diff -Nru gawk-3.1.8+dfsg/ABOUT-NLS gawk-4.0.1+dfsg/ABOUT-NLS --- gawk-3.1.8+dfsg/ABOUT-NLS 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/ABOUT-NLS 2010-12-22 19:09:06.000000000 +0000 @@ -18,35 +18,7 @@ available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. - When reporting bugs in the `intl/' directory or bugs which may be -related to internationalization, you should tell about the version of -`gettext' which is used. The information can be found in the -`intl/VERSION' file, in internationalized packages. - -1.1 Quick configuration advice -============================== - -If you want to exploit the full power of internationalization, you -should configure it using - - ./configure --with-included-gettext - -to force usage of internationalizing routines provided within this -package, despite the existence of internationalizing capabilities in the -operating system where this package is being installed. So far, only -the `gettext' implementation in the GNU C library version 2 provides as -many features (such as locale alias, message inheritance, automatic -charset conversion or plural form handling) as the implementation here. -It is also not possible to offer this additional functionality on top -of a `catgets' implementation. Future versions of GNU `gettext' will -very likely convey even more functionality. So it might be a good idea -to change to GNU `gettext' as soon as possible. - - So you need _not_ provide this option if you are using GNU libc 2 or -you have installed a recent copy of the GNU gettext package with the -included `libintl'. - -1.2 INSTALL Matters +1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs @@ -56,36 +28,19 @@ By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already -provides the GNU `gettext' functions. If not, the included GNU -`gettext' library will be used. This library is wholly contained -within this package, usually in the `intl/' subdirectory, so prior -installation of the GNU `gettext' package is _not_ required. -Installers may use special options at configuration time for changing -the default behaviour. The commands: +provides the GNU `gettext' functions. Installers may use special +options at configuration time for changing the default behaviour. The +command: - ./configure --with-included-gettext ./configure --disable-nls -will, respectively, bypass any pre-existing `gettext' to use the -internationalizing routines provided within this package, or else, -_totally_ disable translation of messages. +will _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will -probably detect the previously built and installed `libintl.a' file and -will decide to use this. This might not be desirable. You should use -the more recent version of the GNU `gettext' library. I.e. if the file -`intl/VERSION' shows that the library which comes with this package is -more recent, you should use - - ./configure --with-included-gettext - -to prevent auto-detection. - - The configuration process will not test for the `catgets' function -and therefore it will not be used. The reason is that even an -emulation of `gettext' on top of `catgets' could not provide all the -extensions of the GNU `gettext' library. +probably detect the previously built and installed `libintl' library +and will decide to use it. If not, you may have to to use the +`--with-libintl-prefix' option to tell `configure' where to look for it. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless @@ -96,7 +51,7 @@ `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. -1.3 Using This Package +1.2 Using This Package ====================== As a user, if your language has been installed for this package, you @@ -148,7 +103,7 @@ to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. -1.4 Translating Teams +1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested @@ -177,859 +132,1118 @@ the terminology in use. Proven linguistic skills are praised more than programming skills, here. -1.5 Available Packages +1.4 Available Packages ====================== Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of November -2007. The matrix shows, in regard of each package, for which languages +matrix shows the current state of internationalization, as of June +2010. 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 af am ar az be bg bs ca cs cy da de el en en_GB eo - +----------------------------------------------------+ - Compendium | [] [] [] [] | - a2ps | [] [] [] [] [] | - aegis | () | - ant-phone | () | - anubis | [] | - ap-utils | | - aspell | [] [] [] [] [] | - bash | [] | - bfd | | - bibshelf | [] | - binutils | | - bison | [] [] | - bison-runtime | [] | - bluez-pin | [] [] [] [] [] | - cflow | [] | - clisp | [] [] [] | - console-tools | [] [] | - coreutils | [] [] [] [] | - cpio | | - cpplib | [] [] [] | - cryptonit | [] | - dialog | | - diffutils | [] [] [] [] [] [] | - doodle | [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] | - fetchmail | [] [] () [] [] | - findutils | [] | - findutils_stable | [] [] [] | - flex | [] [] [] | - fslint | | - gas | | - gawk | [] [] [] | - gcal | [] | - gcc | [] | - gettext-examples | [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] | - gettext-tools | [] [] | - gip | [] | - gliv | [] [] | - glunarclock | [] | - gmult | [] [] | - gnubiff | () | - gnucash | [] [] () () [] | - gnuedu | | - gnulib | [] | - gnunet | | - gnunet-gtk | | - gnutls | [] | - gpe-aerial | [] [] | - gpe-beam | [] [] | - gpe-calendar | | - gpe-clock | [] [] | - gpe-conf | [] [] | - gpe-contacts | | - gpe-edit | [] | - gpe-filemanager | | - gpe-go | [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] | - gpe-package | | - gpe-sketchbook | [] [] | - gpe-su | [] [] | - gpe-taskmanager | [] [] | - gpe-timesheet | [] | - gpe-today | [] [] | - gpe-todo | | - gphoto2 | [] [] [] [] | - gprof | [] [] | - gpsdrive | | - gramadoir | [] [] | - grep | [] [] | - gretl | () | - gsasl | | - gss | | - gst-plugins-bad | [] [] | - gst-plugins-base | [] [] | - gst-plugins-good | [] [] [] | - gst-plugins-ugly | [] [] | - gstreamer | [] [] [] [] [] [] [] | - gtick | () | - gtkam | [] [] [] [] | - gtkorphan | [] [] | - gtkspell | [] [] [] [] | - gutenprint | [] | - hello | [] [] [] [] [] | - herrie | [] | - hylafax | | - idutils | [] [] | - indent | [] [] [] [] | - iso_15924 | | - iso_3166 | [] [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | [] [] [] | - iso_639 | [] [] [] [] | - jpilot | [] | - jtag | | - jwhois | | - kbd | [] [] [] [] | - keytouch | [] [] | - keytouch-editor | [] | - keytouch-keyboa... | [] | - latrine | () | - ld | [] | - leafpad | [] [] [] [] [] | - libc | [] [] [] [] | - libexif | [] | - libextractor | [] | - libgpewidget | [] [] [] | - libgpg-error | [] | - libgphoto2 | [] [] | - libgphoto2_port | [] [] | - libgsasl | | - libiconv | [] [] | - libidn | [] [] [] | - lifelines | [] () | - lilypond | [] | - lingoteach | | - lprng | | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailfromd | | - mailutils | [] | - make | [] [] | - man-db | [] [] [] | - minicom | [] [] [] | - nano | [] [] [] | - opcodes | [] | - parted | [] [] | - pilot-qof | | - popt | [] [] [] | - psmisc | [] | - pwdutils | | - qof | | - radius | [] | - recode | [] [] [] [] [] [] | - rpm | [] | - screem | | - scrollkeeper | [] [] [] [] [] [] [] [] | - sed | [] [] [] | - shared-mime-info | [] [] [] [] () [] [] [] | - sharutils | [] [] [] [] [] [] | - shishi | | - skencil | [] () | - solfege | | - soundtracker | [] [] | - sp | [] | - system-tools-ba... | [] [] [] [] [] [] [] [] [] | - tar | [] [] | - texinfo | [] [] [] | - tin | () () | - tuxpaint | [] [] [] [] [] [] | - unicode-han-tra... | | - unicode-transla... | | - util-linux | [] [] [] [] | - util-linux-ng | [] [] [] [] | - vorbis-tools | [] | - wastesedge | () | - wdiff | [] [] [] [] | - wget | [] [] [] | - xchat | [] [] [] [] [] [] [] | - xkeyboard-config | [] | - xpad | [] [] [] | - +----------------------------------------------------+ - af am ar az be bg bs ca cs cy da de el en en_GB eo - 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18 - - es et eu fa fi fr ga gl gu he hi hr hu id is it + Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ - Compendium | [] [] [] [] [] | - a2ps | [] [] [] () | + a2ps | [] [] | aegis | | - ant-phone | [] | - anubis | [] | - ap-utils | [] [] | - aspell | [] [] [] | - bash | [] | - bfd | [] [] | - bibshelf | [] [] [] | - binutils | [] [] [] | - bison | [] [] [] [] [] [] | - bison-runtime | [] [] [] [] [] | - bluez-pin | [] [] [] [] [] | - cflow | [] | - clisp | [] [] | - console-tools | | - coreutils | [] [] [] [] [] [] | - cpio | [] [] [] | - cpplib | [] [] | - cryptonit | [] | - dialog | [] [] [] | - diffutils | [] [] [] [] [] [] [] [] [] | - doodle | [] [] | - e2fsprogs | [] [] [] | - enscript | [] [] [] | - fetchmail | [] | - findutils | [] [] [] | - findutils_stable | [] [] [] [] | - flex | [] [] [] | - fslint | | - gas | [] [] | - gawk | [] [] [] [] () | - gcal | [] [] | - gcc | [] | - gettext-examples | [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] | - gettext-tools | [] [] [] [] | - gip | [] [] [] [] | - gliv | () | - glunarclock | [] [] [] | - gmult | [] [] [] | - gnubiff | () () | - gnucash | () () () | - gnuedu | [] | - gnulib | [] [] [] | - gnunet | | - gnunet-gtk | | - gnutls | | - gpe-aerial | [] [] | - gpe-beam | [] [] | - gpe-calendar | | - gpe-clock | [] [] [] [] | - gpe-conf | [] | - gpe-contacts | [] [] | - gpe-edit | [] [] [] [] | - gpe-filemanager | [] | - gpe-go | [] [] [] | - gpe-login | [] [] [] | - gpe-ownerinfo | [] [] [] [] [] | - gpe-package | [] | - gpe-sketchbook | [] [] | - gpe-su | [] [] [] [] | - gpe-taskmanager | [] [] [] | - gpe-timesheet | [] [] [] [] | - gpe-today | [] [] [] [] | - gpe-todo | [] | - gphoto2 | [] [] [] [] [] | - gprof | [] [] [] [] [] | - gpsdrive | [] | - gramadoir | [] [] | - grep | [] [] [] | - gretl | [] [] [] () | - gsasl | [] [] | - gss | [] [] | - gst-plugins-bad | [] [] [] [] | - gst-plugins-base | [] [] [] [] | - gst-plugins-good | [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] | - gstreamer | [] [] [] | - gtick | [] [] [] | - gtkam | [] [] [] [] | - gtkorphan | [] [] | - gtkspell | [] [] [] [] [] [] [] | - gutenprint | [] | - hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | - herrie | [] | - hylafax | | - idutils | [] [] [] [] [] | - indent | [] [] [] [] [] [] [] [] [] [] | - iso_15924 | [] | - iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | [] | - iso_4217 | [] [] [] [] [] [] | - iso_639 | [] [] [] [] [] [] | - jpilot | [] [] | - jtag | [] | - jwhois | [] [] [] [] [] | - kbd | [] [] | - keytouch | [] [] [] | - keytouch-editor | [] | - keytouch-keyboa... | [] [] | - latrine | [] [] | - ld | [] [] [] [] | - leafpad | [] [] [] [] [] [] | - libc | [] [] [] [] [] | - libexif | [] | - libextractor | [] | - libgpewidget | [] [] [] [] [] | - libgpg-error | [] | - libgphoto2 | [] [] [] | - libgphoto2_port | [] [] | - libgsasl | [] [] | - libiconv | [] [] [] | - libidn | [] [] | - lifelines | () | - lilypond | [] [] [] | - lingoteach | [] [] [] | - lprng | | - lynx | [] [] [] | - m4 | [] [] [] [] | - mailfromd | | - mailutils | [] [] | - make | [] [] [] [] [] [] [] [] | - man-db | [] | - minicom | [] [] [] [] | - nano | [] [] [] [] [] [] [] | - opcodes | [] [] [] [] | - parted | [] [] [] | - pilot-qof | | - popt | [] [] [] [] | - psmisc | [] [] | - pwdutils | | - qof | [] | - radius | [] [] | - recode | [] [] [] [] [] [] [] [] | - rpm | [] [] | - screem | | - scrollkeeper | [] [] [] | - sed | [] [] [] [] [] | - shared-mime-info | [] [] [] [] [] [] | - sharutils | [] [] [] [] [] [] [] [] | - shishi | [] | - skencil | [] [] | - solfege | [] | - soundtracker | [] [] [] | - sp | [] | - system-tools-ba... | [] [] [] [] [] [] [] [] [] | - tar | [] [] [] [] [] | - texinfo | [] [] [] | - tin | [] () | - tuxpaint | [] [] | - unicode-han-tra... | | - unicode-transla... | [] [] | - util-linux | [] [] [] [] [] [] [] | - util-linux-ng | [] [] [] [] [] [] [] | - vorbis-tools | | - wastesedge | () | - wdiff | [] [] [] [] [] [] [] [] | - wget | [] [] [] [] [] [] [] [] | - xchat | [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] | - xpad | [] [] [] | - +--------------------------------------------------+ - es et eu fa fi fr ga gl gu he hi hr hu id is it - 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52 - - ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn - +--------------------------------------------------+ - Compendium | [] | - a2ps | () [] [] | - aegis | () | - ant-phone | [] | - anubis | [] [] [] | - ap-utils | [] | - aspell | [] [] | - bash | [] | + ant-phone | | + anubis | | + aspell | [] [] | + bash | | bfd | | - bibshelf | [] | + bibshelf | [] | binutils | | - bison | [] [] [] | - bison-runtime | [] [] [] | - bluez-pin | [] [] [] | + bison | | + bison-runtime | [] | + bluez-pin | [] [] | + bombono-dvd | | + buzztard | | cflow | | - clisp | [] | - console-tools | | - coreutils | [] | - cpio | [] | - cpplib | [] | - cryptonit | [] | - dialog | [] [] | - diffutils | [] [] [] | + clisp | | + coreutils | [] [] | + cpio | | + cppi | | + cpplib | [] | + cryptsetup | | + dfarc | | + dialog | [] [] | + dico | | + diffutils | [] | + dink | | doodle | | - e2fsprogs | [] | - enscript | [] | - fetchmail | [] [] | - findutils | [] | - findutils_stable | [] | - flex | [] [] | - fslint | | + e2fsprogs | [] | + enscript | [] | + exif | | + fetchmail | [] | + findutils | [] | + flex | [] | + freedink | | gas | | - gawk | [] [] | - gcal | | + gawk | [] [] | + gcal | [] | gcc | | - gettext-examples | [] [] [] | - gettext-runtime | [] [] [] | - gettext-tools | [] [] | - gip | [] [] | - gliv | [] | - glunarclock | [] [] | - gmult | [] [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] | + gettext-tools | [] [] | + gip | [] | + gjay | | + gliv | [] | + glunarclock | [] [] | gnubiff | | - gnucash | () () () | + gnucash | [] | gnuedu | | - gnulib | [] [] | + gnulib | | gnunet | | gnunet-gtk | | - gnutls | [] | - gpe-aerial | [] | - gpe-beam | [] | - gpe-calendar | [] | - gpe-clock | [] [] [] | - gpe-conf | [] [] [] | - gpe-contacts | [] | - gpe-edit | [] [] [] | - gpe-filemanager | [] [] | - gpe-go | [] [] [] | - gpe-login | [] [] [] | - gpe-ownerinfo | [] [] | - gpe-package | [] [] | - gpe-sketchbook | [] [] | - gpe-su | [] [] [] | - gpe-taskmanager | [] [] [] [] | - gpe-timesheet | [] | - gpe-today | [] [] | - gpe-todo | [] | - gphoto2 | [] [] | - gprof | [] | - gpsdrive | [] | - gramadoir | () | - grep | [] [] | - gretl | | - gsasl | [] | + gnutls | | + gold | | + gpe-aerial | | + gpe-beam | | + gpe-bluetooth | | + gpe-calendar | | + gpe-clock | [] | + gpe-conf | | + gpe-contacts | | + gpe-edit | | + gpe-filemanager | | + gpe-go | | + gpe-login | | + gpe-ownerinfo | [] | + gpe-package | | + gpe-sketchbook | | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] | + gpe-today | [] | + gpe-todo | | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | [] [] | + gsasl | | gss | | - gst-plugins-bad | [] | - gst-plugins-base | [] | - gst-plugins-good | [] | - gst-plugins-ugly | [] | - gstreamer | [] | - gtick | [] | - gtkam | [] [] | - gtkorphan | [] | - gtkspell | [] [] | - gutenprint | [] | - hello | [] [] [] [] [] [] [] | - herrie | [] | + gst-plugins-bad | [] | + gst-plugins-base | [] | + gst-plugins-good | [] | + gst-plugins-ugly | [] | + gstreamer | [] [] [] | + gtick | | + gtkam | [] | + gtkorphan | [] | + gtkspell | [] [] [] | + gutenprint | | + hello | [] | + help2man | | hylafax | | - idutils | [] | - indent | [] [] | - iso_15924 | [] | - iso_3166 | [] [] [] [] [] [] [] [] | - iso_3166_2 | [] | - iso_4217 | [] [] [] | - iso_639 | [] [] [] [] | - jpilot | () () | - jtag | | - jwhois | [] | - kbd | [] | - keytouch | [] | - keytouch-editor | [] | - keytouch-keyboa... | | - latrine | [] | - ld | | - leafpad | [] [] | - libc | [] [] [] | - libexif | | + idutils | | + indent | [] [] | + iso_15924 | | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | | + iso_639 | [] [] [] [] | + iso_639_3 | | + jwhois | | + kbd | | + keytouch | [] | + keytouch-editor | | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | | + ld | [] | + leafpad | [] [] | + libc | [] [] | + libexif | () | libextractor | | - libgpewidget | [] | + libgnutls | | + libgpewidget | | libgpg-error | | - libgphoto2 | [] | - libgphoto2_port | [] | - libgsasl | [] | - libiconv | [] | - libidn | [] [] | - lifelines | [] | - lilypond | [] | - lingoteach | [] | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | [] | + libidn | | + lifelines | | + liferea | [] [] | + lilypond | | + linkdr | [] | + lordsawar | | lprng | | - lynx | [] [] | - m4 | [] [] | + lynx | [] | + m4 | | mailfromd | | mailutils | | - make | [] [] [] | + make | | man-db | | - minicom | [] | - nano | [] [] [] | - opcodes | [] | - parted | [] [] | - pilot-qof | | - popt | [] [] [] | - psmisc | [] [] [] | + man-db-manpages | | + minicom | | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | | + psmisc | | + pspp | [] | pwdutils | | - qof | | - radius | | - recode | [] | - rpm | [] [] | - screem | [] | - scrollkeeper | [] [] [] [] | - sed | [] [] | - shared-mime-info | [] [] [] [] [] [] [] | - sharutils | [] [] | + radius | [] | + recode | [] [] | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] | + sharutils | [] [] | shishi | | skencil | | - solfege | () () | + solfege | | + solfege-manual | | soundtracker | | - sp | () | - system-tools-ba... | [] [] [] [] | - tar | [] [] [] | - texinfo | [] [] | + sp | | + sysstat | | + tar | [] | + texinfo | | tin | | - tuxpaint | () [] [] | unicode-han-tra... | | unicode-transla... | | - util-linux | [] [] | - util-linux-ng | [] [] | + util-linux-ng | [] | + vice | | + vmm | | vorbis-tools | | - wastesedge | [] | - wdiff | [] [] | - wget | [] [] | - xchat | [] [] [] [] | - xkeyboard-config | [] [] [] | - xpad | [] [] [] | - +--------------------------------------------------+ - ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn - 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6 - - or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta - +--------------------------------------------------+ - Compendium | [] [] [] [] [] | - a2ps | () [] [] [] [] [] [] | - aegis | () () | - ant-phone | [] [] | - anubis | [] [] [] | - ap-utils | () | - aspell | [] [] [] | - bash | [] [] | - bfd | | - bibshelf | [] | - binutils | [] [] | - bison | [] [] [] [] [] | - bison-runtime | [] [] [] [] [] | - bluez-pin | [] [] [] [] [] [] [] [] [] | - cflow | [] | - clisp | [] | - console-tools | [] | - coreutils | [] [] [] [] | - cpio | [] [] [] | - cpplib | [] | - cryptonit | [] [] | - dialog | [] | - diffutils | [] [] [] [] [] [] | - doodle | [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] [] | - fetchmail | [] [] [] | - findutils | [] [] [] | - findutils_stable | [] [] [] [] [] [] | - flex | [] [] [] [] [] | - fslint | [] | - gas | | - gawk | [] [] [] [] | - gcal | [] | - gcc | [] [] | - gettext-examples | [] [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] [] [] | - gettext-tools | [] [] [] [] [] [] [] | - gip | [] [] [] [] | - gliv | [] [] [] [] [] [] | - glunarclock | [] [] [] [] [] [] | - gmult | [] [] [] [] | - gnubiff | () [] | - gnucash | () [] | - gnuedu | | - gnulib | [] [] [] | - gnunet | | - gnunet-gtk | [] | - gnutls | [] [] | - gpe-aerial | [] [] [] [] [] [] [] | - gpe-beam | [] [] [] [] [] [] [] | - gpe-calendar | [] [] [] [] | - gpe-clock | [] [] [] [] [] [] [] [] | - gpe-conf | [] [] [] [] [] [] [] | - gpe-contacts | [] [] [] [] [] | - gpe-edit | [] [] [] [] [] [] [] [] [] | - gpe-filemanager | [] [] | - gpe-go | [] [] [] [] [] [] [] [] | - gpe-login | [] [] [] [] [] [] [] [] | - gpe-ownerinfo | [] [] [] [] [] [] [] [] | - gpe-package | [] [] | - gpe-sketchbook | [] [] [] [] [] [] [] [] | - gpe-su | [] [] [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] [] [] [] | - gpe-timesheet | [] [] [] [] [] [] [] [] | - gpe-today | [] [] [] [] [] [] [] [] | - gpe-todo | [] [] [] [] | - gphoto2 | [] [] [] [] [] [] | - gprof | [] [] [] | - gpsdrive | [] [] | - gramadoir | [] [] | - grep | [] [] [] [] | - gretl | [] [] [] | - gsasl | [] [] [] | - gss | [] [] [] [] | - gst-plugins-bad | [] [] [] | - gst-plugins-base | [] [] | - gst-plugins-good | [] [] | - gst-plugins-ugly | [] [] [] | - gstreamer | [] [] [] [] | - gtick | [] | - gtkam | [] [] [] [] [] | - gtkorphan | [] | - gtkspell | [] [] [] [] [] [] [] [] | - gutenprint | [] | - hello | [] [] [] [] [] [] [] [] | - herrie | [] [] [] | - hylafax | | - idutils | [] [] [] [] [] | - indent | [] [] [] [] [] [] [] | - iso_15924 | | - iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | [] [] [] [] [] [] [] | - iso_639 | [] [] [] [] [] [] [] | - jpilot | | - jtag | [] | - jwhois | [] [] [] [] | - kbd | [] [] [] | - keytouch | [] | - keytouch-editor | [] | - keytouch-keyboa... | [] | - latrine | | - ld | [] | - leafpad | [] [] [] [] [] [] | - libc | [] [] [] [] | - libexif | [] [] | - libextractor | [] [] | - libgpewidget | [] [] [] [] [] [] [] [] | - libgpg-error | [] [] [] | - libgphoto2 | [] | - libgphoto2_port | [] [] [] | - libgsasl | [] [] [] [] | - libiconv | [] [] [] | - libidn | [] [] () | - lifelines | [] [] | - lilypond | | - lingoteach | [] | - lprng | [] | - lynx | [] [] [] | - m4 | [] [] [] [] [] | - mailfromd | [] | - mailutils | [] [] [] | - make | [] [] [] [] | - man-db | [] [] [] [] | - minicom | [] [] [] [] [] | - nano | [] [] [] [] | - opcodes | [] [] | - parted | [] | - pilot-qof | | - popt | [] [] [] [] | - psmisc | [] [] | - pwdutils | [] [] | - qof | [] [] | - radius | [] [] | - recode | [] [] [] [] [] [] [] | - rpm | [] [] [] [] | - screem | | - scrollkeeper | [] [] [] [] [] [] [] | - sed | [] [] [] [] [] [] [] [] [] | - shared-mime-info | [] [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | [] | - skencil | [] [] [] | - solfege | [] | - soundtracker | [] [] | - sp | | - system-tools-ba... | [] [] [] [] [] [] [] [] [] | - tar | [] [] [] [] | - texinfo | [] [] [] [] | - tin | () | - tuxpaint | [] [] [] [] [] [] | - unicode-han-tra... | | - unicode-transla... | | - util-linux | [] [] [] [] | - util-linux-ng | [] [] [] [] | - vorbis-tools | [] | wastesedge | | - wdiff | [] [] [] [] [] [] [] | - wget | [] [] [] [] | - xchat | [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - xpad | [] [] [] | + wdiff | | + wget | [] [] | + wyslij-po | | + xchat | [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] | +--------------------------------------------------+ - or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta - 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3 + af am an ar as ast az be be@latin bg bn_IN bs ca + 6 0 1 2 3 19 1 10 3 28 3 1 38 + + crh cs da de el en en_GB en_ZA eo es et eu fa + +-------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] () | + anubis | [] [] | + aspell | [] [] [] [] [] | + bash | [] [] [] | + bfd | [] | + bibshelf | [] [] [] | + binutils | [] | + bison | [] [] | + bison-runtime | [] [] [] [] | + bluez-pin | [] [] [] [] [] [] | + bombono-dvd | [] | + buzztard | [] [] [] | + cflow | [] [] | + clisp | [] [] [] [] | + coreutils | [] [] [] [] | + cpio | | + cppi | | + cpplib | [] [] [] | + cryptsetup | [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] | + dink | [] [] [] | + doodle | [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] | + exif | () [] [] | + fetchmail | [] [] () [] [] [] | + findutils | [] [] [] | + flex | [] [] | + freedink | [] [] [] | + gas | [] | + gawk | [] [] [] | + gcal | [] | + gcc | [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] [] | + gip | [] [] [] [] | + gjay | [] | + gliv | [] [] [] | + glunarclock | [] [] | + gnubiff | () | + gnucash | [] () () () () | + gnuedu | [] [] | + gnulib | [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] | + gpe-contacts | [] [] [] | + gpe-edit | [] [] | + gpe-filemanager | [] [] [] | + gpe-go | [] [] [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-package | [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] () [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] | + grub | [] [] | + gsasl | [] | + gss | | + gst-plugins-bad | [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] () [] | + gtkam | [] [] () [] [] | + gtkorphan | [] [] [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | [] [] [] | + hello | [] [] [] [] | + help2man | [] | + hylafax | [] [] | + idutils | [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] | + iso_3166 | [] [] [] [] () [] [] [] () | + iso_3166_2 | () | + iso_4217 | [] [] [] () [] [] | + iso_639 | [] [] [] [] () [] [] | + iso_639_3 | [] | + jwhois | [] | + kbd | [] [] [] [] [] | + keytouch | [] [] | + keytouch-editor | [] [] | + keytouch-keyboa... | [] | + klavaro | [] [] [] [] | + latrine | [] () | + ld | [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] () | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] | + libgpg-error | [] [] | + libgphoto2 | [] () | + libgphoto2_port | [] () [] | + libgsasl | | + libiconv | [] [] [] [] [] | + libidn | [] [] [] | + lifelines | [] () | + liferea | [] [] [] [] [] | + lilypond | [] [] [] | + linkdr | [] [] [] | + lordsawar | [] | + lprng | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailfromd | | + mailutils | [] | + make | [] [] [] | + man-db | | + man-db-manpages | | + minicom | [] [] [] [] | + mkisofs | | + myserver | | + nano | [] [] [] | + opcodes | [] [] | + parted | [] [] | + pies | | + popt | [] [] [] [] [] | + psmisc | [] [] [] | + pspp | [] | + pwdutils | [] | + radius | [] | + recode | [] [] [] [] [] [] | + rosegarden | () () () | + rpm | [] [] [] | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | | + skencil | [] () [] | + solfege | [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] [] | + sp | [] | + sysstat | [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + tin | [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] | + vice | () () | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] [] | + wyslij-po | | + xchat | [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] [] | + +-------------------------------------------------+ + crh cs da de el en en_GB en_ZA eo es et eu fa + 5 64 105 117 18 1 8 0 28 89 18 19 0 + + fi fr ga gl gu he hi hr hu hy id is it ja ka kn + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | [] [] | + ant-phone | [] [] | + anubis | [] [] [] [] | + aspell | [] [] [] [] | + bash | [] [] [] [] | + bfd | [] [] [] | + bibshelf | [] [] [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] | + bison-runtime | [] [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + bombono-dvd | [] | + buzztard | [] | + cflow | [] [] [] | + clisp | [] | + coreutils | [] [] [] [] [] | + cpio | [] [] [] [] | + cppi | [] [] | + cpplib | [] [] [] | + cryptsetup | [] [] [] | + dfarc | [] [] [] | + dialog | [] [] [] [] [] [] [] | + dico | | + diffutils | [] [] [] [] [] [] [] [] [] | + dink | [] | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + exif | [] [] [] [] [] [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] | + freedink | [] [] [] | + gas | [] [] | + gawk | [] [] [] [] () [] | + gcal | [] | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] [] | + gip | [] [] [] [] [] [] | + gjay | [] | + gliv | [] () | + glunarclock | [] [] [] [] | + gnubiff | () [] () | + gnucash | () () () () () [] | + gnuedu | [] [] | + gnulib | [] [] [] [] [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gold | [] [] | + gpe-aerial | [] [] [] | + gpe-beam | [] [] [] [] | + gpe-bluetooth | [] [] [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] [] | + gpe-go | [] [] [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-package | [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] [] [] [] [] | + gprof | [] [] [] [] | + gpsdrive | [] [] [] | + gramadoir | [] [] [] | + grep | [] [] | + grub | [] [] [] [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] [] [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] [] [] | + gtkam | [] [] [] [] [] | + gtkorphan | [] [] [] | + gtkspell | [] [] [] [] [] [] [] [] [] | + gutenprint | [] [] [] [] | + hello | [] [] [] | + help2man | [] [] | + hylafax | [] | + idutils | [] [] [] [] [] [] | + indent | [] [] [] [] [] [] [] [] | + iso_15924 | [] () [] [] | + iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | () [] [] [] | + iso_4217 | [] () [] [] [] [] | + iso_639 | [] () [] [] [] [] [] [] [] | + iso_639_3 | () [] [] | + jwhois | [] [] [] [] [] | + kbd | [] [] | + keytouch | [] [] [] [] [] [] | + keytouch-editor | [] [] [] [] [] | + keytouch-keyboa... | [] [] [] [] [] | + klavaro | [] [] | + latrine | [] [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] [] () | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | | + libgnutls | [] [] | + libgpewidget | [] [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] [] | + libidn | [] [] [] [] | + lifelines | () | + liferea | [] [] [] [] | + lilypond | [] [] | + linkdr | [] [] [] [] [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] [] [] | + m4 | [] [] [] [] [] [] | + mailfromd | | + mailutils | [] [] | + make | [] [] [] [] [] [] [] [] [] | + man-db | [] [] | + man-db-manpages | [] | + minicom | [] [] [] [] [] | + mkisofs | [] [] [] [] | + myserver | | + nano | [] [] [] [] [] [] | + opcodes | [] [] [] [] | + parted | [] [] [] [] | + pies | | + popt | [] [] [] [] [] [] [] [] [] | + psmisc | [] [] [] | + pspp | | + pwdutils | [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + rosegarden | () () () () () | + rpm | [] [] | + rush | | + sarg | [] | + screem | [] [] | + scrollkeeper | [] [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] [] [] [] | + shishi | [] | + skencil | [] | + solfege | [] [] [] [] | + solfege-manual | [] [] | + soundtracker | [] [] | + sp | [] () | + sysstat | [] [] [] [] [] | + tar | [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + tin | [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux-ng | [] [] [] [] [] [] | + vice | () () () | + vmm | [] | + vorbis-tools | [] | + wastesedge | () () | + wdiff | [] | + wget | [] [] [] [] [] [] [] [] | + wyslij-po | [] [] [] | + xchat | [] [] [] [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] [] | + +----------------------------------------------------+ + fi fr ga gl gu he hi hr hu hy id is it ja ka kn + 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 + + ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne + +-----------------------------------------------+ + a2ps | [] | + aegis | | + ant-phone | | + anubis | [] [] | + aspell | [] | + bash | | + bfd | | + bibshelf | [] [] | + binutils | | + bison | [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] | + bombono-dvd | | + buzztard | | + cflow | | + clisp | | + coreutils | [] | + cpio | | + cppi | | + cpplib | | + cryptsetup | | + dfarc | [] | + dialog | [] [] [] [] [] | + dico | | + diffutils | [] [] | + dink | | + doodle | | + e2fsprogs | | + enscript | | + exif | [] | + fetchmail | | + findutils | | + flex | | + freedink | [] | + gas | | + gawk | | + gcal | | + gcc | | + gettext-examples | [] [] [] [] | + gettext-runtime | [] | + gettext-tools | [] | + gip | [] [] | + gjay | | + gliv | | + glunarclock | [] | + gnubiff | | + gnucash | () () () () | + gnuedu | | + gnulib | | + gnunet | | + gnunet-gtk | | + gnutls | [] | + gold | | + gpe-aerial | [] | + gpe-beam | [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] | + gpe-clock | [] [] [] [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-filemanager | [] [] | + gpe-go | [] [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | | + gramadoir | | + grep | | + grub | | + gsasl | | + gss | | + gst-plugins-bad | [] [] [] [] | + gst-plugins-base | [] [] | + gst-plugins-good | [] [] | + gst-plugins-ugly | [] [] [] [] [] | + gstreamer | | + gtick | | + gtkam | [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | | + hello | [] [] [] | + help2man | | + hylafax | | + idutils | | + indent | | + iso_15924 | [] [] | + iso_3166 | [] [] () [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] [] | + iso_639 | [] [] | + iso_639_3 | [] | + jwhois | [] | + kbd | | + keytouch | [] | + keytouch-editor | [] | + keytouch-keyboa... | [] | + klavaro | [] | + latrine | [] | + ld | | + leafpad | [] [] [] | + libc | [] | + libexif | | + libextractor | | + libgnutls | [] | + libgpewidget | [] [] | + libgpg-error | | + libgphoto2 | | + libgphoto2_port | | + libgsasl | | + libiconv | | + libidn | | + lifelines | | + liferea | | + lilypond | | + linkdr | | + lordsawar | | + lprng | | + lynx | | + m4 | | + mailfromd | | + mailutils | | + make | [] | + man-db | | + man-db-manpages | | + minicom | [] | + mkisofs | | + myserver | | + nano | [] [] | + opcodes | | + parted | | + pies | | + popt | [] [] [] | + psmisc | | + pspp | | + pwdutils | | + radius | | + recode | | + rosegarden | | + rpm | | + rush | | + sarg | | + screem | | + scrollkeeper | [] [] | + sed | | + sharutils | | + shishi | | + skencil | | + solfege | [] | + solfege-manual | | + soundtracker | | + sp | | + sysstat | [] | + tar | [] | + texinfo | [] | + tin | | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | | + vice | | + vmm | | + vorbis-tools | | + wastesedge | | + wdiff | | + wget | [] | + wyslij-po | | + xchat | [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +-----------------------------------------------+ + ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne + 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 + + nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + +---------------------------------------------------+ + a2ps | [] [] [] [] [] [] [] [] | + aegis | [] [] [] | + ant-phone | [] [] | + anubis | [] [] [] | + aspell | [] [] [] [] [] | + bash | [] [] | + bfd | [] | + bibshelf | [] [] | + binutils | [] [] | + bison | [] [] [] | + bison-runtime | [] [] [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + bombono-dvd | [] () | + buzztard | [] [] | + cflow | [] | + clisp | [] [] | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] | + cppi | [] | + cpplib | [] | + cryptsetup | [] | + dfarc | [] | + dialog | [] [] [] [] | + dico | [] | + diffutils | [] [] [] [] [] [] | + dink | () | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] [] | + exif | [] [] [] () [] | + fetchmail | [] [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] [] | + freedink | [] [] | + gas | | + gawk | [] [] [] [] | + gcal | | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] | + gip | [] [] [] [] [] | + gjay | | + gliv | [] [] [] [] [] [] | + glunarclock | [] [] [] [] [] | + gnubiff | [] () | + gnucash | [] () () () | + gnuedu | [] | + gnulib | [] [] [] [] | + gnunet | | + gnunet-gtk | | + gnutls | [] [] | + gold | | + gpe-aerial | [] [] [] [] [] [] [] | + gpe-beam | [] [] [] [] [] [] [] | + gpe-bluetooth | [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] [] [] [] [] | + gpe-conf | [] [] [] [] [] [] [] | + gpe-contacts | [] [] [] [] [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] [] | + gpe-go | [] [] [] [] [] [] [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] [] [] [] [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] [] [] [] [] [] | + gpe-su | [] [] [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] [] | + gpe-todo | [] [] [] [] [] | + gphoto2 | [] [] [] [] [] [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] | + gramadoir | [] [] | + grep | [] [] [] [] | + grub | [] [] [] | + gsasl | [] [] [] [] | + gss | [] [] [] | + gst-plugins-bad | [] [] [] [] [] [] | + gst-plugins-base | [] [] [] [] [] | + gst-plugins-good | [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] [] [] | + gtkam | [] [] [] [] [] [] | + gtkorphan | [] | + gtkspell | [] [] [] [] [] [] [] [] [] [] | + gutenprint | [] [] | + hello | [] [] [] [] | + help2man | [] [] | + hylafax | [] | + idutils | [] [] [] [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | [] [] [] [] | + iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | + iso_3166_2 | [] [] [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] [] [] [] | + iso_639_3 | [] [] | + jwhois | [] [] [] [] | + kbd | [] [] [] | + keytouch | [] [] [] | + keytouch-editor | [] [] [] | + keytouch-keyboa... | [] [] [] | + klavaro | [] [] | + latrine | [] [] | + ld | | + leafpad | [] [] [] [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] () [] | + libextractor | | + libgnutls | [] [] | + libgpewidget | [] [] [] | + libgpg-error | [] [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] [] [] [] | + libgsasl | [] [] [] [] [] | + libiconv | [] [] [] [] [] | + libidn | [] [] | + lifelines | [] [] | + liferea | [] [] [] [] [] () () [] | + lilypond | [] | + linkdr | [] [] [] | + lordsawar | | + lprng | [] | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | [] | + mailutils | [] | + make | [] [] [] [] | + man-db | [] [] [] | + man-db-manpages | [] [] [] | + minicom | [] [] [] [] | + mkisofs | [] [] [] | + myserver | | + nano | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + pies | [] | + popt | [] [] [] [] | + psmisc | [] [] [] | + pspp | [] [] | + pwdutils | [] | + radius | [] [] [] | + recode | [] [] [] [] [] [] [] [] | + rosegarden | () () | + rpm | [] [] [] | + rush | [] [] | + sarg | | + screem | | + scrollkeeper | [] [] [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] | + skencil | [] [] | + solfege | [] [] [] [] | + solfege-manual | [] [] [] | + soundtracker | [] | + sp | | + sysstat | [] [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + tin | [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux-ng | [] [] [] [] [] | + vice | [] | + vmm | [] | + vorbis-tools | [] [] | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] [] [] [] [] [] | + wyslij-po | [] [] [] | + xchat | [] [] [] [] [] [] [] [] [] | + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + +---------------------------------------------------+ + nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr + 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 - tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu + sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ - Compendium | [] [] [] [] | 19 - a2ps | [] [] [] | 19 - aegis | [] | 1 - ant-phone | [] [] | 6 - anubis | [] [] [] | 11 - ap-utils | () [] | 4 - aspell | [] [] [] | 16 - bash | [] | 6 - bfd | | 2 - bibshelf | [] | 7 - binutils | [] [] [] [] | 9 - bison | [] [] [] [] | 20 - bison-runtime | [] [] [] [] | 18 - bluez-pin | [] [] [] [] [] [] | 28 - cflow | [] [] | 5 - clisp | | 9 - console-tools | [] [] | 5 - coreutils | [] [] [] | 18 - cpio | [] [] [] [] | 11 - cpplib | [] [] [] [] [] | 12 - cryptonit | [] | 6 - dialog | [] [] [] | 9 - diffutils | [] [] [] [] [] | 29 - doodle | [] | 6 - e2fsprogs | [] [] | 10 - enscript | [] [] [] | 16 - fetchmail | [] [] | 12 - findutils | [] [] [] | 11 - findutils_stable | [] [] [] [] | 18 - flex | [] [] | 15 - fslint | [] | 2 - gas | [] | 3 - gawk | [] [] [] | 16 - gcal | [] | 5 - gcc | [] [] [] | 7 - gettext-examples | [] [] [] [] [] [] | 29 - gettext-runtime | [] [] [] [] [] [] | 28 - gettext-tools | [] [] [] [] [] | 20 - gip | [] [] | 13 - gliv | [] [] | 11 - glunarclock | [] [] [] | 15 - gmult | [] [] [] [] | 16 - gnubiff | [] | 2 - gnucash | () [] | 5 - gnuedu | [] | 2 - gnulib | [] | 10 - gnunet | | 0 - gnunet-gtk | [] [] | 3 - gnutls | | 4 - gpe-aerial | [] [] | 14 - gpe-beam | [] [] | 14 - gpe-calendar | [] [] | 7 - gpe-clock | [] [] [] [] | 21 - gpe-conf | [] [] [] | 16 - gpe-contacts | [] [] | 10 - gpe-edit | [] [] [] [] [] | 22 - gpe-filemanager | [] [] | 7 - gpe-go | [] [] [] [] | 19 - gpe-login | [] [] [] [] [] | 21 - gpe-ownerinfo | [] [] [] [] | 21 - gpe-package | [] | 6 - gpe-sketchbook | [] [] | 16 - gpe-su | [] [] [] [] | 21 - gpe-taskmanager | [] [] [] [] | 21 - gpe-timesheet | [] [] [] [] | 18 - gpe-today | [] [] [] [] [] | 21 - gpe-todo | [] [] | 8 - gphoto2 | [] [] [] [] | 21 - gprof | [] [] | 13 - gpsdrive | [] | 5 - gramadoir | [] | 7 - grep | [] | 12 - gretl | | 6 - gsasl | [] [] [] | 9 - gss | [] | 7 - gst-plugins-bad | [] [] [] | 13 - gst-plugins-base | [] [] | 11 - gst-plugins-good | [] [] [] [] [] | 16 - gst-plugins-ugly | [] [] [] | 13 - gstreamer | [] [] [] | 18 - gtick | [] [] | 7 - gtkam | [] | 16 - gtkorphan | [] | 7 - gtkspell | [] [] [] [] [] [] | 27 - gutenprint | | 4 - hello | [] [] [] [] [] | 38 - herrie | [] [] | 8 - hylafax | | 0 - idutils | [] [] | 15 - indent | [] [] [] [] [] | 28 - iso_15924 | [] [] | 4 - iso_3166 | [] [] [] [] [] [] [] [] [] | 54 - iso_3166_2 | [] [] | 4 - iso_4217 | [] [] [] [] [] | 24 - iso_639 | [] [] [] [] [] | 26 - jpilot | [] [] [] [] | 7 - jtag | [] | 3 - jwhois | [] [] [] | 13 - kbd | [] [] [] | 13 - keytouch | [] | 8 - keytouch-editor | [] | 5 - keytouch-keyboa... | [] | 5 - latrine | [] [] | 5 - ld | [] [] [] [] | 10 - leafpad | [] [] [] [] [] | 24 - libc | [] [] [] | 19 - libexif | [] | 5 - libextractor | [] | 5 - libgpewidget | [] [] [] | 20 - libgpg-error | [] | 6 - libgphoto2 | [] [] | 9 - libgphoto2_port | [] [] [] | 11 - libgsasl | [] | 8 - libiconv | [] [] | 11 - libidn | [] [] | 11 - lifelines | | 4 - lilypond | [] | 6 - lingoteach | [] | 6 - lprng | [] | 2 - lynx | [] [] [] | 15 - m4 | [] [] [] | 18 - mailfromd | [] [] | 3 - mailutils | [] [] | 8 - make | [] [] [] | 20 - man-db | [] | 9 - minicom | [] | 14 - nano | [] [] [] | 20 - opcodes | [] [] | 10 - parted | [] [] [] | 11 - pilot-qof | [] | 1 - popt | [] [] [] [] | 18 - psmisc | [] [] | 10 - pwdutils | [] | 3 - qof | [] | 4 - radius | [] [] | 7 - recode | [] [] [] | 25 - rpm | [] [] [] [] | 13 - screem | [] | 2 - scrollkeeper | [] [] [] [] | 26 - sed | [] [] [] [] | 23 - shared-mime-info | [] [] [] | 29 - sharutils | [] [] [] | 23 - shishi | [] | 3 - skencil | [] | 7 - solfege | [] | 3 - soundtracker | [] [] | 9 - sp | [] | 3 - system-tools-ba... | [] [] [] [] [] [] [] | 38 - tar | [] [] [] | 17 - texinfo | [] [] [] | 15 - tin | | 1 - tuxpaint | [] [] [] | 19 + a2ps | [] [] [] [] [] | 27 + aegis | [] | 9 + ant-phone | [] [] [] [] | 9 + anubis | [] [] [] [] | 15 + aspell | [] [] [] | 20 + bash | [] [] [] | 12 + bfd | [] | 6 + bibshelf | [] [] [] | 16 + binutils | [] [] | 8 + bison | [] [] | 12 + bison-runtime | [] [] [] [] [] [] | 29 + bluez-pin | [] [] [] [] [] [] [] [] | 37 + bombono-dvd | [] | 4 + buzztard | [] | 7 + cflow | [] [] [] | 9 + clisp | | 10 + coreutils | [] [] [] [] | 22 + cpio | [] [] [] [] [] [] | 13 + cppi | [] [] | 5 + cpplib | [] [] [] [] [] [] | 14 + cryptsetup | [] [] | 7 + dfarc | [] | 9 + dialog | [] [] [] [] [] [] [] | 30 + dico | [] | 2 + diffutils | [] [] [] [] [] [] | 30 + dink | | 4 + doodle | [] [] | 7 + e2fsprogs | [] [] [] | 11 + enscript | [] [] [] [] | 17 + exif | [] [] [] | 16 + fetchmail | [] [] [] | 17 + findutils | [] [] [] [] [] | 20 + flex | [] [] [] [] | 15 + freedink | [] | 10 + gas | [] | 4 + gawk | [] [] [] [] | 18 + gcal | [] [] | 5 + gcc | [] [] [] | 7 + gettext-examples | [] [] [] [] [] [] [] | 34 + gettext-runtime | [] [] [] [] [] [] [] | 29 + gettext-tools | [] [] [] [] [] [] | 22 + gip | [] [] [] [] | 22 + gjay | [] | 3 + gliv | [] [] [] | 14 + glunarclock | [] [] [] [] [] | 19 + gnubiff | [] [] | 4 + gnucash | () [] () [] () | 10 + gnuedu | [] [] | 7 + gnulib | [] [] [] [] | 16 + gnunet | [] | 1 + gnunet-gtk | [] [] [] | 5 + gnutls | [] [] [] | 10 + gold | [] | 4 + gpe-aerial | [] [] [] | 18 + gpe-beam | [] [] [] | 19 + gpe-bluetooth | [] [] [] | 13 + gpe-calendar | [] [] [] [] | 12 + gpe-clock | [] [] [] [] [] | 28 + gpe-conf | [] [] [] [] | 20 + gpe-contacts | [] [] [] | 17 + gpe-edit | [] [] [] | 12 + gpe-filemanager | [] [] [] [] | 16 + gpe-go | [] [] [] [] [] | 25 + gpe-login | [] [] [] | 11 + gpe-ownerinfo | [] [] [] [] [] | 25 + gpe-package | [] [] [] | 13 + gpe-sketchbook | [] [] [] | 20 + gpe-su | [] [] [] [] [] | 30 + gpe-taskmanager | [] [] [] [] [] | 29 + gpe-timesheet | [] [] [] [] [] | 25 + gpe-today | [] [] [] [] [] [] | 30 + gpe-todo | [] [] [] [] | 17 + gphoto2 | [] [] [] [] [] | 24 + gprof | [] [] [] | 15 + gpsdrive | [] [] [] | 11 + gramadoir | [] [] [] | 11 + grep | [] [] [] | 10 + grub | [] [] [] | 14 + gsasl | [] [] [] [] | 14 + gss | [] [] [] | 11 + gst-plugins-bad | [] [] [] [] | 26 + gst-plugins-base | [] [] [] [] [] | 24 + gst-plugins-good | [] [] [] [] | 24 + gst-plugins-ugly | [] [] [] [] [] | 29 + gstreamer | [] [] [] [] | 22 + gtick | [] [] [] | 13 + gtkam | [] [] [] | 20 + gtkorphan | [] [] [] | 14 + gtkspell | [] [] [] [] [] [] [] [] [] | 45 + gutenprint | [] | 10 + hello | [] [] [] [] [] [] | 21 + help2man | [] [] | 7 + hylafax | [] | 5 + idutils | [] [] [] [] | 17 + indent | [] [] [] [] [] [] | 30 + iso_15924 | () [] () [] [] | 16 + iso_3166 | [] [] () [] [] () [] [] [] () | 53 + iso_3166_2 | () [] () [] | 9 + iso_4217 | [] () [] [] () [] [] | 26 + iso_639 | [] [] [] () [] () [] [] [] [] | 38 + iso_639_3 | [] () | 8 + jwhois | [] [] [] [] [] | 16 + kbd | [] [] [] [] [] | 15 + keytouch | [] [] [] | 16 + keytouch-editor | [] [] [] | 14 + keytouch-keyboa... | [] [] [] | 14 + klavaro | [] | 11 + latrine | [] [] [] | 10 + ld | [] [] [] [] | 11 + leafpad | [] [] [] [] [] [] | 33 + libc | [] [] [] [] [] | 21 + libexif | [] () | 7 + libextractor | [] | 1 + libgnutls | [] [] [] | 9 + libgpewidget | [] [] [] | 14 + libgpg-error | [] [] [] | 9 + libgphoto2 | [] [] | 8 + libgphoto2_port | [] [] [] [] | 14 + libgsasl | [] [] [] | 13 + libiconv | [] [] [] [] | 21 + libidn | () [] [] | 11 + lifelines | [] | 4 + liferea | [] [] [] | 21 + lilypond | [] | 7 + linkdr | [] [] [] [] [] | 17 + lordsawar | | 1 + lprng | [] | 3 + lynx | [] [] [] [] | 17 + m4 | [] [] [] [] | 19 + mailfromd | [] [] | 3 + mailutils | [] | 5 + make | [] [] [] [] | 21 + man-db | [] [] [] | 8 + man-db-manpages | | 4 + minicom | [] [] | 16 + mkisofs | [] [] | 9 + myserver | | 0 + nano | [] [] [] [] | 21 + opcodes | [] [] [] | 11 + parted | [] [] [] [] [] | 15 + pies | [] [] | 3 + popt | [] [] [] [] [] [] | 27 + psmisc | [] [] | 11 + pspp | | 4 + pwdutils | [] [] | 6 + radius | [] [] | 9 + recode | [] [] [] [] | 28 + rosegarden | () | 0 + rpm | [] [] [] | 11 + rush | [] [] | 4 + sarg | | 1 + screem | [] | 3 + scrollkeeper | [] [] [] [] [] | 27 + sed | [] [] [] [] [] | 30 + sharutils | [] [] [] [] [] | 22 + shishi | [] | 3 + skencil | [] [] | 7 + solfege | [] [] [] [] | 16 + solfege-manual | [] | 8 + soundtracker | [] [] [] | 9 + sp | [] | 3 + sysstat | [] [] | 15 + tar | [] [] [] [] [] [] | 23 + texinfo | [] [] [] [] [] | 17 + tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 - util-linux | [] [] [] | 20 - util-linux-ng | [] [] [] | 20 - vorbis-tools | [] [] | 4 - wastesedge | | 1 - wdiff | [] [] | 23 - wget | [] [] [] | 20 - xchat | [] [] [] [] | 29 - xkeyboard-config | [] [] [] | 14 - xpad | [] [] [] | 15 + util-linux-ng | [] [] [] [] | 20 + vice | () () | 1 + vmm | [] | 4 + vorbis-tools | [] | 6 + wastesedge | | 2 + wdiff | [] [] | 7 + wget | [] [] [] [] [] | 26 + wyslij-po | [] [] | 8 + xchat | [] [] [] [] [] [] | 36 + xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 + xkeyboard-config | [] [] [] | 22 +---------------------------------------------------+ - 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu - 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036 + 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW + 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 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 @@ -1042,12 +1256,12 @@ lag between the mere existence a PO file and its wide availability in a distribution. - If November 2007 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 + If June 2010 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://translationproject.org/extra/matrix.html'. -1.6 Using `gettext' in new packages +1.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to diff -Nru gawk-3.1.8+dfsg/ChangeLog gawk-4.0.1+dfsg/ChangeLog --- gawk-3.1.8+dfsg/ChangeLog 2010-05-06 17:56:59.000000000 +0000 +++ gawk-4.0.1+dfsg/ChangeLog 2012-03-28 20:02:44.000000000 +0000 @@ -1,8086 +1,427 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Fri Apr 30 11:37:54 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * configure.ac: Remove check for libsnprintf. + * getopt.c: Add DJGPP to list of platforms where it's ok + to include . + * awkgram.y, builtin.c, ext.c, mbsupport.h, re.c: Update + copyright year. -Tue Apr 27 22:23:26 2010 Andreas Schwab +2012-03-21 Corinna Vinschen - * builtin.c (do_mktime): Make lint check more sane. - Fix overflow check. Removes GCC warning that Arnold - incorrectly didn't like. + * getopt.c: Add Cygwin to list of platforms where it's ok + to include . -Mon Apr 26 20:16:07 2010 Arnold D. Robbins +2012-03-20 Arnold D. Robbins - * ltmain.sh: Removed. - * builtin.c (do_mktime): Restored old code to match the - documentation. We now have a warning that we just have to - live with. Sigh. Stupid GCC. Added a lint warning though. - (format_tree): More code so that %'d acts like %d on systems - without . - * main.c (main): Add `&& #if defined(HAVE_LOCALE_H)' for - call to setlocale. + Get new getopt to work on Linux and C90 compilers: -Wed Apr 21 23:35:43 2010 Arnold D. Robbins + * getopt.c: Undef ELIDE_CODE for gawk. + (_getopt_internal_r): Init first.needs_free to 0. In test for -W + move executable code to after declarations for C90 compilers. + * getopt1.c: Undef ELIDE_CODE for gawk. - * Makefile.am: Change quoting of -Dargs so that even tcsh - users will be happy. - * regex_internal.c (MAX): Add `#undef MAX', just in case. - * configure.ac: Don't look for libsigsegv on OSF/1, gives - us severe headaches. + Minor bug fix with printf, thanks to John Haque: -Tue Apr 20 12:01:01 2010 Arnold D. Robbins + * builtin.c (format_tree): Initialize base to zero at the top + of the while loop. - * dfa.h, dfa.c: Sync with GNU grep. The long-standing x{0} bug - is now gone. Matching UTF-8 with "." is now much faster. - * re.c (avoid_dfa): Remove call to dfabroken() which is now gone. - * builtin.c (do_mktime): Simply check of values passed in to be - more readable and to avoid a weird compiler warning from GCC. + Getting next tar ball ready: -Fri Apr 16 15:02:26 2010 Arnold D. Robbins + * configure.ac: Remove duplicate check for wcscoll. Thanks + to Stepan Kasal. - * array.c (assoc_lookup): Add cast in error message to turn - off compiler warning. - * dfa.c (is_blank): New function. Use it everywhere instead of - ctype.h `isblank' macro which isn't available universally. +2012-03-16 Arnold D. Robbins -Tue Apr 13 22:36:31 2010 Arnold D. Robbins + * getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c, + regex.c, regex.h, regex_internal.c, regex_internal.h, + regexec.c: Sync with GLIBC, what the heck. - * array.c, awkgram.y, builtin.c, dfa.c, eval.c, ext.c, main.c, - node.c, re.c: Remove old ISxxx and TOxxx macros in favor of - standard versions. ``We're two wild and crazy guys!'' +2012-03-14 Eli Zaretskii -Tue Apr 13 22:07:18 2010 Arnold D. Robbins + * mbsupport.h (btowc): Change for non-DJGPP. + * re.c (dfaerror): Add call to exit for DJGPP. - * getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c, regex.c, - regex.h, regex_internal.c, regex_internal.h, regexec.c: Sync with - glibc. What the heck. +2012-03-14 Arnold D. Robbins -Thu Apr 8 21:33:09 2010 Arnold D. Robbins + * regex_internal.c (re_string_skip_chars): Fix calculation of + remain_len with m.b. chars. Thanks to Stanislav Brabec + . - * dfa.h, dfa.c: All leading indentation is now spaces only. Yet - another sync with grep. +2012-02-28 Arnold D. Robbins -Thu Apr 8 20:45:25 2010 Arnold D. Robbins + * main.c (init_groupset): Make `getgroups' failing a non-fatal + error. After all, what's the big deal? Should help on Plan 9. - Move dfa internals into dfa.c and sync with grep. Avoids VMS and - z/OS compile problems in order to avoid cygwin issue when used - with ligsigsegv. ("Portability? We don't need no stinkin' - portability!") +2012-02-27 Arnold D. Robbins - * dfa.h: Move all the internals into dfa.c. - (dfaalloc, dfamusts, dfabroken): Add declarations. - * dfa.c: Accept all the internals. - (dfaalloc, dfamusts, dfabroken): New functions. - * awk.h (Regexp): Use a `struct dfa *'. - * re.c (make_regexp): Call dfaalloc. Adjust uses of dfareg - in other routines. - (refree): Free the dfa struct too. + * dfa.c (parse_bracket_exp): Revert changes 2012-02-15 to stay + in sync with grep. + * dfa.h (dfarerror): Add __attribute__ from grep. -Tue Apr 6 23:06:55 2010 Arnold D. Robbins +2012-02-15 Arnold D. Robbins - * dfa.h, dfa.c: Further sync with GNU grep for enum change - and other misc changes. + Fix warnings from GCC 4.6.2 -Wall option. -Tue Apr 6 20:13:45 2010 Michal Jaegermann + * awkgram.y (newline_eof): New function to replace body of + NEWLINE_EOF macro. + (yylex): Replace body of NEWLINE_EOF macro. + * dfa.c (parse_bracket_exp): Init variables to zero. + * ext.c (dummy, junk): Remove. + * regex_internal.c (re_string_reconstruct): Remove buf array. It was + set but not used. - * main.c: Wrap declarations and bodies of `catchsegv' and - `catchstackoverflow' in #ifdef HAVE_LIBSIGSEGV to avoid - "not used" warnings. +2012-02-10 Arnold D. Robbins -Tue Apr 6 20:11:47 2010 Arnold D. Robbins + * dfa.c: Sync with GNU grep. - * dfa.h: Move definition of token enum to dfa.c to avoid conflict - with Windows WCHAR introduced by libsigsegv. Thanks to Corinna - Vinschen. - * dfa.c: Enum body here. - (in_coll_range): z/OS fix: Initialize array to all zeros and assign - values instead of putting them into the initializer. Thanks to Dave - Pitts for reporting the problem. +2012-02-07 Arnold D. Robbins -Fri Apr 2 12:32:40 2010 Arnold D. Robbins + * main.c (main): Move init of `output_fp' to before parsing of + program so that error messages from msg.c don't dump core. + Thanks to Michael Haardt . - * dfa.c: Sync with grep 2.6.3. +2012-01-13 Arnold D. Robbins -Wed Mar 31 15:50:34 2010 Arnold D. Robbins + * dfa.c [is_valid_unibtye_character]: Fix from GNU grep to + bug reported by me from Scott Deifik for DJGPP. - * dfa.c (dfaexec): Move decl of `saved_end' up to top of function. - Fixes compilation on C89 compilers. +2012-01-03 Arnold D. Robbins -Mon Mar 29 08:40:29 2010 Arnold D. Robbins + * dfa.c: Sync with GNU grep. - Remove local copy of libsigsegv. Use an external copy if available. +2011-12-31 Arnold D. Robbins - * Makefile.am: Remove SEGVSUBDIR and SEGVINCLUDE. - * configure.ac: Remove previous code that handled the library and use - gl_LIBSIGSEGV library. - * custom.h: Remove code for HAVE_SIGSEGV_H. - * main.c: Move to HAVE_LIBSIGSEGV. - * libsigegv/ : Removed. + * awk.h [STREQ, STREQN]: Remove macros. + * awkgram.y, builtin.c, command.y, debug.c, eval.c, + io.c, msg.c: Change all uses to call strcmp, strncmp. -Mon Mar 29 05:41:35 2010 Corinna Vinschen +2011-12-26 Arnold D. Robbins - * dfa.c: Include hard-locale.h after xalloc.h because it needs - xmalloc. - * hard-locale.h (xmalloc): Remove declaration. - (hard_locale): Cast xmalloc to correct target type. + Finish Rational Range Interpretation (!) -Mon Mar 29 05:38:47 2010 Arnold D. Robbins + * dfa.c (match_mb_charset): Compare wide characters directly + instead of using wcscoll(). + * regexec.c (check_node_accept_byte): Ditto. - * io.c: (two_way_open): In counting down retries, test for > 0 - instead of >= 0 since retries is unsigned. Thanks to Pat Rankin - for noticing. - * configure.ac: Remove use of -export-dynamic on cygwin. + Thanks to Paolo Bonzini for pointing these out. -Thu Mar 25 21:48:13 2010 Arnold D. Robbins +2011-12-06 John Haque - * dfa.c: Sync to grep 2.6.1. That's probably enough for now. + * debug.c (source_find): Fix misplaced call to efree. + * profile.c (redir2str): Add a missing comma in the redirtab array. + * eval.c (r_interpret): Disallow call to exit if currule is undefined. + This avoids the possiblity of running END blocks more than once when + used in a user-defined sorted-in comparision function. + * array.c (sort_user_func): Adjust appropriately. -Wed Mar 24 19:48:01 2010 Arnold D. Robbins +2011-12-06 Arnold D. Robbins - * dfa.c: More sync with grep. + * awk.h, mbsupport.h: Changes for MBS support on DJGPP + and z/OS. + * io.c: Disable pty support on z/OS. -Tue Mar 23 19:42:48 2010 Jeff Chua +2011-11-27 Arnold D. Robbins - * io.c (two_way_open): Bug fix in management of timeout value. + * dfa.c: Sync with GNU grep. + * dfa.h: Add _GL_ATTRIBUTE_PURE macro. Bleah. -Tue Mar 23 19:40:04 2010 Arnold D. Robbins +2011-11-14 John Haque - * dfa.h, dfa.c: Synced with released grep 2.6. Oh Frabjous Day! - Callou! Callay! + * debug.c (set_breakpoint_at): Fix problem with setting + breakpoints in a switch statement. Thanks to Giorgio Palandri + for the bug report. -Mon Mar 22 22:49:44 2010 Arnold D. Robbins +2011-11-14 Arnold D. Robbins - * awkgram.c: Regenerated using bison 2.4.2. + * mbsupport.h: Add check for HAVE_BTOWC, per Pat Rankin. -Fri Mar 19 10:19:20 2010 Arnold D. Robbins +2011-11-12 Eli Zaretskii - * dfa.c: Minor edits for compat with grep. + * mbsupport.h: Additional glop for dfa.c in Windows environment. -Fri Mar 19 09:19:56 2010 Arnold D. Robbins +2011-11-01 Arnold D. Robbins - * io.c (two_way_open): Cleanup new code for socket opens. - * replace.c: Include missing_d/usleep.c based HAVE_USLEEP. - * configure.ac: Add usleep to list of functions to look for. + * dfa.c: Move glop for ! MBS_SUPPORT to ... + * mbsupport.h: ... here. + * replace.c: Include missing_d/wcmisc.c if ! MBS_SUPPORT. + * regex_internal.h: Move include of mbsupport.h up and add + additional checks to avoid inclusion of wctype.h and wchar.h. -Thu Mar 18 23:30:33 2010 Arnold D. Robbins +2011-10-27 Arnold D. Robbins - * dfa.h, dfa.c: Imported from GNU grep and merged. Passes "make test". - * xalloc.h: New file, needed by dfa.c. - * Makefile.am (base_sources ): Added xalloc.h. + * builtin.c (do_strftime): Per Pat Rankin, instead of casting + fclock, use a long variable and check for negative or overflow. -Thu Mar 18 07:29:45 2010 Jeff Chua +2011-10-25 Arnold D. Robbins - * io.c (two_way_open): Make failure to open a socket a non-fatal error. - Allow the amount of time to sleep during socket retries to come from an - undocumented env variable giving time in milliseconds. + * Makefile.am (dist-hook): Use `cd $(srcdir)/pc' so that + `make distcheck' works completely. + * builtin.c (do_strftime): Add cast to long int in check + for fclock < 0 for systems where time_t is unsigned (e.g., VMS). -Mon Mar 8 20:58:05 2010 Paolo Bonzini +2011-10-25 Stefano Lattarini - More fixes from GNU grep. + dist: generated file `version.c' is not removed by "make distclean" - * dfa.c (dfaexec): Remove register keywords. - (FETCH): Use do..while(0) idiom. - (parse_bracket_exp_mb): Return MBCSET. - (in_coll_range): New. - (lex): Assign return value of parse_bracket_exp_mb to lasttok, - return it. Use in_coll_range instead of regcomp/regexec. + * Makefile.am (distcleancheck_listfiles): Define to ignore the + generated `version.c' file. -Mon Mar 8 20:36:35 2010 Jim Meyering +2011-10-24 Arnold D. Robbins - Fixes from GNU grep development version: + * dfa.c (wcscoll): Create for VMS. + * Makefile.am (dist-hook): Run sed scripts to make pc/config.h. - build: avoid shadowing warnings - * dfa.c (match_mb_charset): Rename parameter: s/index/idx/. - (check_matching_with_multibyte_ops, match_anychar): Likewise. +2011-10-24 Eli Zaretskii - build: avoid shadowing warning for unused "rs" - * dfa.c (transit_state): Remove dead stores; - Ignore transit_state_consume_1char return value. + * builtin.c [HAVE_POPEN_H]: Include "popen.h". + * README.git: Update for pc/ systems. - syntax: remove trailing blanks - * dfa.c: Remove trailing blanks, to ease synchronization with grep. +2011-10-21 Arnold D. Robbins - clean-up: limit visibility of an internal function - * dfa.c (match_mb_charset): Declare static. + * Makefile.am (distcleancheck_listfiles): Added, per advice from + Stefano Lattarini . + * dfa.c: Additional faking of mbsupport for systems without it; + mainly VMS. - build: rename local to avoid shadowing global, dfa - * dfa.c (dfamust): Rename parameter: s/dfa/d/. +2011-10-21 Stefano Lattarini -Thu Feb 18 22:44:01 2010 Arnold D. Robbins 0 + * configure.ac (AM_C_PROTOTYPES): Remove call to this macro. + The comments in configure.ac said that the call to AM_C_PROTOTYPES + was needed for dfa.h, synced from GNU grep; but this statement is + not true anymore in grep since commit v2.5.4-24-g9b5e7d4 "replace + AC_CHECK_* with gnulib modules", dating back to 2009-11-26. Also, + the support for automatic de-ANSI-fication has been deprecated in + automake 1.11.2, and will be removed altogether in automake 1.12. + * vms/vms-conf.h (PROTOTYPES, __PROTOTYPES): Remove these #define, + they are not used anymore. + * pc/config.h (PROTOTYPES): Likewise. - * eval.c (push_args): Clear the stack to NULL pointers after mallocing - it. Fixes yesterday's problem when called from a rule. - See test/fcall_exit2.awk. Thanks to Seb . +2011-10-18 Dave Pitts -Wed Feb 17 23:19:32 2010 Arnold D. Robbins + * dfa.c: Move some decls to the top of their functions for + C90 compilers. - * eval.c (pop_fcall): Check that argument on stack is not NULL before - attempting to clear it; add comment explaining it. - (push_args): Set nodes to zero for argument to make sure that values - are NULL for testing later in pop_fcall. See test/fcall_exit.awk. - Thanks to Seb . +2011-10-18 Arnold D. Robbins -Sun Jan 31 22:46:49 2010 Arnold D. Robbins + * builtin.c (do_strftime): Add check for negative / overflowed + time_t value with fatal error. Thanks to Hermann Peifer + for the bug report. + * dfa.c (setbit_wc): Non-MBS version. Add a return false + since VMS compiler doesn't understand that abort doesn't return. - * profile.c (prec_level): Add Node_regex to the switch so that - `! /xxx/' works. Thanks to Hermann Peifer for - reporting the bug. +2011-10-10 Arnold D. Robbins -Thu Jan 28 17:40:14 2010 Arnold D. Robbins + * builtin.c (do_sub): Init textlen to zero to avoid "may be + used unitialized" warning. Thanks to Corinna Vinschen for + pointing this out. + * eval.c (unwind_stack): Add parentheses around condition in while + to avoid overzealous warning from GCC. - * configure, Makefile.am: Updated to Autoconf 2.65 and Automake 1.11.1, - libsigsegv 2.8. +2011-09-30 Eli Zaretskii -Thu Jan 21 23:24:56 2010 Arnold D. Robbins + * io.c (remap_std_file): Fix non-portable code that caused + redirected "print" to fail if a previous read from standard input + returned EOF. Reported by David Millis . + (remap_std_file): Per Eli's suggestion, removed the leading close + of oldfd and will let dup2 do the close for us. - * profile.c (pprint): Separate out code for Node_switch_body and only - print the lnode; avoids printing the default case twice. Thanks to - Hermann Peifer for reporting the bug. +2011-10-09 Arnold D. Robbins -Sun Jan 3 21:03:01 2010 Arnold D. Robbins + * dfa.c: Sync with GNU grep. - * dfa.c: Added casts as needed to silence warnings about - signedness of pointers from GCC 4.x. +2011-10-04 Arnold D. Robbins -Fri Jan 1 11:41:50 2010 Arnold D. Robbins + * awk.h, main.c (gawk_mb_cur_max): Make it a constant 1 when + MBS_SUPPORT isn't available to allow GCC dead code constant + expression computation and dead code elimination to help out. - * builtin.c (format_tree): At pr_tail, remember to take the precision - into account when determining how many characters to copy out. - Thanks to tczy for the bug report. +2011-10-02 Arnold D. Robbins -Tue Dec 8 12:29:30 2009 Arnold D. Robbins + * io.c (rsnullscan, get_a_record): Fix the cases where terminators + are incomplete when RS == "". Also fix the case where the new value + is shorter than the old one. Based on patch from Rogier + as submitted by Jeroen Schot + . - * configure.ac, awk.h: Remove use of header file. +2011-09-24 Arnold D. Robbins -Mon Dec 7 15:25:02 2009 Arnold D. Robbins + * eval.c, io.c, re.c: Fix some spelling errors. Thanks to + Jeroen Schot . - * node.c (format_val): Use <= and >= in the comparisons with - LONG_xxx instead of < and > so that things work correctly on systems - with 64 bit integers. Thanks to Stephen Davies for pointing out - the problem. +2011-09-21 Arnold D. Robbins -Sat Nov 21 23:14:59 2009 Arnold D. Robbins + * dfa.c, mbsupport.h: Sync with GNU grep. Large amount of changes + that remove many ifdefs, moving many conditions for multibyte + support into regular C code and relying GCC's dead code optimization + to elimnate code that won't be needed. + * dfa.c: For gawk, add a number of additional defines so that things + will compile if MBS_SUPPORT is 0. + * array.c, awk.h, awkgram.y, builtin.c, eval.c, field.c, main.c, + node.c, re.c: Change `#ifdef MBS_SUPPORT' to `#if MBS_SUPPORT'. + * awk.h, regex_internal.h: Move NO_MBSUPPORT handling to ... + * mbsupport.h: ...here. - * builtin.c (format_tree): If there is not an actual thousands - separator character, don't let `quote_flag' have an effect. Fixes - test failure on Solaris 10, which bizarrely says to use the - thousands separator character every three digits, but then doesn't - actually supply one. Thanks to Nelson Beebe for the initial - report. - -Mon Nov 16 22:27:44 2009 Arnold D. Robbins - - * awk.h (getnode): If MPROF wrap body in parentheses; remove - incorrect trailing semicolon. - * bisonfix.awk: Convert "y.tab.c" to "awkgram.c" for those rare - instances where we need to use a debugger on the parser so - that gdb will find the right source file. - -2009-10-26 Andreas Schwab - - * io.c (iop_open): Set errno when rejecting a directory. - -Tue Oct 20 22:48:14 2009 Arnold D. Robbins - - * awkgram.y (constant_fold): Fix check for two strings to look - at `right->flags'. Fix division code to check for division by - zero first. Thanks to Stephen Davies - for both. - -Fri Oct 16 08:41:29 2009 Arnold D. Robbins - - * io.c (redirect): Do the close-on-exec setting before - attempt to get a FILE *. Thanks to Andreas Schwab. - -Wed Oct 14 23:25:47 2009 Arnold D. Robbins - - * io.c (redirect): When opening a file, set the close-on-exec flag. - Thanks to Chris Pearson for the bug report. - -Tue Oct 6 21:07:23 2009 Arnold D. Robbins - - * main.c (main): When an option requires an argument and we print a - message, call `usage' and exit. - - Fix all calls to `usage' to use EXIT_FAILURE and EXIT_SUCCESS - instead of 1 and 0. - -Sun Oct 4 21:46:11 2009 Arnold D. Robbins - - * main.c (main): Don't reset argv[0] to myname. In call - to `init_args', pass argv[0] if do_posix. Based on - Fedora bug report. - -Sun Oct 4 18:45:06 2009 Arnold D. Robbins - - * array.c (assoc_lookup): In lint warning, don't clobber - the character at the end of the subscript; instead use the - length to limit the number of characters printed. Thanks to - Nick Hobson . - -Sun Aug 30 22:40:12 2009 Arnold D. Robbins - - * builtin.c (do_length): Handle the case where Node_var_new - was passed in as a parameter via a function call parameter. - Thanks to Greg Johnson for reporting - the bug. - -Tue Aug 11 19:23:51 2009 Arnold D. Robbins - - * profile.c (parenthesize_expr): New function. - (tree_eval): Use it for Node_and and Node_or. Thanks to - Hermann Peifer for reporting the bug. - -Tue Aug 4 06:04:23 2009 Arnold D. Robbins - - * builtin.c (format_tree): zero_flag does not apply to - %c and %s conversions. Thanks to Mike Brennan and Thomas Dickey - for the bug report. - -Tue Jul 21 22:28:56 2009 Arnold D. Robbins - - * Release 3.1.7: Release tar file made. - -Fri Jul 17 08:35:10 2009 Arnold D. Robbins - - * awkgram.c: Rebuilt with current Bison (2.4.1). - -Thu Jul 9 22:55:17 2009 Arnold D. Robbins - - * (NEWS README array.c awk.h awkgram.y builtin.c configure - configure.ac custom.h dfa.c ext.c field.c floatcomp.c io.c - main.c node.c profile.c re.c replace.c): Update copyrights - and other prep for a release. - -Thu Jul 9 22:20:04 2009 Arnold D. Robbins - - * main.c (init_locale): New function to make a deep copy of the - struct lconv. Thanks to KIMURA Koichi - for the info. - * eval.c (r_tree_eval): Further improve Node_assign_concat code to - temporarily to keep reference counts correct and to get the - desired behavior. - -Mon Jul 6 20:29:12 2009 Arnold D. Robbins - - * floatmagic.h: Remove @ signs copied from Texinfo. - It would help if I were more awake. - -Sat Jul 4 21:55:18 2009 Arnold D. Robbins - - * Makefile.am (base_sources): Add floatmagic.h so it'll - go into the tar ball. - -Fri Jul 3 13:47:36 2009 Arnold D. Robbins - - * profile.c (is_scalar): Add Node_func_call to list. - (pp_concat): Make logic smarter for tree created by Node_assign_concat. - -Fri Jul 3 13:01:49 2009 Arnold D. Robbins - - * awkgram.y (optimize_concat): New function that applies - Node_assign_concat more generally. - * eval.c (r_tree_eval): Improve Node_assign_concat code to temporarily - increase the stref on `l' to avoid side effects during evaluation of - `r'. This makes test/nasty.awk work. Ouch. - -Tue Jun 30 22:10:37 2009 Arnold D. Robbins - - * floatmagic.h: New file. - * builtin.c (format_tree): Use functions defined in floatmagic.h. - -Tue Jun 30 21:57:47 2009 Arnold D. Robbins - - * configure.ac, Makefile.am: Add new --disable-libsigsegv command line - option to configure. - (LIBSIGSEGV, SEGVINCLUDE, SEGVSUBDIR): New variables that will be empty - if libsigsegv is disabled so nothing will happen, and that will have the - right values otherwise. They are then substituted into the Makefile. - -Wed Jun 24 23:00:10 2009 Arnold D. Robbins - - * bootstrap.sh: Revised. Now works again. We think. (CVS-only file) - -Wed Jun 24 21:57:30 2009 Arnold D. Robbins - - * custom.h: Move z/OS EXIT_FAILURE definition from here to ... - * awk.h: Here. Define at end after regular definition. - -Thu Jun 18 06:17:38 2009 Scott Deifik - - * awk.h: Don't define HAVE_SIGSEGV_H for DJGPP. - -Thu Jun 18 05:38:42 2009 Dave Pitts - - * custom.h: Changes needed for z/OS. - -Wed Jun 10 08:22:53 2009 Arnold D. Robbins - - * node.c (parse_escape): Add a lint warning if \x.. has more than two - hex digits. - -2009-06-08 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. - -Mon Jun 8 22:13:49 2009 Arnold D. Robbins - - Update to Autoconf 2.63, Automake 1.11, Libtool 2.2.6a - - * ltmain.sh: New file. - * configure.ac: Changes to keep infrastructure tools happy. - * alocal.m4, configure: Regenerated. - * Makefile.in, */Makefile.in: Regenerated. - -Mon Jun 8 07:43:25 2009 John DuBois - - * builtin.c (mbc_byte_count, mbc_char_count): Make sure all declarations - come before executable code, for older compilers. - * dfa.c (insert): Ditto. - * io.c (devoopen): Ditto. - -Thu May 21 21:11:44 2009 Arnold D. Robbins - - Add simple constant folding. - - * awk.h (do_optimize): New declaration. - (calc_exp): Add declaration. - * eval.c (calc_exp): Make non-static. - * main.c (do_optimize): New variable. - (opttab): Add new entry for --optimize. - (main): Add 'O' to optlist and code for argument parsing. - (usage): Update for new option. - * awkgram.y (Node_concat, Node_exp, Node_times, Node_quotient, Node_mod, - Node_plus, Node_minus): Call `constant_fold' to create the node in - the tree. - (constant_fold): New function. - -Fri May 15 16:02:01 2009 Arnold D. Robbins - - * awk.h (getnode): For MPROF: Fix a typo. +2011-09-16 Arnold D. Robbins -Fri May 15 14:10:44 2009 Arnold D. Robbins + * dfa.c: Sync with GNU grep. - Function arguments cannot be reserved variable names, per POSIX. +2011-09-03 Arnold D. Robbins - * main.c (struct varinit): Add flags member. - (varinit): Add values for flags member (one or both of NON_STANDARD - or NO_INSTALL). Add entries for the rest of the gawk variables and - sort them, so that the table can be searched by ... - (is_std_var): New routine to see if a name is a standard variable. - * awk.h (is_std_var): Add declaration. - * awkgram.y (func_install): Use new routine and issue error. + * dfa.c: Sync with GNU grep. -Wed Apr 22 07:42:05 2009 Arnold D. Robbins +2011-08-24 Arnold D. Robbins - * builtin.c (sub_common): In code for handling \ replacements, - first make sure that is within the range of parentheses sets - given, and then make sure that the subpattern start is not -1, meaning - that something actually matched. Thanks to Martin Olsson - for the bug report. - (do_length): Add a lint warning if `length' is passed an untyped - argument. + Fix pty co-process communication on Ubuntu GNU/Linux. -Thu Apr 16 22:59:32 2009 Arnold D. Robbins + * io.c: Add include of to get definition of TIOCSCTTY. + (two_way_open): Move call for this ioctl to after setsid() call. - * eval.c (func_call): Save nloops_active; if after function returns - the actual nloops_active is greater than the saved value, it means - there was a return inside the loop body, so pop off the necessary - number of loops. Bug reported by Aleksey Cheusov . - Gawk was not leaking memory - that is, things were still pointed - to, but memory use could keep on growing. +2011-08-23 Arnold D. Robbins -Fri Mar 27 10:59:11 2009 Arnold D. Robbins - - * builtin.c (format_tree): Add lint warnings for fieldwidth and/or - precision in %%, and add lint warning for unknown format specifier - (e.g. %b). Thanks to "joanes.polus" for - the report. - -Wed Mar 18 18:15:41 2009 Pat Rankin - - * awk.h (EXIT_SUCCESS, EXIT_FAILURE): Move VMS-specific values - to vms/vms-conf.h. - (EXIT_FATAL): Define here instead of in msg.c. - * msg.c (EXIT_FATAL): Move definition to awk.h. - -Mon Mar 16 18:58:09 2009 Pat Rankin - - * main.c [#if HAVE_SIGSEGV_H]: For the #else case (VMS), - (stackoverflow_context_t): Dummy typedef for use in prototypes; - (stackoverflow_install_handler): Make macro expand to 0 rather - than nothing so that (void) cast on invocation of it works. - - * main.c (catchstackoverflow): Don't return 0 from void function. - -Wed Feb 25 21:34:14 2009 Arnold D. Robbins - - * awkgram.y (tokentab): Have only one copy of BEGIN / END. - (tokcompare): New function. - (check_special): Sort tokentab for EBCDIC systems. - -Sun Feb 15 22:39:30 2009 Arnold D. Robbins - - * profile.c (pp_delete): Print tree->exec_count to actually get - the value printed. Thanks to Hermann Peifer - for reporting the bug. - -Thu Feb 12 21:54:34 2009 Arnold D. Robbins - - * awkgram.y: Change to use EXIT_FAILURE. - * msg.c [EXIT_FATAL]: New macro. - * msg.c (r_fatal): Change to use EXIT_FATAL. - Thanks to Pat Rankin for pointing these out. - * re.c (reflags2str): Account for RE_SYNTAX_EMACS. - * awk.h: If not VMS, define HAVE_SIGSEGV_H. - * main.c: Check HAVE_SIGSEGV_H before including . If not - there, define dummy macros. - (catchsegv, catchstackoverflow): Remove unneeded comment. Add return 0 - for compilers that care. - -Mon Feb 9 05:24:52 2009 Arnold D. Robbins - - * awk.h [CONST]: Renamed CONSTANT to avoid conflict with libsigsegv - on Windows. - * awkgram.y, field.c, re.c: Update all uses. - -Tue Feb 3 22:46:59 2009 Arnold D. Robbins - - * io.c (do_close): Wrap updating of ERRNO in check for not - do_traditional. - -Sat Jan 31 23:14:00 2009 Arnold D. Robbins - - * builtin.c (format_tree): For '%s', don't count the multibyte - characters if we are just copying all the characters. Gives - big speedup. Thanks to Hirofumi Saito - for reporting the problem. - -Thu Jan 29 21:14:30 2009 Arnold D. Robbins - - * field.c (parse_field, re_parse_field, def_parse_field, - posix_def_parse_field, null_parse_field, sc_parse_field, - fw_parse_field): Add new last arg `in_middle'. Ignored by all - except re_parse_field. - (re_parse_field): Enhance logic to only allow ^ in a regex to match - if indeed at the beginning of a record. - (getfield): Adjust call to parse_field. - -Tue Jan 27 21:42:47 2009 Arnold D. Robbins - - Changes suggested by Toni Schilling , - as modified by feedback from Pat Rankin, and some help - from me. - - * awk.h [WEXITSTATUS]: Improve definition for MSC and VMS. - [EXIT_SUCCESS, EXIT_FAILURE]: Define if they aren't. - * io.c, main.c, profile.c: Switch to using EXIT_xxx instead of - 0 and 1. - (main): Use constants instead of 0/1 for exit_val variable. - * eval.c (interpret): Map exit value from `exit' statement into - success / fail constants for VMS for exit_val variable. - -Tue Jan 20 07:35:34 2009 Arnold D. Robbins - - * regex.h: Define __USE_GNU if not _LIBC; needed for non-GLIBC - systems such as, oh say, Mac OS X. - -Tue Jan 13 09:23:40 2009 Arnold D. Robbins - - * regex.c, regex_internal.h: Remove some changes that are no - longer needed after sync with GLIBC. - -Mon Jan 12 22:27:10 2009 Arnold D. Robbins - - Bi-annual sync with GLIBC. - - * regexec.c, regex.h, regex_internal.c, regcomp.c, regex_internal.h, - regex.c: Reapply any portability patches specific to gawk. - * getopt.c: Sync with GLIBC. - - Base versions: - getopt.c 1.57 Thu Jan 8 20:02:05 2009 - getopt.h 1.21 Fri Mar 19 00:19:32 2004 - getopt1.c 1.10 Tue Mar 9 10:35:37 2004 - getopt_int.h 1.1 Tue Mar 9 10:31:19 2004 - regex.c 1.129 Tue Sep 6 20:49:44 2005 - regexec.c 1.99 Thu Jan 8 20:02:06 2009 - regexec.c 1.99 Thu Jan 8 20:02:06 2009 - regex.h 1.43 Wed Jan 16 10:09:47 2008 - regex_internal.c 1.69 Thu Jan 8 20:02:06 2009 - regex_internal.h 1.76 Thu Jan 8 20:02:06 2009 - regcomp.c 1.120 Thu Jan 8 20:02:06 2009 - -Mon Jan 5 23:07:58 2009 Arnold D. Robbins - - * io.c (devopen): Add a retry to calls to socketopen. Tunable - via undocumented GAWK_SOCK_RETRIES environment variable. Based - on code from Juergen Kahrs after a - suggestion from Hermann Peifer . - -Mon Jan 5 22:48:39 2009 Arnold D. Robbins - - * io.c (redirect): A getline from a directory is no longer - fatal; instead it returns -1. Thanks to Paolo - for the report. - -Mon Dec 29 22:04:57 2008 Arnold D. Robbins - - * builtin.c (format_tree): Case for 's', improve logic for setting - the number of characters to copy, also at pr_tail. Based on - bug report by Hermann Peifer . - -Thu Dec 11 21:23:50 2008 Arnold D. Robbins - - * builtin.c (do_length): If the wide string has zero length - but the bytes are more than zero, use the number of bytes. - (do_index): Similar also: fall back to byte count if the - bytes don't make a wide-character string. - Bug reported by "Carlos G." - - (do_substr): If defaulting to length of rest of the string, - do it based on the wide char string if it's valid. - -Fri Dec 5 11:12:11 2008 Arnold D. Robbins - - * io.c (free_rp): New function. - (redirect): Improved logic for yesterday's change, including - use of free_rp. - (close_redir): Use free_rp. - -Thu Dec 4 22:35:05 2008 Arnold D. Robbins - - * io.c (redirect): Only put the new struct redirect into - the list if the file or pipe could actually be opened. Fixes - a bug with the wrong return value of close, noticed by - Seb . - * dfa.c (parse_bracket_exp_mb): Don't zero out work_mbc->chars - after we malloc'ed it. Fixes a leak found by valgrind when - using UTF-8. (Hmmm. This got fixed in January 2007; It seems - to have crept back into the code in the August 2007 merge with - GNU grep. Sigh.) - -Mon Oct 20 11:47:59 2008 Arnold D. Robbins - - * configure.ac: Add -g3 and -gdwarf-2 to CFLAGS if compiling with - GCC and doing development. Should have done this ages ago. - -Sun Aug 31 22:03:55 2008 Arnold D. Robbins - - * eval.c (set_BINMODE): Tighten up the code even more so - that it matches the documentation. - -Mon Aug 25 22:41:47 2008 Arnold D. Robbins - - * eval.c (set_BINMODE): Tighten up the code to only allow - certain reasonable values when setting BINMODE. - -Fri Aug 22 14:43:49 2008 Arnold D. Robbins - - * io.c (nextfile): Users Strong In The Ways Of The Source can use - non-existant files on the command line without it being a fatal error. - -Wed Jul 30 23:10:51 2008 Arnold D. Robbins - - * re.c (research): Don't ever use DFA if need_start. It can - break on some weird cases. Reported by - "T. X. G." . - -Wed Jul 30 22:27:20 2008 Arnold D. Robbins - - * builtin.c (do_match): Add MAYBE_NUM flag to elements of array - created by `match' since data could come from user. Similar - semantics to `split'. Thanks to Dr. Dirk Zimoch + * regex_internal.c (re_string_fetch_byte_case ): Remove + __attribute((pure)) since it causes failures with gcc -O2 + -fno-inline. Thanks to Neil Cahill for reporting the bug. -Tue Jun 24 07:44:06 2008 Arnold D. Robbins - - * dfa.c (insert): Reworked for significant speed improvement - by Johan Walles . Imported from grep - bug list. - * profile.c (tree_eval): Do a return after all the built-in - variables instead of a break. Thanks again to Hermann Peifer - for finding the problem. - -Sun Jun 22 23:08:14 2008 Arnold D. Robbins - - * node.c (format_val): Restore old code to use %ld when the value - is within the range of a long; improves performance noticably for - applications that convert integers to strings. Use %.0f only for - integral values that are outside the range of a long. Thanks to - Hermann Peifer for pointing out the existence - of a problem. - -Fri May 23 12:08:24 2008 Arnold D. Robbins - - * dfa.c (epsclosure): Change type of `visited' from int to char for - potential speedup. Based on bug report to bug-grep list from - Johan Walles . - -Wed May 14 05:55:48 2008 Arnold D. Robbins - - * builtin.c (format_tree): For `%c' case, add a lint warning - if the value is greater than 255. - (mbc_byte_count, mbc_char_count): Remove unused variable `i'. +2011-08-10 John Haque -Thu Apr 24 20:31:03 2008 Bruno Haible + BEGINFILE/ENDFILE related code redone. - * main.c (main): Move call to catch SIGBUS to before installation of - libsigsegv handler, since on some systems libsigsegv installs its - own handler for SIGBUS. - [STACK_SIZE]: Add a constant instead of inline. ADR. - -Wed Apr 23 22:30:27 2008 Duncan Moore - - * builtin.c (state): Do as an integer array for systems that need it. - (do_rand, init_rand): Modify call to `initstate' as needed. - -Wed Apr 23 22:22:06 2008 Arnold D. Robbins - - * dfa.c (prednames): Add an extra zero to final initializer to - silence a compiler warning. Reported by Duncan Moore - . - -Wed Apr 23 21:36:06 2008 Steffen Schuler - - * field.c (fw_parse_field): Add code for multibyte case. - -Sat Mar 15 22:17:21 2008 Arnold D. Robbins - - * builtin.c (do_length): Handle the case of the parameter being - an array that was a function parameter. - -Tue Mar 11 22:49:11 2008 Kimura Koichi - - * builtin.c (format_tree): Fix call to mbc_byte_count to pass the - right number of characters based on the format type. - -Tue Mar 11 22:31:58 2008 Arnold D. Robbins - - * libsigsegv: Incorporated into the dist. - * Makefile.am (SUBDIRS): Added. Make it first so that the library - is built before gawk is. - (LDADD): Add the library. - (AM_CPPFLAGS): Add -I option to find header. - * configure.ac: Add call to AC_CONFIG_SUBDIRS for libsigsegv. - * main.c (catchsegv, catchstackoverflow): New functions. - (main): Call into sigsegv library with them. - -Tue Mar 4 21:02:25 2008 Arnold D. Robbins - - * builtin.c (mbc_char_count, mbc_byte_count): New functions to return - the number of m.b. chars there are and the number of bytes needed to - copy them. - (format_tree): Use them for %s and %c cases to adjust precision and - for copying characters at pr_tail label. - -Thu Feb 14 14:05:01 2008 Arnold D. Robbins - - * main.c (init_args): Adjust type of third arg to remove warning from - GCC 4.2, add cast in call to make_string. Bleah. - -Fri Jan 25 12:13:39 2008 Dave Pitts - - * README_d/README.zos: New file. - * Makefile.am: Add sed on y.tab.c to convert older Bison "parse error" - messages to "syntax error" messages. - * configure.ac: Added ZOS_USS changes. - * m4/arch.m4: Added ZOS_USS changes. - * m4/inttypes_h.m4: Added ZOS_USS changes. - * m4/inttypes.m4: Added ZOS_USS changes. - * m4/stdint_h.m4: Added ZOS_USS changes. - * awkgram.y: Added USE_EBCDIC changes for EBCDIC collating sequence. - * awk.h: Added ZOS_USS compile changes. - * eval.c: Added EBCDIC casetable and ZOS_USS changes. - * regcomp.c: Added btowc function for ZOS_USS. - * regex.h: Changed __string to __cstring to avoid ZOS_USS header usage. - * regex_internal.h: Added ZOS_USS changes and type defines. - -Sun Jan 13 08:16:38 2008 Arnold D. Robbins - - * dfa.c (epsclosure): Replace MALLOC + zero-out-loop with CALLOC for - large potential speedup, based on bug report to bug-grep list from - Johan Walles . - (dfaanalyze): Made a similar change. - -Fri Dec 21 11:22:16 2007 Arnold D. Robbins - - * profile.c (pprint): Add a missing `#ifdef PROFILING'. - -Thu Dec 13 22:19:19 2007 Arnold D. Robbins - - * profile.c (parenthesize): Remove "!" from output string. - (tree_eval): Fix quotes for delete array case. - (pp_var): New function, call it as appropriate everywhere else. - -Fri Nov 30 11:11:52 2007 Arnold D. Robbins - - * io.c (socketopen): Use NULL as first argument to `getaddrinfo' - if any_remote_host is true. Should help on Non-GLIBC systems. - -Thu Nov 15 22:01:36 2007 Arnold D. Robbins - - * io.c (two_way_open): Case for ptys. Change search for letters - to avoid ASCII / EBCDIC problems. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Sun Oct 14 23:19:12 2007 Ralf Wildenhues - - * Makefile.am: Avoid GNU make-specific `make -C'. - -Sun Oct 14 19:37:01 2007 Arnold D. Robbins - - * configure.ac: Add check for `atexit', needed by replacement - version of `snprintf'. - -Sun Sep 30 21:50:59 2007 Arnold D. Robbins - - Rationalize locale's influence on %'g, strtonum, and input. - - * awk.h (use_lc_numeric): Add declaration. - * builtin.c (format_tree): Add check for quote_flag and set - LC_NUMERIC so that The Right Thing gets done, then reset it. - (do_strtonum): Pass use_lc_numeric as second arg to isnondecimal. - * main.c (main): Have do_posix set use_lc_numeric also. - -Thu Sep 27 21:36:23 2007 Stepan Kasal - - * configure.ac: Do not instantiate version.c; remove the hack - to keep version.c from being removed upon `make distclean'. - * Makefile.am (version.c): New rule. - (.c.i, SUFFIXES): Remove, `.i' is unused. - (MAINTAINERCLEANFILES): Remove awkgram.c; Automake takes care of that. - -Wed Sep 26 14:40:13 2007 Eli Zaretskii - - * builtin.c (format_tree): Handle non-standard snprintf that - returns a negative value when the buffer is too small. - -Tue Sep 25 23:27:41 2007 Arnold D. Robbins - - * ChangeLog: Removed all leading spaces. Fixed up formatting of - entries to have capital letter after the colon. Fixed a number of - entries to have the '*' in the right place. ASCII instead of ascii. - Capitalize Linux. (Is this anal-retentive or what? Sheesh.) - -Tue Sep 25 08:24:11 2007 KIMURA Koichi - - * awk.h: Add include of for Visual Studio. - * regex_internal.h: Do the right thing for replacing alloca. - -Sat Sep 22 23:26:27 2007 Arnold D. Robbins - - * field.c (set_FIELDWIDTHS): Restore behavior of 3.1.4 that allowed - FIELDWIDTHS to be "" without crashing, and such a value has NF = 0. - Yet Another Dark Corner. Thanks to Glenn Zazulia - for pointing out the problem. - - Unrelated: - - * builtin.c (format_free): Make `quote_flag' not sticky. Thanks to - Ulrich Drepper for pointing this out. - * main.c (main): Adjust calls to `setlocale' and `localeconv' so that - the %'d flag will work even if not using the locale's decimal point. - -Thu Sep 20 21:02:41 2007 Arnold D. Robbins - - * array.c (hash, awk_hash, gst_hash_string): Add fourth argument - pointer to retrieve code. Only assign a value if not NULL. - Fix most places to pass NULL for fourth argument. - (assoc_lookup): Save the code in the node for use in growing the - array later. - (grow_table): Use the saved code instead of recomputing each time. - * awk.h (NODE hash): Add `code' member and `ahcode' macro. - (hash): Revise declaration. - * awkgram.y: Revise calls to `hash'. - -Tue Aug 21 17:47:07 2007 Arnold D. Robbins - - * main.c (copyleft): Cite version 3 of the license. - * dfa.c: Minor edits to sync with grep 2.5.3. - -Sat Aug 11 22:48:11 2007 Arnold D. Robbins - - * COPYING: Replaced with GPL 3. - * All other relevent files: Upgraded to GPL 3. - -Fri Aug 3 15:01:38 2007 Andrew J. Schorr - - * builtin.c (format_tree): Free `obuf' before call to `fatal' - to keep valgrind happy. - -Mon Jun 4 01:12:21 2007 Arnold D. Robbins - - * All relevant files: Updated copyright year to 2007. - -Mon May 28 08:06:15 2007 Arnold D. Robbins - - * main.c (use_lc_numeric): New variable, true for new - option `--use-lc-numeric'. - (optab): Add option "use-lc-numeric". - (usage): Add to usage message. - (main): Allow the --use-lc-numeric option to also use the - local decimal point. - -Fri May 18 16:26:00 2007 Arnold D. Robbins - - * awk.h (_TANDME_SOURCE): Add test for ! _SCO_DS for - SCO systems. Thanks to John DuBois - -Tue May 15 13:14:04 2007 Arnold D. Robbins - - General capability suggested by Michael May . - - * configure.ac: New option --disable-directories-fatal. Makes gawk - silently skip directories on the command line. - * io.c (iop_open): Add fourth parameter, pointer to flag which is set - to true if the file is a directory. In this case, close the fd and - return NULL. - (nextfile): Modify call to iop_open. Add logic to check for directory - and skip if --disable-directories-fatal was used. If the configure flag - was not used, then if do_traditional also skip. - (redirect): Modify call to iop_open and call fatal if isdir is true. - -Mon May 7 14:51:54 2007 Arnold D. Robbins - - * POSIX.STD: Updated. - -Wed May 2 19:29:56 2007 Stepan Kasal - - Revert precedence of concatenation and | getline. - From mail dated 2005-10-31. - - * awkgram.y (common_exp): Move the two rules for naked regexp and - the rule for "(...) in arr" to ... - (non_post_simp_exp): ... here ... - (simp_exp): ... and here, respectively. Fixes test/parsefld.awk/. - (simp_exp_nc): New nonterminal, needed to fix the - precedence of concatenation over "|getline". - (common_exp): Can also start with simp_exp_nc. - -Tue May 1 19:53:11 2007 Arnold D. Robbins - - Work around problem with /ab{0}c/. - * dfa.h (struct dfa): Add member `broken'. - * dfa.c (dfainit): Initialize it to false. - (lex): Set it if `minrep == maxrep && minrep == 0'. - * re.c (avoid_dfa): Check flag and return TRUE if set. - -Tue May 1 05:34:53 2007 Arnold D. Robbins - - * configure.ac: Add calls to AM_LANGINFO_CODESET, and gt_LC_MESSAGES. - Thanks to Matthew Burgess . - -Sun Apr 29 22:55:12 2007 Arnold D. Robbins - - * regcomp.c (utf8_sb_map): Remove const if not __GNUC__ >= 3. - * regex_internal.h (re_dfa_t): Bracket bizarre macro call with - check for _LIBC. - Thanks to Nelson Beebe for finding both problems. - -Sun Apr 29 13:10:31 2007 Arnold D. Robbins - - * builtin.c (do_strftime): Add optional third argument to strftime() - which if non-zero or non-null means to use UTC. - * awkgram.y (tokentab): Allow three arguments to strftime. - -Fri Apr 27 11:44:27 2007 Arnold D. Robbins - - * README.cvs, bootstrap.sh: Added to CVS archive, not for - inclusion in tarballs. - -Fri Apr 20 16:48:30 2007 Pat Rankin - - * awk.h: Move inclusion of redirect.h before HAVE_func blocks. - -Tue Apr 24 21:55:36 2007 Arnold D. Robbins - - * re.c (research): In the multibyte case, fall back to the full - matcher if need_start, since there are bugs in the dfa matcher - in some obscure cases. Sigh. - * builtin.c (format_tree): When using %.0f instead of %d, assert - that we're not malloc-ing zero. - -Tue Apr 17 21:51:40 2007 Arnold D. Robbins - - Portability fixes for lsbcc from Nelson Beebe. - - * configure.ac: Check for stddef.h header. - * regex.h: Use check and include header to get size_t definition. - * main.c: Update UPDATE_YEAR, add #ifdef for HAVE_MTRACE. - -Tue Apr 17 13:49:13 2007 Arnold D. Robbins - - * configure.ac: Add test for struct sockaddr_storage. - * io.c: Add macro to redefine sockaddr_storage as sockaddr. - -Tue Apr 17 05:45:19 2007 Arnold D. Robbins - - * io.c (get_a_record): Make it static, to match declaration at the - top of the file. (Thank you GCC for not reporting this. Grr.) - -Fri Apr 13 00:29:24 2007 Arnold D. Robbins - - * replace.c: Only include missing/getaddrinfo.c if HAVE_SOCKETS - is defined. Avoids problems on VMS. Thanks to Pat Rankin. - -Tue Apr 10 18:53:04 2007 Arnold D. Robbins - - * awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c, - node.c: Added some sanity to the lint warnings, to only - print them once if they are syntactic or of the type where - they don't need to be repeated. Switch to `short' instead - of `int', and in general use a variable named `warned', for - consistency. - -Sun Apr 8 16:49:28 2007 Arnold D. Robbins - - * awkgram.y: Add guard code to ifdef out "signed" for VMS. Thanks for - the heads-up to Pat Rankin. - * regcomp.c (utf8_sb_map, init_dfa): Move non-GCC code to initialize - this array into code, to preserve word-size independance. - * configure.ac: Add check for . - * io.c: Include if we have it, instead of keyed off - Tandem, needed on some Unix systems. - * awk.h, main.c, msg.c, awkgram.y: Move to use of CAN_USE_STDARG_H - instead of continuously repeating check for header and defined STDC - and STDC. Thanks to Pat Rankin. - -Fri Apr 6 15:28:09 2007 Arnold D. Robbins - - * builtin.c (do_length): Only print `length(array)' lint warning once. - * node.c (dump_wstr): Restore from being ifdef'ed out. Useful in case - it needs to be called from a debugger. - * regcomp.c (utf8_sb_map): Fix gcc-specific code. - * awk.h (snprintf): Add declaration in case not available on the system. - (Ceil, Floor): Add macros changing the name for VMS, in an attempt to - fix linkage problems. - * io.c: Simplify includes for internet headers and for getaddrinfo - defines. - -Wed Apr 4 23:38:24 2007 Arnold D. Robbins - - * io.c [AI_ADDRCONFIG]: Add a definition in case it's not available. - * main.c (usage): Add comment for translators to add translation - bug report address. - -Wed Apr 4 18:26:45 2007 Pat Rankin - - * regexec.c (build_trtrable): Add missing #if HAVE_ALLOCA. - -Thu Mar 29 19:30:20 2007 Pat Rankin - - * re.c (make_regexp): Cast casetable to RE_TRANSLATE_TYPE. - -Mon Mar 19 12:35:00 2007 Arnold D. Robbins - - Finish removing references to STRTOD_NOT_C89. - - * awk.h (gawk_strtod): Use now if there is no strtod. - * replace.c (strtod.c): Include if there is no strtod. - * configure.ac [GAWK_AC_FUNC_STRTOD_C89]: Removed. - -Mon Mar 19 12:17:16 2007 Kimura Koichi - - * dfa.c (dfaexec): Add check for half-width katakana characters in - character classes in ShiftJIS locale. - From mail originally sent Mon, 01 Aug 2005 09:07:55 +0900 - -Fri Mar 9 11:53:25 2007 Arnold D. Robbins - - * field.c (rebuild_record): Assert that wide string is off when - creating new fields. Inspired by Karel Zak. - -Fri Mar 9 11:26:01 2007 Matthew Woehlke - - * io.c (get_a_record): Limit the max amount read to SSIZE_MAX. Needed - on Tandem systems where this amount is incredibly small. - -Tue Mar 6 08:17:49 2007 Paul Eggert - - * node.c (is_ieee_magic_val): Don't rely on strncasecmp; it mishandles - ASCII bytes in some locales. - (get_ieee_magic_val): Use strtod if it works, relying on our handbuilt - code only if it doesn't work. This is more likely to do the right - thing with strings like "-nan". - -Tue Feb 27 20:51:29 2007 Arnold D. Robbins - - * configure.ac (AM_PROG_CC_STDC): Removed, per email suggestion - from Stepan Kasal some time ago. - -Tue Feb 27 20:44:07 2007 Aleksey Cheusov - - * awk.h: Revise checks for MEMCPY_ULONG and MEMSET_ULONG - for MS Interix using MSVC. - * configure.ac (AC_CHECK_FUNCS): Add checks for memcopy_ulong - and memset_ulong. - From mail dated Tue Aug 30 12:38:39 2005. - -Mon Feb 26 12:47:10 2007 Tony Leneis - - * dfa.c (dfacomp): Check that regexp is non-zero in length - also. Avoids problems with empty regex and IGNORECASE on - systems where `malloc(0)' returns a non-NULL pointer. - From mail dated Wed, 26 Oct 2005 15:42:07 -0700. - -Wed Feb 21 10:23:12 2007 Arnold D. Robbins - - * floatcomp.c (Floor, Ceil): Restore correct expression for Cray. - Then ifdef out the whole business, since it's likely to be obsolete. - Thanks to Paul Eggert. - -Mon Feb 19 12:28:47 2007 Arnold D. Robbins + * awk.h (prev_frame_size, has_endfile, target_get_record, + target_newfile): New defines. + * awkgram.y (mk_program): Initialize has_endfile appropriately for + Op_get_record. + (parse_program): Initialize new jump targets for + Op_get_record and Op_newfile. + * eval.c (unwind_stack): Change argument to number of + items to be left in the stack. Adjust code. + (pop_fcall, pop_stack): New defines. + (setup_frame): Initialize prev_frame_size. + (exec_state, EXEC_STATE): New structure and typedef. + (exec_state_stack): New variable. + (push_exec_state, pop_exec_state): New functions to save and + later retrieve an execution state. + (r_interpret): Use the new functions and the defines in + cases Op_K_getline, Op_after_beginfile, Op_after_endfile, + Op_newfile and Op_K_exit. + * io.c (after_beginfile): When skipping a file using nextfile, + return zero in case there was an error opening the file. + (has_endfile): Nuke global variable. + (inrec): Add a second argument to pass errno to the calling + routine. + * debug.c (print_instruction): Update cases. + +2011-08-10 Arnold D. Robbins + + Fix (apparently long-standing) problem with FIELDWIDTHS. + Thanks to Johannes Meixner . + + * field.c (set_FIELDWIDTHS): Adjust calculations. + + Fix problem with FPAT, reported by "T. X. G." + + * awk.h (Regexp): Add new member 'non_empty'. + * field.c (fpat_parse_field): Save/restore local variable non_empty + from member in Regexp struct. + +2011-08-09 Arnold D. Robbins + + Fix pty issue reported by "T. X. G." + + * configure.ac: Check for setsid. + * awk.h: If not HAVE_SETSID define it as an empty macro. + * io.c (two_way_open): Call setsid if using pty's. + +2011-07-29 Eli Zaretskii + + * builtin.c (format_tree): Rename small -> small_flag, + big -> big_flag, bigbig -> bigbig_flag. Solves compilation errors + when building Gawk with libsigsegv on MS-Windows, see + https://lists.gnu.org/archive/html/bug-gawk/2011-07/msg00029.html. + +2011-07-28 Arnold D. Robbins + + * builtin.c (do_sub): Revert to gawk 3.1 behavior for backslash + handling. It was stupid to think I could break compatibility. + Thanks to John Ellson for raising + the issue. + +2011-07-26 John Haque + + * eval.c (r_interpret): In cases Op_var_assign and Op_field_assign, + include Op_K_getline_redir in the test for skipping the routine. + +2011-07-26 John Haque + + Fix handling of assign routines for 'getline var'. + Rework the previous fix for (g)sub. + + * awk.h: New define assign_ctxt for use in Op_var_assign + and Op_field_assign opcodes. Remove define AFTER_ASSIGN. + * awkgram.y (snode, mk_getline): Initialize assign_ctxt. + * builtin.c (do_sub): Adjust to take only the first two + arguments. + * eval.c (r_interpret): In cases Op_var_assign and Op_field_assign, + skip the routine as appropriate. Adjust case Op_sub_builtin. + * main.c (get_spec_varname): New function. + * debug.c (print_instruction): Use the new function to get + special variable name. + +2011-07-17 Arnold D. Robbins + + * main.c (varinit): Mark FPAT as NON_STANDARD. Thanks to + Wolfgang Seeberg for the report. + * Makefile.am (EXTRA_DIST): Add po/README, per advice from + Bruno Haible. + * dfa.c: Sync with GNU grep. + * xalloc.h (xzalloc): New function, from GNU grep, for dfa.c. + * README: Note that bug list is really a real mailing list. + +2011-07-16 Arnold D. Robbins + + * Makefile.am (AUTOMAKE_OPTIONS): Removed. + * configure.ac (AM_INIT_AUTOMAKE): Removed dist-bzip2 option, on + advice from Karl Berry. + +2011-07-15 John Haque + + * awk.h (Op_sub_builtin): New opcode. + (GSUB, GENSUB, AFTER_ASSIGN, LITERAL): New flags for + Op_sub_builtin. + * awkgram.y (struct tokentab): Change opcode to Op_sub_builtin + for sub, gsub and gensub. + (snode): Update processing of sub, gsub and gensub. + * builtin.c (do_sub, do_gsub, do_gensub): Nuke. + (sub_common): Renamed to do_sub. Relocate gensub argument + handling code from do_gensub to here; Simplify the code a + little bit. + * eval.c (r_interpret): Handle Op_sub_builtin. Avoid field + re-splitting or $0 rebuilding if (g)sub target string is + a field and no substitutions were done. + * pprint (profile.c): Add case for the new opcode. + * print_instruction (debug.c): Ditto. + +2011-07-15 Arnold D. Robbins + + * awk.h: Typo fix: "loner" --> longer. Thanks to Nelson Beebe. + * builtin.c (efwrite): Fix flushing test back to what it was + in 3.1.8. Thanks to Strefil for the problem + report. + * configure.ac: Bump version to 4.0.0a for stable branch. - * node.c (format_val): Simplify code: always format the value - ourselves. Use %.0f if the value is integral. - * floatcomp.c (dval_out_of_range): Remove function, not needed. - (awknum_fraction_bits): Removed. - (adjust_uint): New function, defined IFF have uintmax_t. - * builtin.c (tmp_integer): Use adjust_uint. - Move include of and ... - * awk.h: to here. - (awknum_fraction_bits): Removed. - (adjust_uint): Declare, or define as do-nothing macro. +2011-06-24 Arnold D. Robbins -Sun Feb 18 17:43:33 2007 Arnold D. Robbins + * Makefile.am (EXTRA_DIST): Add ChangeLog.0. + * 4.0.0: Remake the tar ball. - * node.c, floatcomp.c: Add include of to get - correct declarations of math functions. - * configure.ac: If doing development, add -DYYDEBUG and also - -fno-builtin for GCC. +2011-06-23 Arnold D. Robbins -Wed Feb 14 19:42:08 2007 Arnold D. Robbins - - Add support for special infinity and NaN values in non-POSIX - mode, and in POSIX mode, just call system `strtod'. - - * configure.ac [GAWK_AC_FUNC_STRTOD_C89]: Comment out. - * node.c (is_ieee_magic_val, get_ieee_magic_val): New functions. - (r_force_number): Adapt logic and use new functions. - -Tue Feb 13 13:02:32 2007 Arnold D. Robbins - - Move Paul's numeric stuff to a separate file to make code cleaner. - - * floatcomp.c (awknum_fraction_bits): New variable. - (Floor, Ceil): Functions, moved here from macros in builtin.c. - (dval_out_of_range): New function for checking if double is in range - of long. - (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG, AWKSMALL_MANT_DIG, - AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): Moved here from awk.h. - * awk.h: Add decls of stuff now in floatcomp.c. - * Makefile.am[base_sources]: Add floatcomp.c. - * builtin.c (tmp_integer): Refer to `awknum_fraction_bits' - instead of AWKNUM_FRACTION_BITS. - * node.c (format_val): Call `dval_out_of_range' instead of - inline coding the test. - -2007-02-06 Paul Eggert - - * node.c (format_val): Fix bug when handling numbers close to - LONG_MIN and LONG_MAX. - * awk.h (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG, AWKSMALL_MANT_DIG, - AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): Moved here from builtin.c. - * builtin.c: Move those macros to awk.h. - * awk.h (DBL_FRACTION_BITS): New macro. - -Fri Feb 9 13:40:10 2007 Matthew Woehlke - - More Tandem fixes. - - * configure.ac: Check in Tandem's zrldsrl library for dlopen. - * regex_internal.h: Move include into ifdef. - * regexec.c: Bracket alloca uses. Fix GCC use of `?:'. - -Fri Feb 9 13:30:15 2007 Arnold D. Robbins - - * replace.c: Add include of snprintf.c. Ooops! - * configure.ac: Add check for mkstemp and tmpfile for replacement - snprintf.c. - -Tue Feb 6 14:33:51 2007 Arnold D. Robbins - - * node.c (format_val): Restructure a bit to remove need for and - use of goto. - -Sun Feb 4 16:35:21 2007 Arnold D. Robbins - - * awkgram.y (field_spec, opt_incdec): New terminals. - (variable): Change definition of field reference to use field_spec. - See test/parse1.awk. - -Thu Feb 1 17:38:38 2007 Arnold D. Robbins - - * main.c: Allow YYDEBUG to enable the `-D' option, not just - GAWKDEBUG. - -Wed Jan 31 19:30:26 2007 Arnold D. Robbins - - * node.c (format_val): Restore my test for numeric values - being representable, as it includes more conditions than - Andrew's, pending a thorough review of undealt-with emails on - the topic. - * regexec.c (proceed_next_node): Move check for NULL to after - variable declarations inside initial `if'. - -Wed Jan 31 19:25:21 2007 Andrew J. Schorr - - * configure.ac (getaddrinfo): Improve test, since this function - can be in libsocket on some systems. - -Mon Jan 29 15:33:10 2007 Andrew J. Schorr - - * Makefile.am (valgrind): Also call new valgrind-scan target. - -Mon Jan 29 12:44:54 2007 Andreas Schwab - - * dfa.c (copytoks): Adjust index into multibyte csets when - copying an MBCSET token. - -Fri Jan 26 20:01:38 2007 Andrew J. Schorr - - * node.c (format_val): Test whether a numeric value is integral - simply by converting it to long and then back again, and checking - if the value matches. That's more robust than trying to test - whether the floating-point value is representable as a long. - * builtin.c (format_tree): Fix buffer overflow bug, off-by-one errors - in checking snprintf return codes, and use "%.0f" to implement "%d" - formatting. For octal or hex formatting, test whether the value - is integral by trying to convert back to floating point and seeing - if the value matches. This is more robust than trying to test - whether the floating-point value is representable as an integer. - -Tue Jan 23 17:49:28 2007 Arnold D. Robbins - - * io.c (socketopen): Initialize socketfd to avoid "may be used - uninitialized" warning. - * regexec.c (regexec, re_search_stub): Removed unused variable `dfa'. - * builtin.c (wide_tolower_toupper): Fix signedness of pointer in - allocation calls and in call to make_str_node. - -Mon Jan 22 12:57:19 2007 Kimura Koichi - - Deal with halfwidth katakana in SJIS locale inside character ranges. - Based on http://sources.redhat.com/bugzilla/show_bug.cgi?id=1149. - Changes affect non-__LIBC code only. - - * regcomp.c (re_compile_fastmap_iter): Handle half-size characters. - * regexec.c (check_node_accept_bytes): Same. - -Thu Jan 18 22:19:01 2007 Karel Zak - - * node.c (free_wstr): Assert that type is Node_val. - -Thu Jan 18 12:18:47 2007 Arnold D. Robbins - - * regcomp.c (re_compile_fastmap_iter): Declare `dfa' to be - be volatile. Fixes valgrind problem with the ignrcase test. - Sheesh. Gawk should now be valgrind-clean. We hope. - -Mon Jan 15 14:28:04 2007 Arnold D. Robbins - - Use getaddrinfo instead of gethostbyname, to handle IPV6 - format addresses. Based on patch submitted by - Jan Pazdziora . - - * configure.ac: Add getaddrinfo to list of checked functions. - * configh.in, configure: Regenerated. - * io.c: Rework includes based on HAVE_GETADDRINFO. - (socketopen): Reworked for getaddrinfo. - (devopen): Modified for new socketopen. - * replace.c: Include getaddrinfo.c if necessary. - -Sun Jan 14 12:19:53 2007 Arnold D. Robbins - - * awkgram.y: For bad name in array subscripting, build a - valid node anyway to avoid invalid reads reported by valgrind. - * dfa.c (parse_bracket_exp_mb): Remove assignment of NULL - to work_mbc->chars, was losing data malloc'ed earlier. Thanks - to valgrind. - (state_index): Alway initialize d->states[i].mbps elements to zero. - (dfafree): Free allocated d->states[i].mbps.elems if needed. - * regex.c: Try harder to undef alloca. - * regex_internal.h (__mempcpy): Undef before redefinining for - more recent versions of GLIBC. - -Sat Jan 13 22:10:43 2007 Arnold D. Robbins - - * node.c (str2wstr): For count of zero from mbrtowc, set count to 1 - and fall through to code that copies. Originally from Paul Eggert. - - Unrelated: - * configure.ac: Add call to AC_USE_SYSTEM_EXTENSIONS, should help - on Tandem. This lets us remove AC_AIX and AC_MINIX. - - From Matthew Woehlke for Tandem: - - * awk.h (_TANDEM_SOURCE): Also define _XOPEN_SOURCE_EXTENDED. - * io.c (_TANDEM_SOURCE): Include more headers. - -Sat Jan 13 21:53:48 2007 Ralf Wildenhues - - * field.c (set_FIELDWIDTHS): Avoid writing one past the end of - the array. - * node.c (r_force_number): Avoid reading uninitialized variable. - -Sat Jan 13 21:37:15 2007 Arnold D. Robbins - - * Makefile.am (valgrind): New target based on idea from - Ralf Wildenhues for running valgrind on test suite. - -Sat Jan 13 21:24:54 2007 Ralf Wildenhues - - Enable more `--lint-old' warnings. - * awkgram.y: Warning about multiple BEGIN or END rules, - `index in array' outside of for loops, multidimensional arrays. - * field.c (set_FS): Warn about regex FS. - * node.c (parse_escape): Warn about `\b', `\f', `\r'. - -Sat Jan 13 20:56:56 2007 Arnold D. Robbins - - * node.c (wcasestrstr): Revert use of continue, reinstate goto. - Thanks to Andrew Schorr. - (free_wstr): Move zeroing of wsptr and wslen and clearing of flag - back outside the if. - * field.c (rebuild_record): In loop that copies fields to new record, - add call to `free_wstr'. This ensures that flag values are correct - and avoids double free later. Thanks to Karel Zak for pointing out - the problem. - -Fri Jan 12 14:01:51 2007 Dmitry V. Levin - - * builtin.c (do_match): In addition to "gawk_mb_cur_max > 1" check, - check for positive string length. - -Fri Jan 12 13:57:20 2007 Arnold D. Robbins - - Sync with GLIBC. Bi-annual this time. - - * regexec.c, regex.h, regex_internal.c, regcomp.c: - Reapply any portability patches specific to gawk. - * regex_internal.h (build_wcs_upper_buffer): Fix return type - in declaration. Reapply any portability patches specific to gawk. - * regex.c: Add definitions for `bool', `true' and `false'. - Define `alloca' to something invalid to keep it from linking - in case a usage of `alloca' slipped through. Reapply any portability - patches specific to gawk. - - Base versions: - getopt1.c 1.10 Tue Mar 9 10:35:37 2004 - getopt.c 1.55 Fri Mar 24 10:59:56 2006 - getopt.h 1.21 Fri Mar 19 00:19:32 2004 - getopt_int.h 1.1 Tue Mar 9 10:31:19 2004 - regex.c 1.129 Fri Mar 24 10:59:57 2006 - regexec.c 1.97 Fri Mar 24 10:59:57 2006 - regex.h 1.40 Mon Sep 25 20:03:05 2006 - regex_internal.c 1.67 Mon Sep 25 20:03:05 2006 - regex_internal.h 1.73 Fri Mar 24 10:59:57 2006 - regcomp.c 1.112 Fri Mar 24 10:59:57 2006 - -Fri Jan 12 12:28:51 2007 Arnold D. Robbins - - * ABOUT-NLS, INSTALL, Makefile.in, aclocal.m4, config.guess, - config.rpath, config.sub, configh.in, configure, configure.ac, - depcomp, gettext.h, install-sh, missing, mkinstalldirs, ylwrap: - Updated to current autotools, Autoconf 2.61, Automake 1.10, - gettext 0.16.1. - -Thu Jan 4 18:23:50 2007 Dmitry V. Levin - - * node.c (free_wstr): Zero wstptr and wstlen only if WSTRCUR - flag is set. - (str2wstr): Replace invalid `free' call with `free_wstr' call. - -Thu Jan 4 16:49:21 2007 Arnold D. Robbins - - * builtin.c (do_match): Move freeing of wc_indices to outside if. - Thanks to Sven Wegener for the report. - -Thu Dec 21 14:32:13 2006 Arnold D. Robbins - - * main.c (arg_assign): Reassign the '=' only if not initing. - * profile.c (varname): Deleted. - (pp_concat): New function to print concatenations. - (tree_eval): Don't use `varname' anymore. Use `pp_concat'. - -Mon Dec 11 12:43:04 2006 Arnold D. Robbins - - * builtin.c (sub_common): Clear numeric flags on result - unconditionally. - * node.c (wcasestr): Replace `goto' with `continue'. - -Thu Nov 30 15:54:07 2006 Bruno Haible . - - * builtin.c: Change use of HAVE_LC_MESSAGES to defined(LC_MESSAGES). - Bruno suggested only for dcngettext, I did it everywhere (ADR). - -Wed Sep 6 02:04:32 2006 Andrew J. Schorr - - * awkgram.y (get_src_buf): Adjust `source' and `sourceline' to - correctly handle mixed -f and --source options. - -Mon Aug 28 21:17:20 2006 Arnold D. Robbins - - * AUTHORS, FUTURES, LIMITATIONS, NEWS, POSIX.STD, PROBLEMS, README: - Added FSF copyright for no other reason than to satisfy the flunkies - running Savannah. - * Makefile.am: Removed `ansi2knr' from AUTOMAKE_OPTIONS also. - -Fri Aug 11 15:07:45 2006 Arnold D. Robbins - - * field.c (set_field, rebuild_record, set_record): Remove calls to - `free_wstr' since they're not needed. - -Sat Aug 5 22:04:24 2006 Arnold D. Robbins - - * node.c (unref): Call `free_wstr' for fields also. Thanks to - Andrew Schorr. - -Tue Jul 4 22:43:05 2006 Arnold D. Robbins - - * eval.c (interpret): Node_assign_concat case: Turn off NUMBER and - NUMCUR flags in result. Sheesh. Thanks to - for finding the problem. - -Mon Jul 3 22:49:44 2006 Pat Rankin - - * main.c (load_environ): When AWKPATH is missing from ENVIRON[], - try to find it with getenv("AWKPATH") before resorting to DEFPATH. - Suggested by Galen Tackett. - -Mon Jul 3 00:27:59 2006 Arnold D. Robbins - - * io.c (INTERNAL_HANDLE): New constant for use by `iop_alloc' - when allocating an internal IOBUF. - (pidopen, useropen): Use it. - (iop_alloc): Add check for it and just return iop. - -Fri Jun 23 15:48:34 2006 Arnold D. Robbins - - * awkgram.y (subn): At end for `do_sprintf' check, verify - that lnode is not NULL before using it to assign through. - -Sun Jun 18 22:27:25 2006 Arnold D. Robbins - - Repair internal names like /dev/user, /dev/pid, as well as /dev/fd/N, - which have been broken for a long time but noone noticed. - - * io.c (is_internal): New macro to check for internal file like - `/dev/user'. - (spec_setup): Reduce to two parameters, allocate logic is always true. - Add IOP_NO_FREE to flag. - (pidopen, useropen): Return `IOBUF *' instead of int. Fix - logic to test if `iop' parameter is NULL and if so to allocate it. - (specfdopen,): Return `IOBUF *' instead of int. Fix - logic to test if `iop' parameter is NULL and if so to allocate it. - Don't set IOP_NO_FREE in flag. - (iop_open): Remove `IOBUF iob' field from `struct internal' and its use - and the use of `spec_setup' from the code here. Change the check in the - call to the open function to look for NULL. - (get_a_record): Use `is_internal' in initial check for filling the - buffer to not try to call `read' on internal files. If true, set - the IOP_AT_EOF in the flag and return EOF. - -Fri Mar 24 13:05:56 2006 Arnold D. Robbins - - * awkgram.y (get_src_buf): Remove function argument types from - declaration of `readfunc' to avoid bugaboos with VMS declaration - of `read' system call. - -Fri Mar 10 06:28:23 2006 Arnold D. Robbins - - * awk.h (free_wstr): New declaration if MBS_SUPPORT, empty macro - otherwise. - * node.c (free_wstr): New function, inside MBS_SUPPORT. Frees the wide - string part of a node. Provided so that it can be used consistently - everywhere. - (format_val, r_dupnode, mk_number, make_str_node, unref): Use it. - * builtin.c (sub_common): Call `free_wstr' instead of doing it manually. - * eval.c (r_tree_eval): Same in Node_assign_concat case. - * field.c (set_field, rebuild_record, set_record): Add calls to - `free_wstr'. - -Mon Feb 13 22:45:34 2006 Arnold D. Robbins - - * eval.c (r_tree_eval): Node_assign_concat. Release any - wide string value and reset the WSTRCUR flag. Based on - bug report by Karel Zak. - -2006-01-03 Paul Eggert - - * Makefile.am (awkgram.c): Use $(AWK), not awk, so that the rule - works on Solaris too (e.g., Solaris 10). Problem reported by - Andrew J. Schorr. - -Mon Dec 19 05:39:46 2005 Arnold D. Robbins - - * node.c (format_val): Account for overlow of conversion - from double to long. Shows up worse on 64-bit systems. - -Wed Dec 14 18:57:34 2005 Arnold D. Robbins - - * eval.c (set_BINMODE): Fix logic of test for no numeric value. - Makes `gawk -v BINMODE=1 ...' work again. Thanks to Eli Zaretskii - for pointing out the problem. - -Wed Oct 19 10:58:27 2005 Arnold D. Robbins - - * main.c (main, arg_init): Only use the locale's decimal - point if do_posix is set. Too many people the world over - have complained about this. - -Fri Oct 7 13:54:09 2005 Arnold D. Robbins - - Enhancement to fix from 23 Sept 2005, suggested by Pat Rankin. - - * awkgram.y (one_line_close): New function, closes open FILE * used - by `read_one_line'. - (fp): Static FILE * used by `read_one_line' and `one_line_close'. - * awkgram.y (read_one_line): Simplify check for call to `fdopen'. - (get_src_buf): New variable `closefunc' which is a pointer to a - function implementing the `close' system call interface. - -Fri Oct 7 13:23:29 2005 Arnold D. Robbins - - * field.c (set_FIELDWIDTHS): Fix off-by-one error in assignment - of sentinel value at end of FIELDWIDTHS array. - -Fri Sep 23 16:05:13 2005 Arnold D. Robbins - - * awkgram.y (read_one_line): New function, mainly for debugging, - that reads one line of data at a time to pass back as a buffer. - Emulates the variable-length record filesystem of VMS, where - we first saw the problem fixed here. - (get_src_buf): New variable `readfunc' which is a pointer to a - function implementing the `read' system call interface. Based on - an environment variable, use `read_one_line' instead of `read' - for testing. Make the test for expanding the buffer smarter, - so that it doesn't grow unnecessarily. - - Thanks to Galen Tackett (tackett_galen@bah.com) for reporting - the problem and to Anders Wallin and Pat Rankin for help - tracing and reproducing the problem and testing the fix. - -Fri Sep 9 15:06:07 2005 Arnold D. Robbins - - * hard-locale.h (xmalloc): Move declaration to file scope - for non-glibc systems and gcc 4. Thanks to Kito Danya Dietrich - . - -Thu Aug 25 22:40:40 2005 Arnold D. Robbins - - * regcomp.c (build_range_exp): Avoid `btowc' for single-byte - characters. Fedora Core 2, maybe others, have a broken version - that can't handle values > 127. - -Fri Aug 19 16:13:28 2005 Arnold D. Robbins - - * regexec.c (proceed_next_node): Added a band-aid check at the - top of the first `if' to make sure that `mctx->state_log[*pidx]' - isn't NULL. - -Fri Aug 12 13:10:33 2005 Arnold D. Robbins - - * io.c (iop_alloc): Only free `iop' if it was malloc'ed in - the first place. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Tue Jul 26 21:44:54 2005 Arnold D. Robbins - - Copyright dates on all relevant files updated to 2005. - -Wed Jul 6 17:09:02 2005 Arnold D. Robbins - - Minor cleanups: - - * io.c (do_index): Remove unused variables `mbclen', `mbs1' and `mbs2'. - * node.c (wstrstr): Remove unsed variable `j'. - (dump_wstr): `#ifdef' out, not currently needed. - * eval.c (op_assign): Move decl of `t1' and `t2' into a separate block - for the `! HAVE_FMOD' case. Keeps the compiler quiet. Similar for - `ltemp'. - -Wed Jul 6 16:51:31 2005 Arnold D. Robbins - - * io.c (close_io): Now takes pointer to boolean parameter indicating - if there was a problem closing standard output or standard error. - Update it in the right places. - * awk.h (close_io): Update the declaration. - * main.c (main): New variable `stdio_problem'. Pass it to `close_io'. - Check the result and exit non-zero if there was a problem. - (usage, version): Print warning message if problems with stdout. - - Unrelated: - - * main.c (main): For call to `setlocale' for LC_MESSAGES, just use - `#ifdef LC_MESSAGES'. Per Bruno Haible . - -Wed Jul 6 16:44:58 2005 Jim Meyering - - * main.c (init_fds): If any of the STDIN_FILENO, STDOUT_FILENO, - STDERR_FILENO are initially closed, reopen them with permissions - contrary to common usage so that any reasonable attempt to use - them will evoke the same sort of error as reading or writing to - a closed file descriptor would. - -Mon Jul 4 09:38:29 2005 Arnold D. Robbins - - More multibyte fixes from Kimura Koichi, . - - * node.c (format_val, r_dupnode): Spell `wstptr' correctly. - * regex_internal.c (build_wcs_upper_buffer): Label `offsets_needed' - should not be inside `#ifdef _LIBC'. - * regcomp.c (build_charclass): Fix declaration of `class_name' in - prototype to not be unsigned. - -Thu Jun 30 11:52:34 2005 Arnold D. Robbins - - * profile.c (tree_eval): Node_not: Remember to print the exclamation - point! Thanks to Dan Nielsen - for the bug report. - * mbsupport.h: Fix spelling of HAVE_ISWUPPER. Thanks to - Kimura Koichi, . - -Sun Jun 26 16:37:59 2005 Arnold D. Robbins - - Unrelated changes: - - * builtin.c (do_length): Allow array argument to length(). - Returns number of elements in array. - - * awkgram.y (yylex): Ignore carriage returns in source code. Sigh. - -Wed Jun 15 22:12:15 2005 Arnold D. Robbins - - * node.c (isnondecimal): Check loc.decimal_point before using it. - Avoids problems with command line assignment when locale info may - not be set up all the way yet. - -Wed Jun 15 21:59:54 2005 Arnold D. Robbins - - * node.c (make_str_node): If working with multibyte characters, while - parsing string constants, keep multibyte characters together. This - avoids problems in cases where one of the bytes is backslash. Initial - patch supplied by Kimura Koichi, . - -Tue Jun 14 21:50:37 2005 Andrew J. Schorr - - Use Exponentiation By Squaring for integer powers for ^ and ^=. - - * eval.c (calc_exp, cal_exp_posint): New functions. - (r_tree_eval): Use them. - -Fri Jun 3 12:15:54 2005 Arnold D. Robbins - - * configure.ac: Further change the hack at the end so that - it works on Mac OS X `sed'. Sigh. - -Thu Jun 2 22:44:01 2005 Arnold D. Robbins - - * configure.ac (TYPE_SOCKLEN_T): Use `int' as default type if can't - figure one out. - * awkgram.y: Warn that `//' is not a C++ comment. (:-) - -Thu Jun 2 20:55:27 2005 Arnold D. Robbins - - From: Benno Schulenberg - - * eval.c (func_call): Take message out of gettext call since it's for - debugging. - * ext.c (get_actual_argument): Fix formatting of message. - -Wed May 25 09:19:37 2005 Arnold D. Robbins - - * configure.ac: Change hack at end that fixes Makefile to keep - version.c to use `sed' and not `ed'. More portable to OS/2, probably - other systems. - -Mon May 23 09:01:26 2005 Arnold D. Robbins - - Portability help from Jim Meyering. - - * io.c: Rework ifdefs for and . Test them - individually. - * configure.ac: Add AC_C_RESTRICT and code for socklen_t from rsync. - Check for isascii and btowc for regex. - -Sat May 14 22:49:54 2005 Arnold D. Robbins - - * wait_any (errno): Remove decl. - * gawk_popen: The pipe-simulated but not VMS or DOS version. Remove - decl/use of `strdup' in favor of `emalloc' and `strcpy'. - -Wed May 11 18:33:30 2005 Arnold D. Robbins - - All files: Updated address of FSF to: - - 51 Franklin Street, Fifth Floor - Cambridge, MA 02110-1301 - -Wed May 11 18:19:03 2005 Jim Meyering - - * configure.ac: Use AM_GNU_GETTEXT([external]). - Reflect upgrade to gettext-0.14.4. - Reflect renaming of `jm_'-prefixed macros. - (AC_CONFIG_FILES): Remove intl/Makefile. - - * Makefile.am (SUBDIRS): Remove intl. - (AM_CPPFLAGS): Remove -Iintl. - -Wed May 11 11:42:06 2005 Arnold D. Robbins - - Straighten out mess with `isblank' which is C99 function. - - * configure.ac: Remove check for `isblank' in call to AC_CHECK_FUNCS. - * regex_internal.h: #ifdef out definition of `isblank' and provide - `is_blank' function a la dfa.c. - * field.c: Ditto. - * regcomp.c: #ifdef use of `isblank' and add `is_blank' use instead. - -Mon May 9 08:29:37 2005 Arnold D. Robbins - - * configure.ac: Add type check for `socklen_t', fixes compile - warning on AMD/64 Linux. - * io.c (socketopen): Change type of socket length variables - to `socklen_t' from `size_t'. - -Thu May 5 22:00:03 2005 John E. Haque - - * io.c (iop_alloc): Let an input processor hook installed via - `register_open_hooks' open its own fd in case gawk does not know - how to open it. - (iop_open): Call `os_close_on_exec' after `iop_alloc'. - ADR: If `iop_alloc' returns NULL but the fd is valid, close - the fd to avoid an fd leak. - -Mon May 2 08:05:59 2005 Arnold D. Robbins - - * eval.c (update_ERRNO): Don't use `return' in a `void' function. - * awk.h (AWKNUM): Back out use of `long double' based on LDBL_MANT_DIG. - * builtin.c (tmp_integer): Back out extra ifdefs. - -Fri Apr 29 13:01:05 2005 Arnold D. Robbins - - * configure.ac: Look for `isblank' function. - * field.c: Add define for `isblank' if we don't have it. - -Fri Apr 29 12:01:33 2005 Julian Foad - - From grep. Doesn't seem to affect awk. - - * dfa.c (lex): Fix bug #9519: "echo do^re | grep do^re" was - failing to find a match. [Towards end, set `lasttok' before - returning `c'.] - -Fri Apr 29 00:28:46 2005 Arnold D. Robbins - - * configure.ac: Jump through an amazingly convoluted hoop to get - config.status to keep version.c upon `make distclean'. Seems to - work though. - -Thu Apr 28 23:40:02 2005 Stepan Kasal - - * configure.ac (PRINTF_HAS_F_FORMAT): Some cosmetic changes. - (custom.h): Don't cat custom.h at the end of config.h; instead, use - AH_BOTTOM([#include "custom.h"]) - * awklib/Makefile.am (AM_CPPFLAGS): Add $(top_srcdir) so that - custom.h can be found. - -Thu Apr 28 23:21:22 2005 Jim Meyering - - * field.c (set_FIELDWIDTHS): Tighten up the code to accept FIELDWIDTHS - values in [1..INT_MAX], e.g., detect overflow and invalid strings, - and reject strings starting with `-'. - -Thu Apr 28 23:05:33 2005 Stepan Kasal - - * dfa.c (parse_bracket_exp_mb): Shorten one part of the code, to get - closer to grep's copy. - -Thu Apr 28 23:00:58 2005 Pat Rankin - - * builtin.c (format_tree) [#if VAXCRTL]: For floating point - formatting, reject zero_flag if using old VAXCRTL run-time - library to avoid getting erroneous results which appear as if - numerically incorrect (due to an embedded space in some cases, - extra trailing zeroes in others) rather than just misformatted. - `hsprint' test still fails, but not as badly. - -Thu Apr 28 19:12:03 2005 Arnold D. Robbins - - * re.c (reflags2str): Add three new RE_ flags from current regex.h - to bring the table up to date. - - * builtin.c (format_tree): Save 2 spare bytes instead of one. Suggested - by Stepan Kasal. - -Thu Apr 28 18:16:09 2005 Andrew J. Schorr - - * awk.h (IOBUF): Add new fields `opaque', `get_record', and - *close_func', to support insertion of an alternate input processor. - This is used by the XML extension. - (register_deferred_variable, register_open_hook, update_ERRNO_saved): - Declare new functions. - (load_environ, load_procinfo): Remove declarations -- these functions - are no longer global, since we use register_deferred_variable instead. - * awkgram.y (register_deferred_variable): New function to allow - calling code to register special variable names that trigger a callback - upon the first reference. This is now used to implement ENVIRON - and PROCINFO. - (variable): Search the list of deferred variables instead of hardcoded - tests for ENVIRON and PROCINFO. - * eval.c (set_BINMODE): Fix spelling of "arbitrary" in warning message. - (update_ERRNO_saved): New function that allows the caller to specify - the errno value instead of using the current value. - (update_ERRNO): Implement by calling update_ERRNO_saved(errno). - * io.c (iop_close): Call `iop->close_func' if non-NULL. - (close_redir): Should save `errno' value, otherwise `lintwarn' messages - might update it. Then use `update_ERRNO_saved' to set ERRNO. - (do_getline): Call `update_ERRNO_saved' to set ERRNO based on the - error code returned by the redirect function (instead of the current - value of errno). Similarly, use `update_ERRNO_saved' to set ERRNO - based on the value returned by `get_a_record'. But add a special - check to avoid updating ERRNO if `get_a_record' returns an error - code value of -1 (this is used by the XML extension which already - sets ERRNO before returning). - (register_open_hook): New function to register a function to be - called whenever a new data file is opened. This can be used to - install a special input processor (as in the XML extension). - (iop_alloc): Call registered open hook. - (get_a_record): If a `get_record' method has been set, call that instead. - * main.c (init_vars): Use `register_deferred_variable' to implement - ENVIRON and PROCINFO. - (load_environ, load_procinfo): Now static instead of global. - * doc/gawk.texi: Document new internal functions `update_ERRNO_saved', - `register_deferred_variable', and `register_open_hook'. - -Thu Apr 28 10:50:10 2005 Arnold D. Robbins - - * array.c (assoc_find, do_delete): Change incorrect uses of STREQN - to memcmp. - * builtin.c (do_index): Same. - * field.c (set_FS): Same. - * io.c (redirect, getredirect, do_close, set_RS): Same. - * re.c (reisstring): Same. - -Wed Apr 27 21:35:57 2005 Arnold D. Robbins - - Allow for long double. Initial changes from Jean-Marc Saffroy - . - - * awk.h (AWKNUM): If have long doubles (LDBL_MANT_DIG), define AWKNUM - as long double, otherwise just use double. - * builtin.c (format_tree): Change type of tmpval to double. - (do_strtonum): Same for `d' and types used in casts. - (tmp_integer): Don't do bit shifting if have long doubles. - - Unrelated, from Andrew J. Schorr: - - * io.c (close_one): Check for RED_FILE|RED_WRITE, not just RED_FILE. - -Mon Apr 25 12:23:18 2005 Andrew J. Schorr - - * eval.c (r_tree_eval): In Node_assign_concat case, when copying string - constants, include the terminating zero byte. - -Fri Apr 1 06:26:31 2005 Arnold D. Robbins - - Update to Automake 1.9.5. - - * INSTALL, aclocal.m4, depcomp, install-sh, missing, - mkinstalldirs, ylwrap: Updated. - - Unrelated: - - * builtin.c (do_tolower, do_toupper): Remove old code - based on 8-bit character table. - -Wed Feb 23 08:23:22 2005 Arnold D. Robbins - - * bisonfix.awk: New file, fixes continued #ifdef for dumb compilers. - * Makefile.am (awkgram.c): Fix rule to use it. - (EXTRA_DIST): Include bisonfix.awk. - -Tue Feb 22 21:18:50 2005 Arnold D. Robbins - - * random.h: Remove include of config.h and move it to ... - * random.c: Here. Move include of random.h back to where it was. - - * regcomp.c, regex.c, regexec.c: NUKED all use of alloca not inside - `_LIBC' ifdef. Hooray! - -Sat Feb 19 20:13:28 2005 Pat Rankin - - Workarounds for bugs and missing C89 features in old VAX C compiler. - - * regex_internal.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT - is defined. - [MB_CUR_MAX]: Define as 1 if mbsupport.h hasn't defined it. - [ER_ERRMSG, ERRMSG_TYPE, ERRMSG_OFFSET, ERRMSG_SEPARATOR]: New macros - conditionalized upon gawk's NO_TOKEN_PASTING macro. - * regcomp.c: Use them. - (parse_dup_op): Use alternate initialization of start_token if - RE_TOKEN_INIT_BUG is defined. - * regexec.c (proceed_next_node): Compare push_fail_stack() result - explicitly against REG_NOERROR rather than implicitly against 0. - -Sat Feb 19 20:05:50 2005 Pat Rankin - - * dfa.c "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined. - -Wed Feb 16 20:43:07 2005 Pat Rankin - - * awk.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined. - * regex.h : Guard inclusion with HAVE_SYS_TYPES_H. - * regex.c : Likewise. - * random.c "random.h": Include this first to get config.h setup. - : Guard inclusion with HAVE_FCNTL_H. - : Guard inclusion with HAVE_UNISTD_H. - * io.c [#if defined(MSDOS) ||... defined(__CYGWIN__)]: Splice the - backslash continuation back into one long line. - -Wed Feb 16 10:11:21 2005 Arnold D. Robbins - - * node.c (unref, format_val): Add assertions checking that both - `tmp->wstptr != NULL' and `(tmp->flags & WSTRCUR) != 0' before - freeing `tmp->wstptr'. Thanks to kimura.koichi@canon.co.jp. - - * random.c (HAVE_UNISTD_H): Conditionalize include of . - Thanks to Scott Deifik . - -Sun Feb 13 18:24:50 2005 Arnold D. Robbins - - * io.c (socketopen): Move `#ifdef MSG_PEEK' up to above - declarations too. Thanks to Michal Jaegermann. - - * config.guess, config.sub: Updated from Savannah. - -Thu Feb 10 15:48:48 2005 Arnold D. Robbins - - * regex_internal.c (re_dfa_add_node): Remove variable `type' - and just use `token.type' directly in RE_ENABLE_I18N code below. - Saves a compiler warning, and a good compiler will handle it anyway. - * regexec.c (check_arrival_add_next_nodes): Move decl of `err' - inside #ifdef RE_ENABLE_I18N code where it's used. - * awkgram.y (yylex): Add casts to int before use of `strlen' results - for printf-style precision. Avoid a compiler warning. - * io.c (redirect, do_close): Same for use of tmp->stlen. - - Thanks to Michal Jaegermann . - -Wed Feb 9 10:19:15 2005 Stepan Kasal - - * Makefile.am (datadir, libexecdir): Removed. - (awkdatadir): Renamed to pkgdatadir. - (pkgdatadir, LDADD): Use the make syntax to refer to other variables, - not @...@. - -Wed Feb 9 10:05:46 2005 Arnold D. Robbins - - * node.c (r_dupnode): Assign NULL to r->wstr after `getnode'. - Fix count of bytes to copy in call to `memcpy'. - Thanks to Kimura Koichi, . - -Tue Feb 8 19:26:22 2005 Pat Rankin - - * regcomp.c (init_dfa): Avoid strcasecmp() since regex.c doesn't - use awk.h and none of the assorted other included header files - are guaranteed to declare it. - (parse_expression): Modify casts for the string arguments passed to - build_charclass_op() to fix char * vs unsigned char * mismatch. - (parse_bracket_exp): Likewise add cast for the string argument - passed to build_charclass(). - -Mon Feb 7 15:04:09 2005 Arnold D. Robbins - - * eval.c (make_scalar): Don't use P() macro in definition. - Thanks to Juergen Kahrs . - -Wed Feb 2 16:36:19 2005 Arnold D. Robbins - - * main.c (main): Call `close_io', without its result affecting - the exit status. Super small, super dark corner. - - See test/exitval2.awk. - -Tue Feb 1 11:58:29 2005 Arnold D. Robbins - - * regex.h (__APPLE_CC__): Removed test and definition of __restrict. - Not needed for current MacOS X compiler. - -Sun Jan 30 13:56:37 2005 Arnold D. Robbins - - Fresh merge with CVS regex routines. Fixes handling of \B. - See tests/gnureop3.awk and also - http://sources.redhat.com/bugzilla/show_bug.cgi?id=693. - - CVS base versions: - - * regcomp.c: Version 1.92, Thu Jan 27 19:05:20 2005. - * regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005. - * regex_internal.c: Version 1.49, Thu Jan 27 19:07:15 2005. - * regex_internal.h: Version 1.60, Wed Jan 26 22:40:50 2005. - * regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005. - -Sat Jan 22 22:30:40 2005 Arnold D. Robbins - - Reinstate patch of 18 Nov 2001, for VMS, at least: - - * random.c (srandomdev): ifdef-out. Lots of compile time - problems on multiple platforms, and gawk doesn't even - use the routine. The heck with fine-grained solutions. - -Thu Jan 20 14:15:32 2005 Arnold D. Robbins - - * awkgram.y (LEX_FOR): Free NAME tokens in transformation of - `for (iggy in foo) delete foo[iggy]' into `delete foo'. - Thanks and a tip of the hatlo to Valgrind. - - * dfa.c (_): Clean up stuff here by just including "gettext.h". - Per Bruno Haible. - -Wed Jan 19 18:29:23 2005 Arnold D. Robbins - - * awkgram.y (yylex): Improve parsing of numeric constants - and hex values, via a push from Paul Eggert. See test/hex.awk. - - * regex_internal.c (re_node_set_alloc): If `size' is 0, just - zero out the structure. From valgrind. - -Tue Jan 18 17:23:25 2005 Arnold D. Robbins - - Make gawk multibyte aware. This means that index(), length(), - substr() and match() all work in terms of characters, not bytes. - - * awk.h (NODE): Add `wsp' and `wslen' elements to value for wide - string. - (WSTRCUR, wstptr, wstlen, force_wstring): New macros. - (str2wstr, wstrstr, wcasestrstr): New declarations. - * builtin.c (do_index, do_length, do_substr, do_match): Handle wide - strings. - * eval.c (flags2str): Add WSTRCUR. - * node.c (format_val, r_dupnode, mk_number, make_str_node, unref): - Add code to deal with wide strings. - (str2wstr, dump_wstr, wstrstr, wcasestrstr): New functions. - -Sun Jan 16 15:10:35 2005 Arnold D. Robbins - - * random.h (int32_t): Define this type. - -Thu Jan 13 14:38:13 2005 Arnold D. Robbins - - Cause `configure --disable-nls' to still allow locale-correct - formating of numeric values. - - * builtin.c (format_tree): Change #ifdefs to only test HAVE_LOCALE_H. - Improve code for ' flag so that extraneous separator is not included if - number of digits is multiple of locale separater count (3, 6, 9, etc.) - * dfa.c (dfaparse): Change ifdef to only test #ifdef LC_COLLATE. - * eval.c (fmt_ok): Remove ENABLE_NLS from #ifdef test. - * gettext.h: Include on both sides of test. Should really - be factored out. - * main.c (loc): Remove ENABLE_NLS from #ifdef test. - (main): Same in call to localeconv(). - * node.c (isnondecimal): Remove ENABLE_NLS from #ifdef test. - - Unrelated: - - * regcomp.c (init_dfa): Change `codeset' to `codeset_name' in two - places. - -Mon Jan 10 11:49:56 2005 Arnold D. Robbins - - Annual sync with glibc. - - * getopt_int.h: New file. - * Makefile.am (base_sources): Add it. - * getopt.h, getopt.c, getopt1.c: Updated. - * regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h, - regexec.c: Updated. - - Original versions: - - getopt_int.h, 1.1, Tue Mar 9 10:31:19 2004 - getopt1.c, 1.10, Tue Mar 9 10:35:37 2004 - getopt.h, 1.21, Fri Mar 19 00:19:32 2004 - getopt.c, 1.53, Wed Mar 10 23:13:26 2004 - regcomp.c, 1.87, Mon Dec 6 02:56:42 2004 - regex.c, 1.126, Fri Jan 30 05:19:58 2004 - regex.h, 1.33, Thu Nov 18 23:50:57 2004 - regex_internal.c, 1.46, Thu Jan 6 20:59:49 2005 - regex_internal.h, 1.57, Mon Dec 27 16:29:05 2004 - regexec.c, 1.75, Mon Dec 27 16:29:52 2004 - - * regex.h: Add check for __APPLE_CC__ and definition of __restrict. - * regex.c: Add check for _MSC_VER and include . - * regex_internal.h (_RE_ENABLE_I18N): Change test. - (re_realloc): Add check/fix for SunOS 4.1.x. - * regex_internal.c (build_wcs_upper_buffer): ifdef label - `offsets_needed', add cast in call to `wcrtomb'. - * regcomp.c (build_charclass, build_charclass_op): Remove `unsigned' - from declarations of `char *' params. - (regerror): Remove use of mempcpy. - (peek_token): Disallow \s and \S for gawk. - (build_charclass): Change decl of `class_name' and use it directly. - Nuke variable `name'. - (build_charclass_op): Change decl of `class_name' and `extra'. - -Thu Jan 6 16:44:32 2005 Arnold D. Robbins - - Improve autoconfiscation stuff for wide character use. - - * builtin.c (do_tolower, do_toupper): Conditionally compile - call to `wide_tolower_toupper'. - (wide_tolower_toupper): Conditionally compile typedefs and function. - * mbsupport.h: Add check for having `wint_t', and `iswlower', - `iswupper', `towlower' and `towupper'. - * configure.ac (HAVE_WINT_T): Add test. - (AC_CHECK_FUNCS): Add `wint_t', `iswlower', `iswupper', `towlower' - and `towupper'. - - Unrelated change: - - * hard-locale.h (hard_locale): Add decl of `xmalloc' to prevent - redeclaration problems on some compilers. - -Wed Jan 5 10:20:17 2005 Arnold D. Robbins - - Update to Bison 2.0. - - * bisonfix.sed: Removed, no longer needed. - * Makefile.am (EXTRA_DIST): Removed bisonfix.sed. - (awkgram.c): Fix build rule. - * awkgram.c: Regenerated. - -Tue Jan 4 18:47:56 2005 Arnold D. Robbins - - Update to Automake 1.9.4. - - * alocal.m4, config.guess, config.sub, install-sh: Updated. - -Mon Jan 3 14:08:27 2005 Arnold D. Robbins - - Update to Automake 1.9.3. - - * INSTALL, alocal.m4, config.guess, config.sub, depcomp, - install-sh, missing, ylwrap: Updated. - -Mon Jan 3 11:23:36 2005 Arnold D. Robbins - - Fix obscure issue. ^ in RS should only match at the very - beginning of the input. Essentially, the file is one long - string. To do this, use the `not_bol' flag in the `struct - pattern_buffer'. Thanks to Stepan Kasal for pointing out the - problem and to Andreas Schwab for pointing out the mechanism - for a solution. - - * awk.h (RE_NEED_START, RE_NO_BOL): New flags for `research'. - (IOP_AT_START): New flag for IOBUF. - (research): Last parameter is now `flags'. - * builtin.c (do_match, sub_common): Change calls to `research'. - * eval.c (interpret, match_op): Same. - * field.c (re_parse_field): Same. - * io.c (spec_setup): Add IOP_AT_START flag. - (iop_alloc): Same. - (rsrescan): Modify logic to check IOP_AT_START and if not on to - add RE_NO_BOL to flags value in call to `research'. - (get_a_record): Clear IOP_AT_START upon return from `*matchrec'. - (iopflags2str): Add IOP_AT_START to table. Also IOP_CLOSED, - which was missing. (Ooops.) - * re.c (research): Last paramater is now flags. Modify logic to - handle RE_NO_BOL case by setting the right bit initially. Clean - up control flow so that it's cleared before returning. If RE_NO_BOL, - don't bother with the dfa matcher, as it doesn't have an analogous - capability. - -Wed Dec 22 12:33:48 2004 Arnold D. Robbins - - For --exec, don't allow x=y assignments where filenames would be. - Do allow -v. This is because we assume --exec is used mainly for - CGI stuff and we don't want var assigns to affect the code. - - Suggested by Stepan Kasal; motivated by reading about web security. - - * main.c (disallow_var_assigns): New variable. - (main): Set the var for --exec. - (arg_assign): Check it appropriately. - -Sun Dec 19 17:27:09 2004 Arnold D. Robbins - - * builtin.c (do_gensub): Make `global' flag smarter, such that - a string numeric constant (e.g., "3") acts like a numeric - constant. - * node.c (r_force_number): Not really related: Only set NUMCUR - if we actually convert some digits. - -Sun Dec 19 16:08:50 2004 Arnold D. Robbins - - * dfa.h, dfa.c: Synchronize with what's happening in GNU grep - development. Effectively only minor whitespace changes and some - slight code motion of ifdefs and includes. - * hard-locale.h: New file, extracted from old dfa.c. - * Makefile.am (base_sources): Add hard-locale.h. - -Sun Dec 19 11:13:45 2004 Arnold D. Robbins - - * io.c (socketopen): Change type of `readle' and `namelen' - variables to size_t. For QNX, but a good idea anyway. Thanks - to `Anthony' (rz1a@mail.ru). - -Mon Dec 6 11:11:22 2004 Arnold D. Robbins - - Undid change of Mar 9 2004, to add gofast patch. It gets things - wrong for gawk. This removes the bandaid of ifdef-ing out the - main check. Eventually this'll all get straightened out in the - GNU grep code. - - * dfa.c (buf_offset): Removed. - (SKIP_REMAINS_MB_IF_INITIAL_STATE): Removed use of buf_offset, do - free `mblen_buf', `inputwcs'. - (match_anychar, match_mb_charset, transit_state_consume_1char, - transit_state): Remove use of buf_offset in mblen_buf. - (dfaexec): Use `free' and `malloc', not `realloc'. - -Mon Dec 6 10:55:37 2004 Fumitoshi UKAI - - Forwarded from james@nocrew.org, the Debian contact. - - * dfa.c (parse_bracket_exp_mb): - 1. Build range correctly when IGNORECASE for [a-a] to also get 'A'. - 2. For [:lower:] and [:upper:], if ignoring case, set type string - to "alpha". This parallels code in the regex routines. - 3. Reset wc1 to EOF when parsing bracket expressions. - -Mon Nov 29 18:36:25 2004 Arnold D. Robbins - - * io.c (redirect): When allocating a new struct redirect, set - rp->pid to -1, not 0, so that code checking for EOF on an - input pipe works correctly. - -Thu Nov 25 14:22:41 2004 Stepan Kasal - - * Makefile.am (MAINTAINERCLEANFILES): Add. - * version.in (version_string): Use PACKAGE_STRING. - -Tue Nov 23 17:27:38 2004 Stepan Kasal - - * re.c: Fix a typo in a comment. - -Mon Nov 22 16:47:00 2004 Arnold D. Robbins - - * awkgram.y (yylex): Add lint check for tawk style modifiers on - regexes, /.../i and /.../s. Not that it'll help anyone. - -Wed Oct 27 14:25:18 2004 Stepan Kasal - - * builtin.c (do_tolower, do_toupper): Fix the wide char handling, - especially when the lowercased char doesn't ocuppy the same - number of bytes as its uppercase equivalent. Make use of ... - (wide_tolower_toupper): ... this new static function. - -Mon Oct 25 11:51:14 2004 Arnold D. Robbins - - * builtin.c (bchunk, bchunk_one, cksize): Change type of `olen' - to size_t from long. It is the 21st century now, after all... - Thanks to Stepan Kasal. - -Mon Oct 11 10:49:09 2004 Arnold D. Robbins - - * awkgram.y (yylex): Improve lint warnings for non-decimal constants. - * node.c (isnondecimal): Made a little smarter, thanks to Stepan Kasal. - -Thu Oct 7 21:59:38 2004 Arnold D. Robbins - - * dfa.c (dfamust): Redo fix of 22 Sep to match code from - current GNU grep. - -Sun Oct 3 23:06:00 2004 Arnold D. Robbins - - * node.c (isnondecimal): Made smarter, so that 0xEE does - register as non-decimal. Added parameter to indicate use of - locale's decimal point and changed declaration and callers. - -Tue Sep 28 18:38:17 2004 Arnold D. Robbins - - * node.c (isnondecimal): New function, now smarter. - * awk.h (isnondecimal): Changed from macro to function. - -Wed Sep 22 11:24:46 2004 Arnold D. Robbins - - * dfa.c (dfamust): At end, check results of `malloc'. - Based on bug report from Sorav Bansal - for grep. - -Mon Sep 20 13:18:18 2004 Arnold D. Robbins - - New --exec option. Needed for gawk CGI scripts to prevent - arbitrary options and/or source getting passed in from the web. - - * main.c (optab): New long option, --exec. - (main): Catch it. Like -f but end option processing. - (usage): Add it to the usage message. - - Thanks to John DuBois and Don Stokes for their input. - - Unrelated: - - * dfa.c (dfaexec): Disabled caching into buffer that bypasses - multibyte initialization, since it can get things wrong. Thanks - to Andreas Schwab . - -Mon Sep 20 12:59:42 2004 Andreas Schwab - - * awkgram.y (nextc): Check for end of lexer buffer before - advancing ring buffer index. - -Wed Sep 8 09:54:53 2004 Arnold D. Robbins - - * main.c (main): Force LC_NUMERIC locale to "C" before parsing - the program, since a variable assignment with -v can leave the - locale set incorrectly. - - Thanks to Sirix for reporting the problem. - -Wed Aug 25 18:55:30 2004 Arnold D. Robbins - - * main.c (UPDATE_YEAR): New constant at top of file, where we - won't miss it. - (copyleft): Use it. - -Sun Aug 22 17:26:39 2004 Stepan Kasal - - Define gawk_mb_cur_max even if there is no mbs support, as - ``const int'' and assign 1 to it. - This fixes a bug in re.c where #ifdef MBS_SUPPORT was missing. - - * awk.h (gawk_mb_cur_max): Declare. - * main.c (gawk_mb_cur_max): Define. - * awkgram.y (nextc_is_1stbyte): Without mbs support, define to 1. - * builtin.c (index_multibyte_buffer): Define a dummy function - when there is no mbs support. - * awkgram.y, builtin.c, re.c: Remove some `#ifdef MBS_SUPPORT'. - -Sun Aug 15 22:08:04 2004 Arnold D. Robbins - - Import current FreeBSD random.c. Make it work for gawk. - Needed for cases where long is more than 32 bits. - - * random.c: Imported from FreeBSD. Header includes tweaked. - * random.h: Typdef gawk_uint32_t appropriately and #define uint32_t - to it. - * configure.ac: Add calls to AC_CHECK_SIZEOF for unsigned int - and unsigned long. - - Started with - http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/random.c - Thanks to Andreas Schwab for the pointer. - -Thu Aug 12 13:09:53 2004 Arnold D. Robbins - - * main.c (copyleft): Fix copyright year. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon Aug 2 12:17:40 2004 Arnold D. Robbins - - * configure.ac: Fix the hack. Do the sed on `Makefile', - not `Makefile.in'. Sigh. - -Sun Aug 1 14:48:30 2004 Arnold D. Robbins - - * configure.ac: MAJOR HACK: At end, remove version.c from Makefile.in - variable `CONFIG_CLEAN_FILES' so that `make distclean' doesn't - remove version.c. - -Mon Jul 19 17:07:27 2004 Arnold D. Robbins - - * config.guess, config.sub: Updated from Savannah CVS. - -Fri Jul 16 10:59:07 2004 Arnold D. Robbins - - * re.c (make_regexp): Bracket code using `gawk_mb_cur_max' - inside `#ifdef MBS_SUPPORT'. - -Thu Jul 15 12:36:25 2004 Arnold D. Robbins - - * dfa.c (parse_bracket_exp_mb): If doing case folding, - include the other case for regular characters inside [...]. - - * re.c (make_regexp): Smarten up handling of IGNORECASE, - particularly for multibyte character sets. Sigh. - -Wed Jul 14 16:25:23 2004 John Haque - - * eval.c (interpret): For `Node_K_return', use `copynode' - and not `dupnode' for non-PERM, non-TEMP values. - (func_call): Don't add TEMP flag to returned value. - - These two fix a problem uncovered by the July 8 change in - `assoc_lookup'. - -Wed Jul 14 16:14:09 2004 Arnold D. Robbins - - * awkgram.y (node_common): Add check `lexeme >= lexptr_begin', - from valgrind run. - -Wed Jul 14 16:00:51 2004 John Haque - - * io.c (rsrescan): Fix off by one error at end of record. - -Thu Jul 8 16:59:51 2004 Stepan Kasal - - * awkgram.y (output_redir): Make sure not to dereference NULL - pointer. The bug was triggered by the following code: - - gawk 'BEGIN{print "date" |& getline}' - - No test case created, beacuse of the following: - Correct interpretation involves executing "1" or "0" -- as the user - may have defined this, we would have to override this in the test - script. It's not worth the hassle. - -Thu Jul 8 12:59:49 2004 Arnold D. Robbins - - * awk.h (load_casetable): Name changed from `load_ignorecase'. - * eval.c (load_casetable): Name changed from `load_ignorecase'. - Fix all uses. - -Thu Jul 8 12:32:13 2004 John Haque - - * awkgram.y (get_src_buf): Fix off-by-one error to avoid "does not end - in newline" messages. - * array.c (assoc_lookup): Small performance hack: for TEMP subs nodes, - use its string memory for ahname. - * ext.c (get_actual_argument): Minor code cleanup. - * builtin.c (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): - fixed to issue "non-numeric argument" lint warnings before using - `force_number'. - -Mon Jun 21 16:53:35 2004 Arnold D. Robbins - - More changes from John Haque to rationalize extension functions. - - * awk.h (get_curfunc_arg_count): Name changed from - `get_curfunc_parm_count'. - * eval.c (get_curfunc_arg_count): Ditto, body redone to count actual - args passed at call time. - * ext.c (get_argument): Update range check. - (get_actual_argument): Simplify the code. - -Mon Jun 14 14:01:16 2004 Arnold D. Robbins - - Changes from John Haque and ADR to rationalize extension functions. - - * awk.h (check_special, get_curfunc_parm_count, get_actual_argument): - new function declarations. - (get_scalar_argument, get_array_argument): New macros. - * awkgram.y (check_special): New function. - (yylex): Use `check_special' to search `tokentab'. - (dump_funcs): Always count functions, in order to get dynamic ones. - Removed bogus use of `static' on `tab' variable. - * eval.c (struct fcall): Change type of `count' to `size_t'. - (get_curfunc_parm_count): New function. - (push_args): Set `r->rnode' to NULL for local variable. - * ext.c (make_builtin): Add sanity checking for presence and - name of new function, and that it's not a redefinition. - (get_argument): Check that requested arg is within range of actual - number of parameters. Also clean up logic for Node_var_new, - Node_var_array, Node_array_ref. - (get_actual_argument): New function. - * profile.c (pp_builtin): Better handling of dynamic extension function. - -Sun Jun 13 14:32:22 2004 Arnold D. Robbins - - * io.c (redirect): Conditionalize checking for process recovery - on `#ifdef PIPES_SIMULATED'. Needed for MS-DOS and VMS. - * builtin.c (tmp_integer): Change bracketing of magic test to - `#ifdef HAVE_UINTMAX_T' which is more general and more correct. - -Wed Jun 9 21:36:01 2004 Arnold D. Robbins - - * re.c (make_regexp): Add dfa matching into IGNORECASE handling. - -Tue Jun 8 15:38:56 2004 Arnold D. Robbins - - * awk.h (casetable): Remove `const'. - * eval.c (casetable): Remove `const'. - (load_ignorecase): New function. Loads locale-correct values in - upper 128 bytes. - (set_IGNORECASE): Call `load_ignorecase'. - -Tue Jun 8 14:04:19 2004 Arnold D. Robbins - - * awkgram.y (get_src_buf): Make sure that value from - `optimal_bufsize' is reasonable. Increase it if not. - -Tue Jun 8 13:54:28 2004 John E. Haque - - * awkgram.y (statement:LEX_FOR): Fix bug in loop to `delete a' - optimization. - * io.c (format_tree): Check for out of range values for - positional specifiers. - -Mon Jun 7 17:02:48 2004 Arnold D. Robbins - - * builtin.c (tmp_integer): Bracket the magic test inside - `#ifndef VMS'. - - * awk.h (child_catcher): Remove declaration. - * main.c (main): Remove `signal' calls for SIGCLD, SIGCHLD. - * io.c (child_died, child_signo, child_catcher): Removed. - (get_a_record): Remove code checking for death of child. - (redirect): If `rp' matches and is at EOF and type is input - pipe, and `rp->pid' is not -1, call `wait_any' to reap the - child. This is a heuristic, but it works pretty well. - -Sun Jun 6 18:35:17 2004 Arnold D. Robbins - - * io.c (get_a_record): Restore use of `memmove' instead of - memcpy. Otherwise some tests break on some systems. We think. - (child_died): Don't reset signal handler; breaks on some S5 systems. - (get_a_record): Reset handler if child_died. Still flaky on Solaris. - * configure.ac (version.c): Made from version.in again, for - non-Unix systems. - * Makefile.am (base_sources): Add version.c back. - * version.in: Include config.h for definition of const. - * main.c (version_string): Add back declaration, don't - include "version.i". - (main): Don't install child_catcher on Sun. (HACK) - -Thu Jun 3 14:06:06 2004 Arnold D. Robbins - - * main.c (version_string): Removed declaration, since - version.i is included directly. - * version.in: Removed test for definition of const. - -Tue Jun 1 19:23:53 2004 Stepan Kasal - - * Makefile.am (base_sources): Don't mention version.c, so that - it doesn't get distributed. - * po/POTFILES.in: Remove version.c - * configure.ac: Create version.i from version.in. - * main.c: Include version.i. - -Tue Jun 1 18:33:32 2004 Arnold D. Robbins - - Fix problem reported by Stephen Marchant - on Thu, 30 Oct 2003 13:11:42 -0500. - - * regex_internal.h (re_realloc): Allow for SunOS pre-Standard C - `realloc' which doesn't accept NULL pointers. - * awk.h (erealloc): Same. - - Unrelated. Change suggested by Peter Sobisch , have - PROCINFO["version"] be the version of gawk: - - * main.c (load_procinfo): Add in version. - - Unrelated: Avoid warning: - - * main.c (main): Cast calls to `bindtextdomain' and `textdomain' to - void. Avoids diagnostic with `configure --disable-nls'. - * dfa.c (check_matching_with_multibyte_ops): Remove unneeded nested - #ifdef, per Scott Deifik (scottd@amgen.com). Also fix some spelling - errors in comments. - -Tue Jun 1 18:26:45 2004 Paul Eggert - - Fix a bug reported by Mike Romaniw - to bug-gnu-utils on 2003-09-27: compl(compl(0xf0f)) returned 0xfff - on hosts with 64-bit uintmax_t and 64-bit IEEE-764 double, due to - rounding errors. - - * doc/gawk.texi (Bitwise Functions): Leading nonzero bits are - removed in order to fit the result into a C 'double' without rounding - error. - * builtin.c: Include if available. - (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG): Define if not already defined. - (AWKSMALL_MANT_DIG, AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): New macros. - (tmp_integer): New function. - (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Use them. - -Tue Jun 1 17:40:47 2004 Stepan Kasal - - * eval.c (push_args): Set var_value to Nnull_string for - local variables. - -Mon May 31 11:49:20 2004 Stepan Kasal - - * replace.c: #undef DEBUG before including mktime.c, it has - different meaning there. - -Mon May 31 08:25:30 2004 Arnold D. Robbins - - * array.c (get_actual): Add extra error message for `delete f' - inside body of function `f'. - -Mon May 3 09:53:34 2004 Arnold D. Robbins - - * Makefile.in, */Makefile.in: Updated to automake 1.8.4. - * config.guess, config.sub: Same. - * aclocal.m4, depcomp, install-sh: Same. - -Mon May 3 09:24:45 2004 Arnold D. Robbins - - * configure.ac: Look for missing `strtoul'. - * replace.c: Include missing_d/stroul.c if not HAVE_STRTOUL. - * io.c (devopen): Use `strtoul' instead of `strtod' for - extracting fd number from "/dev/fd/N". (Thanks to Jim Meyering.) - * field.c (set_FIELDWIDTHS): Use `strtoul' instead of `strtod' - when parsing FIELDWIDTHS values. (Thanks to Jim Meyering.) - -Mon Apr 19 20:12:57 2004 Arnold D. Robbins - - * Makefile.in, */Makefile.in: Updated to automake 1.8.3. - * config.guess, config.sub: Same. - -2004-03-18 Stepan Kasal - - * eval.c (make_scalar): Comment clarification. - - * array.c (get_actual): Remove the condition ``canfatal'' - before ``cant_happen()''; if the data are consistent, we - simply cannot get there with a non-func Node_param_list, - no matter whether we are called via get_array or not. - - * awkgram.y (variable): Make one longer message, to help translators. - -Tue Mar 9 17:34:10 2004 Arnold D. Robbins - - Adapted `gofast' patch from Redhat Enterprise version of grep - to current dfa.c. - - * dfa.c (buf_offset): New variable. - (SKIP_REMAINS_MB_IF_INITIAL_STATE): Modified to use it, don't - free `mblen_buf', `inputwcs'. - (match_anychar, match_mb_charset, transit_state_consume_1char, - transit_state): Use buf_offset in mblen_buf. - (dfaexec): Realloc things instead of free and malloc. - -Thu Mar 4 16:46:55 2004 Arnold D. Robbins - - * configure.ac (AC_FUNC_MBRTOWC): Added. - (AC_CHECK_FUNCS): Removed `mbrtwoc'. - (REGEX_MALLOC): Removed. Not needed for new regex* routines. - - * re.c (research): Removed comment and check for return of -2 - since that was for old regex using alloca or REGEX_MALLOC. - -Wed Mar 3 17:10:16 2004 Arnold D. Robbins - - * io.c (close_one): Don't close stdout or stderr; can happen if - /dev/stdout or /dev/stderr are used in redirection and all the - open files get used. - -Sun Feb 29 12:17:37 2004 Arnold D. Robbins - - * regcomp.c (build_charclass, build_charclass_op): Change type of - `class_name' parameter to `const char *' from `const unsigned char *' - and adjust callers. - -Thu Feb 26 15:20:22 2004 Arnold D. Robbins - - * awkgram.y (get_src_buf): Rewritten to better manage input and - supplying newlines on command line programs. Fixes problems reading - source files on Cygwin. - - Unrelated fixes from mary1john8@earthlink.net: - - * node.c (format_val): For no malloc case, free s->stptr if necessary. - * io.c (nextfile): Add missing call to `unref(FILENAME_node->var_value)' - for no files case. - (close_redir): Remove file from redirection list even if fp is - stdout or stderr. - -Tue Feb 24 12:11:34 2004 Arnold D. Robbins - - * regex_internal.c (build_wcs_upper_buffer): Enclose `offsets_needed' - label in `#ifdef _LIBC' to silence `unused label' compiler warning. - -Tue Feb 24 11:57:18 2004 Nelson H.F. Beebe - - * regcomp.c (parse_expression): Add cast to (unsigned char *) in calls - to `build_charclass_op'. - * regex_internal.c (build_wcs_buffer): Add cast to char* in call to - `wcrtomb'. - * regex_internal.h (bitset_not, bitset_merge, bitset_not_merge, - bitset_mask, re_string_char_size_a, re_string_wchar_at, - re_string_elem_size_at): Change to use prototypes. - (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at): - Declare as `internal_function'. - - * Makefile.am: Add rule to make .i files. This assists in debugging. - * awk.h (m_tree_eval): Add casts to NULL. (Some compilers are just - dumb. ADR) - -Mon Feb 23 15:58:39 2004 Arnold D. Robbins - - Clean up occupied process slots of children that have died: - - * awk.h (child_catcher): New function, declare it. - * main.c (main): Catch SIGCHLD/SIGCLD with `child_catcher'. - * io.c (child_died): New static variable. - (child_catcher): New function, sets `child_died', reinstalls self - as signal handler. - (close_rp): New function: isolates actual fp/iop closing logic. - (close_redir): Call `close_rp'. - (get_a_record): Check `child_died' and call `wait_any(0)' if so. - Add descriptive comment. - - Unrelated clean up: - - * eval.c (fcalls): Renamed from `fcall_list'. All uses changed. - (pop_fcall, push_args, dump_fcall_stack): Adjusted to use indexing - on `fcalls' instead of a pointer into it. Avoids hassles if `fcalls' - is realloc-ed during recursive tree_evals. Thanks to BWK. - - * config.guess, config.sub: Updated from Savannah. - -2004-02-19 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1. - -Wed Feb 18 12:40:09 2004 Arnold D. Robbins - - * awkgram.y (rule): Use `msg' not `warning' for `must have an - an action part' message. `warning' is wrong, since it's a real error. - -Mon Feb 16 12:17:39 2004 Arnold D. Robbins - - * main.c, eval.c, builtin.c: Change test for `#ifdef HAVE_LOCALE_H' - to `#if ENABLE_NLS && defined(HAVE_LOCALE_H)' so that builds with - `configure --disable-nls' will actually work on non-glibc systems. - -Thu Feb 12 02:05:34 2004 Stepan Kasal - - Lots of misc changes from Stepan Kasal integrated. - - * array.c: Various variables and parameters of static functions - changed from int to long, in order to prevent overflow. - - * eval.c (make_scalar): New function; takes care of everything - that has to be done when a node of type Node_var_new or - Node_array_ref changes to a scalar variable. - (tree_eval, get_lhs): Call it. - (tree_eval): From now on, tree_eval(NULL) doesn't work; - it reports an internal error. - * awk.h (m_tree_eval): Likewise for the two macro versions. - * awkgram.y (statement): Make sure the Node_K_return's lnode is - always the return value, never NULL. - - * Makefile.am (install-exec-hook, uninstall-links): Make use of - $(VERSION). - (INCLUDES): Renamed to AM_CPPFLAGS. - (AM_CPPFLAGS): The file libintl.h is generated in the - build subdirectory intl, not in the directory $(srcdir)/intl. - (diffout): New target is an alias for ``make -C test diffout.'' - * awklib/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS. - - * README_d/README.hpux: Change the whitespace in the appended patch, - so that it applies to the current source. - * posix/gawkmisc.c: Change a tab to a space (needed for the above). - - Make version control more in the style of current autotools: - - * configure.ac: Remove obsolete versions of macros: - AM_INIT_AUTOMAKE doesn't need any parameters. - AC_OUTPUT shouldn't have any parameters either. - Its parameters go to a new macro: AC_CONFIG_FILES. - AC_CONFIG_HEADERS moved near the end of the file. - * configure.ac: Add [version.c:version.in] to AC_CONFIG_FILES - * version.in: Modify for autoconf substitutions. - * version.c: Remove, it's generated at configure time now. - * fixvers, patchlev.h, unsupported/tandem/ptchlvl.h: Nuke and ... - * Makefile.am, main.c: ... forget them. - -Mon Feb 9 12:57:00 2004 Arnold D. Robbins - - * awk.h builtin.c eval.c field.c (HUGE): Changed to `UNLIMITED'. - Avoids possible conflict with constant in svid-mode math.h. Thanks to - Roman.Putanowicz@iecn.u-nancy.fr for pointing out the problem. - -Fri Feb 6 12:09:55 2004 Arnold D. Robbins - - * configure.ac: Check for `wctype', `wcscoll' and `iswctype'. - * mbsupport.h: New file. Merges and centralizes testing for MBS support. - * Makefile.am (base_sources): Add mbsupport.h to list. - * dfa.c, dfa.h, awk.h (MBS_SUPPORT): Include "mbsupport.h" and use the - test there. - * regex_internal (RE_ENABLE_I18N): Same. - - * Makefile.am (CLEANFILES): Added. - -Thu Feb 5 18:05:12 2004 Arnold D. Robbins - - * configure.ac (HAVE_WCTYPE_T): New test code added. - * dfa.h (wctype_t): Define if system doesn't. Needed here too - for other files that include dfa.h. - * dfa.c (wctype_t): Define if system doesn't. - (lex): Manually fill in arrays used for char class range testing - so will work on c89 and older compilers. - (parse_bracket_exp_mb): Split up an assignment to avoid type complaints. - - * main.c (main): When checking for `close_io' failure, only set - `exit_val' to 1 if not already exiting. - - * regcomp.c (regerror): Remove use of mempcpy. Generates too - many compiler warnings. - * configure.ac (AC_CHECK_FUNCS): Don't bother checking for it. - -Wed Feb 4 17:34:47 2004 Arnold D. Robbins - - * getopt.h (__THROW): Only define it if C++. The __GNU_PREREQ - macro is a major headache. - -2004-02-02 Paolo Bonzini - - * regexec.c (check_matching): Add P_MATCH_FIRST parameter. - (re_search_internal): Pass new parameter to check_matching. - (check_matching): Unless a parenthesized group is found at the - beginning of the regexp, advance P_MATCH_FIRST until we entered - a state different from the initial state. - -Mon Feb 2 15:52:37 2004 Arnold D. Robbins - - * re.c (research): Change last param to re_search to pass - NULL if `need_start' is false. May give us a marginal speed gain. - -Thu Jan 29 17:04:51 2004 Arnold D. Robbins - - * builtin.c (sub_common): Fix logic for `&' in replacement for - multibyte case. Simplify code a bit. - -Tue Jan 20 10:41:45 2004 Arnold D. Robbins - - * configure.ac: Add check for `memmove'. - * replace.c: Include missing_d/memmove.c if don't have `memmove'. - -Sun Jan 18 12:01:29 2004 Arnold D. Robbins - - * builtin.c (sub_common): Add comment and support for 2001 POSIX - behavior when --posix in effect. The masses have been - clamoring for this one. - -2004-01-16 gettextize - - * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.13.1. - * intl/*: Updated to 0.13.1. - -Fri Jan 16 08:16:38 2004 Arnold D. Robbins - - * getopt.h, getopt.c, getopt1.c: Synced to GLIBC version: - getopt.c: 1.51 - getopt.h: 1.18 - getopt1.c: 1.9 - -Thu Jan 15 15:28:48 2004 Arnold D. Robbins - - Here we go again: - - * regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c, - regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC - CVS versions: - - regcomp.c: 1.76 - regexec.c: 1.55 - regex.c: 1.125 - regex.h: 1.30 - regex_internal.c: 1.39 - regex_internal.h: 1.45 - regexec.c: 1.55 - - * acinclude.m4: Removed, not needed for automake 1.8.x. - * configure.ac: Updated to autoconf 2.59. - - Everything else updated to automake 1.8x and autoconf 2.59. - -Wed Jan 14 14:26:36 2004 Arnold D. Robbins - - * dfa.c, dfa.h: Updated manually with most of the changes in - grep 2.5.1. That version lost the ability to match newlines - in the data, so the merge had to be done by hand. Sigh. - -2004-01-12 Paolo Bonzini - - ALLOCA patch from - http://sources.redhat.com/ml/libc-alpha/2004-01/msg00099.html - added. - - * regcomp.c [_LIBC && !RE_ENABLE_I18N]: - Drop code to support this, it is never true. - (build_range_exp) [!_LIBC]: Do not create a range - in MBCSET for a single-byte character set. - (build_range_exp) [_LIBC]: Do not create a range - in MBCSET for a single-byte character set without - collation elements. - (init_dfa): Do not conditionalize on _LIBC, it - just makes the code less clear. - (parse_bracket_exp): Use NON_MATCH variable in - addition to "mbcset->non_match", not as an - alternative. - (build_charclass_op): Rename NOT parameter to - NON_MATCH, use it instead of declaring a variable. - (parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET - if the character set is single-byte. - -Wed Jan 7 15:23:04 2004 Arnold D. Robbins - - * awkgram.y (mk_rexp): Set n->re_cnt to 1. Makes reinstated - dfa code actually take effect! Don't know how I missed this. - - Unrelated: sync regex code to glibc. - - * regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c, - regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC - CVS versions: - - regcomp.c: 1.74 - regex.c: 1.124 - regex.h: 1.30 - regex_internal.c: 1.39 - regex_internal.h: 1.43 - regexec.c: 1.55 - - * regcomp.c (peek_token): Temporarily, we hope, disable \s and \S - operators. Too much trouble to document right now. - * dfa.c (lex): Add code for \s and \S but disable it until - next release. - -Wed Dec 24 15:28:57 2003 Arnold D. Robbins - - * eval.c (r_tree_eval): For Node_assign_concat, add - call `free_temp(r)'. Thanks to mary1john8@earthlink.net. - -Mon Dec 1 10:25:52 2003 Arnold D. Robbins - - CONSTVAL not needed if we test PERM instead. Thanks to - mary1john8@earthlink.net. See test/concat3.awk. - - * awk.h [CONSTVAL]: Removed. - * eval.c (flag2str): Removed CONSTVAL from table. - (r_tree_eval): For Node_assign_concat, it's enough to check - if l->flags has PERM clear. - * awkgram.y (yylex): Removed use of CONSTVAL for YSTRING and YNUMBER. - -Mon Nov 3 16:33:26 2003 Arnold D. Robbins - - * awkgram.y (get_src_buf): Replace `memmove' with `memcpy' for - marginal portability gain to older systems. - * io.c (get_a_record): Ditto. - -Sun Nov 2 15:59:27 2003 Arnold D. Robbins - - * awk.h [CONSTVAL]: Renamed from `STRCONST'. - * eval.c (flags2str): Fix in table. - (r_tree_eval): For Node_assign_concat, check for the flag for - both left and right hand sides. Also add a `force_string' call - for the right hand side and the left hand side. - * awkgram.y (yylex): Change flag value for YSTRING and add use - of flag for YNUMBER. - -Wed Oct 29 14:23:29 2003 Arnold D. Robbins - - * awk.h [STRCONST]: New flag value. - * eval.c (flags2str): Add it to table. - (r_tree_eval): For Node_assign_concat, check for the flag so that - we don't clobber string constants given: - s = "" - s = s something - * awkgram.y (yylex): For YSTRING, set STRCONST flag. - -Tue Oct 28 18:00:00 2003 Arnold D. Robbins - - Force SUBSEP to always have a string value. Per bug report - from mary1john8@earthlink.net. - - * awk.h (NODETYPE): New type, Node_SUBSEP. - (set_SUBSEP): Add declaration. - * awkgram.y (isnoeffect, isassignable): Add Node_SUBSPEP case. - * array.c (set_SUBSEP): New function. - * eval.c (nodetypes): Add Node_SUBSEP. - (r_tree_eval, r_get_lhs): Add code for Node_SUBSEP. - * main.c (varinit): Use Node_SUBSEP as type for SUBSEP. - * profile.c (tree_eval, pp_lhs, is_scalar, prec_level): Handle - Node_SUBSEP. - -Tue Oct 7 09:26:33 2003 Arnold D. Robbins - - * awk.h (NODETYPE): New member `Node_assign_concat'. - * awkgram.y (exp): Look for case of `x = x y' and if so, create a - Node_assign_concat. - * eval.c (interpret): Add case for Node_assign_concat. - * profile.c (prec_level): Ditto. - (tree_eval): Ditto. For variables, call new function `vname' to - print name; handles varname field for -v variables, which end up - including the value. - (vname): New function. - -Wed Sep 24 17:32:31 2003 Arnold D. Robbins - - Speed up `avoid_dfa' kludge, at least a little: - - * awk.h (struct Regexp): Add `has_anchor' member. Make it and - `dfa' member shorts; keeps space the same. - * re.c (make_regexp): Set `has_anchor' member correctly. - (avoid_dfa): Test for `has_anchor' member instead of searching - for it each time. - -Sun Sep 21 18:34:32 2003 Arnold D. Robbins - - * builtin.c (state): Only needs to be 256 bytes, initstate() can't - use any more than that. Well whadayaknow. - (do_rand, do_srand): Call `setstate' after calling `initstate'. - -Tue Sep 16 15:44:29 2003 Arnold D. Robbins - - * eval.c (interpret): For Node_K_switch, add kludge_need_start stuff - as used in `match_op'. Sigh. - * re.c (make_regexp): Add `no_dfa' variable, which is true if - GAWK_NO_DFA exists in the environment. This enables run time - testing of things with/without the dfa matcher. - -Mon Sep 15 18:36:38 2003 Arnold D. Robbins - - After much soul searching, reinstated old dfa code. The performance - of the new regex is just disastrous. Sigh. - - * awk.h (re_cnt): Reinstated old definition. - (struct Regexp): Added `dfareg' and `dfa' members. - (make_regexp): New last parameter in function, changed decl. - (avoid_dfa): Added declaration. - * awkgram.y (regexp, mk_rexp): Added use of `re_cnt'. Fixed call - to `make_regexp'. - * Makefile.am: Add dfa.h and dfa.c. - * eval.c (match_op): Complexified: added call to `avoid_dfa' and - `kludge_need_start' variable where used to 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): Added last paramter (`dfa') to function. - Complexified the code. - (re_update): Fixed call to `make_regexp'. - (research): Complexified the code, added calls to dfa stuff. - (dfaerror): New function. - (re_update): Fixed call to `make_regexp'. - (avoid_dfa): New function. - -Tue Sep 9 15:57:38 2003 Arnold D. Robbins - - * awkgram.y (get_src_buf): Fix calculation of `offset' when shifting - source lines around. In general, improve handling of things when - moving the source code line around. What a mess this code is. - -Mon Sep 8 19:08:55 2003 Arnold D. Robbins - - * eval.c (fmt_ok): Make provision for %F format and printf %'f flag - here too. - -2003-07-23 Christophe Bisiere (tiny change) - - * posix/regex.h (RE_TRANSLATE_TYPE): Define it to "unsigned char," - to avoid problems at hosts with signed char. - * posix/regexec.c (re_search_internal): Don't say - "unsigned RE_TRANSLATE_TYPE." - -Thu Aug 28 11:09:41 2003 Arnold D. Robbins - - * io.c (nextfile): Change use of variable `files' to make it - clearer that it's a boolean flag. - -Tue Aug 26 22:58:15 2003 Arnold D. Robbins - - * io.c (useropen): Add `defined (HAVE_GETGROUPS)' as first test - in `#ifdef'. Brings things in sync with same test in main.c and awk.h. - -Tue Aug 26 22:49:37 2003 Arnold D. Robbins - - * dbug.h: New file. - - * array.c, awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c, - main.c, msg.c, node.c, profile.c, re.c: Converted to use - Fred Fish's `dbug' library. By default compiled out, thus - not affecting speed. - - For the nonce, the `dbug' library itself is not shipped with - gawk, since I expect no-one else but me to be using it. - -Thu Aug 21 23:15:36 2003 Arnold D. Robbins - - * awkgram.y (numfiles): Change extern decl to long, to match what's - in main.c. Keeps things working on 64-bit systems. Thanks to bug - report from Jan Oravec . - -Wed Aug 20 14:53:47 2003 Arnold D. Robbins - - * eval.c (genflags2str): Move test for out-of-space inside test - for is the bit set. - -Mon Aug 11 11:26:51 2003 Arnold D. Robbins - - * regcomp.c (parse_bracket_exp): If `build_charclass' fails, just pass - its value on as the return value. - -Sun Aug 10 16:59:14 2003 Arnold D. Robbins - - * regcomp.c (build_range_exp): Make sure we don't - get WEOF on range characters. - -Tue Aug 5 21:49:32 2003 Arnold D. Robbins - - * array.c (get_actual): In `case Node_param_list' add test for - `&& (symbol->flags & FUNC) == 0' to the if. - -Sun Jul 13 18:28:38 2003 Arnold D. Robbins - - Further bug fix: - - * awkgram.y (variable): Give the new variable an lnode - of Nnull_string if it's not an array, even if it is - a Node_var_new. - -Fri Jul 11 09:32:21 2003 Arnold D. Robbins - - Bug fix: - - * eval.c (r_tree_eval): For Node_array_ref, set - tree->orig_array->var_value to Nnull_string too. - - Unrelated i18n and POSIX change: - - * configure.ac: Add check for local printf supporting %F format. - * awk.h (loc): New variable declaration. - * main.c (loc): Defined. - (main): Call `localeconv' to set loc. - * io.c (format_tree): Add support for printf quote flag, %'d for - decimal formats (not %e, %E), adds thousand separator into value. - -2003-07-10 Paul Eggert - - * io.c (two_way_open): If /bin/sh cannot be executed, exit - with status 126 consistently. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -Mon Jul 7 09:55:49 2003 Arnold D. Robbins - - * main.c (copyleft, usage): Make sure to fflush output fp. Per Jim - Meyering, if error, exit non-zero. - * ext.c (get_argument): Fix array paramater handling. - -2003-07-06 Paul Eggert - - * builtin.c (do_substr): Issue better diagnostics when - d_substr and d_length are NaN, or when 0 < d_length < 1. - Be careful when comparing double to SIZE_MAX, as - the comparison might return the "wrong" answer when - `(double) SIZE_MAX' is a number that is not equal to - SIZE_MAX. - (do_gensub): Watch out for HOW values that are out of range - or are NaN. - (do_dcngettext): dcngettext wants an argument of type - unsigned long, not long, so use a value of that type. - -Fri Jul 4 10:58:02 2003 Arnold D. Robbins - - * main.c (main): Make option letter 'D' fall through into default - unknown case if not debugging. Let's us have just one version of - `optlist'. - -Thu Jun 26 15:25:57 2003 Arnold D. Robbins - - * array.c (get_actual): Undo Stepan Kasal change of 2003-06-17. - See test/match2.awk. - -Wed Jun 25 15:26:08 2003 Arnold D. Robbins - - * builtin.c (do_rand): Change calculation so that result - obeys constraint: 0 <= N < 1. This is per history and POSIX. - Thanks to Nelson Beebe (beebe@math.utah.edu) for reporting - this issue. - -Mon Jun 23 15:13:39 2003 Arnold D. Robbins - - * io.c (rs1scan): Per advice from Bruno Haible, it's safe - to skip the multibyte checking code if RS is '\n'. See - the comment in the code. Big performance improvement for - multibyte locales. - -2003-06-20 Stepan Kasal - - * eval.c (comp_func): If memcmp returns 0, we have to compare - the lengths. - -2003-06-19 Stepan Kasal - - * eval.c (interpret) : Use NULL, not 0, to - initialize the variable list. - (comp_func): Array indices no longer are string values, - you have to use ahname_str, ahname_len. - -Tue Jun 17 11:53:46 2003 Arnold D. Robbins - - * array.c (get_actual): Make check for isparam - smarter: also check for FUNC flag. - -2003-06-17 Stepan Kasal - - * array.c (get_actual): Even if canfatal is FALSE, don't - tolerate existence of things which can't happen. - -Mon Jun 16 16:21:44 2003 Arnold D. Robbins - - * configure.ac: Removed m4/Makefile. - * m4/Makefile.am: Removed. - -2003-06-16 gettextize - - * configure.ac (AC_OUTPUT): Add m4/Makefile. - (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1. - -Sun Jun 15 20:45:43 2003 Arnold D. Robbins - - * io.c (get_a_record): Enhance logic to fill buffers to include - `|| no_data_left(iop)'. - (rs1scan): Fix logic for setting recm fields for multibyte - character case. - -2003-06-10 Stepan Kasal - - * awkgram.y (release_all_vars): Do not try to release a value of - Node_var_new; after get_lhs, use the lhs directly, do not try - to do (*lhs)->var_value; the Node_var case doesn't need - special treatment. - * builtin.c (do_match): `get_param' is successful iff it returns - Node_var_array---if the variable was new, get_param has already - changed the type. - * field.c (do_split): Likewise. - -Sun Jun 15 19:36:35 2003 Arnold D. Robbins - - * node.c (r_dupnode): Typo fix in hash tables: stptr -> ahname_str. - Thanks to mary1john8@earthlink.net. - * array.c (get_actual): Add `if (canfatal)' before call to - `cant_happen'. - -Sun Jun 15 19:25:49 2003 Patrick T.J. McPhee - - * awk.h (memcpy_ulong): Add ! WIN32 to ifdefs. - -Mon Jun 9 18:38:20 2003 Arnold D. Robbins - - * custom.h (hpux): Added stuff to (hopefully) get `tzset' - declared on HP/UX 10 and up. - -Mon Jun 9 17:12:24 2003 Patrick T.J. McPhee - - * awk.h (ATTRIBUTE_EXPORTED): New macro for dynamic libs on Windows32. - * CONVMFTidx, stack_ptr, do_lint, lintfunc: Now have this attribute. - -Mon Jun 9 13:11:33 2003 Arnold D. Robbins - - Clean up of Stepan's patches. - - * array.c (get_actual): Renamed from r_get_array. Added second - param canfatal if routine should print fatal message when not an array. - (get_actual): Renamed 'prm' to `isparam'. - (array_vname): Add static msglen var; only realloc string if it grows. - Don't use `s += sprintf(...)'. No good on old systems where sprintf - returns char *. Minor formatting cleanups. - (do_adump): Restored separate `a' and `r' variables; helps for debugging. - - * awk.h (SCALAR, UNINITIALIZED): Removed entirely, renumbered other flags. - (get_array, get_param): New macros, calls get_actual. - (get_actual): Declaration changed from that of r_get_array. - - * awkgram.y (release_all_vars): Restored previous version of code; new - version isn't right for Node_xx variables. - (variable): Minor code cleanup for readability. - - * builtin.c (do_match): Use get_param and print our own message when - third parameter is not an array. - - * eval.c: Added a few comments here and there, removed some no longer - needed comments. - - * field.c (do_split): Use get_param and print our own message when - second parameter is not an array. - -Mon Jun 9 11:46:21 2003 Arnold D. Robbins - - * array.c (do_delete): Initialize hash1 and last to keep gcc -Wall happy. - * io.c (rsnullscan): Comment out label skip_leading for same reason. - -Wed May 28 08:31:23 CEST 2003 Stepan Kasal - - * eval.c (forloops_active, in_function): Nuked. - (pop_all_forloops, pop_fcall_stack): Are now inline. - -Wed May 28 07:58:35 2003 Stepan Kasal - - * field.c, awk.h (Null_field): No longer static. - * field.c (init_fields): Initial value of $0 can be Nnull_string, - no need to copy it. - * eval.c (r_get_lhs) : Test for uninitialized field, - which is Nnull_string for $0 and Null_field for $(>0). - * builtin.c (do_print_rec): Test for uninitialized $0. - -Tue May 27 17:03:02 2003 Stepan Kasal - - * awk.h (Node_var_new): New node type for variables which can be - either scalar or array. From now on, Node_var is always scalar. - (Node_gvar_ref): Nuked, its role can be taken by Node_array_ref. - (orig_var): Removed, orig_array is enough. - (SCALAR, UNINITIALIZED): Flags nuked. - (var_uninitialized): New macro to distinguish uninitialized vars; - used in several other macros. - * array.c (r_get_array, array_vname, do_adump): Adapt to the - above changes. - * awkgram.y, eval.c, field.c, main.c, node.c, profile.c: Ditto. - -Tue May 27 14:27:50 2003 Stepan Kasal - - * array.c (r_get_array): New function, which goes all the way - through Node_param_list to actual Node_var_array; if it encounters - non scalar Node_var, it changes it to Node_var_array. - (in_array, do_delete, do_delete_loop, do_adump, assoc_sort_inplace): - Use get_array. - (assoc_lookup): The parameter must be a Node_var_array. - * awk.h (get_array, r_get_array): Declare the new function and define - a macro to speed it up. - * builtin.c (do_match): Use get_array. - * eval.c (interpret) : Ditto. - (r_get_lhs) : Ditto. - * field.c (do_split): Ditto. - -Tue May 27 08:23:51 2003 Stepan Kasal - - Changed node->vname meaning for type Node_array_ref and Node_gvar_ref. - It contains only the reference name; one has to (recursively) follow - node->prev_array to find out the call history for the array. - - * array.c (array_vname): New function to print the array name. - (assoc_lookup, do_delete): Use array_vname. - * eval.c (interpret, r_tree_eval, r_get_lhs): Use array_vname. - (push_args, pop_fcall): Things have simplified. - * awk.h (array_vname): Declare. - (prev_array): Define. - -Sun Jun 8 11:25:36 2003 Stepan Kasal - - * awkgram.y (append_right): When using savetail, remember that it - is not necessarily the tail of the list---it's just a pointer to - the last chunk appended. - -Thu Jun 5 12:01:41 2003 Arnold D. Robbins - - * builtin.c (do_strtonum): Make `strtonum(13)' work. - -Wed Jun 4 17:07:06 2003 Corinna Vinschen - - * io.c (binmode): Include function for __CYGWIN__ too. - -Tue Jun 3 12:40:50 2003 Arnold D. Robbins - - * eval.c (interpret): Node_K_switch. For regex case, don't - call `free_temp' on the result of `force_string' if it's equal to - switch_value. Thanks to John DuBois - for finding the problem. - -Sun Jun 1 13:08:22 2003 Arnold D. Robbins - - * builtin.c (format_tree): For %c, force precision to 1. - -Wed May 28 11:55:48 2003 Arnold D. Robbins - - * awkgram.y (isnoeffect, isassignable): Add Node_TEXTDOMAIN to - switches in both functions. - -Wed May 28 11:38:59 2003 Stepan Kasal - - * awkgram.y (switch_body): Remove rule ``switch_body:/*empty/'' - as ``switch_body:case_statements'' covers it---this disambiguation - fixes a reduce/reduce conflict. - -Sun May 25 16:23:43 2003 Corinna Vinschen - - * configure.ac: Remove linking against /usr/lib/automode.o. - * configure: Regenerate. - -Sun May 25 15:19:19 2003 Stepan Kasal - - * awk.h (get_lhs): For an initialized Node_var, you may return - the address of var_value pointer, no matter whether reference - bit was set or not. We were silly slowing down most of the - assignements. - - * (get_a_record): After grow_iop_buffer, move recm.rt_start even - if recm.len == 0. - -Mon May 19 16:55:59 2003 Arnold D. Robbins - - Code for C-style switch statements. Initial version contributed by - Michael Benzinger . - - Disabled by default, use `configure --enable-switch' to turn it on. - - * configure.ac: New AC_ARG_ENABLE for switch statements. - * awk.h (NODETYPE): New types for switch, case, default keywords - and respective lists. - * awkgram.y: New productions for switch statement. Does checking to - avoid duplicate cases. - * eval.c (nodetypes): New entries for new NODETYPEs. - (interpret): New code to do switch execution. - * profile.c (pprint): New code to print switch statements. - -Mon May 19 15:05:43 2003 Arnold D. Robbins - - * configure.ac: Renamed from configure.in. - * fixvers: Now looks in configure.ac. - * Makefile.am: Now cites configure.ac. - - * Misc other: Updated to Automake 1.7.5. - -Sun May 18 12:03:56 2003 Arnold D. Robbins - - * array.c (do_delete_loop): Fix bracing of logic for - tests. - -Wed May 14 09:01:16 2003 Stepan Kasal - - Misc patches: - - * builtin.c (do_match): If third parameter to `match' is supplied, - store all subexpressions which are applicable, even though there - are some unused between them. - - * awkgram.y (yylex): When returning from unterminated REGEXP - (which is /* kludge */), take care to fake a yylval, to - prevent ``internal error'' later. - -Sun May 11 15:51:00 2003 Stepan Kasal - - * io.c (rsnullscan, get_a_record): Boundary condition bug fixes. - -Sun May 11 15:15:20 2003 Scott Deifik - - * awk.h: Add decls for `memcpy_ulong', `memset_ulong', and - MSC defines. - * regex.c: Include if MSC for size_t. - -Mon May 5 15:11:06 2003 Arnold D. Robbins - - * io.c (get_a_record): Only tweak RT's value in place if the current - RS scanner is the same as the last one. Bug report submitted by - John DuBois (). - -Fri May 2 14:39:48 2003 Arnold D. Robbins - - * io.c (get_a_record): Add logic at end to be smart about setting - RT. Saves considerable time, esp for default case where RS = "\n". - -Wed Apr 30 11:44:38 2003 Arnold D. Robbins - - * field.c (do_split): Add check and code for Node_gvar_ref. - * array.c (in_array, do_delete, asort_actual): Same. - * builtin.c (do_split): Same for 3rd arg array parameter. - * eval.c (interpret): Same for Node_K_array_for. - (push_args): Same for evaluating extra args. - -Tue Apr 29 15:54:28 2003 Arnold D. Robbins - - Record reading code redone/simplified considerably. - - * awk.h (IOBUF): Removed total field, no longer used. - * io.c (at_eof, has_data, no_data_left): New macros. - (RECVALUE, SCANSTATE): New enumerated types. - (rs1get_a_record, rsnull_get_a_record, rsre_get_a_record): Removed. - (get_a_record): Rewritten, again. Now contains just buffer and - record code; searching code moved into these functions: - (rs1scan, rsnullscan, rsrescan): New functions to scan a buffer - for record contents and terminator. Fill in values in: - (struct recmatch): Holds found record and terminator. - (spec_setup): Set iop->dataend to indicate data is already in buffer. - (nextfile, inrec): Use new macros instead of flag and pointer tests. - (set_RS): Set scanning function instead of record function. - - FWIW, it all passes `make test'. - -Sun Apr 27 21:02:39 2003 Arnold D. Robbins - - * io.c (do_close): At end, if do_posix return 0. See comment in code. - -Tue Apr 15 09:56:03 2003 Isamu Hasegawa - - * configure.in: Check existence of wcrtomb, and wcscoll. - * configh.in: Likewise. - * configure: Re-generate. - Thanks to Kimura Koichi for reporting. - -Sun Apr 13 16:02:10 2003 Arnold D. Robbins - - * main.c (main): Add call to `setlocale' for LC_NUMERIC after program is - parsed. - (arg_assign): Switch back to "C" locale for LC_NUMERIC for command - line assignments; this is per POSIX that period is decimal point for - program and command line assignments and the locale's separator - applies for input, output, and string to number conversion. - -2003-03-26 Paul Eggert - - * builtin.c [HAVE_INTTYPES_H]: Include . - [!HAVE_INTTYPES_H && HAVE_STDINT_H]: Include . - (CHAR_BIT, INTMAX_MIN, UINTMAX_MAX): Define if the system does not. - (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): New macros, taken from - coreutils and many other GNU utilities. - (format_tree): When formatting, use widest possible integers - rather than settling with 'long'. - (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Likewise, - when doing bitwise operations. - * configure.in (jm_AC_TYPE_LONG_LONG, jm_AC_TYPE_UNSIGNED_LONG_LONG, - jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Add, since the mainline - code now needs this. - * doc/gawk.texi (Control Letters, Bitwise Functions): Document this. - * m4/intmax_t.m4: New file, taken from coreutils (but renamed to - avoid collision with our m4/inttypes.m4). - * m4/longlong.m4: New file, taken from coreutils. - * m4/uintmax_t.m4, m4/ulonglong.m4: Remove; superseded by the above - new m4 files. - - * builtin.c (BITS_PER_BYTE): Remove; use CHAR_BIT instead, since - it's the standard name. - (do_lshift, do_rshift): Complain if the shift width is exactly equal - to the word size, too. - -Thu Mar 27 10:44:11 2003 Arnold D. Robbins - - * io.c (rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record): - Enhance check for no data left in file to be only if file has - non-zero size. Linux files such as /proc/filesystems stat as a - regular file of size 0, but actually have contents. Ugh. - Thanks to Martin Schlemmer for the bug report. - -Wed Mar 26 12:19:32 2003 Arnold D. Robbins - - * builtin.c (format_tree): Add a lint warning at label `out_of_range'. - -Tue Mar 25 12:24:38 2003 Arnold D. Robbins - - * awkgram.y (variable): For array subscript, if NAME is in the - symbol table, but not a variable, array, or parameter, generate - a syntax error. - (isarray): New function, tests if a symbol can be an array. - - * custom.h: Add check for HP/UX, needed for GCC. - -Mon Mar 17 09:21:09 2003 Arnold D. Robbins - - Allow simultaneous manipulation of a global array directly - and when passed as a parameter. - - * awk.h (Node_gvar_ref): New nodetype. - [orig_var]: New macro. - * array.c (do_delete_loop, do_delete): Add logic to handle - seeing Node_gvar_ref. - * eval.c (nodetypes): Add Node_gvar_ref. - (r_tree_eval, r_get_lhs): Add Node_gvar_ref case. - -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. - -Wed May 1 16:07:49 2002 Arnold D. Robbins - - * getopt.c: Installed latest version from glibc. - -Sun Apr 28 17:19:07 2002 Arnold D. Robbins - - * fixvers: Changed patterns to allow test versions of the - form `gawk-3.1.1a'. - * patchlev.h: Patchlevel is now a string constant. - * main.c (version): Print patchlevel using %s, not %d. - * Makefile.am: Rework DEFPATH stuff and datadir stuff yet again. - - * config.sub: Updated with current version from ftp.gnu.org. - * config.guess: Ditto. - - Upgrade to gettext-0.11.2: - - * ABOUT-NLS: Replaced with version from gettext 0.11.2. - * config.rpath: Replaced with version from gettext 0.11.2. - * intl/*: Replaced with version from gettext 0.11.2. - * po/Makefile.in.in: Replaced with version from gettext 0.11.2. - * po/Makevars.template: Replaced with version from gettext 0.11.2. - * po/Rules-quot: Replaced with version from gettext 0.11.2. - * po/boldquot.sed: Replaced with version from gettext 0.11.2. - * po/en@boldquot.header: Replaced with version from gettext 0.11.2. - * po/en@quot.header: Replaced with version from gettext 0.11.2. - * po/insert-header.sin: Replaced with version from gettext 0.11.2. - * po/quot.sed: Replaced with version from gettext 0.11.2. - * po/remove-potcdate.sin: Replaced with version from gettext 0.11.2. - * m4/codeset.m4: Replaced with version from gettext 0.11.2. - * m4/gettext.m4: Replaced with version from gettext 0.11.2. - * m4/glibc21.m4: Replaced with version from gettext 0.11.2. - * m4/iconv.m4: Replaced with version from gettext 0.11.2. - * m4/isc-posix.m4: Replaced with version from gettext 0.11.2. - * m4/lcmessage.m4: Replaced with version from gettext 0.11.2. - * m4/lib-ld.m4: Replaced with version from gettext 0.11.2. - * m4/lib-link.m4: Replaced with version from gettext 0.11.2. - * m4/lib-prefix.m4: Replaced with version from gettext 0.11.2. - * m4/progtest.m4: Replaced with version from gettext 0.11.2. - -Wed Apr 17 15:09:45 2002 Arnold D. Robbins - - * regex.c (PREFIX): Change test for token concatenation ability - to `#ifdef HAVE_STRINGIZE'. If a cpp has one, it ought to have - the other. - -Tue Apr 16 12:26:06 2002 Arnold D. Robbins - - * profile.c (tree_eval): Make unary minus case smarter, - use is_scalar test and if false parenthesize expression. - Add Node_TEXTDOMAIN case. - (pp_lhs, is_scalar, prec_level): Add Node_TEXTDOMAIN cases. - -Thu Apr 11 21:28:33 2002 Arnold D. Robbins - - * array.c (do_adump): Spelling fix in output message. - * builtin.c: Ditto, in multiple routines. - (do_toupper, do_tolower): Add cast to size_t in assigment to mbclen - for some compilers. - * re.c (research): Fix way returning is done to silence some - compiler diagnostics. - -Wed Apr 10 19:30:51 2002 Arnold D. Robbins - - * Makefile.am (datadir): Set directly to have `/awk'. - (DEFPATH): Go back to using $(datadir) for path. - -Tue Apr 9 17:34:09 2002 Arnold D. Robbins - - Upgraded to gettext 0.11.1. - - * Makefile.am (LDADD): Use @LIBINTL@ instead of @INTLLIBS@. - * ABOUT-NLS: Version from 0.11.1. - * config.rpath: Version from 0.11.1. - * aclocal.m4: Regenerated based on new files. - * intl/*: Replaced with version from 0.11.1. - * m4/ChangeLog: New file. - * m4/codeset.m4: New file. - * m4/gettext.m4: Version from 0.11.1. - * po/ChangeLog: New file. - * po/Makefile.in.in: Version from 0.11.1. - * po/remove-potcdate.sin: New file. - -Mon Apr 8 22:22:58 2002 Arnold D. Robbins - - * Makefile.am (libexecdir): Set directly to have `/awk'. - (DEFPATH): Use $(pkgdatadir) for path. - (install-exec-hook): Add version link for pgawk. - (uninstall-links): Remove pgawk version link. - -Wed Mar 20 13:44:21 2002 Isamu Hasegawa - - * regex.c (__alignof__): Definition for non-GCC compilers. - -Sun Mar 17 17:41:55 2002 Arnold D. Robbins - - * io.c (do_pathopen): Malloc buffers to hold constructed - filenames: No Arbitrary Limits! Thanks to keoki@techie.com - for the bug report. - -Sun Mar 10 16:59:06 2002 Scott Deifik - - * awk.h (LOCALEDIR): Provide a definition in case not using - i18n stuff. - -Wed Mar 6 18:14:44 2002 Arnold D. Robbins - - * main.c (usage): Add some explanatory text and examples at end. - -Sun Mar 3 16:42:50 2002 Arnold D. Robbins - - * getopt.h, getopt.c, getopt1.c: Update to current version - from glibc CVS. - -Fri Feb 22 15:53:38 2002 Isamu Hasegawa - - * dfa.c (fetch_wc): Fix type from wchar_t to wint_t. - (parse_bracket_exp_mb): Likewise. - * regex.c (extract_number): Retrieve the sign information from - byte-code in case of AIX. - -Thu Feb 21 16:44:24 2002 Arnold D. Robbins - - * re.c (resetup): Moved setting re_max_failures into regex.c. - * regex.c (re_max_failures): Set to really big if REGEX_MALLOC - defined. Do this in both places that define re_max_failures. - -Thu Feb 21 19:02:22 2002 Isamu Hasegawa - - * builtin.c (sub_common): Avoid index_multibyte_buffer invocation - in single byte character environments. - -Thu Feb 21 10:08:56 2002 Isamu Hasegawa - - * dfa.c (parse_bracket_exp_mb): For ':', use wctype_t in MALLOC, - not wchar_t. - -Thu Feb 21 09:52:16 2002 Arnold D. Robbins - - Upgraded to automake 1.5 and gettext-0.11. - Also bug fix to multibyte code. - - * ABOUT-NLS: Upgraded. - * config.guess, config.sub, config.rpath, gettext.h, ylwrap: New files. - * Makefile.am: Added above to appropriate places. - * awk.h: Replace libintl.h and macros with include of gettext.h. - (emalloc, erealloc): Add num bytes to error message, put string inside _(). - (index_multibyte_buffer): Removed decl. - * awklib/Makefile.am: Use $(EXEEXT) for grcat and pwcat targets. - * builtin.c (index_multibyte_buffer): Made static to this file. - (sub_common): Add checks that replacement string is length > 0 so - that we don't try to malloc(0): this fails on some systems. - * configure.in (AM_GNU_GETTEXT): Update macro for gettext 0.11. - (ALL_LINGUAS): Removed. - * m4/codeset.m4: New file. - * m4/gettext.m4: Updated. - * m4/glibc21.m4: New file. - * m4/iconv.m4: New file. - * m4/isc-posix.m4: New file. - * m4/lcmessage.m4: Updated. - * m4/lib-ld.m4: New file. - * m4/lib-link.m4: New file. - * m4/lib-prefix.m4: New file. - * m4/progtest.m4: Updated. - * intl/*: Replaced with version from gettext 0.11. - * po/*: Revised for gettext 0.11. - -Mon Feb 18 14:42:39 2002 Arnold D. Robbins - - * builtin.c (nondec2awknum): Change assert to runtime check - in case user passed in bad data. - -2002-02-17 Paul Eggert - - * re.c (resetup): Try to avoid silly limitation of regex.c by - setting re_max_failures to the largest reasonable value. - -Sun Feb 17 14:57:43 2002 Arnold D. Robbins - - * builtin.c (research): If re_search() returns -2, the - match failed since regex couldn't allocate enough memory - for what it needed. Fail with a fatal message instead. - This is a workaround, not a fix, but I don't mess with - regex.[ch]. - -Fri Feb 8 16:01:11 2002 Arnold D. Robbins - - * awkgram.y (LEX_FOR): Fix case of array loop with body of single - delete statement to actually check the right things to make the - optimization. - * profile.c (tree_eval): Add case for Node_K_delete_loop. - (prec_level): Ditto. - -Mon Feb 4 10:38:00 2002 Bruno Haible - - * awk.h (dcngettext): New macro. - (do_dcngettext): New declaration. - * awkgram.y (tokentab): Add dcngettext. - (snode): Add a warning for incorrect use of dcngettext. - (dumpintlstr): fflush at the end, not in the middle. - (dumpintlstr2): New function. - * builtin.c (localecategory_from_argument): New function, extracted - from do_dcgettext. - (do_dcgettext): Call it. - (do_dcngettext): New function. - -Sun Feb 3 17:56:20 2002 Bruno Haible - - * builtin.c (do_bindtextdomain): Don't free the same variable twice. - * main.c (main): Call setlocale for LC_MESSAGE, to make dcgettext - function work on glibc systems. - -Wed Jan 23 15:03:36 2002 Andreas Buening - - * configure.in (PATH_SEPARATOR): Code added for OS/2. - Makefile.am (PATH_SEPARATOR): Added. - (DEFPATH): Make use of PATH_SEPARATOR. - -Wed Jan 23 14:46:04 2002 Arnold D. Robbins - - * awkgram.y (yylex): Add test for lasttok != '$' when looking - at _"...". See comments in code. - -Wed Aug 15 07:43:10 2001 Isamu Hasegawa - - * regex.c : Implements the codes for exactn_bin to work correctly - in multibyte environments, in case of invalid multibyte sequence. - -Wed Aug 15 07:36:56 2001 Isamu Hasegawa - - * regex.c : Implements the codes for charset/charset_not to - work in multibyte environments. - -Wed Aug 15 05:04:34 2001 Isamu Hasegawa - - * regex.c : Add some comments. - -Wed Aug 15 05:04:15 2001 Isamu Hasegawa - - * regex.c (count_mbs_length): New function, check the mutibyte - strings and count how many wchar_t the substring occupy. - (CHAR_T): New macro, character type depending on - environments(singlebyte/multibyte). - (UCHAR_T): New macro, unsigned character type. - (COMPILED_BUFFER_VAR): New macro, the buffer containing - the compiled buffer. - Adapt singlebyte/multibyte environments with CHAR_T, UCHAR_T, - and COMPILED_BUFFER_VAR. - -Mon Jun 25 09:00:41 2001 Isamu Hasegawa - - * regex.c : Reorganize code to build code twice. byte_* are - for single byte, wcs_* are for multibyte character sets. - Chose functions according to current locale dynamically. - * regex.c (convert_mbs_to_wcs): New function, convert multibyte - strings to wide character strings for multibyte environments. - -Fri Jun 22 05:43:50 2001 Isamu Hasegawa - - * regex.c (MBS_SUPPORT): New macro, defined if the environment - can handle multibyte characters. - (OFFSET_ADDRESS_SIZE): Offset address size in the - compiled buffer. - Rewrite offset addresses with OFFSET_ADDRESS_SIZE. - -Thu Apr 26 08:03:17 2001 Isamu Hasegawa - - * builtin.c (index_multibyte_buffer): Inspect the buffer and write - the index. - (sub_common): In multibyte environment, skip multibyte characters - when we check special characters. - * awk.h (index_multibyte_buffer): Add prototype. - * eval.c (cmp_nodes): In multibyte environment, compare per character. - * field.c (re_parse_field): In multibyte environment, avoid to - call research() on invalid boundary. - (sc_parse_field): In multibyte environment, avoid to compare on - invalid boundary. - (null_parse_field): In multibyte environment, split per - character, not per byte. - * io.c (get_a_record): In multibyte environment, avoid to compare - on invalid boundary. - -Wed Apr 25 08:29:47 2001 Isamu Hasegawa - - * awk.h (strncasecmpmbs): Add prototype. - * builtin.c (strncasecmpmbs): New function like strncasecmp but for - multibyte strings. - (do_index): In multibyte environment, compare per character. - * builtin.c (do_tolower): In multibyte environment, user towlower - instead of TOLOWER. - (do_toupper): In multibyte environment, user towupper instead - of TOUPPER. - -Tue Apr 24 10:38:06 2001 Isamu Hasegawa - - In multibyte environments, handle multibyte characters as single - characters in bracket expressions. - - * dfa.h (mb_char_classes): New structure. - (mbcsets): New variable. - (nmbcsets): New variable. - (mbcsets_alloc): New variable. - * dfa.c (prtok): Handle MBCSET. - (fetch_wc): New function to fetch a wide character. - (parse_bracket_exp_mb): New function to handle multibyte character - in lex(). - (lex): Invoke parse_bracket_exp_mb() for multibyte bracket expression. - (atom): Handle MBCSET. - (epsclosure): Likewise. - (dfaanalyze): Likewise. - (dfastate): Likewise. - (match_mb_charset): New function to judge whether a bracket match - with a multibyte character. - (check_matching_with_multibyte_ops): Handle MBCSET. - (dfainit): Initialize new variables. - (dfafree): Free new variables. - -Mon Apr 23 01:40:09 2001 Isamu Hasegawa - - Implement the mechanism to match with multibyte characters, - and use it for `period' in multibyte environments. - - * dfa.h (mbps): New variable. - * dfa.c (prtok): Handle ANYCHAR. - (lex): Use ANYCHAR for `period' in multibyte environments. - (atom): Handle ANYCHAR. - (state_index): Initialize mbps in multibyte environments. - (epsclosure): Handle ANYCHAR. - (dfaanalyze): Handle ANYCHAR. - (dfastate): Handle ANYCHAR. - (realloc_trans_if_necessary): New function. - (transit_state_singlebyte): New function. - (match_anychar): New function. - (check_matching_with_multibyte_ops): New function. - (transit_state_consume_1char): New function. - (transit_state): New function. - (dfaexec): Invoke transit_state if expression can match with - a multibyte character in multibyte environments. - (dfamust): Handle ANYCHAR. - -Fri Apr 20 11:31:24 2001 Isamu Hasegawa - - Avoid incorrect state transition in multibyte environments. - - * dfa.h (nmultibyte_prop): New variable. - (multibyte_prop): New variable. - * dfa.c (addtok): Set inputwcs. - (dfastate): Avoid incorrect state transition in multibyte - environments. - (dfaexec): Likewise. - (dfainit): Init multibyte_prop. - (dfafree): Free multibyte_prop. - (inputwcs): New variable. - (mblen_buf): New variable contains the amount of remain byte - of corresponding multibyte character in the input string. - -Fri Apr 20 06:28:59 2001 Isamu Hasegawa - - Handle a multibyte character followed by '*', '+', and '{n,m}' - correctly. - - * dfa.c (update_mb_len_index): New function. - Support for multibyte string. - (FETCH): Call update_mb_len_index. - (lex): Check cur_mb_index not to misunderstand multibyte characters. - (atom): Make a tree from a multibyte character. - (dfaparse): Initialize new variables. - (mbs): New variable. - (cur_mb_len): New variable. - (cur_mb_index): New variable. - -Thu Apr 19 09:32:47 2001 Isamu Hasegawa - - * awkgram.y (cur_mbstate): New varialble containing means current - shift state. - (cur_char_ring): New varialbe reffering the buffer which contains - last some character from the buffer. - (cur_ring_idx): New variable containing the current index on - cur_char_ring. - (nextc_is_1stbyte): New macro, means that last nextc() return a - singlebyte character or 1st byte of a multibyte character. - (nextc): Check the buffer and update cur_ring_char in multibyte - environments. - (pushback): Adjust cur_ring_idx in multibyte environments. - (yylex): Add check whether nextc() returned 1st-byte in multibyte - environments. - * re.c (make_regexp): In multibyte environment, skip multibyte - characters when we check special characters. - -Wed Apr 18 07:58:20 2001 Isamu Hasegawa - - * awk.h (MBS_SUPPORT): New flag, means supporting multibyte strings. - * configure.in : Add check for wchar.h, wctype.h, mbrtowc, and mbrlen. - -Wed Jan 16 16:32:40 2002 Arnold D. Robbins - - * builtin.c (do_strtonum): Simplified. Check first if the - value matches a non-decimal number, and if so convert it. - Otherwise do a regular force_number. - -Mon Jan 7 22:12:15 2002 Arnold D. Robbins - - * awkgram.y (statement): Moved delete, print, and expressions into - new non-terminal `simple_stmt'. Allow opt_simple_stmt in the - first and third part of a for loop, per latest POSIX, which documents - an otherwise undocumented historical oddity in Unix awk. This has - the pleasant side effect of making line numbers more accurate for - messages involving delete statements. - (opt_simple_stmt, simple_stmt): New non-terminals. - - Based on bug report from drj@pobox.com. - -Mon Dec 24 14:04:02 2001 Arnold D. Robbins - - * configure.in: Changes for VMS with new strftime: - (AC_HEADER_TIME): Added. - (AC_CHECK_HEADERS): Check for sys/time.h. - (TIME_T_IN_SYS_TYPES_H): Add header check. - * acconfig.h (TIME_T_IN_SYS_TYPES_H): Added. - -Wed Dec 19 16:01:58 2001 Peter J. Farley III - - * configure.in: Add MS-DOS to getpgrp special case. - * dfa.c, getopt.c, regex.c: Fix code to work with --disable-nls. - -Wed Dec 19 15:59:25 2001 Eli Zaretskii - - * profile.c (init_profiling_signals) [__DJGPP__]: Use SIGINT - instead of SIGHUP and SIGQUIT instead of SIGUSR1. - -Tue Dec 18 20:56:07 2001 Andreas Buening - - More OS/2 stuff. - - * awk.h (O_BINARY): Don't redefine for EMX. - * io.c (gawk_popen): Add __EMX__ in case compiling DOS executable. - * configure.in: Add OS/2 to case for manual GETPGRP_VOID. - -Tue Dec 4 17:54:30 2001 Arnold D. Robbins - - New configure time option, --with-whiny-user-strftime. - - * configure.in (AC_ARG_WITH): Add appropriate code for autoconf. - * accondig.h (USE_INCLUDED_STRFTIME): Add #undef for it. - * custom.h (USE_INCLUDED_STRFTIME): Set things up write. - -Tue Dec 4 16:44:07 2001 Andreas Buening - - Mongo patch for updated OS/2 support. - - * awk.h (TOUPPER, TOLOWER): Define only if not already defined. - * awkgram.y (extproc feature): Add ifdef for __EMX__. - * gawkmisc.c (__EMX__): Include pc/gawkmisc.c directly. - * io.c (__EMX__): Added for a number of places in addition to OS2 def. - (two_way_open): Added OS/2 specific code added that uses spawn. - (gawk_popen): Ditto. - -Mon Dec 3 14:07:56 2001 Arnold D. Robbins - - Fix use of getgroups to use dynamic memory, solves - problem of systems where NGROUPS_MAX lies. - - * awk.h (groupset, ngroups): New extern variables. - * configure.in (AC_CHECK_FUNCS): Add getgroups to list. - * io.c (user_open): Use global ngroups and groupset variables, - don't call getgroups here. - * main.c (init_groupset): New function to init global - vars using malloc. Declare it at top. - (main): Call init_groupset(). - (load_procinfo): Use global ngroups and groupset variables. - -Sun Nov 18 11:56:01 2001 Arnold D. Robbins - - * random.c (srandomdev): ifdef-out. Lots of compile time - problems on multiple platforms, and gawk doesn't even - use the routine. The heck with fine-grained solutions. - -Wed Nov 14 16:12:40 2001 Pat Rankin - - * builtin.c (bchunk_one): Use `ofre < 1' instead of `ofre <= 0' - to avoid compiler complaint about suspicious comparison for - unsigned variable. (`ofre == 0' ought to suffice...) - -Tue Nov 13 17:27:52 2001 Arnold D. Robbins - - * awkgram.y (yyerror): Fix the code to behave like it - used to. Keep "no arbitrary limits" by mallocing the - buffer and freeing it. - -Wed Nov 7 16:46:20 2001 Arnold D. Robbins - - * awkgram.y (yyerror): Remove dependency upon buf[] to - hold prepended space and `^' pointer. Avoids core dumps - for long source lines. - -Sat Nov 3 22:27:21 2001 Arnold D. Robbins - - * m4/strtod.m4: Add missing `#endif'. Oops. - -Mon Oct 29 14:53:57 2001 Arnold D. Robbins - - * awkgram.y: Add semicolons in calls to count_args(). - Apparently bisoon adds a semicolon to each body - automatically and byacc doesn't. - -Sun Oct 28 16:53:18 2001 Arnold D. Robbins - - * builtin.c (format_tree): Fix off-by-one error in "ran out - for this one" diagnostic. Also fix lint check for too many - arguments vs. count in format string. - -Wed Oct 10 11:01:47 2001 Arnold D. Robbins - - * fixvers: Check that files exist before doing `cmp', in - case they're in a source code system and aren't there. - Fix from Grant Erickson (gerickson@brocade.com). - -Thu Oct 4 18:20:36 2001 Arnold D. Robbins - - * eval.c (r_tree_eval): For comparison, dupnode() results of - evaluation so that we can hang on to them and avoid memory - corruption. Change calls to free_temp() to unref(). - -Tue Sep 25 15:19:53 2001 Arnold D. Robbins - - * io.c (iop_open): Only call os_close_on_exec() for - fd > fileno(stderr). - -2001-09-07 Paul Eggert - - * io.c (redirect): When deciding to use the fdopen bug hack, - use "__sun" rather than "solaris". No compilers predefine - "solaris", but both GCC and Sun C predefine "__sun". - -Thu Aug 30 15:17:12 2001 Arnold D. Robbins - - * main.c (copyleft): Use a printf %d for last year of update - to avoid translation strings changing when the file - is updated from now on. Suggestion from Ulrich Drepper. - -Thu Aug 23 14:01:14 2001 Arnold D. Robbins - - * awkgram.y (unary minus production): Add check that value - isn't a string. Based on bug report from drj@pobox.com. - * profile.c (tree_eval): For node_val, only test NUMBER - to see if value is numeric, not NUM|NUMBER. - -Thu Aug 16 12:21:28 2001 Arnold D. Robbins - - * configure.in (ALL_LINGUAS): Added `fr' and `tr'. - * po/fr.po, po/tr.fo: New files. - -2001-08-13 Paul Eggert - - This patch fixes a bug that causes gawk to rewind standard - input incorrectly. It also removes all instances of fseek, - from the gawk source proper, which should make gawk a bit - more portable. - - (The original patch removed off_t & lseek too, but I need - that for something else. ADR.) - - * posix/gawkmisc.c (optimal_bufsize): - Don't use lseek on the input, because that might change - its state. Instead, just check whether it is a regular file. - This obviates the need to invoke isatty. - (Also, fix a spelling error in the first line of the source.) - * pc/gawkmisc.pc, unsupported/atari/gawkmisc.atr: Likewise. - - * awk.h (S_ISREG): Move this macro here ... - * io.c (S_ISREG): from here. - - * protos.h (fseek): Remove prototype; no longer used. - -Fri Aug 3 13:38:54 2001 Arnold D. Robbins - - * array.c (assoc_lookup): Change assert test on type to real test - to protect against FS[1] = "x" kinds of things. It'd be better - to do this in the grammar, but this is easier and just as - effective. - - Undid BECAMEARRAY changes of 25 June 2001 in favor of correct code: - * eval.c (pop_fcall): Change test and comment for freeing n->vname. - (flags2str): Removed BECAMEARRAY entry. - * awk.h (BECAMEARRAY): Removed define. - * array.c (assoc_lookup): Removed setting of BECAMEARRAY flag. - -Mon Jul 23 17:33:13 2001 Arnold D. Robbins - - * io.c (get_a_record): Handle case where RS = "" and input file - is only newlines. See test/onlynl. Bug report by - Michel Jouvin . - -Wed Jul 4 18:34:19 2001 Arnold D. Robbins - - * eval.c (assign_val): Don't allow negative values for NF. - * field.c (set_NF): Robustify field-freeing code to make sure - values are always positive. - -Sun Jul 1 19:15:01 2001 Arnold D. Robbins - - * builtin.c (do_index): If second string is "", return 1. - -Mon Jun 25 19:34:24 2001 Arnold D. Robbins - - Further rationalization of treatment of dynamic regexes, - so that profiling code works correctly. - - * awk.h (NODETYPE): New type, Node_dynregex. - * awkgram.y (mk_rexp): Use Node_dynregex. - * eval.c (nodetypes): Add Node_dynregex. - (r_tree_eval): Add Node_dynregex to case for match_op(). - * profile.c (tree_eval): Add Node_dynregex to case for pp_match_op(). - (pp_match_op): Handle Node_dynregex, simplify cases for ~ and !~. - * re.c (re_update): Add assertion that type is Node_regex when flags - indicate CONST. - - New lint warning. - - * awkgram.y (yylex): Added lint warning that constant with leading - zero is treated as octal or hex. - - Generalized code for those who are Strong In The Ways of the Source. - - * awk.h: New boolean variable. - * main.c (main): Set it. - * eval.c (interpret): For arrays, check it. Remove variable 'first', - not needed anymore. - * profile.c (pp_string_fp): Enable printing of non-ASCII characters - verbatim if variable set. - - Fix memory corruption on SCO for array vars as params changed globally. - - * awk.h (BECAMEARRAY): New flag. - * array.c (assoc_lookup): Set the flag as appropriate. - * eval.c (flags2str): Add the flag. - (pop_fcall): Check the flag, don't free memory if set. - -Wed Jun 13 18:07:06 2001 Arnold D. Robbins - - * eval.c (fmt_index): Actually call erealloc() to grow fmt_list - if that's really necessary. Bug report from David Jones, - djones@zoonami.com. - -Sun Jun 10 14:24:48 2001 Arnold D. Robbins - - * profile.c (pp_match_op): Rationalized the code. - -Thu Jun 7 11:54:36 2001 Arnold D. Robbins - - * awk.h (O_BINARY): Don't define if already defined - (as is true for cygwin/gcc --- oops). - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Wed Apr 25 11:44:07 2001 Arnold Robbins - - * Makefile.am (AM_MAKEFLAGS): Add definition per advice from - Nelson Beebe. - -Tue Apr 24 14:28:00 2001 Arnold Robbins - - * io.c (devopen): Patch from Jeurgen to robustify pulling - out hostname, port numbers, etc, to avoid any buffer overrun - problems. - -Mon Apr 23 10:26:38 2001 Arnold Robbins - - * awkgram.y: Fix grammar so that `print ... |& ".." |& getline' - dies with a parse-time error message. - -Sun Apr 22 16:46:48 2001 Arnold Robbins - - * io.c (socketopen): Fix from Juergen in recursive call. - -Thu Apr 19 18:39:20 2001 Pat Rankin - - * awk.h: Really fix logic around include of . - - * awk.h (callresult): New name for `result' macro. - * eval.c (r_get_lhs, case Node_builtin): Use it. - -Thu Apr 19 16:31:09 2001 Pat Rankin - - * io.c: Move code around to allow compilation with DEC C. - -Thu Apr 19 16:21:56 2001 Arnold D. Robbins - - * random.h: Move decl of random() here. - * random.c: Remove decl of random(). - -Mon Apr 9 11:41:58 2001 Arnold D. Robbins - - * dfa.c (dfainit): Initialize more members in the structure, - based on bug report in bug.gnu.utils by aaronl@vitelus.com - (Aaron Lehmann). - * awk.h: Fix logic around include of . - -Thu Apr 5 20:12:05 2001 Pat Rankin - - * dfa.c: For VMS, #include instead of . - * missing_d/mktime.c: Likewise. - - * random.c: Reorder include directives to get gawk config info - from random.h sooner. - [fcntl.h]: Guard #include with HAVE_FCNTL_H test. - [unistd.h]: Guard #include with HAVE_UNISTD_H test. - - * random.c (srandomdev): Skip /dev/urandom usage if O_RDONLY - is not defined. - -Tue Mar 20 11:07:11 2001 Arnold D. Robbins - - * awkgram.y (function_body): Add opt_nls to end of production. - -Tue Mar 20 09:30:32 2001 Pat Rankin - - * awk.h (BROKEN_STRNCASECMP): Add decl of strcasecmp. - * io.c (two_way_open): Add `return FALSE;' for fussy compilers. - -Sun Mar 18 15:10:56 2001 Arnold D. Robbins - - * io.c (gawk_pclose): Set the exit value for close correctly - if the pipe died with a signal. - -Wed Mar 7 11:28:52 2001 Arnold D. Robbins - - * io.c (get_a_record): Correctly handle the case of a leading - single newline at the front of the file when RS = "". - -2001-02-26 Paul Eggert - - * COPYING: Incorporate latest version from FSF, which fixes a Y2k bug. - - * builtin.c (do_mktime): Allow the user to specify the - tm_isdst member as an optional trailing integer, and to - specify "out-of-range" members. Check for overflow when - subtracting 1 from month or 1900 from year. Allow years just - past INT_MAX, as they work on some hosts when INT_MAX - 1900 - is representable as an int. - - * doc/gawk.1, doc/gawk.texi: Document the above changes. - Also, document that the origin-zero Gregorian calendar is used. - Fix confusing wording about "midnight" by replacing it with 00:00 - ("midnight" is also 24:00, the end of the day). - Mention the typical range for time stamps. - Do not assume that years are nonnegative and are less than 10,000. - Suggest TZ=UTC0 instead of TZ=GMT0, as that's how recent versions - of GNU date behave. - GMT is not always the time of day in Greenwich these days. - Fix typos: "Emporer/Era", "1980's", "1970's". - - * m4/largefile.m4: Synchronized with latest version. - -Tue Feb 27 12:10:11 2001 Arnold D. Robbins - - * profile.c (pp_in_array): Change test to tree->type == Node_expression_list. - -Wed Feb 7 14:46:50 2001 Arnold D. Robbins - - * awkgram.y (LEX_FOR): Allow newline after `;' in for loops. - Per bug report from Brian Kernighan, bwk@research.bell-labs.com. - -Tue Feb 6 18:35:27 2001 Martin C. Brown - - * io.c (socket_open): Conditionalize various options based on - ifdef. Needed for BeOS port. - -Tue Feb 6 18:17:13 2001 Michal Jaegermann - - * regex.c (re_match_2_internal): Case maybe_pop_jump, for - charset and not_charset: Change cast from (unsigned char) - to (unsigned). Catches last 8 chars with high bit set - if backtracking. See test/rebt8b1.awk, test/rebt8b2.awk. - -Tue Feb 6 11:20:21 2001 Arnold D. Robbins - - Have `for (iggy in foo)' save the elements and loop over them. - Make sorted for loops a dynamic test instead of a compile time test. - Still requires being Strong In The Ways Of The Source. - - * awk.h: (struct search): Removed. - (assoc_scan, assoc_next): Removed declarations. - * array.c (assoc_scan, assoc_next): Removed functions. - * eval.c (interpret): Remove Node_K_array_sorted_for. Change code - at Node_K_arrayfor. - (nodetypes): Remove Node_K_array_sorted_for. - * configure.in: Removed array sorting test. - * awkgram.y: Removed sorted_in keyword and associated code. - -Sun Feb 4 14:57:49 2001 Arnold D. Robbins - - * eval.c (interpret): Use tree->rnode->exec_count to hold count of - times if was true. - profile.c (interpret): Ditto. - * main.c (pre_assign): Gross hack. malloc fresh copy of assign so can - clear the '=', otherwise screws up profiling print out. - -Sun Jan 28 16:16:02 2001 Arnold D. Robbins - - Per request from Nelson Beebe, SIGHUP to pgawk dumps profile - and function call stack and exits, SIGUSR1 dumps and continues - running. - - * eval.c (dump_fcall_stack): New function, dumps awk function call - stack. - * awk.h (dump_fcall_stack): Add declaration. - (init_profiling_signals): Ditto. - * main.c (main): Call init_profiling_signals. - * profile.c (init_profiling_signals, dump_and_exit, just_dump): New - functions. - -Sun Jan 28 15:50:02 2001 Eli Zaretskii - - * io.c (gawk_popen): Restore the mode of stdin before running the - child process and switch it back if BINMODE is in effect after the - child returns. - (redirect): Restore the mode of stdin before running the child - process. - (close_redir): Switch mode of stdin back to binary if BINMODE is - in effect, after the child returns. - - * builtin.c (do_system): Restore the mode of stdin before running - the child process and switch it back if BINMODE is in effect after - the child returns. - - * awk.h (os_restore_mode): Add prototype. - -Thu Jan 18 14:03:06 2001 Arnold D. Robbins - - * custom.h, README_d/README.ultrix: Fixes for Ultrix - from Juergen Kahrs. - -Wed Jan 17 11:03:40 2001 Eli Zaretskii - - * io.c (redirect) [F_GETFL && O_APPEND]: Use binmode in the call - to fdopen. - -Mon Jan 15 16:29:52 2001 Arnold D. Robbins - - * profile.c (prec_level): Made Node_K_getline higher than < - but lower than others. Allows use of getline with redirection - inside an if. - -Wed Jan 10 15:35:06 2001 Arnold D. Robbins - - * eval.c (set_BINMODE): Rationalized string assignment. - -Sun Jan 7 15:26:16 2001 Arnold D. Robbins - - * getopt.h: Removed names in prototypes for getopt_long - and getopt_long_only, fixes problems on MINGW32. - -Thu Jan 4 10:13:46 2001 Arnold D. Robbins - - * configure.in: Add check for mcheck.h - * main.c: Include mcheck.h if have it. - (main): If TIDYMEM turned on in environment, also call mtrace(). - -Wed Jan 3 16:41:33 2001 Arnold D. Robbins - - Fixed minor memory leaks. - * re.c (re_update): When IGNORECASE changed, unref(t->re_text). - * eval.c (pop_fcall): Fix the logic to correctly free the vname - when copying array args back to their underlying source. - - Fixed massive memory leaks. - * node.c (dupnode): If PERM is set, do nothing. - (unref): Fix logic. Always turn off TEMP. Check just for MALLOC - when incrementing the stref. - * array.c (assoc_lookup): Turn off PERM also when saving subscript. - * builtin.c (sub_common): Turn off PERM also when making private copy - of string. - - Add a minor memory cleanup facility (undocumented): - * awk.h (do_tidy_mem, release_all_vars): Add declarations. - * main.c (do_tidy_mem): Add declaration. - (main): If $TIDYMEM exists, do_tidy_mem is true, and call mtrace(). - * awkgram.y (release_all_vars): New function. - -Sun Dec 31 10:47:37 2000 Arnold D. Robbins - - * awkgram.y (in_end_rule): Renamed `parsing_end_rule' to avoid - conflict with global var of same name. - -Sun Dec 24 10:36:54 2000 Eli Zaretskii - - * awkgram.y (snode): Reword the error message about the number of - arguments for a builtin, so as not to use the English `s' as a - plural suffix. - -Tue Dec 12 08:38:03 2000 Arnold D. Robbins - - * ext.c (do_ext): ifdef out use of `dummy'. Duh. - * regex.c (re_error_msgid): Revert to array of `char *' so that can - compile on K&R compilers. Fix all uses appropriately. - (re_error_msgid_idx): Removed. - -Fri Dec 8 11:47:26 2000 Arnold D. Robbins - - * ext.c (dummy): Make gcc specific via ifdef. - * builtin.c (do_dcgettext): Make conditional compilation smarter. - * msg.c (warning, error, r_fatal): Finish switching back to - multi-version function header. - -Wed Dec 6 13:28:58 2000 Arnold D. Robbins - - * random.h: Include to get ssize_t definition. - * awkgram.y (yyerror): Restore multi-version function header, - it seems that what ansi2knr produces doesn't quite do the - job on old compilers. - msg.c (msg): Ditto. - -Tue Dec 5 15:05:35 2000 Arnold D. Robbins - - * configure.in (AC_C_INLINE): Added macro call. - * Makefile.am (LN): Define it for install hooks. - -Sun Dec 3 17:28:53 2000 Arnold D. Robbins - - * awk.h (os_setbinmode): Declare new function. - (setmode): Remove definition: conflicts with MacOS X. - * main.c (main): Change call of setmode to os_setbindmode. - - * builtin.c (do_dcgettext): Improve ifdef for code, fixes MacOS X. - * custom.h (__APPLE__): Force definition of HAVE_MKTIME, won't - link otherwise. Harumph. - -Sun Nov 26 11:58:52 2000 Arnold D. Robbins - - * builtin.c (do_dcgettext, do_bindtextdomain): Add calls to - free_temp the various arguments. Sigh. - * io.c (yylex): Nuked bstart variable, put all uses of mend variable - into TANDEM ifdef. - * main.c (load_environ): Removed cp variable, value never used. - * random.c: Remvoed uses of `inline' keyword. - * Makefile.am (install-exec-hook, uninstall-local): New targets. - Adds creation of gawk-X.Y.Z and awk links, as in 3.0.x. - * configure.in (GAWK_AC_TYPE_SSIZE_T): Added. - m4/ssize_t.m4: New file. - -Wed Nov 22 14:47:18 2000 Arnold D. Robbins - - After consultation with Brian Kernighan and Michael Brennan, - nuked the abort keyword. - - * awk.h (Node_K_abort): Removed. - * eval.c (aborting): Removed decl. - (interpret): Removed Node_K_abort case. - * io.c (do_input): Removed checks for aborting. - * main.c (aborting): Removed. - (main): Removed checks for aborting. - * profile.c (pprint): Removed Node_K_abort case. - * awk.y (LEX_ABORT): All stuff removed. - -Wed Nov 22 10:45:57 2000 Arnold D. Robbins - - * ext.c (dummy): Move inside #ifdef DYNAMIC. Helps on - PCs and other platforms that don't do dynamic loading. - * awk.h (RED_TCP): New flag, means use shutdown. - io.c (redflags2str): Add RED_TCP. - (SHUT_RD, SHUT_WR, SHUT_RDWR): Add conditional defines. - (redirect): Add RED_TCP to tflag if appropriate. Add more - #ifdef HAVE_SOCKETS as needed. - (close_redir): If RED_TCP set, shutdown(2) on each end of the socket. - -Tue Nov 21 16:25:41 2000 Arnold D. Robbins - - * awk.y: for (iggy in foo) loops: Add test that index - in delete statement is a simple variable. - -Tue Nov 14 16:11:39 2000 Arnold D. Robbins - - * awk.h: Add appropriate conditional versions of the gettext - functions if we don't have or if ENABLE_NLS - is not defined or zero. - * configure.in: Add check for libintl.h header. - - From Scott Deifik for PCs. - * awk.h (lintwarn): Call set_loc unconditionally, makes - compilation work on PCs. - * builtin.c (do_dcgettext): Compile out cat_tab and code - if not ENABLE_NLS. - * ext.c: For MSC, no long long variable. - * random.c: Use clock() instead of gettimeofday(). - * builtin.c: Fixed prototypes for new random functions (ADR). - -Sun Nov 12 17:45:44 2000 Arnold D. Robbins - - * builtin.c (parse_next_arg): Fix call to >= num_args so - running out of args check is correct, instead of core dumping. - (format_tree): Save and restore `the_args' and `args_size' - if a nested call is in progress, see explanatory comment. - See also tests/addcomma. - * Makefile.am: Fix things so that gawk/pgawk built first, - even if `make check' called before make. Add some - commentary. - -Wed Nov 8 14:39:20 2000 Arnold D. Robbins - - * configure.in: Only add -rdynamic for Linux. - * dfa.h, dfa.c: Upgraded to versions in grep 2.4.2. - -Tue Nov 7 18:17:17 2000 Arnold D. Robbins - - * All: Switched to ANSI function headers and added - `ansi2knr' automake option. Really cool. - -Tue Nov 7 16:57:49 2000 Arnold D. Robbins - - * io.c (redirect): Check for O_APPEND in flags when doing - fdopen() of /dev/fd/N. Thanks to bug report from - "John H. DuBois III" . - -Tue Nov 7 14:09:14 2000 Arnold D. Robbins - - * awk.h (os_is_setuid): Declare function. - * main.c (main): Call it if do_lint and warn if true. - * awkgram.y (tokentab): - - Made sure all extensions are actually marked as such. Ouch. - - Changed "sort" to "asort". Potential to break too much old code. - * getopt.h, getopt.c, getopt1.c: Replaced with current versions - from glibc CVS archive. - -Mon Nov 6 18:14:33 2000 Arnold D. Robbins - - * random.c: Replaced with recent version from FreeBSD. - -Mon Nov 6 15:37:12 2000 Arnold D. Robbins - - Major simplification of automake machinery. - - * configure.in: - - INSTALL is forced only if not provided in environment - - lots of Makefile.in files removed since move to automake 1.4a - * Makefile.am, */Makefile.am: Moved directories that don't need - the automake machinery into EXTRA_DIST as appropriate and - removed the Makefile{,.am,.in} files as needed. - * eval_p.c, profile_p.c: New files to make it easier with automake - to compile pgawk. - -Tue Oct 24 12:20:18 2000 Arnold D. Robbins - - * awkgram.y (valinfo, var_comp, dump_vars): New functions to dump - the list of global variables. - * awk.h: Declare dump_vars. - * main.c (optab): New option "dump-variables". - (main): Code to handle it, set the output file and then call - dump_vars() at the end. - (usage): New option added to usage message. - -Sat Oct 21 22:59:59 2000 Arnold D. Robbins - - * awkgram.y (parms_shadow): For a function, check if any - parameters shadow global variables and print a warning. - (shadow_funcs): Go through all functions and call parms_shadow(). - (isnoeffect, isassignable): Add Node_LINT and NODE_BINMODE. - * main.c (main): If do_lint, call shadow_funcs(). - * awk.h: Add declaration of shadow_funcs(). - * configure.in: Added m4/Makefile and awklib/eg/network/Makefile - to list of generated makefiles. - -Tue Oct 17 10:47:35 2000 Arnold D. Robbins - - * array.c (assoc_lookup): Reverted change that did dupnode of - array indices. Creates significant problems if index is - numeric value and CONVFMT changes. Added fix to set - bucket->ahname->stfmt to -1 so that force_string never recalculates - the string value, and also turned off NUM and turned on STR. - See test/arynasty.awk. - -Mon Oct 16 12:21:26 2000 Arnold D. Robbins - - * All: Cleaned up various lint warnings for consistent phrasing. - * awk.y (in_end_rule): New variable for warning about unredirected - getline. It's ok in a BEGIN, but not in an END. - -Sun Oct 15 14:14:05 2000 Arnold D. Robbins - - * field.c (set_FS): Add lint warning for FS = "". - (do_split): Ditto for 3rd arg = "". - -Fri Oct 13 09:17:04 2000 Arnold D. Robbins - - * io.c (close_redir): Clear rp->fp on all closes. Remove - rp from list if either closing both ends or both ends - have been closed separately. Add exitwarn message for - co-process. - (flush_io): Add warning message if fflush of co-process - fails. Rationalize return value to either 0 or -1. - * builtin.c (do_gensub): 3rd arg of zero generates a - warning. - (do_fflush): Rationalize return value: -1 for unopen or read-only - redirection, status of fflush otherwise. - -Wed Oct 11 22:11:19 2000 Arnold D. Robbins - - * awk.y (for loop): Check that there is a body as - part of the `is it a delete statement' check. - -Thu Oct 5 11:56:42 2000 Arnold D. Robbins - - * awk.h, awkgram.y, configure.in, eval.c: Enabled - `for (i in_sorted array)' loops for those who - are Strong In The Way Of The Source. So there. - -Mon Oct 2 10:09:32 2000 Arnold D. Robbins - - * io.c (do_close): Make close(x) for non-open x return -1 - and update ERRNO. close(FILENAME) no longer does anything - magic; this is all for better consistency with other awks - and is more logical, anyway. - -Thu Sep 28 17:27:16 2000 Arnold D. Robbins - - * io.c (close_one): Added a lint warning if it becomes - necessary to start multiplexing fd's, per ancient suggestion - from Scott Deifik, . - -Tue Sep 26 14:41:41 2000 Arnold D. Robbins - - * profile.c: Move enum for redirection placement to top - of file, and make the value a parameter to pp_redir. - Fix all the calls. This gets `|&' right everywhere. - -Sun Sep 24 16:38:04 2000 Arnold D. Robbins - - * awk.h (freenode): Set the flags straight to UNINITIALIZED. - * node.c (unref): Fix test for MALLOC|TEMP to test the - actual flags, not zero. - * builtin.c (format_tree): ala print and concat, dupnode - the temp nodes from tree_evaling the arguments. See - test/nasty2.awk. - -Mon Sep 18 10:16:58 2000 Arnold D. Robbins - - * awkgram.y (snode): Make match 3rd arg and close 2nd arg fatal - errors if --tradtional. - -Thu Sep 14 12:22:42 2000 Arnold D. Robbins - - * eval.c (update_ERRNO): Call gettext on result of strerror. - i18n rules. - -Wed Sep 13 14:56:11 2000 Arnold D. Robbins - - * eval.c (r_tree_eval): Case for Node_concat. Dupnode the - strings ala do_print to get more consistent results. - Compare gawk 3.0.6 to nawk/mawk on test/nasty.awk. - Thanks to Andrew Sumner (andrewsumner@yahoo.com) for - pointing this one out. - -Wed Sep 13 10:06:47 2000 Arnold D. Robbins - - * io.c (two_way_close_type): New enumerated type. - (close_redir): New third param of type two_way_close_type. - Add smarts to two-way case for different close types. - Only remove it from the redir list if closing is for both ends. - (gawk_pclose): Check that rp->iop != NULL before closing, - all three versions. - * awkgram.y (tokentab): Allow 2nd argument to close. - (snode): Add lint warning. - -Sun Sep 10 14:16:10 2000 Arnold D. Robbins - - * field.c (set_FIELDWIDTHS): Generate a fatal error upon - encountering a negative width. - -Sun Sep 10 10:37:35 2000 Arnold D. Robbins - - * awkgram.y (snode): If first argument to dcgettext is a - string constant and --gen-po, dump the string constant to - the .po file too. - * main.c (nostalgia): Add call to fflush(stderr). - * eval.c (r_tree_eval): Add entries for Node_LINT and for - NODE_TEXTDOMAIN. - -Thu Sep 7 10:46:20 2000 Arnold D. Robbins - - * builtin.c (do_dcgettext): Per suggestion from Ulrich Drepper, - make the awk interface: - - str = dcgettext(string [, domain [, category]]) - -Wed Sep 6 16:28:12 2000 Arnold D. Robbins - - Bring gettext features out to the awk level! - - * awk.h: Add declarations of new functions `do_dcgettext' - `do_bindtextdomain', `set_TEXTDOMAIN' and variables - `TEXTDOMAIN', `TEXTDOMAIN_node'. New NODETYPE enum - `Node_TEXTDOMAIN'. - * eval.c (nodetypes): Add Node_TEXTDOMAIN at end. - (set_TEXTDOMAIN): New function. - (r_get_lhs): Add case for Node_TEXTDOMAIN. - * main.c (varinit): Add entry for TEXTDOMAIN. - * node.c (format_val): If INTLSTR use dcgettext of string - and TEXTDOMAIN. - * awkgram.y (tokentab): Add entries for "dcgettext" and - "bindtextdomain". - * builtin.c (do_dcgettext, do_bindtextdomain): New functions. - -Tue Sep 5 17:01:34 2000 Arnold D. Robbins - - * profile.c (pp_string_fp): Use lower case versions of - isascii and isprint to avoid printing high-bit-set - characters. Make it smarter to break strings at 70 - chars or after embedded newline, for --gen-po. - Fix the calls to it everywhere for new boolean option - to yes/no break lines. - * m4/strtod.m4: New file, defines GAWK_AC_FUNC_STRTOD_C89. - * configure.in: GAWK_AC_FUNC_STRTOD_C89 call added - * acinclude.m4: Include strtod.m4. - * acconfig.h: Add entry for STRTOD_NOT_C89. - Remove entries for BITOPS and NON_DEC_DATA. - * missing/missing.c: Add check for STRTOD_NOT_C89, use ours - if set. - * missing/strtod.c: Make smarter for input like 0x345. - * awk.h: [STRTOD_NOT_C89]: Define strtod gawk_strtod to get - our version. Avoids linker weirdness. - -Mon Sep 4 09:16:43 2000 Arnold D. Robbins - - * field.c (set_record): Fix from Utz-Uwe Haus - to make sure there's - always enough room in the record. - * builtin.c (nondec2awknum): Fix octal conversions to exit - when hitting a non-digit, and not go to decimal. Make - check for non-octal better. Based on bug report from - Morris_Lee@tvratings.com. - -Sun Sep 3 13:52:11 2000 Arnold D. Robbins - - * builtin.c (format_tree): Allow positional parameters for - %*.* kinds of things. - - Made octal/hex constants and strtonum on by default. Made - --enable-non-decimal-data a runtime switch `--non-decimal-data'. - - * configure.in: Removed AC_ARG_ENABLE for --enable-bitops and - --enable-non-decimal-data. - In .developing check, remove the AC_DEFINEs. - * awk.h: Decls for bitwise functions now there by default. - Add decl of `do_non_decimal_data'. - * main.c (do_non_decimal_data): New variable - (optlist): Add new entry for `--non-decimal-data'. - (main): Turn off `do_non_decimal_data' if `do_traditional'. - (usage): Add the new option. - * node.c (r_force_number): Make check for non-decimal data a - runtime check based on do_non_decimal_data. - * awkgram.y (yylex): Make non-decimal constants a runtime check. - * builtin.c: Remove the ifdefs around the bit functions and - nondec2awknum. - -Tue Aug 29 18:45:56 2000 Arnold D. Robbins - - * configure.in: Go back to ARRAYDEBUG if .developing set. - * awkgram.y: Use ARRAYDEBUG for adump(), use multiple tests - for stopme(). - -Mon Aug 28 17:09:06 2000 Arnold D. Robbins - - * field.c (do_split): Add check for first arg is null string, - if so, skip the work and return zero. - -Mon Aug 14 23:01:55 2000 Arnold D. Robbins - - Add %COUNT$... handling to printf. - - * awk.h (printf_count): New define in NODE structure. - (format_tree): Added decl. - * awkgram.y (count_args): New function to set printf_count in - a node. - [print productions]: Call the function. - * (snode): For do_sprintf, call count_args, set the count - in the lnode. - * builtin.c (format_tree): New fourth arg is argument count. - Add smarts to handle the `$' in a format. - * (do_sprintf): Use new argument to format_tree. - node.c (format_val): Ditto. - -Sun Aug 13 11:10:41 2000 Arnold D. Robbins - - Changes from Alan J. Broder (ajb@woti.com): - - Array third arg to match puts subtexts into the array: - - * awk.y (tokentab): "match" gets third arg, and lint warning - * builtin.c (do_match): If third arg there, fill it with subtexts - - - New builtin sort function: - - * awk.h (do_sort): Declared. - * array.c (do_sort, dup_table, merge, merge_sort, assoc_from_list, - assoc_sort_inplace): New functions. - - * eval.c (tree_eval): In debug code, make uninitialized var - a warning, not a fatal error. Breaks too many things. - -Wed Aug 9 10:51:41 2000 Arnold D. Robbins - - * eval.c (func_call): Increment the exec_count on the - function's node; this allows printing a call count for - functions. - profile.c (pp_func): Print the count for functions. - * ALL: Changed DEBUG to GAWKDEBUG in all gawk files, so that - I don't get regex/dfa debugging. In some cases, changed - memory-related stuff to MEMDEBUG. Still have work to do. - * awk.h, node.c, profile.c: Removed exec_count_init variable; - code has been cleaned up to not need different values for - profiling/not profiling. - -Thu Jul 5 21:10:59 2000 Arnold D. Robbins - - * eval.c (casetable): Removed the USE_PURE_ASCII stuff; it - was never documented. Latin 1 forever. - * main.c (main): Only call `init_profiling' after arg parsing - if `do_profiling' is still false. Avoids resetting `prof_fp' - back to stderr. - -2000-02-17 Akim Demaille - - * m4: New directory. - * acinclude.m4: Removed, replaced by m4/*.m4. - * Makefile.am: Adjusted. - Added ACLOCAL_AMFLAGS. - * configure.in Adjusted. - Use AC_SYS_LARGEFILE not GAWK_AC_SYS_LARGEFILE, jm_FUNC_MKTIME, - not GAWK_FUNC_MKTIME. - * acconfig.h: Removed _FILE_OFFSET_BITS, _LARGEFILE_SOURCE and - _LARGE_FILES now templated by m4/largefile.m4. - -2000-02-15 Arnold Robbins - - * MOVED TO AUTOMAKE AND GETTEXT. - Just about every file touched. Work done by Arno Peters. - -Sun Jan 2 14:48:23 2000 Arnold D. Robbins - - First edit of the new millenium! - * awk.y (yylex): If lint checking, be obnoxious about gotos. - -Mon Oct 25 19:12:02 1999 Arnold D. Robbins - - * awk.h: Remove C_ALLOCA ifdef. - * main.c (main): Remove C_ALLOCA code. - * io.c (do_input): Ditto. - -Mon Aug 9 17:36:24 1999 Arnold D. Robbins - - * bisonfix.sed: Unconditionally #undef YYSTACK_USE_ALLOCA. - * configure.in: Remove all alloca and ALLOCA related stuff. - * Makefile.in: Ditto. - -Thu Jul 29 18:32:05 1999 Arnold D. Robbins - - * awk.h (NODE): exec_count now in #ifndef NO_PROFILING. - * Makefile.in: Changes to only recompile eval.c and profile.c to a - special version for profiling. - * custom.h [MSC_VER]: Turn on NO_PROFILING to omit the exec_count - and save space. - * node.c (more_nodes): Move setting of exec_count to - #ifndef NO_PROFILING. - -Thu Jul 1 12:12:05 1999 Arnold D. Robbins - - * configure.in (AC_PREREQ): Update to 2.13. - GAWK_AC_C_STRINGIZE: convert to AC_C_STRINGIZE. - * aclocal.m4 (GAWK_AC_C_STRINGIZE): Remove definition, now - part of autoconf. - * acconfig.h (HAVE_STRINGIZE): Ditto. - -Wed Apr 28 11:08:05 1999 Arnold D. Robbins - - * array.c (assoc_lookup): Fix call to free_temp(subs) to after - last use of subs. - -Sun Apr 25 16:48:06 1999 Arnold D. Robbins - - * io.c (redirect): Add lint warning when same file is used for - > and >>. - -Thu Apr 22 15:05:30 1999 Arnold D. Robbins - - * array.c (assoc_lookup): Fix call to fatal to lintwarn instead. - * node.c (r_force_number): Use `0 &&' to disable warnings about - conversions: they're overzealous, methinks. - -Thu Apr 8 14:27:58 1999 Arnold D. Robbins - - New features for profiling: - - * awk.h (NODE): Add `exec_count' member. - (freenode): Clear `exec_count' upon free. - * awk.y (func_count): New variable, counts total number of functions. - (func_install): Increment func_count. - (struct finfo): Information for use in sorting functions when - pretty printing. - (fcompare): Compare two finfo structures. - (dump_funcs): Print the functions in sorted order for profiling. - (getfname): Return the name of a builtin function. - * eval.c (INCREMENT): New macro for counting execution of nodes. - (interpret): Call INCREMENT() appropriately. - * main.c (do_profiling): New flag if doing profiling. - `--profiling': New option added to getopt_long machinery. - (main): For profiled version, set do_profile and output file. - Call `dump_prog' and `dump_funcs' if do_profiling at end. - (usage): Add new argument. - * node.c (more_nodes, freenode): Set exec_count to zero. - * profile.c: New file, does pretty printing and prints counts. - * Makefile.in: Update to create two versions of gawk, regular - and `pgawk' which does profiling. - -Wed Mar 10 21:38:14 1999 Arnold D. Robbins - - * io.c (close_redir): Use update_ERRNO() instead of manually - doing it. - -Mon Dec 21 15:58:21 1998 Arnold D. Robbins - - * configure.in: Add BeOS to list of cases where we hardwire - GETPGRP_VOID. - custom.h: Remove the #define from __be_os case. Cleaner to - do it all in configure. Based on email from Martin C. Brown, - mc@whoever.com. - -Mon Nov 30 20:52:52 1998 Arnold D. Robbins - - * eval.c (update_ERRNO): New function, mainly for use by - extension functions. - * awk.h: Add decl. - -Tue Nov 24 18:13:29 1998 Arnold D. Robbins - - * Changes based on submission from Christos Zoulas at D.E. Shaw - that adds the following features: - - checking for use of uninitialized variables - - checking if a string that's not a number converts to 0 - - ability to load a dynamic library to add built-ins - - VERSION variable (may or may not stay) - Additional change: - - --lint=fatal makes lint errors become fatal - - LINT="fatal" has the same effect, any other positive - value makes lint errors be just warnings - * Makefile.in (includedir): New variable for gawk header files - (ext.c, ext.o): New source and object files - (OTHERS, extension): New directory for macro with example extension - (install): Install header files - * acconfig.h (DYNAMIC): New macro, true if can do dynamic loading - * array.c (assoc_lookup): New parameter `reference' is true if we - want to do reference checking. Add appropriate reference checking - code. - * awk.h (UNITITIALIZED): New flag - (lintfunc): Function pointer for correct function to use - (lintwarn): New macro to produce warnings - (result): New macro for func call result, used in commented out - code in eval.c. - (getnode, freenode): Revised to set UNINITIALIZED. - (get_lhs): Third arg for reference checking, change all calls - -- Add appropriate decls of new/changed functions - * awk.y (tokentab): New builtin "extension" for adding extensions - (node_common): Set flags to UNINITIALIZED for Node_var. - * configure.in (dynamic linking): New check. Probably should - be a separate macro. - * eval.c (flag2str): Add UNINITIALIZED to the table. - (r_tree_eval): Add checks for UNINITIALIZED. - (push_args): Appropriate changes for UNINITIALIZED to work. - (r_get_lhs): New third argument for reference checking. - (set_LINT): Add code to handle setting `lintfunc' appropriately. - * ext.c: New file, for doing dynamic library extensions. - * extension/*: New directory with simple example code. - * main.c (VERSION_node, EXTENSION_node): New nodes for new vars. - (optab): Change for "lint" to allow optional argument. - (lintfunc): Definition. - (main): Add case in option processing for --lint. - (varinit): Add entries for VERSION and EXTENSION. - * node.c (r_force_number): Checks that string really is a number. - (morenodes): Set UNITIALIZED in the flags. - * re.c (all): Change `result' to `res' globally to avoid conflict - with new macro. - * GLOBAL: Change lint calls to warning() to lintwarn(). - * GLOBAL: Change all calls to get_lhs() to have 3rd arg. - * GLOBAL: Change all calls to assoc_lookup() to have 3rd arg. - -Sun Nov 22 17:07:39 1998 Arnold D. Robbins - - * patchlev.h: Renamed from patchlevel.h to make life - easier for the PC guys. - (main.c): Changed to include patchlev.h. - (Makefile.in): Changed to ref patchlev.h where needed. - -Sat Nov 7 21:29:52 1998 Arnold D. Robbins - - * eval.c (r_get_lhs): case Node_field_spec. Fix the lint - warnings for field reference of null string or non-numeric value. - When turned on, $0 generated a warning! Oops. - -Thu Nov 5 16:58:38 1998 Arnold D. Robbins - - * main.c (init_fds): New function to pre-open 0, 1, and 2 on - /dev/null if they're not open. Robustness, more or less. - (main): Call init_fds. - * io.c (str2mode): Add smarts for two-letter strings - such as "rw", "r+", "wr", "w+" and "a+". - -Mon Nov 2 16:55:46 1998 Arnold D. Robbins - - * builtin.c (do_*): Added lint checks for non-numeric - and/or non-string arguments, as appropriate. This should - have been done long ago. - -Tue Oct 20 21:56:06 1998 Arnold D. Robbins - - * awk.h (LINT_node): New variable for LINT special var - (Node_LINT): New node type. - (set_LINT): Declare function. - * main.c (varinit): Add LINT variable. - (usage): Print an emphatic pointer to the manual for bug reports. - * eval.c (nodetypes): New entry for Node_LINT. - (r_get_lhs): Case added for Node_LINT. - (set_LINT): Set do_lint from LINT variable. - -Mon Oct 19 22:35:46 1998 Arnold D. Robbins - - * configure.in: For GCC, add -Wall to get warnings for development. - * Makefile.in (awktab.c): Move sed stuff to separate script. - * bisonfix.sed: New script, with old fix and Solaris x86 fix. - * awk.h (nodetype2str): Add declaration. - (load_procinfo): Add declaration. - -Tue Oct 13 22:28:56 1998 Arnold D. Robbins - - Changes to make PROCINFO["FS"] reflect the use of FIELDWIDTHS or FS. - - * eval.c (assign_val): New function that does the mechanics of - assignment - * main.c (load_procinfo): Add setting of PROCINFO["FS"] to "FS". - * field.c (update_PROCINFO): New function to update the array. - (set_FS): Call update_PROCINFO. - (set_FIELDWIDTHS): Ditto. - -Sun Sep 27 10:18:05 1998 Arnold D. Robbins - - * awk.h (reisstring): New prototype. - * re.c (reisstring): New function, returns true if the re did - a simple string match. This is rather simplistic in its logic. - * io.c (get_a_record): In the case that RS is a regexp, AND - the re matched at the exact end of the buffer, add a call to - `reisstring' in case it's a simple string match. If so, we - don't need to read more into the buffer because we don't - have a regex like `x.*y' that might extend longer. - This should be very helpful for interactive /inet clients - where something like `RS = "\r\n"' happens. - -Thu Aug 13 22:07:40 1998 Arnold D. Robbins - - * io.c (socketopen): Fixes from Juergen Kahrs to socket - opening code for "any host". - -Tue Jul 14 19:02:33 1998 Arnold D. Robbins - - * aclocal.m4 (GAWK_AC_LIB_SOCKETS): Removed the caching; - configure gave different results the second time it was run! - -Fri Jul 10 09:11:06 1998 Arnold D. Robbins - - * eval.c (interpret): Minor cleanups: add variable name to - fatal error Node_K_array_for and other minor changes. - -Mon Jun 22 16:53:34 1998 Arnold D. Robbins - - * Makefile.in (tags, TAGS): Add $(LIBSRC). - -Tue Jun 2 15:23:05 1998 Arnold D. Robbins - - * io.c (devopen): Relax previous change, don't require "any", - just that a port be there. The user can put 0 if they - don't care. - -Wed May 27 21:33:45 1998 Arnold D. Robbins - - * io.c (devopen): For /inet, require that local and remote - ports and the remote hostname be there, and that `any' - be used for a port if they don't care. - -Thu May 21 14:13:46 1998 Arnold D. Robbins - - * node.c (parse_escape): Add warning that is always on - for \q for any unknown q inside string or regex constant. - I got bit by this myself once too often. Or else I'm - just getting old and senile. - -Mon May 4 12:42:49 1998 Arnold D. Robbins - - * awk.h (NODETYPE): Sorted the Node_xxx entries for the - builtin variables. Gotta look nice, don't we? - * eval.c (nodetypes): Ditto. - (genflags2str): Added code to check that we don't - overflow the static buffer. This is just a debugging - routine, not worth the hassle of dynamic allocation. - -Mon Mar 2 16:06:16 1998 Arnold D. Robbins - - * Makefile.in (dist): Remove any embedded copied RCS or CVS - directories. - -Mon Feb 23 00:09:52 1998 Arnold D. Robbins - - * awk.h (genflags2str): Add declaration. - * eval.c (genflags2str): New function. - (flags2str): Use new general purpose function. - * io.c (redflags2str): Same. - -Sun Feb 22 23:57:29 1998 Arnold D. Robbins - - Significant changes to add two-way i/o and sockets!!! - - * Makefile.in: Add @SOCKET_LIBS@ to LIBS variable. - * acconfig.h: Add HAVE_SOCKETS and HAVE_PORTALS defs. - * aclocal.m4: New macro GAWK_AC_LIB_SOCKETS. - * awk.h: New node type, Node_redirect_twoway, and new redirection - flags: RED_TWOWAY, and RED_SOCKET. - * awk.y (parser): Add TWOWAYIO token and appropriate productions. - (yylex): Recognize `|&' token if not traditional. - * builtin.c (do_print, do_printf): Flush buffer if TWOWAYIO. - * configure.in: Add header checks for networking header files, - add --enable-portals switch, call GAWK_AC_LIB_SOCKETS - * eval.c (nodetypes): Add string constant for Node_redirect_twoway. - * io.c (redflags2str): New function. - (redirect): Better error message in default case, add code for - Node_redirect_twoway. - (socketopen): New function. - (iop_open, devopen): Add recognition of `/inet/...'. - (two_way_open): New function. - -Sat Dec 13 21:15:07 1997 Arnold D. Robbins - - * awk.h (struct node): New member, `param_list' in union `x', becomes - `node->parmlist' in the code. - * awk.y (func_install): Rearranged a bit, to build up a list of - the function parameter names and to save it in the `parmlist' field. - * eval.c (push_args): New parameter, `varnames', which is the list - of variable names. Use this to set the vname field of each - parameter's value as it's created. Special case arrays to include - where they came from, mainly for array vs. scalar diagnostics. - (r_tree_eval): Don't set the `vname' field for parameters. - (pop_fcall): Free the `vname' field if it's an array. - (func_call): Pass in the `parmlist' field to call of push_args(). - (r_get_lhs): For Node_subscript, change error message to use - the `vname' field. - (stopme): New do-nothing function for use with debugging code - and setting breakpoints. - -Thu Dec 4 15:18:17 1997 Arnold D. Robbins - - * awk.y: Fixed several lint checks and moved some into - test for do_lint_old. - * eval.c (fmt_index): Add value of bad format spec to - error message. - -Tue Nov 18 22:19:02 1997 Arnold D. Robbins - - * Makefile.in (install): Strip the installed binary. - From Anatoly A. Orehovsky (tolik@mpeks.tomsk.su). - -Sun Nov 16 22:12:39 1997 Arnold D. Robbins - - * array.c (in_array, assoc_lookup): Add symbol->vname to - fatal calls for scalar in array context. - -Wed Nov 12 22:18:33 1997 Arnold D. Robbins - - * awk.h [ISASCII]: On all IS* macros, add cast to unsigned char. - [TOUPPER, TOLOWER]: New macros using unsigned char. - * awk.y: Change to use of IS* vs. is* macros. - * builtin.c (nondec2awknum): Change to use of IS* vs. is* macros, - change casts for casetable[] from int to unsigned char. - use new TOLOWER, TOUPPER macros - * dfa.c [ISASCII]: On all IS* macros, add cast to unsigned char. - (lex): Change isdigit to ISDIGIT. - [TOUPPER, TOLOWER]: New macros using unsigned char, now used. - * eval.c (fmt_ok): Change to use of IS* vs. is* macros. - * field.c (sc_parse_field): Change to use of IS* vs. is* macros, - change casts for casetable[] from int to unsigned char. - (set_FS): Change to use of IS* vs. is* macros. - * io.c (get_a_record): Change to use of IS* vs. is* macros, - change casts for casetable[] from int to unsigned char. - * main.c (main): Change to use of IS* vs. is* macros. - * node.c (r_force_number, parse_escape): Change to use of IS* vs. - is* macros. - * re.c (make_regexp): Change to use of IS* vs. is* macros. - * regex.c [ISASCII]: On all IS* macros, add cast to unsigned char. - -Sun Oct 19 12:36:47 1997 Arnold D. Robbins - - * ALL: Change email address to arnold@gnu.org in all relevant places. - -Wed Oct 15 03:38:12 1997 Arnold D. Robbins - - * awk.y (yylex): Don't allow newlines after ? or : if do_posix. - -Thu Oct 9 19:28:39 1997 Arnold D. Robbins - - * custom.h [SEQUENT]: Removed; not needed any more since the - mmap code was ripped out. - -Wed Oct 8 17:22:03 1997 Arnold D. Robbins - - * configure.in: Remove check for madvise; don't need it any more - after nuking use of mmap. - -Tue Oct 7 11:14:21 1997 Arnold D. Robbins - - * eval.c (flags2str): Made the code table driven. Shortened a lot. - -Tue Sep 30 20:59:17 1997 Arnold D. Robbins - - * eval.c (r_get_lhs): case Node_field_spec. Add lint warnings - for field reference of null string or non-numeric value. - Based on patch submitted by Alan Broder, ajb@dtmr.com. - -Wed Sep 24 20:47:59 1997 Arnold D. Robbins - - * custom.h [TANDEM]: New changes. Finishes up Tandem - integration. - -Mon Sep 22 00:42:34 1997 Arnold D. Robbins - - * custom.h [__be_os]: Remove BROKEN_TOKEN definition. - * dfa.c, dfa.h: Change `token' to `dfa_token' to avoid BeOS - compile problems. - -Thu Aug 7 22:35:17 1997 Arnold D. Robbins - - Changes for BeOS from mc@whoever.com - - * awk.h (strncasecmp): Bracket prototype. - custom.h [__be_os]: New stuff. - dfa.h, dfa.c [BROKEN_TOK]: New ifdefs to use dfa_token, not token. - -Fri Aug 1 13:32:49 1997 Arnold D. Robbins - - Tandem changes: - - * awk.h [TANDEM]: Misc additions, as needed. - * io.c (get_a_record): Changes for fixed length records; not used - on other systems. - * main.c (MRL): New variable, TANDEM specific. - (main): Update handling -mr option for TANDEM. - (load_environ): Comment out whole routine if TANDEM. - missing.c [TANDEM]: New includes. - gawkmisc.c [TANDEM]: Include `tmiscc'. - -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - Close-on-exec changes: - - * awk.h: (os_close_on_exec, os_isdir): New functions. - * gawkmisc.c: Add include fcntl.h. - * configure.in [AC_CHECK_HEADERS]: Add fcntl.h. - * io.c (devopen, iop_open): Change to use os_isdir(), not S_IFDIR(). - (redirect, devopen, iop_open, gawk_popen): Change all calls to - fcntl() to os_close_on_exec(). - -Tue Jul 29 11:09:45 1997 Arnold D. Robbins - - * eval.c (set_BINMODE): Fixed check for digits to use isdigit() - instead of looping over digits and using strchr(). Duh. - -Sat Jul 26 22:52:08 1997 Arnold D. Robbins - - * eval.c (set_BINMODE): Fix so that `-v BINMODE=w' works. - * node.c (r_force_number): Add decl of strtod(); makes things - work on MIPS. - * Makefile.in (install-strip): New target. - -Fri Jul 18 13:28:05 1997 Arnold D. Robbins - - * io.c (redirect, devopen, iop_open, gawk_popen): Set the - close-on-exec flag on all files and pipes opened for I/O. - Keeps children run via system() or other pipes from running out - of file descriptors. - - (Reported by Kenny McCormack, gazelle@yin.interaccess.com.) - -Tue Jul 8 22:18:00 1997 Arnold D. Robbins - - * awk.y [LEX_NEXT]: Removed support for `next file' as two words. - -Tue Jul 8 06:46:32 1997 Arnold D. Robbins - - * dfa.c: Changes from pjr@jet.UK (Paul J Rippin) from an old - bug report against 2.14.0 that speed up initialization and - rewrite the inner loop into readable code. - -Thu Jul 3 11:44:50 1997 Arnold D. Robbins - - * Atari support moved into new `unsupported' directory. - awk.h, Makefile.in, gawkmisc.c, and missing.c modified. - -Sun Jun 29 14:17:37 1997 Arnold D. Robbins - - * awk.y (exp): Fixed warning about `x = /foo/'. - -Wed Jun 25 09:07:57 1997 Arnold D. Robbins - - * PORTS: Removed from distribution. - * Makefile.in (MISC): Removed PORTS. - -Sun Jun 22 11:52:57 1997 Arnold D. Robbins - - BINMODE changes. - - * awk.h (Node_BINMODE): Added. - (struct redirect): Added mode field to save for io.c:close_one(). - (BINMODE, BINMODE_node, set_BINMODE): Add declarations. - * awk.y (isnoeffect): Add Node_BINMODE. - * eval.c (nodetypes): Add Node_BINMODE string. - (r_tree_eval, r_get_lhs): Add cases for Node_BINMODE. - (set_BINMODE): New function. - * io.c (binmode): New function. - (nextfile, redirect, gawk_popen): Add calls to binmode(). - * main.c (BINMODE, BINMODE_node): Add decls. - (main): Add call to setmode() if BINMODE is set. - (varinit): Add entry for BINMODE. - -Wed Jun 4 21:52:25 1997 Arnold D. Robbins - - * configure.in [AC_FUNC_MMAP]: Removed call. - * awk.h [struct iobuf]: Removed IOP_MMAPED flag and `getrec' member. - * io.c: Removed all mmap related code. - -Sun Apr 27 16:23:56 1997 Arnold D. Robbins - - * aclocal.m4 [GAWK_AC_FUNC_MKTIME]: New macro. - * configure.in (GAWK_AC_FUNC_MKTIME): Call it. - -Thu Apr 24 23:25:06 1997 Arnold D. Robbins - - * io.c (devopen): Remove stat test for /dev/foo files. Finally. - -Fri Jul 26 09:23:15 1996 Arnold D. Robbins - - Changes to add an abort statement, a la tawk. - - * awk.h (Node_K_abort): New enum value for NODETYPE. - * main.c (aborting): New flag variable. - (main): Add logic to handle aborting. - * eval.c (interpret): Add case for Node_K_abort. - * io.c (do_input): If aborting, break loop. - * awk.y (tokentab): Add entry for "abort" keyword - (PRODUCTIONS): Add production for LEX_ABORT. - -Wed Jul 24 12:49:52 1996 Arnold D. Robbins - - First cut at changes for i18n. - - * awk.h (do_intl): Declare new flag variable. - [INTLSTR]: New flag def. - (m_tree_eval): Fix definitions for INTLSTR. - (force_string): Fix definitions for INTLSTR. - * awk.y (yylex): Add _"..." for international strings. - (dumpintlstr): New function. - * main.c (do_intl): Define new flag variable. - (optab): Add "gen-po" entry. - (main): If do_intl, exit, don't run the program. - (gawkoption): Add "gen-po" entry. - * node.c (r_force_string): Call gettext if flags indicate INTLSTR. - -Thu Mar 14 06:29:42 1996 Arnold D. Robbins - - * awk.h (do_mktime): Added declaration of new function. - * builtin.c (do_mktime): New function. - * awk.y (tokentab): Added "mktime" to list of gawk extensions. - * missing.c [HAVE_MKTIME]: Added include of mktime.c if needed. - -Mon Feb 26 22:32:19 1996 Arnold D. Robbins - - * io.c (pidopen, useropen): Added warnings to use PROCINFO[], - not special files. - * main.c (load_procinfo): New function. - * awk.y (variable): Added call to load_procinfo() function. - -Mon Aug 7 15:23:00 2000 Arnold D. Robbins - - * Release 3.0.6: Release tar file made. - -Thu Aug 3 17:47:53 2000 Greg McGary - - * regex.c: Patches for gcc bounded pointer handling. - -Thu Aug 3 13:09:09 2000 Arnold D. Robbins - - * array.c (in_array, do_delete): Fix tests for index equality - when searching through the array to work correctly when - index is "". - -Fri Jul 14 21:40:17 2000 Pat Rankin - - * builtin.c (format_tree): Workaround a DEC C V5.7 bug by - splitting `strcpy() + 3' into two expressions (the builtin - inline strcpy evidently has erroneous return type of void * - instead of char *; reputedly fixed in V6.1). - - * eval.c (C): New macro. - [casetable]: Use it to add explicit casts for the character - values outside the range of 0 to 127. - * missing/strncasecmp.c [C, charmap]: Likewise. - - * io.c (redirect): Add EIO check on failed open for VMS. - -Fri Jul 14 11:57:23 2000 Arnold D. Robbins - - Efficiency hack: turn `for (iggy in foo) delete foo[iggy]' - into moral equivalent of `delete foo'. - - * array.c (do_delete_loop): New routine. - * awk.h [NODETYPE]: New Node_K_delete_loop value. - Add declaration of do_delete_loop. - * awk.y [LEX_FOR]: Fix code to recognize special case. - * eval.c (nodetypes): New entry for Node_K_delete_loop. - (interpret): Add case for Node_K_delete_loop, add more - diagnostic info in default (cant_happen) case. - -Tue Jul 11 22:15:10 2000 Pat Rankin - - * awk.y (nextc): Recast unsigned char values back to int to - prevent VAX C from truncating EOF to 255. - -Tue Jul 11 14:08:23 2000 Arnold D. Robbins - - * array.c (do_delete): Switch to string comparison, not - cmp_nodes. - (assoc_find): Add call to force_string on subscript. - * eval.c (interpret): Case Node_K_arrayfor: check for - Node_array_ref and fetch original_array. Yowser. - -Fri Jun 30 21:57:00 2000 Arnold D. Robbins - - * array.c (assoc_lookup): Don't force the subscript - to be a string. Not a good idea after the change - to using dupnode. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 14 13:03:45 2000 Arnold D. Robbins - - * field.c (set_record): Manage a private buffer for $0. - Keeps things safe in case `getline var' rearranges the - IOBUF's contents that $0 is still pointing into. - -Tue Jun 13 16:27:55 2000 Paul Eggert - - Upgrade to latest and greatest version of largefile code. - - * configure.in (AC_CANONICAL_HOST): Remove. - (GAWK_AC_SYS_LARGEFILE): Defer until after AC_MINIX, - to avoid autoconf warnings. - - Rewrite largefile configuration so that we don't need to run - getconf and don't need AC_CANONICAL_HOST. - * config.guess, config.sub: Remove these files. - * Makefile.in (MISC): Remove config.guess, config.sub. - * m4/largefile.m4 (GAWK_AC_SYS_LARGEFILE_FLAGS, - GAWK_AC_SYS_LARGEFILE_SPACE_APPEND): Remove. - (GAWK_AC_SYS_LARGEFILE_TEST_INCLUDES): New macro. - (GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from - CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. - All uses changed. - Instead of inspecting the output of getconf, try to compile the - test program without and with the macro definition. - (GAWK_AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check - for getconf. Instead, check for the needed flags by compiling - test programs. - - (GAWK_AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be 500 to - work around glibc 2.1.3 bug. - - (GAWK_AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on IRIX if the - installer said otherwise. - - (GAWK_AC_SYS_LARGEFILE_FLAGS): Work around a bug in the QNX shell, - which doesn't propagate exit status of failed commands inside - shell assignments. - -Wed Jun 7 13:23:09 2000 Arnold D. Robbins - - * Updated copyright dates in appropriate files. - -Mon May 22 17:29:43 2000 Arnold D. Robbins - - * Makefile.in (clean): Get `*/core' too. - -Sun May 7 16:33:05 2000 Arnold D. Robbins - - * array.c (concat_exp): Change ref to `lnode->stlen' and - `lnode->stptr' for SUBSEP to use `var_value->...'. - -Tue May 2 09:54:29 2000 Arnold D. Robbins - - Fix referencing freed memory as shown by test/arynocls.* tests. - * awk.h [Node_array_ref]: New node type. - [orig_array]: New macro element in NODE structure. - * field.c (do_split): Handle case for Node_array_ref, fetch - the original array. - * array.c (in_array, do_delete): Ditto. - * eval.c (nodetypes[]): Add Node_array_ref string. - (r_tree_eval): Handle case for Node_array_ref. - (push_args): Push arrays as Node_array_ref, and pass them on. - (pop_fcall): Don't unref lnode if it's an array when releasing - local arguments. Check for both Node_array and Node_array_ref. - (r_get_lhs): Choke on Node_array_ref as for Node_array. - For Node_subscript, handle Node_array_ref. - -Tue May 2 09:52:12 2000 Bruno Haible - - * io.c (redirect): After reopening a `struct redirect', move it to - the head of the list. - -Sun Apr 2 17:51:40 2000 Arnold D. Robbins - - * re.c (re_update): Check if IGNORECASE has changed, and - if so recompute the re. See test/igncdym.awk. - -Mon Mar 20 16:18:34 2000 Arnold D. Robbins - - * io.c (set_RS): Added a lint warning about multicharacter RS, - per suggestion from Akim DeMaille (akim@epita.fr). - -Sun Feb 13 14:40:32 2000 Arnold D. Robbins - - * eval.c (push_args): Fix from Nide Naoyuki , - re-assign `f' in case tree_eval moved fcall_list around. - -Sun Feb 6 11:39:33 2000 Arnold D. Robbins - - * eval.c (op_assign): Fix it right. For ++ and --, get the lhs - in the operations, do the op, and then return. For += etc, - get the rhs FIRST, since the lhs can move around as a result, - *then* get the lhs and do the operation. See test/opasnidx.awk. - -Tue Feb 1 18:41:40 2000 Arnold D. Robbins - - * eval.c (op_assign): Reget the rval after regetting - the left hand side. See test/opasnslf.awk for why. - -Thu Jan 27 18:06:31 2000 Arnold D. Robbins - - * awk.y (yylex): Made ']' not one of the characters - that sets `want_assign' to false. `a[i] /= 2' was - broken. Per bug report from Kristofer T. Karas - . - -Wed Dec 22 15:06:37 1999 Arnold D. Robbins - - * awk.y: Removed declarations of functions before - definition of `tokentab[]'. They're redundant with - what's in awk.h. - -Thu Dec 9 17:01:07 1999 Arnold D. Robbins - - * node.c (parse_escape): Add lint warning for unrecognized - escape sequences. - -Mon Dec 6 15:17:34 1999 Arnold D. Robbins - - * main.c (usage): Changed bug reporting email addresses to - be a reference to `Bugs' node in the online and printed - doc, instead. - -Thu Dec 2 13:08:18 1999 Arnold D. Robbins - - * builtin.c (do_compl): Test `d' for negative inside the do_lint - test, not uval. Ooops. - -Fri Nov 26 10:58:36 1999 Arnold D. Robbins - - * array.c (assoc_find): ALWAYS compare indexes as strings, - don't use cmp_nodes in case they are numeric. Oh my. - Talk about a Day 1 bug! - -Tue Nov 23 11:58:53 1999 Arnold D. Robbins - - * regex.c (SYNTAX): Cast argument to `unsigned char' instead of - &-ing with 0xFF. Hopefully somewhat more portable, ala 21 Nov 99 - changes to awk.y. - -Sun Nov 21 22:25:27 1999 Paul Eggert - - * aclocal.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a - problem with the QNX 4.25 shell, which doesn't propagate exit - status of failed commands inside shell assignments. - -Sun Nov 21 20:33:35 1999 Arnold D. Robbins - - * awk.h (nextc): Remove declaration, don't need it here. - awk.y (nextc): Cast values to unsigned char so that latin-1 - characters in strings don't turn themselves into EOF. - Most notably y-umlaut, which is decimal 255. - -Mon Nov 1 20:00:25 1999 Arnold D. Robbins - - * regex.c (init_syntax_once): Move below definition of - ISALNUM etc., then use ISALNUM to init the table, so that - the word ops will work if i18n'ed. - (SYNTAX): And subscript with 0xFF for Latin-1 characters. - -Mon Oct 25 18:37:13 1999 Arnold D. Robbins - - * awk.h, main.c, io.c: Undo previous changes (22 Oct 1999). - * main.c (main): Move call to `init_fields()' to before - arg parsing. This allows `-v NF=blah' to work ok. - -Fri Oct 22 17:43:40 1999 Arnold D. Robbins - - * main.c (arg_assign): Add new arg, `initing' for icky special - casing of -v of special variables. Use it to check for NF. - May need to add other cases later. - (pre_assign): Change call arg_assign, passing initing=TRUE; - io.c (nextfile): Change call arg_assign, passing initing=FALSE; - awk.h: Change prototype for arg_assign. - -Tue Oct 19 16:06:48 1999 Paul Eggert - - * io.c (close_redir): Don't munge errno between setting it and - using it. - -Wed Oct 6 17:47:47 1999 Arnold D. Robbins - - * main.c (arg_assign): Return NULL on bad variable. Allows - things like `./3x=stuff' to work as a filename. - -Thu Sep 23 21:35:46 1999 Paul Eggert - - * aclocal.m4 (GAWK_AC_SYS_LARGEFILE_FLAGS): Work around GCC - 2.95.1 bug in HP-UX 10.20 or later. (Had to fix the fix. ADR. :-) - -Tue Sep 21 13:31:36 1999 Arnold D. Robbins - - * builtin.c (format_tree): For '0', only set zero_flag if we - haven't seen the field width or precision yet. - -Mon Aug 9 13:06:01 1999 Arnold D. Robbins - - * array.c (assoc_lookup): Removed code that gave each array - a private copy of each index. Balloons memory usage for - no good reason that I can see. Just use dupnode in all - cases. - * configure.in: Check for $srcdir/.developing adds extra - defines for my testing/debugging use. Yes, hack alert. - -Sun Aug 1 11:02:02 1999 Arnold D. Robbins - - * node.c (dupnode): Turn off FIELD when copying nodes. - * array.c (do_adump, assoc_dump): New functions for array debugging. - * awk.y (tokentab): Conditionally add "adump" function for debugging. - * awk.h: Delcare new functions. - -Thu Jul 29 23:26:40 1999 Arnold D. Robbins - - From wsanchez@apple.com: - * Makefile.in (install-strip): New target, coding stds. compatibility. - * config.guess, config.sub: Add MacOS X recognition. - -Thu Jul 29 19:09:19 1999 Arnold D. Robbins - - * awk.y (func_install): Make `function foo(foo)' a fatal error. - eval.c (r_tree_eval): Diagnose use of a function name as a - variable inside the function. - -Sun Jul 4 16:53:14 1999 Arnold D. Robbins - - * eval.c (eval_condition): Add extra braces to avoid - gcc warning. I'm not going to bother for the library - code like dfa and regex. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Wed Jun 30 16:10:11 1999 Arnold D. Robbins - - * awk.h: Add include of , and comment about config.h - having to be included before any system headers. Otherwise, - with egcs-2.91.66 and later on Linux systems, and possibly - others, things break badly, due to the LFS macros. - * awk.y, builtin.c, eval.c, field.c, io.c: Removed include - of assert.h - -Wed Jun 9 11:39:19 1999 Paul Eggert - - Port the large-file code to AIX, HP-UX, and IRIX. - Add cross-compilation support for large files. - - * config.guess, config.sub: New files. - - * configure.in (AC_CANONICAL_HOST): - Add; GAWK_AC_SYS_LARGEFILE needs this. - (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES. - - * aclocal.m4 (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES. - Add support for AIX and HP-UX. - (GAWK_AC_SYS_LARGEFILE_FLAGS, GAWK_AC_SYS_LARGEFILE_SPACE_APPEND, - GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): New macros. - - * acconfig.h (_FILE_OFFSET_BITS, _LARGEFILE_SOURCE, _LARGE_FILES): - New macros. - - * Makefile.in (MISC): Add config.guess and config.sub so they get - included in the distribution. - -Wed Jun 9 11:29:29 1999 Paul Eggert - - * io.c (iop_alloc): Don't mmap files whose sizes don't fit in `int'. - [ This isn't really needed, as HAVE_MMAP is #undef'ed at the top, - but it's there in case people want to take their life in their hands. ] - -Sun Jun 6 11:28:07 1999 Arnold D. Robbins - - * BETA Release 3.0.46: Release tar file made. - -Wed Jun 2 14:36:24 1999 Arnold D. Robbins - - * PORTS: Updated with a more recent list of systems - that gawk compiles and tests ok on. - -Tue Jun 1 14:24:59 1999 Arnold D. Robbins - - * BETA Release 3.0.45: Release tar file made. - -Tue May 25 16:32:37 1999 Arnold D. Robbins - - * builtin.c (format_tree): More smarts for weird cases, such as - zero precisions and zero values used with the `#' flag. - Thanks to Andreas Schwab (schwab@gnu.org) for pointing these out. - -Wed May 19 14:02:54 1999 Arnold D. Robbins - - * io.c (do_close): Move test for `close(FILENAME)' to after - loop through all open redirections. Fixes problems in obscure - cases with redirections in END rules. - -Sun May 16 14:08:39 1999 Arnold D. Robbins - - * awk.y (yylex): Fix group of characters including ',' to - set want_assign = FALSE. Fixes bizarre parsing problems in - function call lists, for example. - * io.c (get_a_record): Repair logic for single-leading-newline - case. - -Tue May 11 16:48:11 1999 Arnold D. Robbins - - * aclocal.m4 (GAWK_AC_AIX_TWEAK): New macro. - * configure.in: Call it - * Makefile.in: (awklib/all): Pass CFLAGS on to sub-make so - that password programs will get AIX magic defines. Avoids - having to tweak program code for those in doc/gawk.texi. - -Mon May 3 16:56:23 1999 Arnold D. Robbins - - * array.c (do_delete): Don't free_temp(subs) until after all - references to it are finished. - -Mon May 3 13:41:16 1999 Arnold D. Robbins - - * BETA Release 3.0.44: Release tar file made. - -Sun May 2 18:25:43 1999 Arnold D. Robbins - - * io.c (get_a_record): Do a really good job of stripping newlines - from the front of records when RS = "" and there's only one - newline at the front of the file, which the regex didn't catch. - -Wed Apr 28 12:27:49 1999 Arnold D. Robbins - - * configure.in: More HP stuff: fix the manual alloca code so that - gawk will compile and link on HP systems. See the comments. - -Sun Apr 25 13:39:16 1999 Arnold D. Robbins - - * Makefile.in (gawk): Add $(CFLAGS) to linking step. - * configure.in: Correctly do AC_FUNC_GETPGRP on HP systems too. - -Tue Apr 13 20:21:00 1999 Arnold D. Robbins - - * BETA Release 3.0.43: Release tar file made. - -Tue Apr 13 19:02:20 1999 Arnold D. Robbins - - * io.c (useropen, pidopen): Add casts to int on arguments to - silence gcc warnings. - * regex.c (regcomp,regexec,regfree): Add ifdef for APPLE. - -Thu Feb 4 10:38:02 1999 Arnold D. Robbins - - * custom.h: Hacks for BeOS. Not documented in the manual right now. - * configure.in: Hacks for BeOS. Check for HP-UX and define C_ALLOCA - if not using gcc. I wish they'd just fix bison already. - -Sun Dec 20 16:57:38 1998 Arnold D. Robbins - - * BETA Release 3.0.42: Release tar file made. - -Sun Nov 15 21:05:39 1998 Arnold D. Robbins - - * io.c (gawk_popen): Add WIN32 to list of systems that use - the non-real-pipe version. From the PC gawk guys. - -Wed Nov 4 11:32:24 1998 Arnold D. Robbins - - * BETA Release 3.0.41: Release tar file made. - -Tue Nov 3 16:24:35 1998 Arnold D. Robbins - - * eval.c (r_get_lhs): Fix the cases for the special variables, - don't unref their current value if it's the same as the internal - copy; perhaps the current one is used in a concatenation or some - other expression somewhere higher up in the call chain. Ouch. - See test/getnr2tm.awk. - -Sun Nov 1 15:24:52 1998 Arnold D. Robbins - - * builtin.c (format_tree): Improve handling of zero-fill - when a precision is present. See test/zeroflag.awk. - -Wed Oct 28 20:40:17 1998 Arnold D. Robbins - - * eval.c (r_tree_eval): Case for Node_concat. Get lengths - separately, in case one expression has a side effect that - that changes another. Ugly, but it keeps gawk from core - dumping. See test/nasty.awk. - -Sun Oct 18 21:27:24 1998 Arnold D. Robbins - - * awk.y (append_right): Bug fix, if `list' or `new' are NULL, - return `list', so that things don't break too badly. - * regex.c (re_compile_fastmap): Remove unused variable `num_regs'. - -Thu Oct 8 19:36:57 1998 Arnold D. Robbins - - * BETA Release 3.0.40: Release tar file made. - -Mon Jul 27 10:14:33 1998 Arnold D. Robbins - - * node.c (parse_escape): Remove assignment with side effects - from ISXDIGIT test. Thanks to "Mihai T. LAZARESCU" - for pointing this out. - -Mon Apr 27 11:31:32 1998 Arnold D. Robbins - - * main.c (usage): Fix the email address for the bug list. - (copyleft): Update the copyright year. - -Mon Mar 23 21:22:32 1998 Arnold D. Robbins - - * eval.c (r_get_lhs): Make sure that values of type - Node_param_list don't have the FUNC flag set. This means - we don't allow the use of a function name as a variable or - array from within the function. - -Sun Mar 22 19:12:32 1998 Paul Eggert - - * aclocal.m4 (GAWK_AC_LARGE_FILES): New macro that checks for - large file support, and updates CPPFLAGS, LDFLAGS, LIBS as - needed. - * configure.in: Call GAWK_AC_LARGE_FILES. - * Makefile.in (CPPFLAGS, LDFLAGS): Let autoconf configure. - (COMPFLAGS): Add $(CPPFLAGS). - -Mon Mar 16 14:06:41 1998 Arnold D. Robbins - - * field.c (using_FIELDWIDTHS): New macro. - (using_fieldwidths): Use new macro. - (do_split): In case for FS_DFLT, also check that - we're not using FIELDWIDTHS. Otherwise, split() would use - FIELDWIDTHS, not current value of FS. Oops. - -Sun Nov 16 20:08:59 1997 Arnold D. Robbins - - * builtin.c (sub_common): Fix for count of matches in gsub - from Geert.Debyser@esat.kuleuven.ac.be. - -Wed Oct 15 03:38:12 1997 Arnold D. Robbins - - * field.c (set_FS): Use `sc_parsefield' if the value of FS is not - alphabetic OR if not ignoring case. Bug fix if IGNORECASE - is true and FS happens to be '^'. Sheesh, talk about obscure. - (rebuild_record): Add more smarts to the code that sets up the - fields. Thanks to Alan J. Broder (ajb@dtmr.com). - -Sun Oct 5 11:56:52 1997 Arnold D. Robbins - - * configure.in: If ISC add -D_SYSV3 to CFLAGS, per email from - Mario Vanoni (vanonim@dial.eunet.ch). - -Fri Sep 26 00:57:49 1997 Arnold D. Robbins - - * awk.y (append_right): Return if either list is NULL. Prevents - syntax errors from causing core dumps. - -Wed Sep 17 15:34:15 1997 Arnold D. Robbins - - * field.c (rebuild_record): Set things up so that all fields point - into the new record and release any changed fields without - causing memory leaks. Avoids problems when fields are extended - with the value of $0 or other fields and then $0 is assigned to. - -Mon Sep 15 16:12:55 1997 Arnold D. Robbins - - * builtin.c (do_print): When testing for NUMBER, make sure - it's not a string too. Thanks to Michael Brennan for - clarifying the semantics. - -Sun Sep 14 19:55:12 1997 Arnold D. Robbins - - * node.c (format_val): Always format values ourselves: avoids - problems if OFMT is bizarre, like %s. - -Sun Sep 14 00:08:53 1997 Arnold D. Robbins - - * io.c (get_a_record): Replace all occurrences of the test - `grRS == FALSE' with `RS_is_null' which makes ` RS = "\0" ' - actually work, is clearer code, and actually makes use of - the `RS_is_null' variable! - -Sun Aug 17 07:15:12 1997 Arnold D. Robbins - - * field.c (set_FS): Change logic to always set parse_field, even - if FS hasn't changed. Thanks to Igor Sheyn for catching this. - -Wed Aug 6 21:04:37 1997 Arnold D. Robbins - - * io.c (VMS et al gawk_popen): Use pclose, not fclose, if - iop_alloc fails. - -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - * awk.y [variable]: Fix case for subscript if $3 == NULL. - -Sun Jul 27 22:47:30 1997 Arnold D. Robbins - - * awk.y (get_src_buf): Don't close file if it's stdin. - -Sun Jul 27 22:47:15 1997 Pat Rankin - - * io.c (#if VMS: vmsrtl_fileno): New routine. - (#if VMS: fileno): New macro substituted for stdio one. - -Thu Jul 17 20:05:59 1997 Arnold D. Robbins - - * builtin.c (do_print): When OFMT != CONVFMT, create a new - temporary node with just the numeric value valid and format it, - and use that for printing. Avoids memory corruption. - -Wed Jul 16 10:01:16 1997 Arnold D. Robbins - - * regex.c: When SYNTAX_TABLE is defined, but not emacs, then - CHAR_SET_SIZE is not defined, though used in regcomp. It should - be taken out of #ifdef SYNTAX_TABLE. Fix from bug group, from - Akim Demaille, demaille@inf.enst.fr. - * awk.h (isnondecimal): Make test a little smarter. - * builtin.c (nondec2awknum): Add bailout for decimal numbers, e.g. - `00.1'. Fix from Larry Schwimmer . - -Thu Jun 19 19:00:40 1997 Arnold D. Robbins - - * eval.c (interpret): case Node_K_next, Node_K_nextfile: fatal - error if called from BEGIN or END. - (Fixed completely Mon May 3 13:31:42 1999.) - -Mon Jun 9 22:40:04 1997 Arnold D. Robbins - - * builtin.c (nondec2awknum): Allow `f' and `F' in hexadecimal numbers. - Gotta get more sleep... - * array.c (assoc_lookup): Fix from Tom Karzes (karzes@equator.com) - for memory leak when forcing type to Node_var_array. - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Wed May 14 08:06:08 1997 Arnold D. Robbins - - * io.c (do_close): Add lint warning if closing something that - isn't open. - -Tue May 13 12:14:12 1997 Arnold D. Robbins - - * random.c, builtin.c: Remove __GLIBC__ tests, since it breaks - `make test'. I prefer consistency across platforms. - * Makefile.in (gawk): Undid April 25 changes and added comment. - Putting COMPLAGS in breaks with -g on VMS POSIX. - -Sun May 11 14:48:04 1997 Darrell Hankerson - - * io.c [MSC_VER]: Add cases for WIN32. - * regex.c [MSC_VER]: Add cases for WIN32. - -Sun May 11 07:04:01 1997 Arnold D. Robbins - - * builtin.c (do_print): In the loop that evaluates each expression - to be printed, do a dupnode to avoid bizarre output. Thanks to - Michal for finding this problem. - * awk.y (yylex): Fix scanning of hexadecimal constants. - -Wed May 7 15:09:25 1997 Arnold D. Robbins - - * io.c (get_a_record): Fix casetable indexing with cast to int. - Keeps Michal happy. - -Tue May 6 16:40:19 1997 Arnold D. Robbins - - * eval.c (func_call): Removed unneeded variables. - -Mon May 5 21:17:37 1997 Pat Rankin - - * missing/strftime.c [case 'v', VMS_EXT]: For VMS date format, two - digit day of month should not be zero padded on the 1st through - the 9th. - -Mon May 5 06:33:47 1997 Arnold D. Robbins - - * regex.h, regex.c: Merge with current GLIBC version. - -Mon May 5 06:33:47 1997 Pat Rankin - - * io.c (nextfile): Move the check for null return from iop_open - in the normal case and add one for the "no args" case. - -Fri Apr 25 16:52:33 1997 Arnold D. Robbins - - * array.c (grow_table): Add a bunch more large primes so arrays - can get really big. Thanks to christos@deshaw.com. - * all files: Remove ifdef'ed out code and update copyrights. - * Makefile.in (gawk): Add $(COMPFLAGS) to command line. - * eval.c (flags2str): Added case for FIELD. - -Thu Apr 24 22:39:23 1997 Arnold D. Robbins - - * COPYING: Changed to current official version from FSF. - * regex.c: Merge with GLIBC version. - * awk.h [_GNU_SOURCE]: Bracket definition inside ifdef. - (NODE.source_line): Move name member out of `x' union and - into `nodep'; avoids problems doing diagnostics. - (nondec2num): Put decl into #if BITOPS || NONDECDATA - * posix/gawkmisc.c, missing/system.c, missing/strtod.c, - missing/strerror.c: Move to generic GPL statement at top. - * builtin.c (nondec2num): Put into #if BITOPS || NONDECDATA - -Wed Apr 23 22:14:14 1997 Arnold D. Robbins - - * dfa.c: Misc changes for really pedantic SGI compilers. - * builtin.c: Bracket defs of random() etc for GLIBC. - * random.c: Bracket whole file for GLIBC. - * configure.in: Extra goop for GETPGRP test for VMS POSIX. - * custom.h [VMS]: Remove hard definition of GETPGRP_VOID. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Tue Apr 15 21:35:45 1997 Arnold D. Robbins - - NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE! - * acconfig.h [NONDECDATA]: New macro. - * awk.h: Add decl of do_strtonum. - * awk.y (tokentab): Add entry for strtonum function. - * builtin.c (do_strtonum): New function. - * configure.in (non-decimal-data): New --enable-* option. - * node.c (r_force_number): Change to allow non-decimal data inside - ifdef NONDECDATA. - -Tue Apr 15 06:32:50 1997 Pat Rankin - - * missing/strftime.c (malloc, realloc, getenv, strchr): Only - declare these when STDC_HEADERS is not defined. - : Include these when STDC_HEADERS is defined. - * awk.h (freenode, tree_eval, m_tree_eval): Reorganize definitions. - * alloca.c (malloc): If malloc is already defined as a macro, - presumeably by config.h, don't define or declare it. - -Wed Apr 9 22:45:27 1997 Arnold D. Robbins - - * Makefile.in [COMPFLAGS]: Per suggestion from Karl Berry, put - $(CFLAGS) last. - -Tue Apr 8 23:54:46 1997 Arnold D. Robbins - - * eval.c (interpret): For Node_K_break and Node_K_continue, if - treating them like `next', also check the function call stack - and pop it if necessary. - -Mon Apr 7 18:22:37 1997 Arnold D. Robbins - - * awk.h: Add decls of new routines do_compl() and set_loc(). - * awk.y (tokentab): Add entry for "compl" function. - * builtin.c (do_compl): New function to do ones complement. - (do_substr): Rationalized yet again, now notices negative start - and length parameters. - * eval.c (push_args): Fix if call_list gets realloc'ed in the - middle of things. Avoids crash for deeply nested function calls. - * main.c (catch_sig): Add call to set_loc(). - * msg.c (set_loc, srcfile, srcline): New function and private - variables to help out in tracing down source of error messages. - -Fri Mar 28 08:42:27 1997 Arnold D. Robbins - - * io.c (iop_alloc, iop_close): Undo changes of Feb 11, apparently - other cleanups in io.c made mmap stuff start working again. - BAH! It's a mess, the test suite still fails. I'm leaving the - mmap stuff undefined for now. It'll probably get ripped out in 3.1. - -Thu Mar 27 08:48:57 1997 Arnold D. Robbins - - * custom.h [_SEQUENT_]: Undef HAVE_MMAP. - -Wed Mar 26 09:08:16 1997 Arnold D. Robbins - - * io.c (iop_alloc): Fix definition to make it static. - -Mon Mar 24 23:09:07 1997 Arnold D. Robbins - - * field.c (init_fields, etc..): More clean up use of Null_field - and the various flags. - * node.c (unref): If a field, free the node itself. Fixes - memory leak problems. - -Sun Mar 23 22:51:09 1997 Arnold D. Robbins - - * awk.h [FIELD]: New flag for node->flags field. - * builtin.c (sub_common): If FIELD is set, dup the string. - * field.c (init_fields): Set up a new Null_field global var. - (init_fields, set_field, set_record) use the FIELD flag. - (getfield): Use Null_field instead of private variable. - * io.c (wait_any): Comment out calls to pclose and iop_close, - caused weird race conditions. See test/pipeio1.awk. Thanks - to Darrell Hankerson for tracing this one down. - -Tue Mar 18 20:57:18 1997 Arnold D. Robbins - - * dfa.c (inboth): Free templist; plugs memory leak. - * field.c (init_fields, grow_fields_arr, set_field, rebuild_record, - set_record): Remove PERM flag from entries in fields_arr[]. Fixes - nasty memory leak. - -Tue Mar 18 06:33:00 1997 Arnold D. Robbins - - * awk.y (dup_parms): Robustified against parameter errors. - -Sun Mar 16 21:31:40 1997 Arnold D. Robbins - - NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE! - * acconfig.h [BITOPS]: New macro. If set, do octal & hex and bit ops. - * awk.h [isnondecimal]: New macro, and decl of new functions. - * awk.y (yylex): Add recognition of octal and hex constants. - * builtin.c (do_and, do_or, do_xor, do_lshift, do_rshift): New - functions that do bit operations. - (nondec2awknum): New function to convert octal or hex to double. - * configure.in: Add AC_ARG_ENABLE for bit operations. - * node.c (r_force_number): Add octal and hex conversion. - -Sun Mar 16 21:28:56 1997 Arnold D. Robbins - - * awk.h [IOP_NOFREE_OBJ]: New macro. - * io.c (iop_open, iop_alloc): Add new third parameter, which is - either NULL, meaning allocate a new IOP, or the address of one - already allocated. Have a static one in the `nextfile' - routine, and use the IOP_NOFREE_OBJ flag for it. All of this - keeps us from reading freed memory. The `swaplns' test fails - otherwise. - (iop_close): If IOP_NOFREE_OBJ is set, don't free the IOBUF. - -Wed Feb 26 06:21:02 1997 Arnold D. Robbins - - * eval.c (in_function, pop_fcall_stack, pop_fcall, push_args): - New functions. These manage "frames" of awk function call arguments. - The problem is that a `next' or a `nextfile' from a function - leaks memory. These changes allow us to free up that memory. - (interpret): for Node_K_next and Node_K_nextfile, check if in - a function call and free all function call frames. - -Fri Feb 21 06:23:19 1997 Arnold D. Robbins - - Misc changes from Katsuyuki Okabe : - - * builtin.c (do_substr): Change a %d to %ld in warning message. - * eval.c (op_assign): Fix format string for warning about %=. - -Wed Feb 19 23:29:02 1997 Arnold D. Robbins - - * main.c (main): Add do_intervals to condition that causes - resetup() to be called again. Makes the --re-interval option - actually work. What a concept. - -Fri Feb 14 09:47:31 1997 Arnold D. Robbins - - * io.c [#include "awk.h"]: Undef HAVE_MMAP to just use the old code. - Something is causing a file descriptor leak, and this is getting to - be just too much hair. I reserve the right to rip out the mmap - code entirely at a future date. - -Tue Feb 11 06:28:29 1997 Arnold D. Robbins - - * io.c (iop_alloc): For an mmap'ed file, close the file descriptor, - and then touch each page to get a private copy. Fixes nasty case - of truncating our input file. - (iop_close): Don't call close on mmap'ed file. - -Wed Feb 5 17:59:04 1997 Arnold D. Robbins - - * eval.c (interpret): For Node_K_delete, just call do_delete; let - it handle the case of `delete array'. - * array.c (do_delete): Changed to handle case of `delete array', - and made smarter if the array is actually an uninitialized - parameter. - -Sun Jan 26 22:58:29 1997 Arnold D. Robbins - - * getopt.h, getopt.c, getopt1.c: Replaced with new versions from - GLIBC 2. - -Sun Jan 19 23:37:03 1997 Arnold D. Robbins - - * eval.c (nodetype2str): Not static, for debugging. - (flags2str): New function for debugging. - * field.c (get_field): Add new var that is like Nnull_string but - does not have numeric attributes, so that new fields are strings. - (set_record): Turn off PERM flag before unrefing fields and field 0. - * array.c (in_array): Always evaluate subscript, could have - side effects. - * builtin.c (do_strftime): Way increase size of buffer to make sure - we don't have overflow problem. Keeps Paul Eggert happy. - * custom.h [__amigaos__]: Define fork to vfork. From Fred Fish. - * dfa.c: Move include of config.h to top, for RSXNT. From Kai - Uwe Rommel. - (ISALPHA, etc): Change from Jacob Engelbrecht (jaen@novo.dk) - to better handle non-ASCII environments. - * gawkmisc.c: Remove amigados case, posix should now work fine. - * amiga/*: Nuked per previous entry. - * Makefile.in: Removed all references to amiga - * io.c [HAVE_SYS_PARAM_H]: Add #undef RE_DUP_MAX to avoid - spurious conflict with regex.h. - (flush_io): Remove amiga ifdefs, not needed anymore. - (spec_setup): Set getrec field for special files. Fix from - Mark Gray (markgray@pdt.net). - * node.c (more_nodes): Fix to get the last entry in the array. - -Wed Jan 8 17:42:37 1997 Andreas Schwab - - * io.c (mmap_get_record): Fix return value if file ends without - record separator. - -Fri Jan 3 19:57:16 1997 Pat Rankin - - * awk.y (get_src_buf): Test for an empty source file by detecting - an initial read of 0 bytes rather than by relying on info from - stat(). - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Wed Dec 25 11:17:32 1996 Arnold D. Robbins - - * Makefile.in (install, uninstall): Use $(srcdir)/patchlevel.h. - Thanks to Richard Levitte, LeViMS@stacken.kth.se. - (install): Remove chmod command; let $(INSTALL_PROGRAM) use -m. - -Mon Dec 23 20:36:59 1996 Pat Rankin - - * custom.h (#if VMS_POSIX): Define GETPGRP_VOID. - -Fri Dec 20 08:59:55 1996 Arnold D. Robbins - - * getopt.c, getopt1.c: Comment out the `#if defined (_LIBC) || - !defined (__GNU_LIBRARY__)' and `#endif' to force use of this - getopt, even on systems like Linux. This will be handled - better in 3.1 / glibc 2. - -Thu Dec 19 22:52:39 1996 Arnold D. Robbins - - * awk.y (yylex): In several places, after yyerror(), add call to - exit(). Otherwise, infinite messages. This should probably - be handled better. - -Wed Dec 18 22:42:10 1996 Darrel Hankerson - - * getopt.c (_getopt_internal): If 'W' and ';', if optind == argc, - return c, don't fall through. - -Wed Dec 18 10:09:44 1996 Arnold D. Robbins - - * configure.in [AC_PREREQ]: Update to 2.12 in order to switch to - autoconf 2.12. Lots of other files will be rebuilt automatically. - [AM_SANITY_CHECK_CC]: Removed, autoconf does it now. - * aclocal.m4 [AM_SANITY_CHECK_CC]: Removed, autoconf does it now. - -Tue Dec 17 22:23:16 1996 Arnold D. Robbins - - * builtin.c (do_strftime): Fix case if format string is "". - Also fix it if format is not "" but result of strftime is "". - See comments in code. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Tue Dec 10 22:39:41 1996 Arnold D. Robbins - - * Makefile.in (dist): Add dependency on `info'. Remove line that - does makeinfo. - (install): Use $(LN) not $(LN_S) to link gawk gawk-version. - -Sun Dec 8 07:53:44 1996 Arnold D. Robbins - - * Makefile.in (gawk): Took COMPFLAGS out of link line for help - on VMS posix. Shouldn't (I hope) affect anything else. - -Thu Nov 28 11:52:24 1996 Arnold D. Robbins - - * configure.in (AC_PROG_INSTALL): Set INSTALL to install-sh. - -Tue Nov 26 22:42:00 1996 Arnold D. Robbins - - * PORTS: Updated list of systems. - * Makefile.in (install): Fix some typos and add some improvements - for Ultrix. - -Sun Nov 24 22:16:26 1996 Arnold D. Robbins - - * builtin.c (do_printf): If no args, fatal error. Return silently - if --traditional. - -Thu Nov 7 20:54:43 1996 Arnold D. Robbins - - * io.c (inrec): Make sure EOF hasn't already happened before - trying to read; prevents accessing freed buffer. Thanks to - Michal Jaegermann. - * Makefile.in [AWKSRC]: Add random.h. - * random.h: New file, redefines names of the `random' functions. - * random.c, builtin.c: Add include of random.h. - -Thu Nov 7 09:06:21 1996 Arnold D. Robbins - - * awk.y (snode): Undo 4 Oct change, put do_split code back. - * field.c (do_split): Restore old code; add test for CONST, so - that re_parse_field is used if third arg to split is a regexp - constant. - -Mon Nov 4 12:57:11 1996 Arnold D. Robbins - - * main.c (main): Research -m[fr] options don't need literal '=' - characters. Brian's documentation was confusing. Fixed, not - that anyone actually uses these options with gawk. - -Sun Nov 3 11:23:21 1996 Arnold D. Robbins - - * field.c (def_parse_field): Add \n to list of acceptable white space. - (posix_def_parse_field): New routine, just like def_parse_field(), - but only allows space and tab as separators. - (do_split, set_FS): Make appropriate choice between the two - *def_parse_field() routines. - -Fri Oct 25 10:13:06 1996 Arnold D. Robbins - - * configure.in: Remove test for random. - * Makefile.in: Add random.c to list of files always compiled. - * missing.c: Remove HAVE_RANDOM test. - * builtin.c: Remove ifdef's for HAVE_RANDOM. - [GAWK_RAND_MAX]: Use constant we know works with our random(). - * random.c: New file - moved from missing/ directory. - -Wed Oct 23 19:46:01 1996 Pat Rankin - - * builtin.c (do_tolower, do_toupper): Add `unsigned char *' casts. - -Tue Oct 22 21:27:52 1996 Arnold D. Robbins - - * builtin.c [GAWK_RANDOM_MAX]: Try to make definition a bit - smarter; don't use RAND_MAX if it's equal to SHRT_MAX, blows - things up. - -Tue Oct 22 08:49:20 1996 Arnold D. Robbins - - * main.c (copyleft): Update copyright date to 1996. - * Too many files to list: Update copyright date to 1996. - -Sun Oct 20 12:21:09 1996 Arnold D. Robbins - - * awk.y, dfa.c, eval.c, io.c, re.c: Added various FIXME comments. - -Sat Oct 19 22:06:42 1996 Arnold D. Robbins - - * eval.c (nodetype2str): Make static, add prototype. - * field.c (sc_parse_field): Cast array subscripts to int to - shut up gcc warnings. - * gawkmisc.c: Add prototype for xmalloc. - * awk.h: Add prototype for getredirect. - * builtin.c (do_fflush): Remove extern decl of getredirect. - * io.c (get_a_record, mmap_get_record): Change decl of rs to int, - to shut up gcc warnings. - * awk.y (isassignable): Add a default to switch to quiet gcc. - * getopt.c (_getopt_internal): Give default value to `indfound'. - -Fri Oct 18 09:00:49 1996 Arnold D. Robbins - - * regex.h [RE_SYNTAX_AWK]: Add RE_CONTEXT_INDEP_ANCHORS. - -Thu Oct 17 22:32:55 1996 Arnold D. Robbins - - * aclocal.m4 [AM_SANITY_CHECK_CC]: Added. - * configure.in: Use it. - -Thu Oct 17 21:43:25 1996 Arnold D. Robbins - - * configure.in: Add checks for locale.h and setlocale(). - * awk.h: Include locale.h and define out setlocale() if not available. - * main.c (main): Call setlocale(). - * builtin.c (do_tolower, do_toupper): Use unsigned char pointers, - to get other charsets right in different locales. - -Wed Oct 16 21:32:53 1996 Arnold D. Robbins - - * builtin.c (format_tree): Change initial buffer size to 512 - and use a constant. Allows large values of %f per bug report - from sheyn@cs.bu.edu. - -Wed Oct 16 21:22:08 1996 Arnold D. Robbins - - * Makefile.in [MISC]: Removed TAGS and tags. - (local-distclean): Added TAGS and tags. - (maintainer-clean): Removed TAGS and tags. - -Wed Oct 16 12:28:43 1996 Arnold D. Robbins - - * main.c (version): Add call to copyleft(), per new standards. - version.c: Fix text of version string to match new standards. - -Sun Oct 6 22:19:45 1996 Arnold D. Robbins - - * regex.c: Updated to Emacs 19.34b base. - -Sun Oct 6 21:57:34 1996 Arnold D. Robbins - - * re.c (make_regexp): Fixed to handle \8 and \9 in the middle - of a regexp. - -Fri Oct 4 10:26:16 1996 Arnold D. Robbins - - * awk.y (snode): Remove case for do_split; always making the - third arg a Node_regex is wrong. - * field.c (do_split): Rationalized to distinguish `/ /' from `" "'. - Generally fixed up. - * node.c (parse_escape): Allow single digit \x escapes. - -1996-10-02 Paul Eggert - - * builtin.c (format_tree): Fix bug in %d and %i format: NaNs, and - values in the range LONG_MAX+1 .. ULONG_MAX, were mishandled. - Don't assume that double values <= -1 are converted to unsigned - long in the expected way; the C Standard doesn't guarantee this. - -1996-10-02 Paul Eggert - - * awk.h (INT_MAX): Remove unused symbol. - -Mon Sep 30 22:19:11 1996 Arnold D. Robbins - - * getopt.c (_getopt_internal): If 'W' is in the optstring followed - by a ';' then search through the long opts table. This makes - `-W foo=bar' same as `--foo=bar'. - * main.c (main): 'W' now prints an error message. - (gawk_option): Deleted the routine. - -Sun Sep 29 23:04:54 1996 Arnold D. Robbins - - * builtin.c (sub_common): Fix several bugs with gsub when - matching null strings. See test/gsubtest.awk. - -Fri Sep 20 17:35:54 1996 Pat Rankin - - * alloca.c (NULL): Don't define if has already done so. - -Fri Sep 20 11:54:31 1996 Arnold D. Robbins - - * builtin.c (do_print): Evaluate all the expressions first and - then print them. Avoids surprising behavior. See test/prtoeval.awk - for an example. - -Tue Sep 10 06:21:40 1996 Arnold D. Robbins - - * awk.h [FUNC]: New flag, marks a Node_parameter_list as really - being the function name; allows more checking in awk.y. - * awk.y (isassignable): Now takes a NODE * instead of a type, to - check if a function parameter is marked FUNC, then it's the function - name, which is not assignable. Fix call from snode(). - (function_prologue): Mark function name as FUNC. - (yyerror): Don't call exit() anymore; gawk will now report - all syntax errors. - -Sun Sep 1 19:36:30 1996 Arnold D. Robbins - - * field.c (rebuild_record): After building new field 0, go through - all old fields, and if they used to point into the old one, - have them point into the new one. Then turn off PERM flag before - unref-ing field 0. - -Wed Aug 28 19:13:34 1996 Arnold D. Robbins - - * eval.c (set_IGNORECASE): Correctly parenthesize bit operations - in test and fix logic for string value. - -Wed Aug 28 22:06:33 1996 Arnold D. Robbins - - * main.c (usage): Add email addresses for bug reporting, per - change in GNU Coding Standards from RMS. - -Sun Aug 11 23:13:22 1996 Arnold D. Robbins - - * Makefile.in (install): Correct use of $(INSTALL_PROGRAM). - -Thu Aug 8 23:29:43 1996 Arnold D. Robbins - - * parse.y (isassignable): New function, checks in type can - be assigned to. - (snode): Changed checking for 3rd arg of gsub to be more - general, supersedes earlier change. - -Thu Aug 8 13:58:26 1996 Arnold D. Robbins - - * parse.y (snode): If third arg to sub or gsub is builtin - function, complain, since can't substitute into result. - * eval.c (r_get_lhs): Diagnose Node_builtin as an error, instead - of falling through into default case and using cant_happen(). - -Thu Aug 1 07:13:14 1996 Arnold D. Robbins - - * regex.h [RE_DEBUG]: New macro. - [RE_SYNTAX_GNU_AWK]: Add RE_DEBUG. - [RE_SYNTAX_POSIX_AWK]: Add RE_INTERVALS. - * regex.c (re_set_syntax): Add #ifdef DEBUG code to turn on `debug' - flag if RE_DEBUG set, and turn off debug if not set and debug - was on. - * main.c (main): Remove `do_intervals = TRUE' from `if (do_posix)', - it's now handled in the definition of RE_SYNTAX_POSIX_AWK. - -Mon Jul 29 17:49:07 1996 Pat Rankin - - * io.c (O_ACCMODE): Define it if doesn't. - -Mon Jul 29 12:02:48 1996 Arnold D. Robbins - - * eval.c (set_IGNORECASE): Made somewhat smarter. gawk -v IGNORECASE=0 - was acting the same as -v IGNORECASE=1. Thanks to Darrell Hankerson - for the bug report. - -Fri Jul 26 12:04:43 1996 Arnold D. Robbins - - * awk.h (format_val): Add declaration of new routine. - * node.c (format_val): New routine, abstracts old guts of - r_forcestring; accepts format string and index as additional params. - (r_force_string): Changed to call format_val. - * builtin.c (do_print): Don't tree_eval the tree twice in case - OFMTidx != CONVFMTidx; doing so could cause side effects - (from bug report by Tobias Rettstadt, xassp@ipds.uni-kiel.de). - Instead, call format_val. - -Mon Jul 22 21:59:15 1996 Arnold D. Robbins - - * io.c (iop_close): Change check for "is $0 in the input buffer" - to use `< (iop->buf + iop->secsiz + iop->size)' instead of - `< iop->end'. The latter is bogus if EOF has been hit on the - file. Fix from Darrel Hankerson based on bug report by - Charles Howes (howes@grid.direct.ca). See test/eofsplit.awk. - -Thu Jul 18 19:43:20 1996 Arnold D. Robbins - - * builtin.c (sub_common): Backed out change of Feb 14 in favor of: - (do_gensub): Changed to use make_string and then to |= TEMP - flag, based on bug report and patch from Katsuyuki Okabe, - hgc02147@niftyserve.or.jp. - -Thu Jul 18 19:23:53 1996 Arnold D. Robbins - - * custom.h: Added ifdef for QNX, based on bug report from - Michael Hunter, mphunter@qnx.com. - -Mon Jul 15 09:31:01 1996 Arnold D. Robbins - - * io.c (redirect): When finding the rp pointer, if it's not - NULL, set str = rp->value. This gets the '\0' terminated - version. Motivated by bug report from John Hawkinson - (jhawk@bbnplanet.com). - -Sun Jul 14 18:40:26 1996 Arnold D. Robbins - - * configure.in: Added call to AC_CHECK_LIB(m, fmod), since - apparently some systems have fmod in the math library. - Portability: The Holy Grail. Sigh. - -Sun Jul 14 18:08:01 1996 Arnold D. Robbins - - * awk.h: Add Jim Meyerings ISASCII etc hacks for ctype macros. - * builtin.c (do_toupper, do_tolower, sub_common): Changed to use - upper-case versions of ctype macros. - * main.c (main): Ditto. - * node.c (r_force_number, parse_escape): Ditto. - -Sun Jul 14 06:34:18 1996 Arnold D. Robbins - - * field.c (set_record): Made it always do the PERM flag. - Fixes cases where $0 is assigned to, e.g. by gsub, keeps - the fields valid. - (get_field): Removed the call to reset_record in - case where ! field0_valid. We want to leave the fields alone - if they've been changed. - -Thu Jul 11 23:04:20 1996 Arnold D. Robbins - - * io.c (devopen): Change tests of (flag & O_fooONLY) to - (flag & O_ACCMODE) == O_fooONLY. Per (long standing) bug - report from Chapman Flack. - (close_redir): Change final conditional to just (status != 0) - so that ERRNO always set; the warning had its own `if (do_lint)' - anyway. - * eval.c (do_split): Force type of array to be Node_var_array - instead of Node_var. Per (long standing) bug report from - Chapman Flack. - -Thu Jul 11 22:17:14 1996 Arnold D. Robbins - - * Makefile.in (install): Added symlink of gawk to awk if - no awk in $(bindir). - (LN_S): New variable for symlinking. - (uninstall): Remove awk if it's the same gawk. - * Configure.in: Added call to AC_PROG_LN_S for Makefile.in. - -Sun Jul 7 15:47:13 1996 Arnold D. Robbins - - * main.c (main): Made `--posix' turn on interval expressions. - Gawk now matches its documentation. (What a concept!) - -Wed Jul 3 15:02:48 1996 Arnold D. Robbins - - * regex.h, regex.c: Upgraded to changes from Emacs 19.31. - -Fri May 17 08:46:07 1996 Arnold D. Robbins - - * io.c (get_a_record): Added `continued' flag. Fix from - Darrell Hankerson for when RS = "\n|something". - -Wed May 15 02:34:55 1996 Arnold D. Robbins - - * Makefile.in (awklib/all): Now depends on gawk, fixes problem - with parallel make. - -Tue May 14 15:02:52 1996 Arnold D. Robbins - - * builtin.c (format_tree): Fix handling of '*' to deal with - negative value for fieldwidth -- make positive and turn on - left justify. Per bug report from Michael Brennan. - -Sun May 12 20:42:06 1996 Arnold D. Robbins - - * eval.c (r_get_lhs): case Node_subscript. Check if array name - is actually a function, fatal error if so. - -Sun May 5 10:11:52 1996 Arnold D. Robbins - - * io.c (redirect): Call flush_io() before creating a new output pipe, - per bug report from Brian Kernighan (bwk@research.bell-labs.com). - -Fri Mar 15 06:38:33 1996 Arnold D. Robbins - - * Makefile.in (install): Use $(INSTALL_PROGRAM), not $(INSTALL). - (local-distclean): Add `*~' to list of files to be removed. - (CFLAGS): Now contains just @CFLAGS@. - (COMPFLAGS): Replaces use of CFLAGS, has CFLAGS plus all the - other stuff. - -Wed Mar 13 14:19:38 1996 Arnold D. Robbins - - * io.c (mmap_get_record): Fixed to not place sentinel at end - of mmap'ed object. Won't work if file is exact multiple of - disk block size. See comments in code for more info. - Thanks to Rick Adams (rick@uunet.uu.net) for help in testing. - -Sun Mar 10 22:50:23 1996 Arnold D. Robbins - - * io.c (do_close): Notice if we were called as `close(FILENAME)' - and arrange to close the current input file. This turns out - to be easy to do, just call `nextfile(TRUE)'. Based on bug report - from Pascal A. Dupuis, . - -Thu Mar 7 08:08:51 1996 Arnold D. Robbins - - * field.c (init_fields, grow_fields, set_field, rebuild_record): - Nuke the `nodes' array everywhere. Anytime a field is unref'ed, - allocate a new node that is a copy of Nnull_string. This avoids - subtle memory management problems when doing a lot of assignment - to fields, and tweaking of NF. Make sure that fields_arr[0] always - has a type of Node_val! - * field.c (set_NF): If NF is decremented, clear fields between - NF and parse_high_water, otherwise if NF incremented, clear - fields between parse_high_water and NF. - * eval.c (nodetype2str): New function, used for diagnostics. - (interpret): Use nodetype2str when finding invalid node. - -Mon Mar 4 09:02:28 1996 Arnold D. Robbins - - * builtin.c (do_toupper, do_tolower): Use isascii along with - isupper/islower before changing case, in case characters have - the high bit set. This is a hack. - -Mon Feb 26 22:24:44 1996 Arnold D. Robbins - - * builtin.c (sub_common): If no match, and called from gensub, - don't free the temporary string, since the tmp_number then - writes over it. - -Sun Feb 25 23:13:01 1996 Arnold D. Robbins - - * builtin.c (format_tree): Fixed %c to treat user input as - numeric also by adding test for MAYBE_NUM. - -Tue Feb 20 12:25:50 1996 Arnold D. Robbins - - * configure.in: Added AC_FUNC_MMAP call and add madvise to - list of functions to look for. - * awk.h [IOP_ISMAPPED]: New flag value for mmap support and new - `getrec' structure member in struct iobuf. - * io.c (iop_alloc, iop_close): Changed to map/unmap input file - into memory if possible. - (mmap_get_record): New function to actually retrieve the - record from mmaped file. - -Thu Feb 1 08:56:46 1996 Arnold D. Robbins - - * builtin.c (do_substr): Fixed lint message to use indx+1 when - start position is past end of string. - -Sun Jan 28 07:00:56 1996 Arnold D. Robbins - - * builtin.c (do_substr): Rationalized handling of missing length - argument, as well as various accompanying lint warnings. Previous - code was slightly bogus. Talk about your Day 1 bugs. - -Thu Jan 25 14:09:11 1996 Arnold D. Robbins - - * builtin.c (do_substr): If length exceeds length of actual - string, do computation of needed substring length *after* - the lint warning. - -Wed Jan 24 10:06:16 1996 Arnold D. Robbins - - * Makefile.in (gawk): Add $(CFLAGS) to link line. - (Makefile): Target depends on the Makefile.in files. - (OTHERS): Added TAGS and tags to the distribution. - (local-distclean): New rule. - (distclean): Use it. - (maintainer-clean): Don't `make distclean' before running submakes, - since that removes makefiles needed for the submakes. - * builtin.c (do_strftime): Remove hard coded limit on length of result. - Based on code from Paul Eggert (eggert@twinsun.com). - -Mon Jan 22 13:16:37 1996 Arnold D. Robbins - - * main.c (usage): Takes new fp parameter which is either - stdout for `--help' (per the GNU Coding Standards) or stderr - if an error occurs. Fix all calls. - (version): Prints to stdout per the coding stds. - (copyleft): Prints to stdout now, not stderr, and exits. - -Fri Jan 19 08:10:29 1996 Arnold D. Robbins - - * regex.h [RE_GNU_AWK]: Added RE_CONTEXT_INDEP_OPS to set of - bits we turn off for regular operation. Breaks things like - /^+[0-9]+/ to match a literal `+' at the beginning of, say, - a phone number. - -Wed Jan 10 23:19:36 1996 Arnold D. Robbins - - * 3.0.0 polished up and release tar file made. - -Wed Dec 27 11:46:16 1995 Arnold D. Robbins - - * 2.94.0 released to porting group (no, I haven't been good - about this file; I'll do better once 3.0 is released). - -Mon Aug 28 23:04:30 1995 Arnold D. Robbins - - * awk.h updated for NeXT - bracket TRUE/FALSE - * io.c (get_a_record): Removed shadowing of 'start' in - * Makefile.in and doc/Makefile.in: Fixed to use gawk.1 and gawk.texi, - instead of gawk.1.in and gawk.texi.in. - -Mon Aug 25 11:04:30 1995 Arnold D. Robbins - - * 2.90.0 released to porting group. - -Fri Aug 18 12:43:31 1995 Arnold D. Robbins - - * ChangeLog created. + * configure.ac: Update version to 4.0.0. + * configure: Regenerated. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * README: Bump version to 4.0.0. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/ChangeLog.0 gawk-4.0.1+dfsg/ChangeLog.0 --- gawk-3.1.8+dfsg/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/ChangeLog.0 2011-06-23 06:27:01.000000000 +0000 @@ -0,0 +1,9885 @@ +Mon Jun 20 20:33:26 2011 Arnold D. Robbins + + * dfa.c (dfaanalyze): Allocate the right number of leaves to + avoid crashes. Thanks to Jim Meyering. + +Mon Jun 20 20:22:35 2011 Arnold D. Robbins + + * dfa.c (setbit_c, setbit_case_fold_c): Compare btowc result against + WEOF. Thanks to Eli Zaretskii for pointing out the problem. + +Mon Jun 20 20:22:26 2011 Pat Rankin + + * dfa.c (addtok_wc): enclose prototype within #if MBS_SUPPORT. + +Fri Jun 17 11:09:22 2011 Arnold D. Robbins + + * Release 3.1.86: Final beta test tar ball for 4.0. + +Fri Jun 17 10:55:27 2011 Arnold D. Robbins + + Implement Rational Range Interpretation (RRI) directly in code. + + * regex.h [RE_RANGES_IGNORE_LOCALES]: Remove macro and its use. + * dfa.c (parse_bracket_exp): Remove use of RE_RANGES_IGNORE_LOCALES + and just do it in code. + (hard-locale.h): Remove include. + (hard_LC_COLLATE): Remove variable and its uses. + * re.c (resetup): Remove use of RE_RANGES_IGNORE_LOCALES. + * regcomp.c (build_range_exp): Remove use of RE_RANGES_IGNORE_LOCALES + and just do it in code. Remove cmp_buf array; it's no longer needed. + * Makefile.am (base_sources): Remove hard_locale.h and hard_locale.c. + * hard_locale.h, hard_locale.c: Removed from dist. + +Sun Jun 12 23:43:06 2011 Arnold D. Robbins + + * re.c (resetup): Always turn on RE_RANGES_IGNORE_LOCALES. + Add justifying comment with URLs for the relevant portions of + POSIX. Thanks to Paul Eggert for pointing out the happy change + to the rules and supplying the URLs. + +Wed Jun 8 22:41:30 2011 Arnold D. Robbins + + * regcomp.c (build_range_exp): Add check for RE_NO_EMPTY_RANGES + from GNULIB regcomp.c, courtesy of GNU grep. + +Wed Jun 8 22:10:03 2011 Arnold D. Robbins + + * dfa.c: Sync with GNU grep. + +Sun Jun 5 21:49:30 2011 Arnold D. Robbins + + * Release 3.1.85: Fourth beta test tar ball for 4.0. + +Sun Jun 5 21:39:17 2011 Arnold D. Robbins + + * field.c (fpat_parse_field): Bug fix. Thanks to + "Radoulov, Dimitre" for pointing + out the problem. + +Fri Jun 3 10:39:17 2011 Arnold D. Robbins + + * regcomp.c (build_range_exp): Make syntax the first argument, + for compatibility with gnulib version of the file. + +Wed Jun 1 06:29:27 2011 Pat Rankin + + * re.c (check_bracket_exp): Fix typo. + +Tue May 31 23:01:00 2011 John Haque + + * re.c (check_bracket_exp): Use mem* routines instead of str* + for searching. + * main.c (arg_assign): Disallow builtin or user-defined function + as the name of a variable. + * awkgram.y (check_special): Rework so can be called from + arg_assign. + +Tue May 31 22:23:41 2011 Arnold D. Robbins + + In order to attain the goal of having ranges act like they are + always in the C locale, bit the bullet and did the work in + the regex and dfa engines. The pre-processing routine was not + handling too many cases that a full regexp parser would catch. + + * regex.h [RE_RANGES_IGNORE_LOCALES]: New syntax bit. + (RE_SYNTAX_GNU_AWK): Use it. + * dfa.c (parse_bracket_exp): If the RE_RANGES_IGNORE_LOCALES + is set, ignore locales when building a range. + * re.c (expand_range): Remove function and declaration. + (add_char): Remove function and declaration. + (make_regexp): Remove use of expand_range. + (resetup): Add RE_RANGES_IGNORE_LOCALES if --traditional. + * regcomp.c (build_range_exp): Add syntax variable as last argument. + Add code to check for RE_RANGES_IGNORE_LOCALES and do the right thing. + Adjust all calls. + +Sun May 29 22:48:41 2011 Arnold D. Robbins + + * re.c (expand_range): Handle cases where expanded range + includes '\\' (and ']'). Thanks to Juergen Daubert . + Fatal error if end point is below start point ([z-a]), + thanks to John Haque. Don't repeat the last character in + the expansion. Thanks to Arnold Robbins. + +Fri May 27 10:01:17 2011 Arnold D. Robbins + + * Release 3.1.84: Third beta test tar ball for 4.0. + +Thu May 26 22:10:08 2011 Arnold D. Robbins + + * field.c (get_field): Enhance logic for setting NF if we're + using FPAT to parse fields. Can end up with weird cases. Thanks + to Pat Rankin for pointing them out. + +Mon May 23 22:06:13 2011 Arnold D. Robbins + + * awkgram.y: Allow newline after comma in range patterns, + per POSIX. Thanks to discussion in comp.lang.awk. (!!!) + +Mon May 23 22:02:46 2011 John Haque + + * ext.c (get_actual_argument): Change argument type from + Node_var_new to Node_var when used as a scalar. + +Sun May 22 11:56:40 2011 Arnold D. Robbins + + * main.c (varinit): Give FPAT a reasonable default value. + * field (get_field): Adjust test for at end of record to >=; + fpat_parse_field can go beyond when matching null regexps. + Thanks to Pat Rankin. + +Fri May 20 11:00:17 2011 Arnold D. Robbins + + * regex_internal.h (__attribute_warn_unused_result__): Always + ifdef out. Bleah. + +Thu May 19 17:13:18 2011 Arnold D. Robbins + + * Release 3.1.83: Second beta test tar ball for 4.0. + +Thu May 19 16:47:19 2011 Arnold D. Robbins + + * awkgram.y (dump_vars): Fix warning message. Thanks to Pat Rankin. + * main.c (usage): No space allowed after -d and -p. Also thanks + to Pat Rankin. + +Thu May 19 16:34:04 2011 Pat Rankin + + * regex_internal.h (__attribute_warn_unused_result__): Define with + empty expansion for !__GNUC__ configuration. + +Wed May 18 22:13:18 2011 Arnold D. Robbins + + * Release 3.1.82: Beta test tar ball for 4.0, we hope! + +Wed May 18 21:47:54 2011 Arnold D. Robbins + + * io.c (PIPES_SIMULATED): Simplify the case where PIPES_SIMULATED + is true but using temporary files - that code not needed anymore. + * regcomp.c, regex.h, regex_internal.c, regex_internal.h, + regexec.c: Sync with GLIBC. Why not. + +Mon May 16 17:55:25 2011 Arnold D. Robbins + + * awkgram.c: Regenerated using bison 2.5. + +Sat May 14 22:25:50 2011 Arnold D. Robbins + + * io.c (nextfile): Use `in_array' in main loop to see if element + of ARGV exists, instead of using `assoc_lookup'. The latter creates + the element! A day one bug! + * dfa.c (parse_bracket_exp): For z/OS init pattern manually. + +Mon May 9 16:30:49 2011 Arnold D. Robbins + + * array.c (sort_up_value_type): Remove unused variable ret. + (do_delete): Initialize local variables to silence warnings. + Thanks to Michal Jaegermann. + +Mon May 9 15:07:29 2011 Corinna Vinschen + + * awk.h: Remove cygwin code for libsigsegv. + +Sun May 8 20:38:03 2011 John Haque + + * eval.c (r_interpret): In case Op_sub_array, store only the + subarray index as 'vname'. + * array.c (make_aname): Redone for dynamic computation of + a subarray actual 'vname'. + (array_vname): Use make_aname() for (sub)array name. + (asort_actual): Performance optimization for asort(a). + +Sun May 8 20:29:17 2011 Arnold D. Robbins + + * debug.c (print_array): Sort in order of string indices, per + request from John Haque. + * array.c (sort_up_value_number): Use string value to provide + ordering when numeric values are equal. Ensures that tests come + out OK on different systems. + +Sun May 8 20:27:27 2011 Arnold D. Robbins + + * dfa.c: Sync with GNU grep. + * regex.h: Sync with GLIBC in preparation for submitting updates + back. + +Thu May 5 21:22:44 2011 Arnold D. Robbins + + * eval.c (r_interpret): PROCINFO sorting only takes effect + if not do_posix. + +Wed May 4 23:31:14 2011 Arnold D. Robbins + + Move array sorting to using predefined strings, add value sorting + by type of assignment. + + * array.c (sort_up_value_type, sort_down_value_type): New routines. + (asort_actual): Pass string value to assoc_list, not NODE *. + Make sure indices of new arrays have numeric value set also. + (sort_up_value_number): Don't break the tie based on string value. + (sort_selection): Removed. + (assoc_list): Third arg is string constant. Add name to table of + functions. Linear search it. + * awk.h (assoc_list): Fix declaration. + * debug.c (print_array): And use of assoc_list. + * eval.c (r_interpret): Ditto. + +Wed May 4 23:06:17 2011 John Haque + + * eval.c (setup_frame): Handle a Node_var in stack. Fixes + a problem when a Node_var_new as param becomes Node_var during + expresssion evaluation for a subsequent param. + +Wed May 4 23:04:06 2011 John Haque + + Fix the problem (crash) with disappearing array argument when + it is a subarray of another deleted array argument. + + * awk.h (struct exp_node): Nuke unused field sub.nodep.number. + New field sub.nodep.rn. + (parent_array): New definition for sub.nodep.rn to keep track + of the parent of a subarray. + * awkgram.y (mk_symbol): Initialize parent_array to NULL. + * eval.c (r_interpret): In the case Op_sub_array, assign + parent_array. + * array.c (get_array): Initialize parent_array to NULL when + a Node_var_new becomes a Node_var_array. + (assoc_find): Add a fourth argument for the previous node + of the returned bucket. + (in_array, assoc_lookup): Adjust calls to assoc_find(). + (adjust_fcall_stack): New routine to change a soon-to-be deleted + subarray parameter in the function call stack to a local array. + (do_delete): Simplify code, remove recursive usage. Call + adjust_fcall_stack() where appropriate. + (do_delete_loop): Call adjust_fcall_stack() before clearing the + array. + (asort_actual): Don't accept an array and its subarray as + arguments for asort() or asorti(). + (asort_actual, dup_table): For asort(), appropriately assign + parent_array when creating the result array. + * field.c (do_split, do_patsplit): An array and its subarray not + accepted for the second and the fourth arguments. Remove + unnecessary dupnode of the field seperator node. + + Unrelated: + * awkgram.y (LEX_DELETE, simple_variable): Change type argument + from Node_var_array to Node_var_new for calls to variable(). + * io.c (devopen): Fix parsing GAWK_MSEC_SLEEP env variable. + +Mon May 2 23:44:34 2011 Arnold D. Robbins + + * dfa.c (parse_bracket_exp): Sync with GNU grep, since we + now require C 90, go ahead and put non-constant values into + the array initializers. + +Mon May 2 23:37:09 2011 Corinna Vinschen + + * awk.h (small): Undef after include of to compile + builtin.c on Cygwin. + +Fri Apr 29 12:29:56 2011 Arnold D. Robbins + + * dfa.c: Sync with GNU grep, mainly typos in comments. + +Fri Apr 29 12:13:32 2011 Arnold D. Robbins + + * io.c (inetfile): Change ifdef to ifndef for have getaddrinfo. + Ooops. + +Fri Apr 29 11:49:38 2011 Arnold D. Robbins + + Per Pat Rankin, remove code related to GFMT_WORKAROUND and VAXCRTL. + + * builtin.c (sgfmt): Nuked. + (format_tree): Removed code related to GFMT_WORKAROUND and VAXCRTL. + * node.c (format_val): Revise comment. + +Fri Apr 29 11:33:08 2011 Arnold D. Robbins + + * awk.h (NUMIND): New flag, indicates numeric value of an + array index is current. + * array.c (awk_hash): Remove code for VAXC, it's no longer + needed. Per Pat Rankin. + (assoc_lookup): Only assign the numeric value if it's available. + (do_delete): Add comment about free_subs calling force_string. + (sort_force_index): Use NUMIND. + +Fri Apr 29 10:15:24 2011 John Haque + + * builtin.c: Relocate all codes from awkprintf.h. Restore + format_tree. + * debug.c (do_print_f): Adjust appropriately. Install fatal trap + for format_tree. + * Makefile.am (base_sources): Remove awkprintf.h. + + * array.c (assoc_list): Avoid possible crash; Remove unneeded + initialization of pre_func. + +Wed Apr 27 22:31:23 2011 Arnold D. Robbins + + * awk.h (ahash_dupnode): Merged into dupnode in node.c, change uses. + * array.c (ahash_unref): Merged into unref in node.c, change all uses. + * node.c (dupnode): Revised to support Node_ahash. + (unref): Ditto. + + Lots of code clean up in array.c: + + * array.c (AVG_CHAIN_MAX): Made unsigned. + (array_init): Use strtoul to convert value instead of doing it + manually. + (array_vname): Nuke code that could limit length of name. It + was never used. + (concat_exp): Make len unsigned, clean up the calculation. + (assoc_lookup): Set ahname_num in the index at time of element + creation. + (dup_table): Copy ahname_num also. + Other minor cleanups after code review. + +Sun Apr 24 15:39:19 2011 Arnold D. Robbins + + * NEWS.0: Moved all pre-4.0 news to here. + * NEWS: Shortened. + * Makefile.am (EXTRA_DIST): Add NEWS.0. + +Sun Apr 24 12:43:49 2011 John Haque + + * array.c (sort_user_func): Fix return value to match the + documentaion. + (sort_selection): Make user-specified comparison function with + the same name override default "unsorted" specification. + +Fri Apr 22 16:05:27 2011 John Haque + + * array.c (sort_user_func): New routine to handle user-defined + quicksort comparison function. + (assoc_list): Adjust for user-defined comparison function. + +Fri Apr 22 09:18:16 2011 Arnold D. Robbins + + * array.c (awk_hash): Force results into 32 bits for consistency + across platforms. Keeps the test suite happy. This may turn out + to be a bad idea in the long run. + +Mon Apr 18 10:18:26 2011 John Haque + + * array.c (assoc_list): New function to construct, and optionally + sort, a list of array elements. + (asort_actual): Use the new function to sort array elements. + (assoc_sort_inplace, assoc_from_list, merge_sort, merge): Nuked. + (sort_selection): Simplify handling of error and warning messages. + (sorted_in, sort_match): Nuked, related code in sort_selection() and + assoc_list(). + (sort_ignorecase, sort_up_index_ignrcase, sort_down_index_ignrcase, + sort_maybe_numeric_index, sort_cmp_nodes, cmp_func, sort_up_value, + sort_down_value): Nuked. Ignorecase handling done in the corresponding + non-ignorecase versions. + (cmp_string): New routine for string comparisons. + (sort_up_value_string, sort_down_value_string, sort_up_value_number, + sort_down_value_number, sort_force_index_number, + sort_force_value_number, sort_force_value_string): New routines. + * awk.h (struct exp_node): New field sub.hash.num to store the + numeric value of an array index. + (ahname_num): New define. + (SORT_CTXT): New typedef. + * awkgram.y (tokentab): Accept three args for asort() and asorti(). + (snode): Adjust for the extra args. + * eval.c (r_interpret): In case Op_arrayfor_init, call assoc_list() + for a list of array elements. + * debug.c (print_array): Call assoc_list() for a sorted list of array + elements. + +Wed Apr 13 10:17:37 2011 John Haque + + * builtin.c (do_strftime): Make the third argument to strftime + really work. + * io.c (redirect): Do not free `rp' after failure to open socket + in redirect_twoway. Fixes a double-free memory error. + +Thu Apr 7 21:38:08 2011 Arnold D. Robbins + + * array.c (merge): Use sort_cmp_nodes for asort/asorti. + See test/arraysort.awk test 1. + +Thu Apr 7 10:48:21 2011 Pat Rankin + + * array.c (sort_cmp_nodes): New routine. Unlike cmp_nodes, numbers + are less than strings instead of being formatted and then compared. + (sort_up_value): Use it. + +Sun Apr 3 22:18:26 2011 Arnold D. Robbins + + * README, FUTURE: Minor edits. + +Fri Apr 1 11:53:54 2011 Pat Rankin + + * array.c (sort_up_index_number): Fix the NODE arguments passed to + sort_up_index_string() when a tie breaker is needed. + +Fri Apr 1 11:49:17 2011 Arnold D. Robbins + + Change ISATTY macro to os_isatty function. + + * awk.h (ISATTY): Remove definition. + (os_isatty): Add declaration. + * debug.c, io.c, main.c: Change all calls. + +Thu Mar 31 22:57:36 2011 Arnold D. Robbins + + * Checklist: Updated. This is a git-only file. + * POSIX.STD: Revised some. + +Tue Mar 29 20:52:38 2011 John Haque + + * awkgram.y (LEXT_NEXT): Don't issue an error message if the next + statement is in a function (rule = 0). + + Always resolve the jump target for an exit statement at run-time. + This fixes a bug when the statement occurs in a function. + + * awk.h: New defines target_atexit and target_end. + * awkgram.y (LEX_EXIT): Initilize the jump targets. + * eval.c (r_interpret): Use current rule to choose the jump target + for Op_K_exit. + * debug.c (print_instruction): Adjust case Op_K_exit. + +Tue Mar 29 20:45:49 2011 Pat Rankin + + Move the code to support sorting `for (index in array)' from + eval.c to array.c, and implement several additional orderings. + + * array.c (comp_func, sorted_in, sort_ignorecase, + sort_up_index_ignrcase, sort_down_index_ignrcase): Move from eval.c. + (sort_up_index_string, sort_down_index_string): Move from eval.c + and rename from *_str to *_string. + (sort_selection, sort_match, sort_maybe_numeric_index, + sort_up_index_number, sort_down_index_number, + sort_up_value, sort_down_value): New routines. + * eval.c (sort_&c): Move to array.c. + (r_interpret: case Op_arrayfor_init): Call sort_maybe_numeric_index + before and after qsort. + * awk.h (qsort_compfunc): New typedef. + (sorted_in, sort_maybe_numeric_index): Declare. + +Fri Mar 25 13:15:36 2011 Arnold D. Robbins + + * awk.h: Move libsigsegv portability checks to here from main.c. + * eval.c (fcall_list, fcall_count): Move definitions to here + from main.c. + * io.c (do_find_source): Check against NULL in for loop. + * main.c: Lots of cleanup. Move some things out to other files, + add comments to some variable definitions. + (enum asgntype): To assign_type + (main): Remove decls of getopt variables, clean up comments. + Use emalloc and efree for libsigsegv stack. Remove check for SCCS + leading magic characters. + (add_preassign): Change allocassigns to alloc_assigns. + (init_locale): Change strdup calls to estrdup. + (save_argv): Make the routine static. + * version.in (version_string): Remove leading 4 SCCS magic characters. + +Wed Mar 2 08:15:02 2011 John Haque + + * array.c (asort_actual): Handle the case when the same array + is used as the source and destination. + * field.c (do_split): Make it fatal if attempting to use the same + array for both second and fourth arguments. + (do_patsplit): Ditto. + +Sun Feb 27 08:01:04 2011 Arnold D. Robbins + + Update copryright in all relevant files. + +Sat Feb 26 21:54:07 2011 Arnold D. Robbins + + * eval.c (sorted_in): Revise text of lint warning. + +Fri Feb 25 17:34:14 2011 Pat Rankin + + * eval.c (sorted_in): Remove incorrect unref() call. + +Wed Feb 23 21:48:20 2011 Arnold D. Robbins + + * main.c (main): Free extra_stack, to make valgrind happier. + +Tue Feb 22 12:04:09 2011 Arnold D. Robbins + + * main.c (UPDATE_YEAR): Move to 2011. Fix copyright. + +Tue Feb 15 17:11:26 2011 Pat Rankin + + * eval.c (sorted_in, sort_up_index_str, sort_down_index_str, + sort_up_index_ignrcase, sort_down_index_ignrcase, sort_ignorecase): + New functions to sort arrays for `for (index in array)' statements. + (r_interpret: case Op_arrayfor_init): Call sorted_in(). + +Wed Feb 16 07:12:50 2011 John Haque + + Fix line numbers in the lint, warning and error messages issued + by the parser. + + * awkgram.y (lintwarn_ln, warning_ln, error_ln): New local versions, + each accepts an additional line number argument. + (print_included_from): New function to seperate 'Included from ..' + message from yyerror. Use it in yyerror, and in the new functions. + (grammar): Use the local versions for messages. + (add_srcfile, include_source, dup_parms, func_install, param_sanity, + mk_binary, add_lint): Ditto. + (dup_params, include_source): Adjust arguments to pass line number. + * awk.h: New definition ATTRIBUTE_PRINTF_2. + + * awkgram.y (yylex): New variable warntab. Use it to issue only one + warning for the same non-standard special token in source. + (parse_program): Avoid spurious warnings. Don't call check_funcs if + yyparse aborts prematurely. + +Mon Feb 14 08:03:41 2011 John Haque + + * awkgram.y (regexp): Don't use tokstart in lint warning, it isn't + `\0' terminated. + (grammar): Copy update and assign routines from relevant variables into + instructions to avoid extra pointer dereferencing at run-time. + * awk.h (update_var, assign_var): new definitions. + * eval.c (r_interpret): Adjust cases Op_var_assign and Op_var_update. + +Sun Feb 13 20:22:47 2011 Eli Zaretskii + + * awkgram.y (add_srcfile): + * debug.c (source_find): Pass `path' and `src' to files_are_same. + * gawkmisc.c [__DJGPP__ || __MINGW32__]: Include pc/gawkmisc.pc, + for consistency with __EMX__ and pc/Makefile. + * debug.c (interpret, initialize_pager, prompt_continue) + (set_gawk_output): Use ISATTY instead of isatty. + * io.c (redirect, iop_alloc): Same. + * main.c (main): Same. + * awk.h (ISATTY): Trivial definition, if not defined elsewhere. + +Sun Feb 13 20:16:04 2011 Arnold D. Robbins + + * awkgram.y (check_funcs): Update warning about never called to say + "never called directly" since it could be called indirectly. + +Sun Feb 13 07:12:50 2011 John Haque + + * profile.c (pprint): In case Op_indirect_func_call, pop off + indirect var after function parameters. + Thanks to Hermann Peifer for the bug report. + * array.c (do_delete): Always free an empty sub-array name and node. + * ChangeLog: Fix typos. + +Fri Feb 11 10:26:25 2011 Arnold D. Robbins + + * io.c (remad_std_file): Close oldfd first, in case we've + run out of fd and do dup2 if the newfd isn't what we were + looking for. Thanks to Hermann Peifer for + the bug report. + +Thu Feb 10 21:31:36 2011 Andreas Buening + + * main.c (load_procinfo): Fix warning about unsed variables if we + don't have multiple groups. + * protos.h: Move decls for many standard functions here if + they aren't in the header files (OS/2) and bracket inside + #ifndef STDC_HEADERS. + * io.c (devopen): Remove decl of strtoul. + * field.c (set_FIELDWIDTHS): Same. + * awk.h: Always include protos.h. + +Tue Feb 8 22:46:22 2011 Arnold D. Robbins + + * array.c, builtin.c, eval.c: Equalize message strings and + fix a typo. Thanks to Benno Schulenberg . + +Mon Feb 7 11:23:33 2011 Arnold D. Robbins + + * awkgram.y (next_sourcefile): Comment out assertion that + lexeof is true; causes core dump on user typos of bad + characters which previous versions did not do. Thanks to + Pat Rankin for the report. + + * re.c (expand_range): Allow for ^ as first character + inside range. Thanks for Nelson Beebe for the bug report. + +Fri Feb 4 10:28:19 2011 Arnold D. Robbins + + * README.cvs: Udpated. + * Checklist: New file for storage in the git repository. + +Wed Feb 2 20:34:41 2011 Corinna Vinschen + + * awkgram.y (free_bc_internal): Remove unused variable. + +Tue Feb 1 23:13:10 2011 Arnold D. Robbins + + * bootstrap.sh: No need to find aclocal.m4, just touch it. + +Tue Feb 1 23:05:51 2011 Corinna Vinschen + + Make values of ctype macros into unsigned char to fix + warnings found on Cygwin / Newlib. + + * array.c (array_init): Add cast. + * awkgram.y: Ditto. + * awkprintf.h: Ditto. + * builtin.c (sub_common, nondec2awknum): Ditto. + * command.y: Ditto. + * eval.c (fmt_ok): Ditto. + * ext.c (make_builtin): Ditto. + * main.c (main, arg_assign): Ditto. + * re.c (check_bracket_exp): Ditto. + * node.c (r_force_number, parse_escape): Ditto. + (dump_wstr): Add unused attribute (unrelated). + +Tue Feb 1 23:01:40 2011 John Haque + + Fix switch debugging. + + * awkgram.y (LEX_SWITCH, case_statements, case_statement, + case_value): Linearize instructions to facilitate debugging. + (switch_body): Removed. + (yylex): Add LEX_CASE in special token processing. + (free_bc_internal): Remove case Op_K_switch. + * awk.h (OPCODE): Remove opcode Op_case_list. + * eval.c (r_interpret): Remove Op_K_switch. Add case + Op_K_case to handle switch. + Add cases Op_K_do, Op_K_while, Op_K_for, Op_K_arrayfor, Op_K_switch + and Op_K_default as no-ops, needed for pgawk. + * debug.c (print_instruction): Remove case Op_K_switch, + add case Op_K_case instead. + + Unrelated: + * awkgram.y (case_statements): As case values, "abc" and /abc/ + no longer considered as duplicates. + + Cleanup grammar and run-time code for switch and loops. + Jump targets for break and continue are now fixed, and known + at parse time. See ChangeLog entry dated Oct 21, 2010. + + * awk.h (OPCODE): Remove Op_push_loop and Op_pop_loop. + (loop_count): Remove definition. + * awkgram.y (fix_break_continue): Change calling parameters to + instruction list, break and continue targets. Adjust code. + (LEX_DO, LEX_WHILE, LEX_SWITCH, LEX_FOR): Simplify grammar. Use + Op_no_op as target for break. Adjust call to fix_break_continue. + (mk_for_loop): Ditto. + * eval.c (r_interpret): Nuke cases Op_push_loop and Op_pop_loop. + Simplify Op_K_break and Op_K_continue. Remove declaration of in_loop + and all loop detection code thereof. + * debug.c (pre_execute, post_execute): Adjust declarations and code. + (print_instruction): Nuke cases Op_push_loop and Op_pop_loop. + * eval.c (r_interpret): Adjust calls to pre_execute and post_execute. + * profile.c (pprint): Adjust cases Op_K_for, Op_K_do, Op_K_while, + Op_K_switch and Op_K_arrayfor. Add cases Op_K_case and Op_K_default. + Remove Op_push_loop and Op_pop_loop. + + Unrelated cleanup: + * awkgram.y (mk_condition): Don't include Op_K_if, Op_K_else and + Op_cond_exp if not profiling. + +Tue Feb 1 10:20:02 2011 Arnold D. Robbins + + * eval.c (r_interpret): Change magic string for array sorting. + +Sun Jan 30 21:49:53 2011 John Haque + + Add `isarray' built-in function. + + * awk.h (enum opcodeval): Op_push_arg: new opcode. + (do_isarray): Add declaration. + * awkgram.y (tokentab): Add new entry for `isarray' function. + (snode): Add handling for it. + * builtin.c (do_isarray): New function. + (do_length): Die if posix and get an array argument. + * debug.c (print_instruction): Handle Op_push_arg. + * profile.c (pprint): Likewise. + * eval.c (optypes, r_interpret): Likewise. + +Sun Jan 30 21:13:01 2011 Arnold D. Robbins + + * hard-locale.h: Synced to GNU grep. + * hard-locale.c: New file, brought in from GNU grep. + * Makefile.am (base_sources): Add hard-locale.c. + * dfa.h: Sync as much as possible to GNU grep. + * dfa.c: Sync as much as possible to GNU grep. + * builtin.c (do_strftime): Remove unneeded variable. + +Thu Jan 27 22:52:54 2011 Arnold D. Robbins + + * awk.h (comp_func): Add declaration. + * debug.c (comp_func): Make not static, and move to ... + * eval.c (comp_func): ... here. + (r_interpret): Add array sorting if magic index is + set in PROCINFO. + +Thu Jan 27 22:12:00 2011 Corinna Vinschen + + * Makefile.am: Remove $(EXEEXT) from 'awk' symlink. + +Thu Jan 27 21:21:13 2011 John Haque + + * eval.c (r_interpret): When in BEGINFILE or ENDFILE, add check for + `getline var < file' in cases Op_K_getline_redir and Op_K_getline. + + * awkgram.y (constant_fold): Code cleanups. Fix bug in the code for + string concatenation. + + * configure.ac: Remove unneeded extra call to AC_LANG. + +Thu Jan 27 15:00:42 2011 Arnold D. Robbins + + * eval.c: Fix up some comments. + * io.c (remap_std_file): New function. + (iop_close): Use it. + +Mon Jan 24 22:14:21 2011 Andreas Buening + + * debug.c: Bracket variables used with readline in #ifdef. + * dfa.c (add_utf8_anychar): Move inside ifdef. + +Mon Jan 24 22:05:26 2011 Arnold D. Robbins + + * re.c (make_regexp): Add separate variable for dfa syntax. + General formatting cleanup. + (research): General formatting cleanup. + (refree): Remove out of date comment. + (re_update): Comment the routine. + (check_bracket_exp): Improve check for range to not get [^-/] + kinds of things. Thanks to Nelson Beebe for pointing out the bug. + +Wed Jan 19 20:31:17 2011 Arnold D. Robbins + + * awk.h (is_valid_character): Add `& 0XFF' and remove casts to + unsigned chars in other files. Remove definition of this macro + in not MBS_SUPPORT case, since it wasn't being used. + (btowc_cache): New macro to index into the array and use the + same trick. Relies on ANSI C preprocessor semantics. + Fix all uses. + * builtin.c, node.c, io.c: Fix uses of these macros. + +Wed Jan 19 20:19:29 2011 Arnold D. Robbins + + * node.c (wstr2str): New function. + * awk.h: Declare it. + * builtin.c (is_wupper, is_wlower, to_wupper, to_wlower, + wide_change_case, wide_tolower, wide_toupper): New functions to + simplify wide character case conversions. + (do_tolower, do_toupper): Use wide_tolower, wide_toupper in multibyte + case. + (do_substr): Simplify code a little bit. + +Mon Jan 17 22:48:48 2011 Arnold D. Robbins + + * builtin.c (do_bindtextdomain): Change type of `the_result' + to const char* to kill compiler warnings. + * debug.c (source_find): Improve error message when file not + found. + * awkgram.y (get_src_buf): Add cast to value of `read' to + turn off compiler warnings on different systems. + +Mon Jan 10 21:40:05 2011 Andreas Buening + + * io.c (devopen): Handle opening of directories for OS/2. + +Mon Jan 10 21:37:49 2011 Arnold D. Robbins + + * awk.h: Rearrange includes of so it won't be + included for VMS, move definition of O_BINARY down. + +Sat Jan 8 23:00:37 2011 Arnold D. Robbins + + * awk.h: Include here. + * main.c, io.c: Remove includes of . + +2011-01-08 Eli Zaretskii + + * io.c (PIPES_SIMULATED) [__DJGPP__ || __MINGW32__]: Define. + (binmode): Define for __DJGPP__ and __MINGW32__ as well. + (gawk_popen) [!PIPES_SIMULATED]: Define for __DJGPP__ and + __MINGW32__ as well. + +Wed Jan 5 20:35:30 2011 Arnold D. Robbins + + * configure.ac: Move call to AC_LANG([C]) into here from + m4/readline.m4. + +Tue Jan 4 11:21:18 2011 Arnold D. Robbins + + Clean up some compiler warnings: + + * array.c (do_delete): Cast for printf. + * builtin.c (do_bindtextdomain): Casts for const char *. + * io.c (rs1scan): Cast for indexing of array. + * re.c (add_char): Remove unused variables. + +Fri Dec 31 11:05:11 2010 Michal Jaegermann + + * awk.h (strncasecmpmbs): Change parameters to const char *. + * builtin.c (strncasecmpmbs): Change parameters to const char *. + Add casts as appropriate in calls to other functions. + * eval.c (cmp_nodes): Add casts in calls to strncasecmpmbs. + * node.c (str2wstr): Ditto. + +Tue Dec 28 21:13:31 2010 Eli Zaretskii + + * gawkmisc.c: Restore inclusion of pc/gawkmisc.pc. + +Tue Dec 28 21:00:36 2010 Arnold D. Robbins + + * ext.c (make_builtin): Make first parameter const char *. + Adjust code inside to fit. + * awk.h (make_builtin): Adjust declaration. + +Mon Dec 27 19:55:10 2010 Arnold D. Robbins + + * io.c [AF_UNSPEC, AF_INET, AF_INET6]: Add definitions for systems + that don't define them. + (inetfile): Make IPv6 a fatal error if using the fake getaddrinfo, + since chances are good that IPv6 really isn't available. + +Sat Dec 25 19:36:27 2010 Arnold D. Robbins + + Fixes for z/OS. + + * awkgram.y (tokcompare): Change argument types to const void *. + (check_special): Add cast to void * in call to qsort. + * builtin.c (do_bindtextdomain): Change `directory' and `domain' + to const char *. + * custom.h (ZOS_USS): Undef HAVE_SYS_PARAM_H and HAVE_MCHECK_H. + Beats me why configure thinks it has those things. + +Fri Dec 24 12:56:46 2010 Arnold D. Robbins + + * custom.h: Remove defs for MIPS RiscOS. + * configure.ac, aclocal.m4: Updated to Autoconf 2.68. + +Wed Dec 22 21:21:28 2010 Arnold D. Robbins + + * gettext.h: Synchronized with gettext 0.18.1. + +2010-12-22 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.18.1. + * ABOUT-NLS, config.rpath: Updated from gettext 0.18.1. + +Sun Dec 19 16:43:14 2010 Arnold D. Robbins + + * awk.h (update_PROCINFO_str, update_PROCINFO_num, make_str_node): + Change `char *' parameters to `const char *' to avoid some + compiler warnings. + * ext.c (do_ext): Remove cast in call to make_string. + * field.c (update_PROCINFO_str, update_PROCINFO_num): Adjust. + * main.c (init_args): Remove casts in calls to make_string. + * node.c (r_make_str_node): Add cast in assignment if ALREADY_MALLOCED. + +Sat Dec 18 20:12:59 2010 Eli Zaretskii + + * array.c, gawkmisc.c, io.c, main.c, regex_internal.h, + awkgram.y, awk.h, array.c: Remove OS2 and _MSC_VER defines. + +Sat Dec 18 19:56:17 2010 Arnold D. Robbins + + * builtin.c, eval.c, floatcomp.c, io.c: Remove all the crufty + old code for #ifdef CRAY. + +Thu Dec 16 11:06:50 2010 Arnold D. Robbins + + Put strftime() default format into PROCINFO["strftime"]. + + * awk.h (def_strftime_format): Declare const char[] array. + * main.c (def_strftime_format): Define it. + (load_procinfo): Load it into PROCINFO. + * builtin.c (do_strftime): Use value in PROCINFO for format + string if it's there. Remove old def_format static array. + +Mon Dec 13 17:12:44 2010 Arnold D. Robbins + + If not POSIX, turn [d-h] into [defgh]. + + * re.c (check_bracket_exp): Make warning about ranges under + lint control. + (expand_range): New routine to expand ranges. + (make_regexp): Check if might have range and call expand_range. + (add_char): New helper function for expand_range. + +Thu Dec 9 22:12:48 2010 Arnold D. Robbins + + * io.c: Restored changes of 1 July 2010 to allow /inet4 and /inet6; + they got lost amongst the merges. Fixed checking of do_sandbox. + Also, removed the option for raw IP sockets since it was never + implemented and wasn't going to be. + +Tue Dec 7 11:59:00 2010 Arnold D. Robbins + + * configure.ac: Remove test for return type of sprintf. Another + renegade from the late 1980's bites the dust! + * protos.h (sprintf): Remove declaration. + +Sun Dec 5 15:01:35 2010 Arnold D. Robbins + + * eval.c (grow_stack): Change env var to GAWK_STACKSIZE. + * awk.h, main.c, eval.c, profile.c: Removed features added + for those who are Strong In The Ways of the Source. + * debug.c (comp_func): Moved to here from eval.c, where it's + no longer needed. + +Sat Dec 4 21:44:38 2010 Arnold D. Robbins + + * node.c (init_btowc_cache): New function. + (btowc_cache): New array. + (str2wstr): Use is_valid_character in test instead of several isXXX + calls. + * awk.h [is_valid_character]: Macro to use btowc_cache. + * main.c (main): Call init_btowc_cache(). + * io.c (rs1scan): Add call to is_valid_character when processing + characters byte by byte. + +Wed Dec 1 08:10:21 2010 Arnold D. Robbins + + * awk.h, awkgram.y, debug.c: Change CONTEXT to AWK_CONTEXT + everywhere to avoid problems with libsigsegv on cygwin. + +Tue Nov 30 13:48:34 2010 Arnold D. Robbins + + * main.c (MRL): Removed variable, not used since Tandem code nuked. + (main): Fix argument parsing for -m. + (usage): Make -m undocumented (already is the doc/* files). + * io.c (MRL): Remove declaration. + +Mon Nov 29 21:59:21 2010 Arnold D. Robbins + + * re.c (check_bracket_exp): Add check and warning for ranges. + I may live to regret this. + +Mon Nov 29 20:09:18 2010 Eli Zaretskii + + * replace.c [!HAVE_STRFTIME]: For __MINGW32__, define + HAVE_STRFTIME while compiling missing_d/strftime.c. + +Thu Nov 25 20:12:28 2010 John Haque + + * awkgram.y (grammar): Bug fix in delete for loop efficiency hack. + * debug.c (do_info): Don't sort functions to avoid potential memory leak + in case A_FUNCTIONS. + + Plug more potential leaks in the debugger eval/condition commands: + * builtin.c (POP_TWO_SCALARS): New macro to free first scalar in case + of a fatal error in the next. + (do_index, do_atan2, do_lshift, do_rshift, do_and, do_or, do_xor): Use it + instead of two consecutive POP_SCALARs. + + Execution context related code cleanups. Also, added descriptive + comments for functions. + * awkgram.y (get_context): Nuked. + (push_context, pop_context, in_main_context): New functions. + (mk_program, parse_program, yylex): Updated. + * debug.c (condition_triggered, do_eval, parse_condition): Updated. + * eval.c (unwind_stack): Updated. + * main.c (main): Updated. + * awk.h (struct context): Removed member level, not needed. + + * eval.c (op_assign): Initialize r to NULL, and declare x only + if HAVE_FMOD not defined to remove GCC warnings. + +Thu Nov 25 08:32:31 2010 Arnold D. Robbins + + * eval.c (posix_compare): Do string comparison with strcoll() / + wcscoll(). + (cmp_nodes): Call it if do_posix. This may be a bad idea, + but what the heck. Standards compatibility uber alles! + +Wed Nov 24 20:09:23 2010 Arnold D. Robbins + + * ext.c (do_ext): Require definition of `plugin_is_GPL_compatible' + per GNU Coding standards. + +Sun Nov 21 14:23:58 2010 John Haque + + Debugger: Fix memory leak when quitting pager. + * awk.h (PUSH_BINDING, POP_BINDING): Generalize macro definitions. + * debug.c (print_array): save and restore bindings for pager. + free list in case of an early exit in the pager. + (do_dump_instructions): Don't sort functions to avoid potential + memory leak. + (execute_code): Adjust PUSH_BINDING and POP_BINDING macro invocations. + + * awkgram.y (func_call): Avoid reading freed memory for indirect var + name; do the special variable check before the call to 'variable'. + + * eval.c (r_interpret): Fixes and cleanups. Change TOP to TOP_SCALAR + in the case Op_store_field. + (assign_common, assign, compare): Nuked macros. + (cmp_scalar, op_assign): New functions as replacements for the macros. + +Fri Nov 19 11:57:28 2010 Arnold D. Robbins + + * bootstrap.sh, Makefile.am: Remove treatment of CVS. + * README.cvs: Updated further. + +Thu Nov 18 23:28:23 2010 Arnold D. Robbins + + * configure.ac: Remove `--enable-portals' option. I don't think + anyone ever used it. + * io.c (two_way_open): Remove the code for portals. + * README.cvs, README.git, bootstrap.sh: New files for storage + in the Git repository. + +Tue Nov 16 11:56:31 2010 Arnold D. Robbins + + * version.in: Removed descriptive comments. New features and + so on are documented in the documentation and in NEWS. + +Mon Nov 15 19:19:25 2010 Arnold D. Robbins + + * awkgram.y (LEX_LENGTH): Removed warning about length with + no argument being deprecated. + * awkprintf.h: Remove code for sun386. Fix %c to print multibyte + character instead of first byte. + * builtin.c (sub_common): Update commentary about POSIX. + * io.c (nextfile): Add MAYBE_NUM to FILENAME. + +Fri Nov 12 11:53:15 2010 Arnold D. Robbins + + * main.c (update_global_values): New routine, needed for correct + operation of --dump-variables. + * awk.h: Declared it. + * awkgram.y (get_varlist): Call it. + Thanks to Hermann Peifer for the bug report. + + * debug.c (find_subscript): Initialize `r' to NULL, per + Michal Jaegermann. + +Thu Nov 11 16:31:49 2010 Arnold D. Robbins + + * awk.h: Restore decls of strcasecmp, strncasecmp. + * builtin.c: Lots of general cleanups. + (sub_common): Actually enable POSIX rules! (Wasn't done right + earlier.) + +Thu Nov 4 14:08:29 2010 Arnold D. Robbins + + * array.c, awkgram.y, awkprintf.h, builtin.c, debug.c, eval.c, + field.c, io.c, main.c, node.c, profile.c, re.c: Remove register + keyword everywhere. + * node.c: Minor code cleanups. + +Wed Nov 3 08:29:15 2010 Arnold D. Robbins + + * node.c (free_wstr): If argument is null string or null field, + return. Thanks to Vojtech Vitek + +Tue Nov 2 16:45:06 2010 Arnold D. Robbins + + Straighten out options more. --lint --> -L, --lint-old --> -t + + * main.c (optlist, optab, main, usage): Adjusted approrpiately. + + Other: + * awk.h: Lots more general cleanup. + * builtin.c (strncasecmpmbs): Move mbstate vars into the routine. + * awk.h (strncasecmpmbs): Adjust declaration. + * eval.c (cmp_nodes): Adjust call. + * awkgram.y, command.y: Remove unused variables. + +Mon Nov 1 21:55:26 2010 Arnold D. Robbins + + * main.c (optlist, optab, main): Renamed -l option to -t + so can eventually merge in xgawk's -l option. + (usage): Adjusted approrpiately. + +Mon Nov 1 16:23:52 2010 Arnold D. Robbins + + * array.c, awk.h, custom.h, eval.c, gawkmisc.c, io.c, main.c, + protos.h, replace.c: Remove code related to: __amigaos__, + atarist, BeOS, _MSC_VER, MSDOS, TANDOM, WIN32, and anything + not for __STDC__. + +Sun Oct 31 21:49:22 2010 Arnold D. Robbins + + * awk.h: Start on cleaning up. Remove stuff for DOS, WIN32, + TANDEM, atarist, NeXT even! + +Sun Oct 31 05:56:23 2010 John Haque + + Add array of arrays. + + * awk.h (Op_sub_array): New opcode. + (POP_SCALAR, TOP_SCALAR): New macros. If the item is not a scalar, + make it a fatal error. + (POP_STRING, TOP_STRING): Use POP_SCALAR and TOP_SCALAR instead + of POP and TOP. + (force_string, force_number): Unrelated: simplify (remove) macros + for older gcc and non-gcc compilers. + * awkgram.y (grammar): New non-terminals for array subscripts. + delete array subscripts are handled differently than array subscripts + used as a variable. + (SUBSCRIPT): New terminal symbol to indicate end of subscripts. + (yylex): Return SUBSCRIPT after all the subscripts has been read. + (rules variable, LEX_DELETE and LEX_FOR): Adapt to these changes. + (sub_counter): New global to count the number of subscripts in a + delete statement. + (optimize_assignment): Adjust code for assignment to an array element. + * array.c (make_aname): New function to construct a sub-array name. + (get_array): Handle Node_val in the default case. + (concat_exp): Issue fatal error message if each expression is not a + scalar. + (assoc_clear): Recursively clear sub-arrays. + (do_delete, assoc_dump, assoc_sort_inplace, dup_table): + Handle array of arrays. + * builtin.c: Replace POP with POP_SCALAR as appropriate. + * eval.c (optypes): Add entry for Op_sub_array. + (r_interpret): Handle Op_sub_array. For case Op_subscript, increment + reference count only if the result is a scalar. If type is not a + scalar in Op_subscript_lhs, make it fatal. Adjust stack pointer + after a call to do_delete in Op_K_delete. Change POP(TOP) + to POP_SCALAR(TOP_SCALAR) as needed. + * profile.c (pprint): Add case for Op_sub_array. + * command.y (grammar): New non-terminals and rules to handle + array of arrays. + * debug.c (struct list_item): Redesigned. Field subs is NODE ** now, + new fields num_subs and sname. New flags OLD_IS_ARRAY and CUR_IS_ARRAY; + removed flag ARRAY_WATCH. Renamed macro IS_ARRAY() to WATCHING_ARRAY. + (do_info): Adapt to the structural changes in cases A_WATCH and + A_DISPLAY. + (print_array): New function to print contents of an array. + (print_subscript): New function to print an element of an array. + (do_print_var): Use the new functions to print an array element + and contents. + (do_set_var): Adapt to the structural changes in list_item for + an array element. + (delete_item, do_add_item, display): Ditto. + (add_item): Ditto. Use field symbol, not subs to store field number and + adjust accordingly everywhere. + Unrelated: handle function parameter correctly, watch and display now + prints the param name instead of the actual array name. + (find_subscript): New function. + (initialize_watch_item): Use the new function find_subscript + to locate an array element NODE. + (watchpoint_triggered): Redone. + (cmp_val): Redone. + (print_watch_code): Adjust code for printing subscript. + (print_instruction): Add case for Op_sub_array. + (serialize_subscript): New function. + (serialize): Use the new function to serialize watch and display + subscripts. + (unserialize_list_item): Adapt to the structural changes. Also, + simplify code. + (do_print_f): Redo code for printting array element. + (pre_execute_code, execute_code): Change POP to POP_SCALAR. + + Unrelated: + + * debug.c (unserialize_commands): New function for common code in + unserialize_breakpoint and unserialize_list_item. + (unserialize_breakpoint and unserialize_list_item): Use the new + function. + + * awkgram.y (grammar): Do not terminate parser if seen an empty(NULL) + subscript. Install null string as subscript and continue parsing. + (variable): Do not terminate parser if type is Node_func, change it + to Node_var_new temporarily. Simplifies grammar and allows parser to + continue. + + * command.y (yylex): Add history entry when blank line repeats + previous command. + + * debug.c (pp_args): Removed. Pretty-printing SUBSEP + seperated indexes can not be made to work reasonably in all cases. + (struct list_item): Removed field pp_subs. + (concat_args): Move to file command.y. + * command.y (grammar): Concatenate SUPSEP seperated indexes. + +Thu Oct 28 16:25:08 2010 Arnold D. Robbins + + Remove use of varargs.h everywhere: + + * awkgram.y (yyerror): Fixed. + * awk.h [CAN_USE_STADARG_H]: Removed, #error added if not available. + (snprintf, Func_print, msg, error, warning): Fix declarations. + * cmd.h (gprintf, d_error): Fix declaration. + * command.y (yyerror): Fixed. + * debug.c (d_error, gprintf): Fixed code. + * main.c (lintfunc): Fix declaration. + * msg.c (msg, warnning, error, r_fatal): Fixed code. + +Wed Oct 27 16:45:29 2010 Arnold D. Robbins + + * awk.h [P]: Finally, nuked the `P' macro. Removed definitions + and uses. + [HAVE_DOPRNT]: Removed check for this, now require vfprintf. + [BELL]: Nuked; require a compiler that supports '\a'. + * array.c, awkgram.y, awkprintf.h, builtin.c, cmd.h, command.y, + debug.c, eval.c, ext.c, field.c, io.c, main.c, protos.h [P]: + Remove all uses. + * node.c (r_force_number): Change check with strtod to `ptr == cpend', + SunOS 3.5 compatibility no longer concerns us. Removed the comment. + [P]: Removed all uses. + (parse_escape): Change from BELL to '\a'. + * profile.c (pp_string): Change from BELL to '\a'. + [P]: Removed all uses. + +Tue Oct 26 20:11:37 2010 Arnold D. Robbins + + * awkgram.y (fix_break_continue): New routine to make break and + continue instructions point to where they should jump to. Adjusted + grammar to call it for switch and loops. + * eval.c (r_interpret): For Op_K_break and Op_K_continue, jump + to pc->target_jmp. + * command.y (cmdtab, do_help): Translate the help messages. + * debug.c (option_list, option_help): Translate the help messages. + Elsewhere, clean up / add calls to gettext. + +Fri Oct 22 11:18:29 2010 Arnold D. Robbins + + * ChangeLog: Merged with ChangeLog.BYTECODE. + * Makefile.am (EXTRA_DIST): Removed ChangeLog.BYTECODE. + * ChangeLog.BYTECODE: Removed the file. + +Thu Oct 21 12:16:35 2010 Arnold D. Robbins + + Make break and continue outside a loop not allowed at all, + even with --traditional, as BWK awk no longer allows this. + + * eval.c (r_interpret): For Op_K_break and Op_K_continue, make + them fatal errors if not in a loop. + * awkgram.y (break_allowed, continue_allowed): New variables. + [BREAK, CONTINUE]: New flags for tokentab. + (yylex): If set, increment the corresponding variable. + (Grammar): Test variables when break/continue seen, decrement them + at the end of productions for loops and switch. + +Tue Oct 19 20:03:29 2010 Arnold D. Robbins + + * main.c (optab, usage): Remove --compat, --copyleft, and --usage extra + option aliases. + +Tue Oct 19 08:25:02 2010 Arnold D. Robbins + + * awkprintf.h (r_format_arg): Undouble "%" characters in + error messages. Thanks to Scott Deifik for catching the problem. + +Sat Oct 16 22:08:54 2010 Arnold Robbins + + Apply changes from John Haque: + + * awk.h [ASSIGNED]: Remove unused flag. + (Op_cond_pair_left): Remove. + * debug.c (print_instruction): Remove Op_cond_pair_left. + (do_trace_instruction): Fix print for Op_newfile. + (parse_condition): Improve code. + * eval.c (optypes): Add space to string for "!". + (r_interpret): Remove Op_cond_pair_left and Node_instruction cases. + Revise Op_cond_pair to handle left and right sides correctly. + Simple code fixes in some other cases. + * profile.c (pprint): Remove Op_cond_pair_left. Simplify Op_not. + +Fri Oct 15 14:17:09 2010 Arnold Robbins + + * awk.h (Op_cond_pair_left): New op for left side of condition pair. + * debug.c (print_instruction): Support it. + * profile.c (pprint): Ditto. + * eval.c (r_interpret): Split Op_cond_pair into two cases; they have + to be handled differently. + +Wed Oct 13 19:17:03 2010 Arnold D. Robbins + + * regex.h [RE_SYNTAX_AWK]: Add RE_CHAR_CLASSES, for compatibility + with modern Unix awk. + +Sun Oct 10 15:31:01 2010 Arnold D. Robbins + + * re.c (dfawarn): Do nothing in body, since gawk does it's + own checking. + +Sun Oct 10 15:30:34 2010 Arnold D. Robbins + + MERGE with bytecode version! Many many files changed / added. + +Sun Oct 3 08:41:25 2010 John Haque + + * Lots of files: Indirect function call, FPAT, BEGINFILE/ENDFILE + from gawk-devel. + + * awk.h (defrule): New enum for rule types. + (ruletab): Converts rule types to string constants. + * awkgram.y: Use rule types to simplify code in grammar. + * eval.c, debug.c, profile.c, awkgram.y routines: Update to use ruletab. + + * Lots of files: New debugger command eval for evaluation of + arbitrary (g)awk expression(s). + eval "awk statement(s)" + OR + eval p1, p2 + > awk statement + > more awk statement(s) + > end + p1, p2 are eval locals. + Conditional break/watch point: + break 1 "condition expression" + OR + break 1 + condition "condition expression" + + * command.y: grammar clean-ups. + (find_command): Redo to fix bugs in abbreviation/partial-string + search. + + * debug.c (command_source): New structure. Used to manage + sources for debugger commands. 'source file' command can now + include additional source commands. + + * awk.h: new enum type redirval for I/O redirection types; + remove redirection types from OPCODE. + * awkgram.y: Adjust grammar for redirection type changes. + (yylex, mk_getline): Update for redirection type changes. + * io.c (redirect, do_getline): Ditto. + * profile.c (redir2str): New function to convert redirection types + to string constants. + (pprint): Use new function redir2str. + * debug.c (print_instruction): Ditto. + * eval.c (optypes): Remove redirection types from table. + + * main.c (main): initialize do_optimize to 1, default optimizations. + do_optimize > 1 for -O (--optimize) command line option. + do_optimize = 0 turns off all optimizations, and is for debugging + purposes. + * awkgram.y: Updated. + + Lots of other cleanups and improvements. + +Thu Sep 16 09:44:47 2010 John Haque + + Lots of bug fixes & improvements, including work on + profiling. + +Wed Aug 18 22:15:06 2010 Arnold Robbins + + Lots of files: Sync fully with gawk-stable version, in particular + documentation edits and all ChangeLog files. + +Mon Aug 9 07:17:54 2010 John Haque + + Fix the case when runtime stack can have a INSTRUCTION pointer + while popping stack items (a next/nextfile statement inside a loop). + + * awk.h: new NODETYPE Node_instruction. Remove instruction pointer + from STACK_ITEM union, and all related macros. + * eval.c (r_interpret): wrap code (INSTRUCTION) pointer inside + a NODE for Op_push_loop. Change Op_pop_loop, Op_K_break + and Op_K_continue accordingly. + (unwind_stack): free Node_instruction. + (nodetypes): add new entry for Node_instruction. + +Thu Aug 5 15:05:22 2010 Arnold Robbins + + * awk.h: Remove redundant declaration of struct lconv loc; + * awkprintf.h: Move ifdef for HAVE_LOCALE_H inside case '\''. + * custom.h: Add macros for setenv and unsetenv for Z/OS. + * main.c (main): Remove three argument version for Tiny CC after + applying patches to local copy that fix the issue with environ. + +Mon Jul 26 07:23:01 2010 John Haque + + Started Byte Code version ChangeLog. + + * awk.h, eval.c, debug.c, profile.c: Renamed opcode Op_exit to + Op_atexit. Simplify exit value handling; use existing global + exit_val from main.c. + New opcode Op_stop. + + * msg.c: New variables fatal_tag_valid, fatal_tag. + (r_fatal): Use these new variables. + (err): Change myname from dgawk to gawk when debugging; + reflects the correct source of error messages. + + * builtin.c, msg.c: Change stdout to output_fp. + (do_fflush): Also flush output_fp if not stdout. + + * command.y (yylex, yyparse): (Much) improved error recovery. + + * awkgram.y (yylex): Add 'goto out' in 'check_special' + for do_traditional or do_posix check, lost somewhere + between 3.1.3 to 3.1.8. + (pop_var): New name remove_symbol to go with mk_symbol. + (install): New name install_symbol. + + * debug.c:(set_gawk_output): Improved handling of /dev files + including /dev/ttyN, /dev/pts/N. + (pre_execute): Renamed execute, a pre_hook in r_interpret. + (post_execute): New function, a post_hook in r_interpret; + used to detect non-local jumps (next, nextfile, exit) + with commands 'until' and 'finish', and to print the + returned value for finish. + (print_instruction): Redo function params initialization + when trace is on. Hopefully, correct this time around. + (close_all): New function to close all known files + during quit and restart. + + * eval.c(r_interpret): Redefine macro JUMPTO to include + post_hook from above, and use it exclusively to move to + the next instruction for execution. + + * debug.c (do_run): Trap gawk fatal errors. +Sun Sep 5 12:44:24 2010 Arnold D. Robbins + + * re.c (check_bracket_exp): Add `warned' flag to table and adjust + code to only warn once about each candidate. + (make_regexp): Always call check_bracket_exp, per discussion + on comp.lang.awk. + +Fri Aug 6 16:29:55 2010 Arnold D. Robbins + + * re.c (check_bracket_exp): Improved the code, again. + +Thu Aug 5 18:41:27 2010 Arnold D. Robbins + + * re.c (check_bracket_exp): Improved the code. + +Tue Aug 3 11:35:11 2010 Arnold D. Robbins + + * re.c (check_bracket_exp): New function. + (make_regexp): Call it if do_lint. + +Thu Jul 1 19:22:33 2010 Arnold D. Robbins + + Add support for /inet4/... and /inet6/... files. + + * io.c (socketopen): New parameter `family' for address family. + (inetfile): New function. Changed everywhere to use it and + the values it sets. + +Fri Jun 25 01:01:39 2010 Arnold D. Robbins + + * main.c (main): Added short option letters for all long options + that didn't have them so that they can be used in #!. This + reinstates -r, FWIW. + (usage): Revised message to list standard options first, then + options for extensions, sorted by short letter. + +Mon Jun 21 23:05:20 2010 Arnold D. Robbins + + New FPAT variable and patsplit built-in function. + + * awk.h (NODETYPE): Add Node_FPAT. + (FPAT_node, do_patsplit, set_FPAT): Declare. + (set_FPAT, update_PROCINFO_str, update_PROCINFO_num, + current_field_sep): New functions. + * awkgram.y (tokentab): Add patsplit. + (snode): Add code for do_patsplit to default third arg to FPAT. + (isnoeffect, isassignable): Add cases for Node_FPAT. + * eval.c (nodetypes): Add FPAT. + (r_tree_eval, r_get_lhs): Add cases for Node_FPAT. + * field.c (fpat_parse_field, update_PROCINFO_num, set_FPAT, + do_patsplit): New functions. + (update_PROCINFO): Renamed to update_PROCINFO_str. + (FPAT_re_yes_case, FPAT_re_no_case, FPAT_regexp): New variables. + (using_FIELDWIDTHS): Replaced with current_field_sep and all calls. + * io.c (set_RS): Call current_field_sep insead of using_fieldwidths. + * main.c (main): Use update_PROCINFO_str and update_PROCINFO_num + instead of manually updating the array. + (varinit): Add FPAT. + * profile.c (tree_eval, pp_lhs, is_scalar, pp_var): Add case for + Node_FPAT. + +Fri Jun 12 13:25:32 2009 Arnold D. Robbins + + Make command line arguments that are directories a warning. + They remain a fatal error if --posix or --traditional. + + * configure.ac: Remove the --disable-directories-fatal option. + * io.c (nextfile): Rationalize the code that handles directories, + including setting ERRNO correctly. + +Thu Feb 26 20:57:52 2009 Arnold D. Robbins + + Changes from August 2008 through February 2009 to add + BEGINFILE and ENDFILE, originally against 3.1.6, merged into + development version. + + * awk.h (in_beginfile_rule, in_endfile_rule): Add declarations. + * awkgram.y (beginfile_block, endfile_block): Add declarations. + (beginfile_or_endfile_rule, parsing_endfile_rule): New variables. + (LEX_BEGINFILE, LEX_ENDFILE): New tokens, new rules for those tokens. + (tokentab): Add new entries for BEGINFILE, ENDFILE. + (LEX_NEXTFILE): Allow nextfile in BEGINFILE rule. + (LEX_GETLINE): Allow only `getline var < file' inside BEGINFILE or + ENDFILE. + * eval.c (interpret): Check in_beginfile_rule and in_endfile_rule for + errors for next and nextfile. + (update_ERRNO_saved): When errno == 0, set to ERRNO to + null string. + (interpret): Allow nextfile in BEGINFILE rule. + (update_ERRNO_saved): Check errcode paramater, not global errno. + * io.c (beginfile_block, endfile_block, in_beginfile_rule, + in_endfile_rule): New variables. + (do_input): Set them. Update ERRNO only if not do_traditional. + Propogate error code down to fatal message. + (run_beginfile_rule, run_endfile_rule): New functions. + (iop_alloc): Use it instead of inline code. Add fourth argument + indicating that the open hooks should run. Adjust calls. Point is + to not call open hooks twice inside `nextfile'. + (do_nextfile): Check it and also in_beginfile_rule and only longjump + when both filebuf valid and not in a BEGINFILE rule. + (nextfile): Call run_beginfile_rule and run_endfile_rule as + appropriate. Reorder the logic to set ERRNO and allow BEGINFILE + to call nextfile to skip a bad data file. Adjust calls to + iop_open and find_open_hook. + (nextfile): Call iop_alloc if there's a BEGINFILE block in case + the hooks changed. + (find_open_hook): New function. + (get_a_record): On read error, just set *errcode and return. Let + higher level logic decide if it's fatal. + (inrec): Have error be fatal if traditional or if there isn't + an ENDFILE rule. + * profile.c (dump_prog): Add code for BEGINFILE / ENDFILE. + * awk.h (dump_prog): Adjust declaration. + * main.c (main): Adjust call to `dump_prog'. Check beginfile_block and + endfile_block also to be not NULL in order to call do_input. Thanks to + Steffen Schuler for pointing out the bug. + +Thu Feb 26 07:54:51 2009 Arnold D. Robbins + + Per advice from BWK and my own feelings, nuke additions from 2001 + of seek and tell functions. They were never documented anyway. + + * awk.h (do_seek, do_tell): Remove declarations. + (IOBUF): Remove save_start and rec_size members. + * awkgram.y (tokentab): Remove "seek" and "tell" entries. + * io.c (do_getline): Remove code setting save_start and rec_size. + (iop_alloc): Remove code initializing save_start and rec_size. + (do_seek, do_tell): Removed. + * configure.ac: Remove --enable-seektell option. + +Mon Feb 16 21:54:13 2009 Arnold D. Robbins + + * awkgram.y (tokentab): Enable switch / case by default. + * configure.ac: Remove test for --enable-switch. + +Thu Feb 12 22:06:17 2009 Arnold D. Robbins + + * main.c (optab): --gen-po becomes --gen-pot. -r goes away since it's + now on by default. + (usage): Similar changes. + * regex.h [RE_SYNTAX_GNU_AWK, RE_SYNTAX_POSIX_AWK]: Adjust to support + interval expressions. + [RE_DEBUG]: Nuke: it is no longer used. + * re.c (resetup): Adjust comment for do_intervals. + (reflags2str): Remove RE_DEBUG. + +Sat Jan 17 20:41:54 2009 Arnold D. Robbins + + * awk.h (WSTRCUR): Always define, no real need for ifdef. + * eval.c (flags2str): Similar. + * field.c (rebuild_record): Similar. + +Sat Jan 17 19:59:39 2009 Arnold D. Robbins + + Add indirect function calls. They require a special + syntax, which is an `@' in front of a function call. + + * awk.h (NODETYPE): New Node_indirect_function_call value. + (ASSIGNED): New flag value. + * eval.c (nodetype2str): Add new node type. + (flags2str): Add ASSIGNED. + (func_call): Test the node type to determine + what kind of call. Cache the function body if a real function + is called indirectly. Also get scoping right if called from a function. + LOTS of work here to get this code right! + (op_assign): Add ASSIGNED to flags. + * awkgram.y (function_call, direct_function_call): New productions for + creating indirect function calls. Only call func_use for direct call. + (yylex): Add case for '@'. Only return it if not posix or traditional. + * profile.c (tree_eval): Add case for Node_indirect_func_call. + (pp_func_call): Check type and print '@' for indirect call. + +Tue Dec 30 22:25:04 2008 Assaf Gordon + + * awk.h (do_sandbox): New variable declaration. + * main.c (do_sandbox): Variable definition. + (opttab): Add new option --sandbox. + (usage): Add to usage message. + * builtin.c (do_system): Disallow if sandboxed. + * io.c (redirect): Disallow redirections if sandboxed. + +Tue Dec 30 22:22:04 2008 Arnold D. Robbins + + * builtin.c (usage): Change --binary to --characters-as-bytes, + per Karl Berry. + +Thu Dec 18 05:29:46 2008 Steffen Schuler + + * field.c (*_parse_field): Add `sep_arr' argument and fill it. + * field.c (do_split): Add handling of fourth argument of awk + builtin `split'. + * field.c (get_field): Extend parse_field by default argument. + * awkgram.y (tokentab): Extend `split' entry with fourth argument. + +Wed Dec 17 09:54:00 2008 Arnold D. Robbins + + * main.c (do_binary): New variable for new option -b which + makes gawk not mess with multibyte strings. + (opttab): Add option entry for -b / --binary. + (main): If do_binary, set gawk_mb_cur_max to 1. + +Sat Oct 27 22:43:50 2007 Arnold D. Robbins + + * re.c (resetup): Add RE_INVALID_INTERVAL_ORD to syntax bits if + doing interval expressions. + +Thu Oct 25 23:11:10 2007 Arnold D. Robbins + + * awk.h (devopen): Add `isdir' pointer argument. + * io.c (devopen): Ditto. Adjust logic that checks for directory. + Adjust all calls. + * main.c (main): Adjust call to devopen. + +Sun Oct 3 23:18:44 2004 Arnold D. Robbins + + * dfa.c (lex): Enabled \s and \S escape sequences. + * regcomp.c (peek_token): Ditto. + +Tue Aug 3 13:29:53 2004 Arnold D. Robbins + + * builtin.c (sub_common): Make POSIX 2001 behavior the + default for `sub' and `gsub'. + +Wed Aug 21 13:39:08 2002 Dean Wakerly + + * main.c (main): Add short option letter 'r' for --re-interval. + Mainly for use in #! scripts. + +Wed Dec 26 22:03:48 2001 Arnold D. Robbins + + Nuke /dev/pid etc. special files! + + * awk.h (IOP_IS_INTERNAL, IOP_NO_FREE): Removed. Other defines + renumbered. + * io.c (iop_open, spec_setup, specfdopen, pidopen, useropen): Removed. + (do_input, redirect): Change uses of iop_open() to devopen() + + iop_alloc(). + (iop_close, get_a_record): Remove special handling for IOP_INTERNAL, + IOP_NO_FREE. + (devopen): Remove comment relating to iop_open. + Add fstat check for valid fd for /dev/fd/N. + +Sun Nov 4 10:27:58 2001 Arnold D. Robbins + + * awk.h, builtin.c, awkgram.y: Renamed mark/reset to tell/seek. + * acconfig.h: Add `#undef SEEK_TELL'. + * configure.in: Add `--enable-seektell' configure-time option. + * io.c (do_seek, do_tell): renamed from do_reset, do_mark. + +Thu Aug 16 12:21:28 2001 Arnold D. Robbins + + New feature, undocumented for now, use #define MARK_RESET to + to turn it on. New function val = mark("/some/file") to + save start position of current record. Use + reset("/some/file", pos) to go back to it. ONLY works + with getline. + + * awk.h (IOBUF): New members save_start and rec_size. + (do_mark, do_reset): Add declarations. + * awkgram.y (tokentab): Add entries for mark and reset. + * io.c (specsetup): Initialize save_start and rec_size. + (iop_alloc): Ditto. + (do_getline): Update them as appropriate. + (do_mark, do_reset): New functions. + +Fri Sep 17 12:42:42 2010 Arnold D. Robbins + + * regcomp.c (btowc): Changed to use mbrtowc. + +Wed Sep 15 08:26:55 2010 Arnold D. Robbins + + * dfa.c: Further sync with GNU grep. + +Tue Sep 14 09:53:55 2010 Arnold D. Robbins + + * node.c (str2wstr): Per advice from Ulrich Drepper, when converting, + if the current byte is isprint, isgraph, iscntrl or zero, then it + can't start a multibyte character. This can save many calls to + `mbrtowcs', and speed up the conversion considerably. + +Mon Sep 13 11:19:21 2010 Arnold D. Robbins + + * dfa.h, dfa.c: Sync with GNU grep. + * re.c (dfawarn): New routine for use by dfa. + +Sun Sep 12 22:17:02 2010 Arnold D. Robbins + + * profile.c (tree_eval): Fix comment on for ... delete array loop. + (pp_string_fp): Get escapes right on regex constant. + +Sun Sep 5 20:38:42 2010 John E. Haque + + * re.c (str2wstr): Decrement src_count when skipping bad bytes. + +Fri Aug 27 13:51:13 2010 Arnold D. Robbins + + * dfa.c: Sync with current GNU grep - minor edits only. + +Fri Aug 20 16:26:14 2010 Arnold D. Robbins + + * profile.c (tree_eval): Always parenthesize Node_cond_exp. + May add a few extra parens but guarantees the right semantics. + Thanks to Hermann Peifer for the bug report. + +Thu Aug 19 21:35:13 2010 Arnold D. Robbins + + * regex_internal.c (re_string_reconstruct): Move ifdef out to cover + variable declarations, to avoid "unused variable" warnings. + * regexec.c (check_arrival_add_next_nodes): Bracket declaration of + `err' with ifdef for the same reason. + + Thanks to avarab@gmail.com for the suggestions. + +Wed Aug 18 22:13:30 2010 Arnold D. Robbins + + * Makefile.am (AUTOMAKE_OPTIONS): Added. Other minor cleanups. + +Tue Aug 17 23:27:43 2010 Arnold D. Robbins + + * profile.c (pp_string_fp): Use different sets of escape characters + if printing a string or a regex, based on delimiter. Thanks to + Hermann Peifer for the bug report. + +Sun Aug 8 23:05:09 2010 Arnold D. Robbins + + * re.c (make_regexp): Don't allocate rp->dfareg unless + we're using dfa; causes a memory leak otherwise. Thanks to + Antonio Columbo for reporting the bug. + +Wed Jul 14 23:04:30 2010 Eli Zaretskii + + * dfa.c: Include langinfo.h only if HAVE_LANGINFO_CODESET is + defined. + +Wed Jul 14 23:00:19 2010 Arnold D. Robbins + + * awkgram.y (yylex): Allow a backslash before CR-LF to also + work for line continuation, for MS-DOS style source files. + Thanks to (Vincent Belaiche) for pointing this out. + +Wed Jul 14 22:31:53 2010 Arnold D. Robbins + + * node.c (str2wstr): Keep going if get a bad multibyte sequence. + Allows match to give correct answers for RSTART, RLENGTH. + Add a lint warning. Correctly set the length of the string + based on pointer subtraction. + +Wed Jun 16 21:52:09 2010 Arnold D. Robbins + + * awk.h (exec_count): Moved into NODE structure as standalone + element since count on `/pat/ { ... }' was wrong. Thanks to + Hermann Peifer for the bug report. + + Note to self: DO NOT propogate this to the byte-code version. + + Unrelated: + + * awkgram.y (matchop): Made left associative to match behavior + of other awks. + (print_expression_list): Simplified so that something like + `print ("a", "b") in B in A' will work. Again, to match what + other awks do. + +Fri Jun 4 15:56:59 2010 Arnold D. Robbins + + * dfa.c: Further merges with GNU grep. + +Thu May 20 22:20:32 2010 Stepan Kasal + + * Makefile.am [AUTOMAKE_OPTIONS]: Removed, contents now in ... + * configure.ac [AM_INIT_AUTOMAKE]: ... here. + Added dist-xz while I'm at it, per Karl Berry. + +Tue May 18 14:52:04 2010 Marcin Szewczyk + + * builtin.c (format_tree): Simplify code in pr_tail when multibyte + and %s or %d. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Fri Apr 30 11:37:54 2010 Arnold D. Robbins + + * configure.ac: Remove check for libsnprintf. + +Tue Apr 27 22:23:26 2010 Andreas Schwab + + * builtin.c (do_mktime): Make lint check more sane. + Fix overflow check. Removes GCC warning that Arnold + incorrectly didn't like. + +Mon Apr 26 20:16:07 2010 Arnold D. Robbins + + * ltmain.sh: Removed. + * builtin.c (do_mktime): Restored old code to match the + documentation. We now have a warning that we just have to + live with. Sigh. Stupid GCC. Added a lint warning though. + (format_tree): More code so that %'d acts like %d on systems + without . + * main.c (main): Add `&& #if defined(HAVE_LOCALE_H)' for + call to setlocale. + +Wed Apr 21 23:35:43 2010 Arnold D. Robbins + + * Makefile.am: Change quoting of -Dargs so that even tcsh + users will be happy. + * regex_internal.c (MAX): Add `#undef MAX', just in case. + * configure.ac: Don't look for libsigsegv on OSF/1, gives + us severe headaches. + +Tue Apr 20 12:01:01 2010 Arnold D. Robbins + + * dfa.h, dfa.c: Sync with GNU grep. The long-standing x{0} bug + is now gone. Matching UTF-8 with "." is now much faster. + * re.c (avoid_dfa): Remove call to dfabroken() which is now gone. + * builtin.c (do_mktime): Simplify check of values passed in to be + more readable and to avoid a weird compiler warning from GCC. + +Fri Apr 16 15:02:26 2010 Arnold D. Robbins + + * array.c (assoc_lookup): Add cast in error message to turn + off compiler warning. + * dfa.c (is_blank): New function. Use it everywhere instead of + ctype.h `isblank' macro which isn't available universally. + +Tue Apr 13 22:36:31 2010 Arnold D. Robbins + + * array.c, awkgram.y, builtin.c, dfa.c, eval.c, ext.c, main.c, + node.c, re.c: Remove old ISxxx and TOxxx macros in favor of + standard versions. ``We're two wild and crazy guys!'' + +Tue Apr 13 22:07:18 2010 Arnold D. Robbins + + * getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c, regex.c, + regex.h, regex_internal.c, regex_internal.h, regexec.c: Sync with + glibc. What the heck. + +Thu Apr 8 21:33:09 2010 Arnold D. Robbins + + * dfa.h, dfa.c: All leading indentation is now spaces only. Yet + another sync with grep. + +Thu Apr 8 20:45:25 2010 Arnold D. Robbins + + Move dfa internals into dfa.c and sync with grep. Avoids VMS and + z/OS compile problems in order to avoid cygwin issue when used + with ligsigsegv. ("Portability? We don't need no stinkin' + portability!") + + * dfa.h: Move all the internals into dfa.c. + (dfaalloc, dfamusts, dfabroken): Add declarations. + * dfa.c: Accept all the internals. + (dfaalloc, dfamusts, dfabroken): New functions. + * awk.h (Regexp): Use a `struct dfa *'. + * re.c (make_regexp): Call dfaalloc. Adjust uses of dfareg + in other routines. + (refree): Free the dfa struct too. + +Tue Apr 6 23:06:55 2010 Arnold D. Robbins + + * dfa.h, dfa.c: Further sync with GNU grep for enum change + and other misc changes. + +Tue Apr 6 20:13:45 2010 Michal Jaegermann + + * main.c: Wrap declarations and bodies of `catchsegv' and + `catchstackoverflow' in #ifdef HAVE_LIBSIGSEGV to avoid + "not used" warnings. + +Tue Apr 6 20:11:47 2010 Arnold D. Robbins + + * dfa.h: Move definition of token enum to dfa.c to avoid conflict + with Windows WCHAR introduced by libsigsegv. Thanks to Corinna + Vinschen. + * dfa.c: Enum body here. + (in_coll_range): z/OS fix: Initialize array to all zeros and assign + values instead of putting them into the initializer. Thanks to Dave + Pitts for reporting the problem. + +Fri Apr 2 12:32:40 2010 Arnold D. Robbins + + * dfa.c: Sync with grep 2.6.3. + +Wed Mar 31 15:50:34 2010 Arnold D. Robbins + + * dfa.c (dfaexec): Move decl of `saved_end' up to top of function. + Fixes compilation on C89 compilers. + +Mon Mar 29 08:40:29 2010 Arnold D. Robbins + + Remove local copy of libsigsegv. Use an external copy if available. + + * Makefile.am: Remove SEGVSUBDIR and SEGVINCLUDE. + * configure.ac: Remove previous code that handled the library and use + gl_LIBSIGSEGV library. + * custom.h: Remove code for HAVE_SIGSEGV_H. + * main.c: Move to HAVE_LIBSIGSEGV. + * libsigegv/ : Removed. + +Mon Mar 29 05:41:35 2010 Corinna Vinschen + + * dfa.c: Include hard-locale.h after xalloc.h because it needs + xmalloc. + * hard-locale.h (xmalloc): Remove declaration. + (hard_locale): Cast xmalloc to correct target type. + +Mon Mar 29 05:38:47 2010 Arnold D. Robbins + + * io.c: (two_way_open): In counting down retries, test for > 0 + instead of >= 0 since retries is unsigned. Thanks to Pat Rankin + for noticing. + * configure.ac: Remove use of -export-dynamic on cygwin. + +Thu Mar 25 21:48:13 2010 Arnold D. Robbins + + * dfa.c: Sync to grep 2.6.1. That's probably enough for now. + +Wed Mar 24 19:48:01 2010 Arnold D. Robbins + + * dfa.c: More sync with grep. + +Tue Mar 23 19:42:48 2010 Jeff Chua + + * io.c (two_way_open): Bug fix in management of timeout value. + +Tue Mar 23 19:40:04 2010 Arnold D. Robbins + + * dfa.h, dfa.c: Synced with released grep 2.6. Oh Frabjous Day! + Callou! Callay! + +Mon Mar 22 22:49:44 2010 Arnold D. Robbins + + * awkgram.c: Regenerated using bison 2.4.2. + +Fri Mar 19 10:19:20 2010 Arnold D. Robbins + + * dfa.c: Minor edits for compat with grep. + +Fri Mar 19 09:19:56 2010 Arnold D. Robbins + + * io.c (two_way_open): Cleanup new code for socket opens. + * replace.c: Include missing_d/usleep.c based HAVE_USLEEP. + * configure.ac: Add usleep to list of functions to look for. + +Thu Mar 18 23:30:33 2010 Arnold D. Robbins + + * dfa.h, dfa.c: Imported from GNU grep and merged. Passes "make test". + * xalloc.h: New file, needed by dfa.c. + * Makefile.am (base_sources ): Added xalloc.h. + +Thu Mar 18 07:29:45 2010 Jeff Chua + + * io.c (two_way_open): Make failure to open a socket a non-fatal error. + Allow the amount of time to sleep during socket retries to come from an + undocumented env variable giving time in milliseconds. + +Mon Mar 8 20:58:05 2010 Paolo Bonzini + + More fixes from GNU grep. + + * dfa.c (dfaexec): Remove register keywords. + (FETCH): Use do..while(0) idiom. + (parse_bracket_exp_mb): Return MBCSET. + (in_coll_range): New. + (lex): Assign return value of parse_bracket_exp_mb to lasttok, + return it. Use in_coll_range instead of regcomp/regexec. + +Mon Mar 8 20:36:35 2010 Jim Meyering + + Fixes from GNU grep development version: + + build: avoid shadowing warnings + * dfa.c (match_mb_charset): Rename parameter: s/index/idx/. + (check_matching_with_multibyte_ops, match_anychar): Likewise. + + build: avoid shadowing warning for unused "rs" + * dfa.c (transit_state): Remove dead stores; + Ignore transit_state_consume_1char return value. + + syntax: remove trailing blanks + * dfa.c: Remove trailing blanks, to ease synchronization with grep. + + clean-up: limit visibility of an internal function + * dfa.c (match_mb_charset): Declare static. + + build: rename local to avoid shadowing global, dfa + * dfa.c (dfamust): Rename parameter: s/dfa/d/. + +Thu Feb 18 22:44:01 2010 Arnold D. Robbins 0 + + * eval.c (push_args): Clear the stack to NULL pointers after mallocing + it. Fixes yesterday's problem when called from a rule. + See test/fcall_exit2.awk. Thanks to Seb . + +Wed Feb 17 23:19:32 2010 Arnold D. Robbins + + * eval.c (pop_fcall): Check that argument on stack is not NULL before + attempting to clear it; add comment explaining it. + (push_args): Set nodes to zero for argument to make sure that values + are NULL for testing later in pop_fcall. See test/fcall_exit.awk. + Thanks to Seb . + +Sun Jan 31 22:46:49 2010 Arnold D. Robbins + + * profile.c (prec_level): Add Node_regex to the switch so that + `! /xxx/' works. Thanks to Hermann Peifer for + reporting the bug. + +Thu Jan 28 17:40:14 2010 Arnold D. Robbins + + * configure, Makefile.am: Updated to Autoconf 2.65 and Automake 1.11.1, + libsigsegv 2.8. + +Thu Jan 21 23:24:56 2010 Arnold D. Robbins + + * profile.c (pprint): Separate out code for Node_switch_body and only + print the lnode; avoids printing the default case twice. Thanks to + Hermann Peifer for reporting the bug. + +Sun Jan 3 21:03:01 2010 Arnold D. Robbins + + * dfa.c: Added casts as needed to silence warnings about + signedness of pointers from GCC 4.x. + +Fri Jan 1 11:41:50 2010 Arnold D. Robbins + + * builtin.c (format_tree): At pr_tail, remember to take the precision + into account when determining how many characters to copy out. + Thanks to tczy for the bug report. + +Tue Dec 8 12:29:30 2009 Arnold D. Robbins + + * configure.ac, awk.h: Remove use of header file. + +Mon Dec 7 15:25:02 2009 Arnold D. Robbins + + * node.c (format_val): Use <= and >= in the comparisons with + LONG_xxx instead of < and > so that things work correctly on systems + with 64 bit integers. Thanks to Stephen Davies for pointing out + the problem. + +Sat Nov 21 23:14:59 2009 Arnold D. Robbins + + * builtin.c (format_tree): If there is not an actual thousands + separator character, don't let `quote_flag' have an effect. Fixes + test failure on Solaris 10, which bizarrely says to use the + thousands separator character every three digits, but then doesn't + actually supply one. Thanks to Nelson Beebe for the initial + report. + +Mon Nov 16 22:27:44 2009 Arnold D. Robbins + + * awk.h (getnode): If MPROF wrap body in parentheses; remove + incorrect trailing semicolon. + * bisonfix.awk: Convert "y.tab.c" to "awkgram.c" for those rare + instances where we need to use a debugger on the parser so + that gdb will find the right source file. + +2009-10-26 Andreas Schwab + + * io.c (iop_open): Set errno when rejecting a directory. + +Tue Oct 20 22:48:14 2009 Arnold D. Robbins + + * awkgram.y (constant_fold): Fix check for two strings to look + at `right->flags'. Fix division code to check for division by + zero first. Thanks to Stephen Davies + for both. + +Fri Oct 16 08:41:29 2009 Arnold D. Robbins + + * io.c (redirect): Do the close-on-exec setting before + attempt to get a FILE *. Thanks to Andreas Schwab. + +Wed Oct 14 23:25:47 2009 Arnold D. Robbins + + * io.c (redirect): When opening a file, set the close-on-exec flag. + Thanks to Chris Pearson for the bug report. + +Tue Oct 6 21:07:23 2009 Arnold D. Robbins + + * main.c (main): When an option requires an argument and we print a + message, call `usage' and exit. + + Fix all calls to `usage' to use EXIT_FAILURE and EXIT_SUCCESS + instead of 1 and 0. + +Sun Oct 4 21:46:11 2009 Arnold D. Robbins + + * main.c (main): Don't reset argv[0] to myname. In call + to `init_args', pass argv[0] if do_posix. Based on + Fedora bug report. + +Sun Oct 4 18:45:06 2009 Arnold D. Robbins + + * array.c (assoc_lookup): In lint warning, don't clobber + the character at the end of the subscript; instead use the + length to limit the number of characters printed. Thanks to + Nick Hobson . + +Sun Aug 30 22:40:12 2009 Arnold D. Robbins + + * builtin.c (do_length): Handle the case where Node_var_new + was passed in as a parameter via a function call parameter. + Thanks to Greg Johnson for reporting + the bug. + +Tue Aug 11 19:23:51 2009 Arnold D. Robbins + + * profile.c (parenthesize_expr): New function. + (tree_eval): Use it for Node_and and Node_or. Thanks to + Hermann Peifer for reporting the bug. + +Tue Aug 4 06:04:23 2009 Arnold D. Robbins + + * builtin.c (format_tree): zero_flag does not apply to + %c and %s conversions. Thanks to Mike Brennan and Thomas Dickey + for the bug report. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Fri Jul 17 08:35:10 2009 Arnold D. Robbins + + * awkgram.c: Rebuilt with current Bison (2.4.1). + +Thu Jul 9 22:55:17 2009 Arnold D. Robbins + + * (NEWS README array.c awk.h awkgram.y builtin.c configure + configure.ac custom.h dfa.c ext.c field.c floatcomp.c io.c + main.c node.c profile.c re.c replace.c): Update copyrights + and other prep for a release. + +Thu Jul 9 22:20:04 2009 Arnold D. Robbins + + * main.c (init_locale): New function to make a deep copy of the + struct lconv. Thanks to KIMURA Koichi + for the info. + * eval.c (r_tree_eval): Further improve Node_assign_concat code to + temporarily to keep reference counts correct and to get the + desired behavior. + +Mon Jul 6 20:29:12 2009 Arnold D. Robbins + + * floatmagic.h: Remove @ signs copied from Texinfo. + It would help if I were more awake. + +Sat Jul 4 21:55:18 2009 Arnold D. Robbins + + * Makefile.am (base_sources): Add floatmagic.h so it'll + go into the tar ball. + +Fri Jul 3 13:47:36 2009 Arnold D. Robbins + + * profile.c (is_scalar): Add Node_func_call to list. + (pp_concat): Make logic smarter for tree created by Node_assign_concat. + +Fri Jul 3 13:01:49 2009 Arnold D. Robbins + + * awkgram.y (optimize_concat): New function that applies + Node_assign_concat more generally. + * eval.c (r_tree_eval): Improve Node_assign_concat code to temporarily + increase the stref on `l' to avoid side effects during evaluation of + `r'. This makes test/nasty.awk work. Ouch. + +Tue Jun 30 22:10:37 2009 Arnold D. Robbins + + * floatmagic.h: New file. + * builtin.c (format_tree): Use functions defined in floatmagic.h. + +Tue Jun 30 21:57:47 2009 Arnold D. Robbins + + * configure.ac, Makefile.am: Add new --disable-libsigsegv command line + option to configure. + (LIBSIGSEGV, SEGVINCLUDE, SEGVSUBDIR): New variables that will be empty + if libsigsegv is disabled so nothing will happen, and that will have the + right values otherwise. They are then substituted into the Makefile. + +Wed Jun 24 23:00:10 2009 Arnold D. Robbins + + * bootstrap.sh: Revised. Now works again. We think. (CVS-only file) + +Wed Jun 24 21:57:30 2009 Arnold D. Robbins + + * custom.h: Move z/OS EXIT_FAILURE definition from here to ... + * awk.h: Here. Define at end after regular definition. + +Thu Jun 18 06:17:38 2009 Scott Deifik + + * awk.h: Don't define HAVE_SIGSEGV_H for DJGPP. + +Thu Jun 18 05:38:42 2009 Dave Pitts + + * custom.h: Changes needed for z/OS. + +Wed Jun 10 08:22:53 2009 Arnold D. Robbins + + * node.c (parse_escape): Add a lint warning if \x.. has more than two + hex digits. + +2009-06-08 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17. + +Mon Jun 8 22:13:49 2009 Arnold D. Robbins + + Update to Autoconf 2.63, Automake 1.11, Libtool 2.2.6a + + * ltmain.sh: New file. + * configure.ac: Changes to keep infrastructure tools happy. + * alocal.m4, configure: Regenerated. + * Makefile.in, */Makefile.in: Regenerated. + +Mon Jun 8 07:43:25 2009 John DuBois + + * builtin.c (mbc_byte_count, mbc_char_count): Make sure all declarations + come before executable code, for older compilers. + * dfa.c (insert): Ditto. + * io.c (devoopen): Ditto. + +Thu May 21 21:11:44 2009 Arnold D. Robbins + + Add simple constant folding. + + * awk.h (do_optimize): New declaration. + (calc_exp): Add declaration. + * eval.c (calc_exp): Make non-static. + * main.c (do_optimize): New variable. + (opttab): Add new entry for --optimize. + (main): Add 'O' to optlist and code for argument parsing. + (usage): Update for new option. + * awkgram.y (Node_concat, Node_exp, Node_times, Node_quotient, Node_mod, + Node_plus, Node_minus): Call `constant_fold' to create the node in + the tree. + (constant_fold): New function. + +Fri May 15 16:02:01 2009 Arnold D. Robbins + + * awk.h (getnode): For MPROF: Fix a typo. + +Fri May 15 14:10:44 2009 Arnold D. Robbins + + Function arguments cannot be reserved variable names, per POSIX. + + * main.c (struct varinit): Add flags member. + (varinit): Add values for flags member (one or both of NON_STANDARD + or NO_INSTALL). Add entries for the rest of the gawk variables and + sort them, so that the table can be searched by ... + (is_std_var): New routine to see if a name is a standard variable. + * awk.h (is_std_var): Add declaration. + * awkgram.y (func_install): Use new routine and issue error. + +Wed Apr 22 07:42:05 2009 Arnold D. Robbins + + * builtin.c (sub_common): In code for handling \ replacements, + first make sure that is within the range of parentheses sets + given, and then make sure that the subpattern start is not -1, meaning + that something actually matched. Thanks to Martin Olsson + for the bug report. + (do_length): Add a lint warning if `length' is passed an untyped + argument. + +Thu Apr 16 22:59:32 2009 Arnold D. Robbins + + * eval.c (func_call): Save nloops_active; if after function returns + the actual nloops_active is greater than the saved value, it means + there was a return inside the loop body, so pop off the necessary + number of loops. Bug reported by Aleksey Cheusov . + Gawk was not leaking memory - that is, things were still pointed + to, but memory use could keep on growing. + +Fri Mar 27 10:59:11 2009 Arnold D. Robbins + + * builtin.c (format_tree): Add lint warnings for fieldwidth and/or + precision in %%, and add lint warning for unknown format specifier + (e.g. %b). Thanks to "joanes.polus" for + the report. + +Wed Mar 18 18:15:41 2009 Pat Rankin + + * awk.h (EXIT_SUCCESS, EXIT_FAILURE): Move VMS-specific values + to vms/vms-conf.h. + (EXIT_FATAL): Define here instead of in msg.c. + * msg.c (EXIT_FATAL): Move definition to awk.h. + +Mon Mar 16 18:58:09 2009 Pat Rankin + + * main.c [#if HAVE_SIGSEGV_H]: For the #else case (VMS), + (stackoverflow_context_t): Dummy typedef for use in prototypes; + (stackoverflow_install_handler): Make macro expand to 0 rather + than nothing so that (void) cast on invocation of it works. + + * main.c (catchstackoverflow): Don't return 0 from void function. + +Wed Feb 25 21:34:14 2009 Arnold D. Robbins + + * awkgram.y (tokentab): Have only one copy of BEGIN / END. + (tokcompare): New function. + (check_special): Sort tokentab for EBCDIC systems. + +Sun Feb 15 22:39:30 2009 Arnold D. Robbins + + * profile.c (pp_delete): Print tree->exec_count to actually get + the value printed. Thanks to Hermann Peifer + for reporting the bug. + +Thu Feb 12 21:54:34 2009 Arnold D. Robbins + + * awkgram.y: Change to use EXIT_FAILURE. + * msg.c [EXIT_FATAL]: New macro. + * msg.c (r_fatal): Change to use EXIT_FATAL. + Thanks to Pat Rankin for pointing these out. + * re.c (reflags2str): Account for RE_SYNTAX_EMACS. + * awk.h: If not VMS, define HAVE_SIGSEGV_H. + * main.c: Check HAVE_SIGSEGV_H before including . If not + there, define dummy macros. + (catchsegv, catchstackoverflow): Remove unneeded comment. Add return 0 + for compilers that care. + +Mon Feb 9 05:24:52 2009 Arnold D. Robbins + + * awk.h [CONST]: Renamed CONSTANT to avoid conflict with libsigsegv + on Windows. + * awkgram.y, field.c, re.c: Update all uses. + +Tue Feb 3 22:46:59 2009 Arnold D. Robbins + + * io.c (do_close): Wrap updating of ERRNO in check for not + do_traditional. + +Sat Jan 31 23:14:00 2009 Arnold D. Robbins + + * builtin.c (format_tree): For '%s', don't count the multibyte + characters if we are just copying all the characters. Gives + big speedup. Thanks to Hirofumi Saito + for reporting the problem. + +Thu Jan 29 21:14:30 2009 Arnold D. Robbins + + * field.c (parse_field, re_parse_field, def_parse_field, + posix_def_parse_field, null_parse_field, sc_parse_field, + fw_parse_field): Add new last arg `in_middle'. Ignored by all + except re_parse_field. + (re_parse_field): Enhance logic to only allow ^ in a regex to match + if indeed at the beginning of a record. + (getfield): Adjust call to parse_field. + +Tue Jan 27 21:42:47 2009 Arnold D. Robbins + + Changes suggested by Toni Schilling , + as modified by feedback from Pat Rankin, and some help + from me. + + * awk.h [WEXITSTATUS]: Improve definition for MSC and VMS. + [EXIT_SUCCESS, EXIT_FAILURE]: Define if they aren't. + * io.c, main.c, profile.c: Switch to using EXIT_xxx instead of + 0 and 1. + (main): Use constants instead of 0/1 for exit_val variable. + * eval.c (interpret): Map exit value from `exit' statement into + success / fail constants for VMS for exit_val variable. + +Tue Jan 20 07:35:34 2009 Arnold D. Robbins + + * regex.h: Define __USE_GNU if not _LIBC; needed for non-GLIBC + systems such as, oh say, Mac OS X. + +Tue Jan 13 09:23:40 2009 Arnold D. Robbins + + * regex.c, regex_internal.h: Remove some changes that are no + longer needed after sync with GLIBC. + +Mon Jan 12 22:27:10 2009 Arnold D. Robbins + + Bi-annual sync with GLIBC. + + * regexec.c, regex.h, regex_internal.c, regcomp.c, regex_internal.h, + regex.c: Reapply any portability patches specific to gawk. + * getopt.c: Sync with GLIBC. + + Base versions: + getopt.c 1.57 Thu Jan 8 20:02:05 2009 + getopt.h 1.21 Fri Mar 19 00:19:32 2004 + getopt1.c 1.10 Tue Mar 9 10:35:37 2004 + getopt_int.h 1.1 Tue Mar 9 10:31:19 2004 + regex.c 1.129 Tue Sep 6 20:49:44 2005 + regexec.c 1.99 Thu Jan 8 20:02:06 2009 + regexec.c 1.99 Thu Jan 8 20:02:06 2009 + regex.h 1.43 Wed Jan 16 10:09:47 2008 + regex_internal.c 1.69 Thu Jan 8 20:02:06 2009 + regex_internal.h 1.76 Thu Jan 8 20:02:06 2009 + regcomp.c 1.120 Thu Jan 8 20:02:06 2009 + +Mon Jan 5 23:07:58 2009 Arnold D. Robbins + + * io.c (devopen): Add a retry to calls to socketopen. Tunable + via undocumented GAWK_SOCK_RETRIES environment variable. Based + on code from Juergen Kahrs after a + suggestion from Hermann Peifer . + +Mon Jan 5 22:48:39 2009 Arnold D. Robbins + + * io.c (redirect): A getline from a directory is no longer + fatal; instead it returns -1. Thanks to Paolo + for the report. + +Mon Dec 29 22:04:57 2008 Arnold D. Robbins + + * builtin.c (format_tree): Case for 's', improve logic for setting + the number of characters to copy, also at pr_tail. Based on + bug report by Hermann Peifer . + +Thu Dec 11 21:23:50 2008 Arnold D. Robbins + + * builtin.c (do_length): If the wide string has zero length + but the bytes are more than zero, use the number of bytes. + (do_index): Similar also: fall back to byte count if the + bytes don't make a wide-character string. + Bug reported by "Carlos G." + + (do_substr): If defaulting to length of rest of the string, + do it based on the wide char string if it's valid. + +Fri Dec 5 11:12:11 2008 Arnold D. Robbins + + * io.c (free_rp): New function. + (redirect): Improved logic for yesterday's change, including + use of free_rp. + (close_redir): Use free_rp. + +Thu Dec 4 22:35:05 2008 Arnold D. Robbins + + * io.c (redirect): Only put the new struct redirect into + the list if the file or pipe could actually be opened. Fixes + a bug with the wrong return value of close, noticed by + Seb . + * dfa.c (parse_bracket_exp_mb): Don't zero out work_mbc->chars + after we malloc'ed it. Fixes a leak found by valgrind when + using UTF-8. (Hmmm. This got fixed in January 2007; It seems + to have crept back into the code in the August 2007 merge with + GNU grep. Sigh.) + +Mon Oct 20 11:47:59 2008 Arnold D. Robbins + + * configure.ac: Add -g3 and -gdwarf-2 to CFLAGS if compiling with + GCC and doing development. Should have done this ages ago. + +Sun Aug 31 22:03:55 2008 Arnold D. Robbins + + * eval.c (set_BINMODE): Tighten up the code even more so + that it matches the documentation. + +Mon Aug 25 22:41:47 2008 Arnold D. Robbins + + * eval.c (set_BINMODE): Tighten up the code to only allow + certain reasonable values when setting BINMODE. + +Fri Aug 22 14:43:49 2008 Arnold D. Robbins + + * io.c (nextfile): Users Strong In The Ways Of The Source can use + non-existant files on the command line without it being a fatal error. + +Wed Jul 30 23:10:51 2008 Arnold D. Robbins + + * re.c (research): Don't ever use DFA if need_start. It can + break on some weird cases. Reported by + "T. X. G." . + +Wed Jul 30 22:27:20 2008 Arnold D. Robbins + + * builtin.c (do_match): Add MAYBE_NUM flag to elements of array + created by `match' since data could come from user. Similar + semantics to `split'. Thanks to Dr. Dirk Zimoch + for reporting the bug. + +Tue Jun 24 07:44:06 2008 Arnold D. Robbins + + * dfa.c (insert): Reworked for significant speed improvement + by Johan Walles . Imported from grep + bug list. + * profile.c (tree_eval): Do a return after all the built-in + variables instead of a break. Thanks again to Hermann Peifer + for finding the problem. + +Sun Jun 22 23:08:14 2008 Arnold D. Robbins + + * node.c (format_val): Restore old code to use %ld when the value + is within the range of a long; improves performance noticably for + applications that convert integers to strings. Use %.0f only for + integral values that are outside the range of a long. Thanks to + Hermann Peifer for pointing out the existence + of a problem. + +Fri May 23 12:08:24 2008 Arnold D. Robbins + + * dfa.c (epsclosure): Change type of `visited' from int to char for + potential speedup. Based on bug report to bug-grep list from + Johan Walles . + +Wed May 14 05:55:48 2008 Arnold D. Robbins + + * builtin.c (format_tree): For `%c' case, add a lint warning + if the value is greater than 255. + (mbc_byte_count, mbc_char_count): Remove unused variable `i'. + +Thu Apr 24 20:31:03 2008 Bruno Haible + + * main.c (main): Move call to catch SIGBUS to before installation of + libsigsegv handler, since on some systems libsigsegv installs its + own handler for SIGBUS. + [STACK_SIZE]: Add a constant instead of inline. ADR. + +Wed Apr 23 22:30:27 2008 Duncan Moore + + * builtin.c (state): Do as an integer array for systems that need it. + (do_rand, init_rand): Modify call to `initstate' as needed. + +Wed Apr 23 22:22:06 2008 Arnold D. Robbins + + * dfa.c (prednames): Add an extra zero to final initializer to + silence a compiler warning. Reported by Duncan Moore + . + +Wed Apr 23 21:36:06 2008 Steffen Schuler + + * field.c (fw_parse_field): Add code for multibyte case. + +Sat Mar 15 22:17:21 2008 Arnold D. Robbins + + * builtin.c (do_length): Handle the case of the parameter being + an array that was a function parameter. + +Tue Mar 11 22:49:11 2008 Kimura Koichi + + * builtin.c (format_tree): Fix call to mbc_byte_count to pass the + right number of characters based on the format type. + +Tue Mar 11 22:31:58 2008 Arnold D. Robbins + + * libsigsegv: Incorporated into the dist. + * Makefile.am (SUBDIRS): Added. Make it first so that the library + is built before gawk is. + (LDADD): Add the library. + (AM_CPPFLAGS): Add -I option to find header. + * configure.ac: Add call to AC_CONFIG_SUBDIRS for libsigsegv. + * main.c (catchsegv, catchstackoverflow): New functions. + (main): Call into sigsegv library with them. + +Tue Mar 4 21:02:25 2008 Arnold D. Robbins + + * builtin.c (mbc_char_count, mbc_byte_count): New functions to return + the number of m.b. chars there are and the number of bytes needed to + copy them. + (format_tree): Use them for %s and %c cases to adjust precision and + for copying characters at pr_tail label. + +Thu Feb 14 14:05:01 2008 Arnold D. Robbins + + * main.c (init_args): Adjust type of third arg to remove warning from + GCC 4.2, add cast in call to make_string. Bleah. + +Fri Jan 25 12:13:39 2008 Dave Pitts + + * README_d/README.zos: New file. + * Makefile.am: Add sed on y.tab.c to convert older Bison "parse error" + messages to "syntax error" messages. + * configure.ac: Added ZOS_USS changes. + * m4/arch.m4: Added ZOS_USS changes. + * m4/inttypes_h.m4: Added ZOS_USS changes. + * m4/inttypes.m4: Added ZOS_USS changes. + * m4/stdint_h.m4: Added ZOS_USS changes. + * awkgram.y: Added USE_EBCDIC changes for EBCDIC collating sequence. + * awk.h: Added ZOS_USS compile changes. + * eval.c: Added EBCDIC casetable and ZOS_USS changes. + * regcomp.c: Added btowc function for ZOS_USS. + * regex.h: Changed __string to __cstring to avoid ZOS_USS header usage. + * regex_internal.h: Added ZOS_USS changes and type defines. + +Sun Jan 13 08:16:38 2008 Arnold D. Robbins + + * dfa.c (epsclosure): Replace MALLOC + zero-out-loop with CALLOC for + large potential speedup, based on bug report to bug-grep list from + Johan Walles . + (dfaanalyze): Made a similar change. + +Fri Dec 21 11:22:16 2007 Arnold D. Robbins + + * profile.c (pprint): Add a missing `#ifdef PROFILING'. + +Thu Dec 13 22:19:19 2007 Arnold D. Robbins + + * profile.c (parenthesize): Remove "!" from output string. + (tree_eval): Fix quotes for delete array case. + (pp_var): New function, call it as appropriate everywhere else. + +Fri Nov 30 11:11:52 2007 Arnold D. Robbins + + * io.c (socketopen): Use NULL as first argument to `getaddrinfo' + if any_remote_host is true. Should help on Non-GLIBC systems. + +Thu Nov 15 22:01:36 2007 Arnold D. Robbins + + * io.c (two_way_open): Case for ptys. Change search for letters + to avoid ASCII / EBCDIC problems. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Sun Oct 14 23:19:12 2007 Ralf Wildenhues + + * Makefile.am: Avoid GNU make-specific `make -C'. + +Sun Oct 14 19:37:01 2007 Arnold D. Robbins + + * configure.ac: Add check for `atexit', needed by replacement + version of `snprintf'. + +Sun Sep 30 21:50:59 2007 Arnold D. Robbins + + Rationalize locale's influence on %'g, strtonum, and input. + + * awk.h (use_lc_numeric): Add declaration. + * builtin.c (format_tree): Add check for quote_flag and set + LC_NUMERIC so that The Right Thing gets done, then reset it. + (do_strtonum): Pass use_lc_numeric as second arg to isnondecimal. + * main.c (main): Have do_posix set use_lc_numeric also. + +Thu Sep 27 21:36:23 2007 Stepan Kasal + + * configure.ac: Do not instantiate version.c; remove the hack + to keep version.c from being removed upon `make distclean'. + * Makefile.am (version.c): New rule. + (.c.i, SUFFIXES): Remove, `.i' is unused. + (MAINTAINERCLEANFILES): Remove awkgram.c; Automake takes care of that. + +Wed Sep 26 14:40:13 2007 Eli Zaretskii + + * builtin.c (format_tree): Handle non-standard snprintf that + returns a negative value when the buffer is too small. + +Tue Sep 25 23:27:41 2007 Arnold D. Robbins + + * ChangeLog: Removed all leading spaces. Fixed up formatting of + entries to have capital letter after the colon. Fixed a number of + entries to have the '*' in the right place. ASCII instead of ascii. + Capitalize Linux. (Is this anal-retentive or what? Sheesh.) + +Tue Sep 25 08:24:11 2007 KIMURA Koichi + + * awk.h: Add include of for Visual Studio. + * regex_internal.h: Do the right thing for replacing alloca. + +Sat Sep 22 23:26:27 2007 Arnold D. Robbins + + * field.c (set_FIELDWIDTHS): Restore behavior of 3.1.4 that allowed + FIELDWIDTHS to be "" without crashing, and such a value has NF = 0. + Yet Another Dark Corner. Thanks to Glenn Zazulia + for pointing out the problem. + + Unrelated: + + * builtin.c (format_free): Make `quote_flag' not sticky. Thanks to + Ulrich Drepper for pointing this out. + * main.c (main): Adjust calls to `setlocale' and `localeconv' so that + the %'d flag will work even if not using the locale's decimal point. + +Thu Sep 20 21:02:41 2007 Arnold D. Robbins + + * array.c (hash, awk_hash, gst_hash_string): Add fourth argument + pointer to retrieve code. Only assign a value if not NULL. + Fix most places to pass NULL for fourth argument. + (assoc_lookup): Save the code in the node for use in growing the + array later. + (grow_table): Use the saved code instead of recomputing each time. + * awk.h (NODE hash): Add `code' member and `ahcode' macro. + (hash): Revise declaration. + * awkgram.y: Revise calls to `hash'. + +Tue Aug 21 17:47:07 2007 Arnold D. Robbins + + * main.c (copyleft): Cite version 3 of the license. + * dfa.c: Minor edits to sync with grep 2.5.3. + +Sat Aug 11 22:48:11 2007 Arnold D. Robbins + + * COPYING: Replaced with GPL 3. + * All other relevent files: Upgraded to GPL 3. + +Fri Aug 3 15:01:38 2007 Andrew J. Schorr + + * builtin.c (format_tree): Free `obuf' before call to `fatal' + to keep valgrind happy. + +Mon Jun 4 01:12:21 2007 Arnold D. Robbins + + * All relevant files: Updated copyright year to 2007. + +Mon May 28 08:06:15 2007 Arnold D. Robbins + + * main.c (use_lc_numeric): New variable, true for new + option `--use-lc-numeric'. + (optab): Add option "use-lc-numeric". + (usage): Add to usage message. + (main): Allow the --use-lc-numeric option to also use the + local decimal point. + +Fri May 18 16:26:00 2007 Arnold D. Robbins + + * awk.h (_TANDME_SOURCE): Add test for ! _SCO_DS for + SCO systems. Thanks to John DuBois + +Tue May 15 13:14:04 2007 Arnold D. Robbins + + General capability suggested by Michael May . + + * configure.ac: New option --disable-directories-fatal. Makes gawk + silently skip directories on the command line. + * io.c (iop_open): Add fourth parameter, pointer to flag which is set + to true if the file is a directory. In this case, close the fd and + return NULL. + (nextfile): Modify call to iop_open. Add logic to check for directory + and skip if --disable-directories-fatal was used. If the configure flag + was not used, then if do_traditional also skip. + (redirect): Modify call to iop_open and call fatal if isdir is true. + +Mon May 7 14:51:54 2007 Arnold D. Robbins + + * POSIX.STD: Updated. + +Wed May 2 19:29:56 2007 Stepan Kasal + + Revert precedence of concatenation and | getline. + From mail dated 2005-10-31. + + * awkgram.y (common_exp): Move the two rules for naked regexp and + the rule for "(...) in arr" to ... + (non_post_simp_exp): ... here ... + (simp_exp): ... and here, respectively. Fixes test/parsefld.awk/. + (simp_exp_nc): New nonterminal, needed to fix the + precedence of concatenation over "|getline". + (common_exp): Can also start with simp_exp_nc. + +Tue May 1 19:53:11 2007 Arnold D. Robbins + + Work around problem with /ab{0}c/. + * dfa.h (struct dfa): Add member `broken'. + * dfa.c (dfainit): Initialize it to false. + (lex): Set it if `minrep == maxrep && minrep == 0'. + * re.c (avoid_dfa): Check flag and return TRUE if set. + +Tue May 1 05:34:53 2007 Arnold D. Robbins + + * configure.ac: Add calls to AM_LANGINFO_CODESET, and gt_LC_MESSAGES. + Thanks to Matthew Burgess . + +Sun Apr 29 22:55:12 2007 Arnold D. Robbins + + * regcomp.c (utf8_sb_map): Remove const if not __GNUC__ >= 3. + * regex_internal.h (re_dfa_t): Bracket bizarre macro call with + check for _LIBC. + Thanks to Nelson Beebe for finding both problems. + +Sun Apr 29 13:10:31 2007 Arnold D. Robbins + + * builtin.c (do_strftime): Add optional third argument to strftime() + which if non-zero or non-null means to use UTC. + * awkgram.y (tokentab): Allow three arguments to strftime. + +Fri Apr 27 11:44:27 2007 Arnold D. Robbins + + * README.cvs, bootstrap.sh: Added to CVS archive, not for + inclusion in tarballs. + +Fri Apr 20 16:48:30 2007 Pat Rankin + + * awk.h: Move inclusion of redirect.h before HAVE_func blocks. + +Tue Apr 24 21:55:36 2007 Arnold D. Robbins + + * re.c (research): In the multibyte case, fall back to the full + matcher if need_start, since there are bugs in the dfa matcher + in some obscure cases. Sigh. + * builtin.c (format_tree): When using %.0f instead of %d, assert + that we're not malloc-ing zero. + +Tue Apr 17 21:51:40 2007 Arnold D. Robbins + + Portability fixes for lsbcc from Nelson Beebe. + + * configure.ac: Check for stddef.h header. + * regex.h: Use check and include header to get size_t definition. + * main.c: Update UPDATE_YEAR, add #ifdef for HAVE_MTRACE. + +Tue Apr 17 13:49:13 2007 Arnold D. Robbins + + * configure.ac: Add test for struct sockaddr_storage. + * io.c: Add macro to redefine sockaddr_storage as sockaddr. + +Tue Apr 17 05:45:19 2007 Arnold D. Robbins + + * io.c (get_a_record): Make it static, to match declaration at the + top of the file. (Thank you GCC for not reporting this. Grr.) + +Fri Apr 13 00:29:24 2007 Arnold D. Robbins + + * replace.c: Only include missing/getaddrinfo.c if HAVE_SOCKETS + is defined. Avoids problems on VMS. Thanks to Pat Rankin. + +Tue Apr 10 18:53:04 2007 Arnold D. Robbins + + * awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c, + node.c: Added some sanity to the lint warnings, to only + print them once if they are syntactic or of the type where + they don't need to be repeated. Switch to `short' instead + of `int', and in general use a variable named `warned', for + consistency. + +Sun Apr 8 16:49:28 2007 Arnold D. Robbins + + * awkgram.y: Add guard code to ifdef out "signed" for VMS. Thanks for + the heads-up to Pat Rankin. + * regcomp.c (utf8_sb_map, init_dfa): Move non-GCC code to initialize + this array into code, to preserve word-size independance. + * configure.ac: Add check for . + * io.c: Include if we have it, instead of keyed off + Tandem, needed on some Unix systems. + * awk.h, main.c, msg.c, awkgram.y: Move to use of CAN_USE_STDARG_H + instead of continuously repeating check for header and defined STDC + and STDC. Thanks to Pat Rankin. + +Fri Apr 6 15:28:09 2007 Arnold D. Robbins + + * builtin.c (do_length): Only print `length(array)' lint warning once. + * node.c (dump_wstr): Restore from being ifdef'ed out. Useful in case + it needs to be called from a debugger. + * regcomp.c (utf8_sb_map): Fix gcc-specific code. + * awk.h (snprintf): Add declaration in case not available on the system. + (Ceil, Floor): Add macros changing the name for VMS, in an attempt to + fix linkage problems. + * io.c: Simplify includes for internet headers and for getaddrinfo + defines. + +Wed Apr 4 23:38:24 2007 Arnold D. Robbins + + * io.c [AI_ADDRCONFIG]: Add a definition in case it's not available. + * main.c (usage): Add comment for translators to add translation + bug report address. + +Wed Apr 4 18:26:45 2007 Pat Rankin + + * regexec.c (build_trtrable): Add missing #if HAVE_ALLOCA. + +Thu Mar 29 19:30:20 2007 Pat Rankin + + * re.c (make_regexp): Cast casetable to RE_TRANSLATE_TYPE. + +Mon Mar 19 12:35:00 2007 Arnold D. Robbins + + Finish removing references to STRTOD_NOT_C89. + + * awk.h (gawk_strtod): Use now if there is no strtod. + * replace.c (strtod.c): Include if there is no strtod. + * configure.ac [GAWK_AC_FUNC_STRTOD_C89]: Removed. + +Mon Mar 19 12:17:16 2007 Kimura Koichi + + * dfa.c (dfaexec): Add check for half-width katakana characters in + character classes in ShiftJIS locale. + From mail originally sent Mon, 01 Aug 2005 09:07:55 +0900 + +Fri Mar 9 11:53:25 2007 Arnold D. Robbins + + * field.c (rebuild_record): Assert that wide string is off when + creating new fields. Inspired by Karel Zak. + +Fri Mar 9 11:26:01 2007 Matthew Woehlke + + * io.c (get_a_record): Limit the max amount read to SSIZE_MAX. Needed + on Tandem systems where this amount is incredibly small. + +Tue Mar 6 08:17:49 2007 Paul Eggert + + * node.c (is_ieee_magic_val): Don't rely on strncasecmp; it mishandles + ASCII bytes in some locales. + (get_ieee_magic_val): Use strtod if it works, relying on our handbuilt + code only if it doesn't work. This is more likely to do the right + thing with strings like "-nan". + +Tue Feb 27 20:51:29 2007 Arnold D. Robbins + + * configure.ac (AM_PROG_CC_STDC): Removed, per email suggestion + from Stepan Kasal some time ago. + +Tue Feb 27 20:44:07 2007 Aleksey Cheusov + + * awk.h: Revise checks for MEMCPY_ULONG and MEMSET_ULONG + for MS Interix using MSVC. + * configure.ac (AC_CHECK_FUNCS): Add checks for memcopy_ulong + and memset_ulong. + From mail dated Tue Aug 30 12:38:39 2005. + +Mon Feb 26 12:47:10 2007 Tony Leneis + + * dfa.c (dfacomp): Check that regexp is non-zero in length + also. Avoids problems with empty regex and IGNORECASE on + systems where `malloc(0)' returns a non-NULL pointer. + From mail dated Wed, 26 Oct 2005 15:42:07 -0700. + +Wed Feb 21 10:23:12 2007 Arnold D. Robbins + + * floatcomp.c (Floor, Ceil): Restore correct expression for Cray. + Then ifdef out the whole business, since it's likely to be obsolete. + Thanks to Paul Eggert. + +Mon Feb 19 12:28:47 2007 Arnold D. Robbins + + * node.c (format_val): Simplify code: always format the value + ourselves. Use %.0f if the value is integral. + * floatcomp.c (dval_out_of_range): Remove function, not needed. + (awknum_fraction_bits): Removed. + (adjust_uint): New function, defined IFF have uintmax_t. + * builtin.c (tmp_integer): Use adjust_uint. + Move include of and ... + * awk.h: to here. + (awknum_fraction_bits): Removed. + (adjust_uint): Declare, or define as do-nothing macro. + +Sun Feb 18 17:43:33 2007 Arnold D. Robbins + + * node.c, floatcomp.c: Add include of to get + correct declarations of math functions. + * configure.ac: If doing development, add -DYYDEBUG and also + -fno-builtin for GCC. + +Wed Feb 14 19:42:08 2007 Arnold D. Robbins + + Add support for special infinity and NaN values in non-POSIX + mode, and in POSIX mode, just call system `strtod'. + + * configure.ac [GAWK_AC_FUNC_STRTOD_C89]: Comment out. + * node.c (is_ieee_magic_val, get_ieee_magic_val): New functions. + (r_force_number): Adapt logic and use new functions. + +Tue Feb 13 13:02:32 2007 Arnold D. Robbins + + Move Paul's numeric stuff to a separate file to make code cleaner. + + * floatcomp.c (awknum_fraction_bits): New variable. + (Floor, Ceil): Functions, moved here from macros in builtin.c. + (dval_out_of_range): New function for checking if double is in range + of long. + (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG, AWKSMALL_MANT_DIG, + AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): Moved here from awk.h. + * awk.h: Add decls of stuff now in floatcomp.c. + * Makefile.am[base_sources]: Add floatcomp.c. + * builtin.c (tmp_integer): Refer to `awknum_fraction_bits' + instead of AWKNUM_FRACTION_BITS. + * node.c (format_val): Call `dval_out_of_range' instead of + inline coding the test. + +2007-02-06 Paul Eggert + + * node.c (format_val): Fix bug when handling numbers close to + LONG_MIN and LONG_MAX. + * awk.h (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG, AWKSMALL_MANT_DIG, + AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): Moved here from builtin.c. + * builtin.c: Move those macros to awk.h. + * awk.h (DBL_FRACTION_BITS): New macro. + +Fri Feb 9 13:40:10 2007 Matthew Woehlke + + More Tandem fixes. + + * configure.ac: Check in Tandem's zrldsrl library for dlopen. + * regex_internal.h: Move include into ifdef. + * regexec.c: Bracket alloca uses. Fix GCC use of `?:'. + +Fri Feb 9 13:30:15 2007 Arnold D. Robbins + + * replace.c: Add include of snprintf.c. Ooops! + * configure.ac: Add check for mkstemp and tmpfile for replacement + snprintf.c. + +Tue Feb 6 14:33:51 2007 Arnold D. Robbins + + * node.c (format_val): Restructure a bit to remove need for and + use of goto. + +Sun Feb 4 16:35:21 2007 Arnold D. Robbins + + * awkgram.y (field_spec, opt_incdec): New terminals. + (variable): Change definition of field reference to use field_spec. + See test/parse1.awk. + +Thu Feb 1 17:38:38 2007 Arnold D. Robbins + + * main.c: Allow YYDEBUG to enable the `-D' option, not just + GAWKDEBUG. + +Wed Jan 31 19:30:26 2007 Arnold D. Robbins + + * node.c (format_val): Restore my test for numeric values + being representable, as it includes more conditions than + Andrew's, pending a thorough review of undealt-with emails on + the topic. + * regexec.c (proceed_next_node): Move check for NULL to after + variable declarations inside initial `if'. + +Wed Jan 31 19:25:21 2007 Andrew J. Schorr + + * configure.ac (getaddrinfo): Improve test, since this function + can be in libsocket on some systems. + +Mon Jan 29 15:33:10 2007 Andrew J. Schorr + + * Makefile.am (valgrind): Also call new valgrind-scan target. + +Mon Jan 29 12:44:54 2007 Andreas Schwab + + * dfa.c (copytoks): Adjust index into multibyte csets when + copying an MBCSET token. + +Fri Jan 26 20:01:38 2007 Andrew J. Schorr + + * node.c (format_val): Test whether a numeric value is integral + simply by converting it to long and then back again, and checking + if the value matches. That's more robust than trying to test + whether the floating-point value is representable as a long. + * builtin.c (format_tree): Fix buffer overflow bug, off-by-one errors + in checking snprintf return codes, and use "%.0f" to implement "%d" + formatting. For octal or hex formatting, test whether the value + is integral by trying to convert back to floating point and seeing + if the value matches. This is more robust than trying to test + whether the floating-point value is representable as an integer. + +Tue Jan 23 17:49:28 2007 Arnold D. Robbins + + * io.c (socketopen): Initialize socketfd to avoid "may be used + uninitialized" warning. + * regexec.c (regexec, re_search_stub): Removed unused variable `dfa'. + * builtin.c (wide_tolower_toupper): Fix signedness of pointer in + allocation calls and in call to make_str_node. + +Mon Jan 22 12:57:19 2007 Kimura Koichi + + Deal with halfwidth katakana in SJIS locale inside character ranges. + Based on http://sources.redhat.com/bugzilla/show_bug.cgi?id=1149. + Changes affect non-__LIBC code only. + + * regcomp.c (re_compile_fastmap_iter): Handle half-size characters. + * regexec.c (check_node_accept_bytes): Same. + +Thu Jan 18 22:19:01 2007 Karel Zak + + * node.c (free_wstr): Assert that type is Node_val. + +Thu Jan 18 12:18:47 2007 Arnold D. Robbins + + * regcomp.c (re_compile_fastmap_iter): Declare `dfa' to be + be volatile. Fixes valgrind problem with the ignrcase test. + Sheesh. Gawk should now be valgrind-clean. We hope. + +Mon Jan 15 14:28:04 2007 Arnold D. Robbins + + Use getaddrinfo instead of gethostbyname, to handle IPV6 + format addresses. Based on patch submitted by + Jan Pazdziora . + + * configure.ac: Add getaddrinfo to list of checked functions. + * configh.in, configure: Regenerated. + * io.c: Rework includes based on HAVE_GETADDRINFO. + (socketopen): Reworked for getaddrinfo. + (devopen): Modified for new socketopen. + * replace.c: Include getaddrinfo.c if necessary. + +Sun Jan 14 12:19:53 2007 Arnold D. Robbins + + * awkgram.y: For bad name in array subscripting, build a + valid node anyway to avoid invalid reads reported by valgrind. + * dfa.c (parse_bracket_exp_mb): Remove assignment of NULL + to work_mbc->chars, was losing data malloc'ed earlier. Thanks + to valgrind. + (state_index): Alway initialize d->states[i].mbps elements to zero. + (dfafree): Free allocated d->states[i].mbps.elems if needed. + * regex.c: Try harder to undef alloca. + * regex_internal.h (__mempcpy): Undef before redefinining for + more recent versions of GLIBC. + +Sat Jan 13 22:10:43 2007 Arnold D. Robbins + + * node.c (str2wstr): For count of zero from mbrtowc, set count to 1 + and fall through to code that copies. Originally from Paul Eggert. + + Unrelated: + * configure.ac: Add call to AC_USE_SYSTEM_EXTENSIONS, should help + on Tandem. This lets us remove AC_AIX and AC_MINIX. + + From Matthew Woehlke for Tandem: + + * awk.h (_TANDEM_SOURCE): Also define _XOPEN_SOURCE_EXTENDED. + * io.c (_TANDEM_SOURCE): Include more headers. + +Sat Jan 13 21:53:48 2007 Ralf Wildenhues + + * field.c (set_FIELDWIDTHS): Avoid writing one past the end of + the array. + * node.c (r_force_number): Avoid reading uninitialized variable. + +Sat Jan 13 21:37:15 2007 Arnold D. Robbins + + * Makefile.am (valgrind): New target based on idea from + Ralf Wildenhues for running valgrind on test suite. + +Sat Jan 13 21:24:54 2007 Ralf Wildenhues + + Enable more `--lint-old' warnings. + * awkgram.y: Warning about multiple BEGIN or END rules, + `index in array' outside of for loops, multidimensional arrays. + * field.c (set_FS): Warn about regex FS. + * node.c (parse_escape): Warn about `\b', `\f', `\r'. + +Sat Jan 13 20:56:56 2007 Arnold D. Robbins + + * node.c (wcasestrstr): Revert use of continue, reinstate goto. + Thanks to Andrew Schorr. + (free_wstr): Move zeroing of wsptr and wslen and clearing of flag + back outside the if. + * field.c (rebuild_record): In loop that copies fields to new record, + add call to `free_wstr'. This ensures that flag values are correct + and avoids double free later. Thanks to Karel Zak for pointing out + the problem. + +Fri Jan 12 14:01:51 2007 Dmitry V. Levin + + * builtin.c (do_match): In addition to "gawk_mb_cur_max > 1" check, + check for positive string length. + +Fri Jan 12 13:57:20 2007 Arnold D. Robbins + + Sync with GLIBC. Bi-annual this time. + + * regexec.c, regex.h, regex_internal.c, regcomp.c: + Reapply any portability patches specific to gawk. + * regex_internal.h (build_wcs_upper_buffer): Fix return type + in declaration. Reapply any portability patches specific to gawk. + * regex.c: Add definitions for `bool', `true' and `false'. + Define `alloca' to something invalid to keep it from linking + in case a usage of `alloca' slipped through. Reapply any portability + patches specific to gawk. + + Base versions: + getopt1.c 1.10 Tue Mar 9 10:35:37 2004 + getopt.c 1.55 Fri Mar 24 10:59:56 2006 + getopt.h 1.21 Fri Mar 19 00:19:32 2004 + getopt_int.h 1.1 Tue Mar 9 10:31:19 2004 + regex.c 1.129 Fri Mar 24 10:59:57 2006 + regexec.c 1.97 Fri Mar 24 10:59:57 2006 + regex.h 1.40 Mon Sep 25 20:03:05 2006 + regex_internal.c 1.67 Mon Sep 25 20:03:05 2006 + regex_internal.h 1.73 Fri Mar 24 10:59:57 2006 + regcomp.c 1.112 Fri Mar 24 10:59:57 2006 + +Fri Jan 12 12:28:51 2007 Arnold D. Robbins + + * ABOUT-NLS, INSTALL, Makefile.in, aclocal.m4, config.guess, + config.rpath, config.sub, configh.in, configure, configure.ac, + depcomp, gettext.h, install-sh, missing, mkinstalldirs, ylwrap: + Updated to current autotools, Autoconf 2.61, Automake 1.10, + gettext 0.16.1. + +Thu Jan 4 18:23:50 2007 Dmitry V. Levin + + * node.c (free_wstr): Zero wstptr and wstlen only if WSTRCUR + flag is set. + (str2wstr): Replace invalid `free' call with `free_wstr' call. + +Thu Jan 4 16:49:21 2007 Arnold D. Robbins + + * builtin.c (do_match): Move freeing of wc_indices to outside if. + Thanks to Sven Wegener for the report. + +Thu Dec 21 14:32:13 2006 Arnold D. Robbins + + * main.c (arg_assign): Reassign the '=' only if not initing. + * profile.c (varname): Deleted. + (pp_concat): New function to print concatenations. + (tree_eval): Don't use `varname' anymore. Use `pp_concat'. + +Mon Dec 11 12:43:04 2006 Arnold D. Robbins + + * builtin.c (sub_common): Clear numeric flags on result + unconditionally. + * node.c (wcasestr): Replace `goto' with `continue'. + +Thu Nov 30 15:54:07 2006 Bruno Haible . + + * builtin.c: Change use of HAVE_LC_MESSAGES to defined(LC_MESSAGES). + Bruno suggested only for dcngettext, I did it everywhere (ADR). + +Wed Sep 6 02:04:32 2006 Andrew J. Schorr + + * awkgram.y (get_src_buf): Adjust `source' and `sourceline' to + correctly handle mixed -f and --source options. + +Mon Aug 28 21:17:20 2006 Arnold D. Robbins + + * AUTHORS, FUTURES, LIMITATIONS, NEWS, POSIX.STD, PROBLEMS, README: + Added FSF copyright for no other reason than to satisfy the flunkies + running Savannah. + * Makefile.am: Removed `ansi2knr' from AUTOMAKE_OPTIONS also. + +Fri Aug 11 15:07:45 2006 Arnold D. Robbins + + * field.c (set_field, rebuild_record, set_record): Remove calls to + `free_wstr' since they're not needed. + +Sat Aug 5 22:04:24 2006 Arnold D. Robbins + + * node.c (unref): Call `free_wstr' for fields also. Thanks to + Andrew Schorr. + +Tue Jul 4 22:43:05 2006 Arnold D. Robbins + + * eval.c (interpret): Node_assign_concat case: Turn off NUMBER and + NUMCUR flags in result. Sheesh. Thanks to + for finding the problem. + +Mon Jul 3 22:49:44 2006 Pat Rankin + + * main.c (load_environ): When AWKPATH is missing from ENVIRON[], + try to find it with getenv("AWKPATH") before resorting to DEFPATH. + Suggested by Galen Tackett. + +Mon Jul 3 00:27:59 2006 Arnold D. Robbins + + * io.c (INTERNAL_HANDLE): New constant for use by `iop_alloc' + when allocating an internal IOBUF. + (pidopen, useropen): Use it. + (iop_alloc): Add check for it and just return iop. + +Fri Jun 23 15:48:34 2006 Arnold D. Robbins + + * awkgram.y (subn): At end for `do_sprintf' check, verify + that lnode is not NULL before using it to assign through. + +Sun Jun 18 22:27:25 2006 Arnold D. Robbins + + Repair internal names like /dev/user, /dev/pid, as well as /dev/fd/N, + which have been broken for a long time but noone noticed. + + * io.c (is_internal): New macro to check for internal file like + `/dev/user'. + (spec_setup): Reduce to two parameters, allocate logic is always true. + Add IOP_NO_FREE to flag. + (pidopen, useropen): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + (specfdopen,): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + Don't set IOP_NO_FREE in flag. + (iop_open): Remove `IOBUF iob' field from `struct internal' and its use + and the use of `spec_setup' from the code here. Change the check in the + call to the open function to look for NULL. + (get_a_record): Use `is_internal' in initial check for filling the + buffer to not try to call `read' on internal files. If true, set + the IOP_AT_EOF in the flag and return EOF. + +Fri Mar 24 13:05:56 2006 Arnold D. Robbins + + * awkgram.y (get_src_buf): Remove function argument types from + declaration of `readfunc' to avoid bugaboos with VMS declaration + of `read' system call. + +Fri Mar 10 06:28:23 2006 Arnold D. Robbins + + * awk.h (free_wstr): New declaration if MBS_SUPPORT, empty macro + otherwise. + * node.c (free_wstr): New function, inside MBS_SUPPORT. Frees the wide + string part of a node. Provided so that it can be used consistently + everywhere. + (format_val, r_dupnode, mk_number, make_str_node, unref): Use it. + * builtin.c (sub_common): Call `free_wstr' instead of doing it manually. + * eval.c (r_tree_eval): Same in Node_assign_concat case. + * field.c (set_field, rebuild_record, set_record): Add calls to + `free_wstr'. + +Mon Feb 13 22:45:34 2006 Arnold D. Robbins + + * eval.c (r_tree_eval): Node_assign_concat. Release any + wide string value and reset the WSTRCUR flag. Based on + bug report by Karel Zak. + +2006-01-03 Paul Eggert + + * Makefile.am (awkgram.c): Use $(AWK), not awk, so that the rule + works on Solaris too (e.g., Solaris 10). Problem reported by + Andrew J. Schorr. + +Mon Dec 19 05:39:46 2005 Arnold D. Robbins + + * node.c (format_val): Account for overlow of conversion + from double to long. Shows up worse on 64-bit systems. + +Wed Dec 14 18:57:34 2005 Arnold D. Robbins + + * eval.c (set_BINMODE): Fix logic of test for no numeric value. + Makes `gawk -v BINMODE=1 ...' work again. Thanks to Eli Zaretskii + for pointing out the problem. + +Wed Oct 19 10:58:27 2005 Arnold D. Robbins + + * main.c (main, arg_init): Only use the locale's decimal + point if do_posix is set. Too many people the world over + have complained about this. + +Fri Oct 7 13:54:09 2005 Arnold D. Robbins + + Enhancement to fix from 23 Sept 2005, suggested by Pat Rankin. + + * awkgram.y (one_line_close): New function, closes open FILE * used + by `read_one_line'. + (fp): Static FILE * used by `read_one_line' and `one_line_close'. + * awkgram.y (read_one_line): Simplify check for call to `fdopen'. + (get_src_buf): New variable `closefunc' which is a pointer to a + function implementing the `close' system call interface. + +Fri Oct 7 13:23:29 2005 Arnold D. Robbins + + * field.c (set_FIELDWIDTHS): Fix off-by-one error in assignment + of sentinel value at end of FIELDWIDTHS array. + +Fri Sep 23 16:05:13 2005 Arnold D. Robbins + + * awkgram.y (read_one_line): New function, mainly for debugging, + that reads one line of data at a time to pass back as a buffer. + Emulates the variable-length record filesystem of VMS, where + we first saw the problem fixed here. + (get_src_buf): New variable `readfunc' which is a pointer to a + function implementing the `read' system call interface. Based on + an environment variable, use `read_one_line' instead of `read' + for testing. Make the test for expanding the buffer smarter, + so that it doesn't grow unnecessarily. + + Thanks to Galen Tackett (tackett_galen@bah.com) for reporting + the problem and to Anders Wallin and Pat Rankin for help + tracing and reproducing the problem and testing the fix. + +Fri Sep 9 15:06:07 2005 Arnold D. Robbins + + * hard-locale.h (xmalloc): Move declaration to file scope + for non-glibc systems and gcc 4. Thanks to Kito Danya Dietrich + . + +Thu Aug 25 22:40:40 2005 Arnold D. Robbins + + * regcomp.c (build_range_exp): Avoid `btowc' for single-byte + characters. Fedora Core 2, maybe others, have a broken version + that can't handle values > 127. + +Fri Aug 19 16:13:28 2005 Arnold D. Robbins + + * regexec.c (proceed_next_node): Added a band-aid check at the + top of the first `if' to make sure that `mctx->state_log[*pidx]' + isn't NULL. + +Fri Aug 12 13:10:33 2005 Arnold D. Robbins + + * io.c (iop_alloc): Only free `iop' if it was malloc'ed in + the first place. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Tue Jul 26 21:44:54 2005 Arnold D. Robbins + + Copyright dates on all relevant files updated to 2005. + +Wed Jul 6 17:09:02 2005 Arnold D. Robbins + + Minor cleanups: + + * io.c (do_index): Remove unused variables `mbclen', `mbs1' and `mbs2'. + * node.c (wstrstr): Remove unsed variable `j'. + (dump_wstr): `#ifdef' out, not currently needed. + * eval.c (op_assign): Move decl of `t1' and `t2' into a separate block + for the `! HAVE_FMOD' case. Keeps the compiler quiet. Similar for + `ltemp'. + +Wed Jul 6 16:51:31 2005 Arnold D. Robbins + + * io.c (close_io): Now takes pointer to boolean parameter indicating + if there was a problem closing standard output or standard error. + Update it in the right places. + * awk.h (close_io): Update the declaration. + * main.c (main): New variable `stdio_problem'. Pass it to `close_io'. + Check the result and exit non-zero if there was a problem. + (usage, version): Print warning message if problems with stdout. + + Unrelated: + + * main.c (main): For call to `setlocale' for LC_MESSAGES, just use + `#ifdef LC_MESSAGES'. Per Bruno Haible . + +Wed Jul 6 16:44:58 2005 Jim Meyering + + * main.c (init_fds): If any of the STDIN_FILENO, STDOUT_FILENO, + STDERR_FILENO are initially closed, reopen them with permissions + contrary to common usage so that any reasonable attempt to use + them will evoke the same sort of error as reading or writing to + a closed file descriptor would. + +Mon Jul 4 09:38:29 2005 Arnold D. Robbins + + More multibyte fixes from Kimura Koichi, . + + * node.c (format_val, r_dupnode): Spell `wstptr' correctly. + * regex_internal.c (build_wcs_upper_buffer): Label `offsets_needed' + should not be inside `#ifdef _LIBC'. + * regcomp.c (build_charclass): Fix declaration of `class_name' in + prototype to not be unsigned. + +Thu Jun 30 11:52:34 2005 Arnold D. Robbins + + * profile.c (tree_eval): Node_not: Remember to print the exclamation + point! Thanks to Dan Nielsen + for the bug report. + * mbsupport.h: Fix spelling of HAVE_ISWUPPER. Thanks to + Kimura Koichi, . + +Sun Jun 26 16:37:59 2005 Arnold D. Robbins + + Unrelated changes: + + * builtin.c (do_length): Allow array argument to length(). + Returns number of elements in array. + + * awkgram.y (yylex): Ignore carriage returns in source code. Sigh. + +Wed Jun 15 22:12:15 2005 Arnold D. Robbins + + * node.c (isnondecimal): Check loc.decimal_point before using it. + Avoids problems with command line assignment when locale info may + not be set up all the way yet. + +Wed Jun 15 21:59:54 2005 Arnold D. Robbins + + * node.c (make_str_node): If working with multibyte characters, while + parsing string constants, keep multibyte characters together. This + avoids problems in cases where one of the bytes is backslash. Initial + patch supplied by Kimura Koichi, . + +Tue Jun 14 21:50:37 2005 Andrew J. Schorr + + Use Exponentiation By Squaring for integer powers for ^ and ^=. + + * eval.c (calc_exp, cal_exp_posint): New functions. + (r_tree_eval): Use them. + +Fri Jun 3 12:15:54 2005 Arnold D. Robbins + + * configure.ac: Further change the hack at the end so that + it works on Mac OS X `sed'. Sigh. + +Thu Jun 2 22:44:01 2005 Arnold D. Robbins + + * configure.ac (TYPE_SOCKLEN_T): Use `int' as default type if can't + figure one out. + * awkgram.y: Warn that `//' is not a C++ comment. (:-) + +Thu Jun 2 20:55:27 2005 Arnold D. Robbins + + From: Benno Schulenberg + + * eval.c (func_call): Take message out of gettext call since it's for + debugging. + * ext.c (get_actual_argument): Fix formatting of message. + +Wed May 25 09:19:37 2005 Arnold D. Robbins + + * configure.ac: Change hack at end that fixes Makefile to keep + version.c to use `sed' and not `ed'. More portable to OS/2, probably + other systems. + +Mon May 23 09:01:26 2005 Arnold D. Robbins + + Portability help from Jim Meyering. + + * io.c: Rework ifdefs for and . Test them + individually. + * configure.ac: Add AC_C_RESTRICT and code for socklen_t from rsync. + Check for isascii and btowc for regex. + +Sat May 14 22:49:54 2005 Arnold D. Robbins + + * wait_any (errno): Remove decl. + * gawk_popen: The pipe-simulated but not VMS or DOS version. Remove + decl/use of `strdup' in favor of `emalloc' and `strcpy'. + +Wed May 11 18:33:30 2005 Arnold D. Robbins + + All files: Updated address of FSF to: + + 51 Franklin Street, Fifth Floor + Cambridge, MA 02110-1301 + +Wed May 11 18:19:03 2005 Jim Meyering + + * configure.ac: Use AM_GNU_GETTEXT([external]). + Reflect upgrade to gettext-0.14.4. + Reflect renaming of `jm_'-prefixed macros. + (AC_CONFIG_FILES): Remove intl/Makefile. + + * Makefile.am (SUBDIRS): Remove intl. + (AM_CPPFLAGS): Remove -Iintl. + +Wed May 11 11:42:06 2005 Arnold D. Robbins + + Straighten out mess with `isblank' which is C99 function. + + * configure.ac: Remove check for `isblank' in call to AC_CHECK_FUNCS. + * regex_internal.h: #ifdef out definition of `isblank' and provide + `is_blank' function a la dfa.c. + * field.c: Ditto. + * regcomp.c: #ifdef use of `isblank' and add `is_blank' use instead. + +Mon May 9 08:29:37 2005 Arnold D. Robbins + + * configure.ac: Add type check for `socklen_t', fixes compile + warning on AMD/64 Linux. + * io.c (socketopen): Change type of socket length variables + to `socklen_t' from `size_t'. + +Thu May 5 22:00:03 2005 John E. Haque + + * io.c (iop_alloc): Let an input processor hook installed via + `register_open_hooks' open its own fd in case gawk does not know + how to open it. + (iop_open): Call `os_close_on_exec' after `iop_alloc'. + ADR: If `iop_alloc' returns NULL but the fd is valid, close + the fd to avoid an fd leak. + +Mon May 2 08:05:59 2005 Arnold D. Robbins + + * eval.c (update_ERRNO): Don't use `return' in a `void' function. + * awk.h (AWKNUM): Back out use of `long double' based on LDBL_MANT_DIG. + * builtin.c (tmp_integer): Back out extra ifdefs. + +Fri Apr 29 13:01:05 2005 Arnold D. Robbins + + * configure.ac: Look for `isblank' function. + * field.c: Add define for `isblank' if we don't have it. + +Fri Apr 29 12:01:33 2005 Julian Foad + + From grep. Doesn't seem to affect awk. + + * dfa.c (lex): Fix bug #9519: "echo do^re | grep do^re" was + failing to find a match. [Towards end, set `lasttok' before + returning `c'.] + +Fri Apr 29 00:28:46 2005 Arnold D. Robbins + + * configure.ac: Jump through an amazingly convoluted hoop to get + config.status to keep version.c upon `make distclean'. Seems to + work though. + +Thu Apr 28 23:40:02 2005 Stepan Kasal + + * configure.ac (PRINTF_HAS_F_FORMAT): Some cosmetic changes. + (custom.h): Don't cat custom.h at the end of config.h; instead, use + AH_BOTTOM([#include "custom.h"]) + * awklib/Makefile.am (AM_CPPFLAGS): Add $(top_srcdir) so that + custom.h can be found. + +Thu Apr 28 23:21:22 2005 Jim Meyering + + * field.c (set_FIELDWIDTHS): Tighten up the code to accept FIELDWIDTHS + values in [1..INT_MAX], e.g., detect overflow and invalid strings, + and reject strings starting with `-'. + +Thu Apr 28 23:05:33 2005 Stepan Kasal + + * dfa.c (parse_bracket_exp_mb): Shorten one part of the code, to get + closer to grep's copy. + +Thu Apr 28 23:00:58 2005 Pat Rankin + + * builtin.c (format_tree) [#if VAXCRTL]: For floating point + formatting, reject zero_flag if using old VAXCRTL run-time + library to avoid getting erroneous results which appear as if + numerically incorrect (due to an embedded space in some cases, + extra trailing zeroes in others) rather than just misformatted. + `hsprint' test still fails, but not as badly. + +Thu Apr 28 19:12:03 2005 Arnold D. Robbins + + * re.c (reflags2str): Add three new RE_ flags from current regex.h + to bring the table up to date. + + * builtin.c (format_tree): Save 2 spare bytes instead of one. Suggested + by Stepan Kasal. + +Thu Apr 28 18:16:09 2005 Andrew J. Schorr + + * awk.h (IOBUF): Add new fields `opaque', `get_record', and + *close_func', to support insertion of an alternate input processor. + This is used by the XML extension. + (register_deferred_variable, register_open_hook, update_ERRNO_saved): + Declare new functions. + (load_environ, load_procinfo): Remove declarations -- these functions + are no longer global, since we use register_deferred_variable instead. + * awkgram.y (register_deferred_variable): New function to allow + calling code to register special variable names that trigger a callback + upon the first reference. This is now used to implement ENVIRON + and PROCINFO. + (variable): Search the list of deferred variables instead of hardcoded + tests for ENVIRON and PROCINFO. + * eval.c (set_BINMODE): Fix spelling of "arbitrary" in warning message. + (update_ERRNO_saved): New function that allows the caller to specify + the errno value instead of using the current value. + (update_ERRNO): Implement by calling update_ERRNO_saved(errno). + * io.c (iop_close): Call `iop->close_func' if non-NULL. + (close_redir): Should save `errno' value, otherwise `lintwarn' messages + might update it. Then use `update_ERRNO_saved' to set ERRNO. + (do_getline): Call `update_ERRNO_saved' to set ERRNO based on the + error code returned by the redirect function (instead of the current + value of errno). Similarly, use `update_ERRNO_saved' to set ERRNO + based on the value returned by `get_a_record'. But add a special + check to avoid updating ERRNO if `get_a_record' returns an error + code value of -1 (this is used by the XML extension which already + sets ERRNO before returning). + (register_open_hook): New function to register a function to be + called whenever a new data file is opened. This can be used to + install a special input processor (as in the XML extension). + (iop_alloc): Call registered open hook. + (get_a_record): If a `get_record' method has been set, call that instead. + * main.c (init_vars): Use `register_deferred_variable' to implement + ENVIRON and PROCINFO. + (load_environ, load_procinfo): Now static instead of global. + * doc/gawk.texi: Document new internal functions `update_ERRNO_saved', + `register_deferred_variable', and `register_open_hook'. + +Thu Apr 28 10:50:10 2005 Arnold D. Robbins + + * array.c (assoc_find, do_delete): Change incorrect uses of STREQN + to memcmp. + * builtin.c (do_index): Same. + * field.c (set_FS): Same. + * io.c (redirect, getredirect, do_close, set_RS): Same. + * re.c (reisstring): Same. + +Wed Apr 27 21:35:57 2005 Arnold D. Robbins + + Allow for long double. Initial changes from Jean-Marc Saffroy + . + + * awk.h (AWKNUM): If have long doubles (LDBL_MANT_DIG), define AWKNUM + as long double, otherwise just use double. + * builtin.c (format_tree): Change type of tmpval to double. + (do_strtonum): Same for `d' and types used in casts. + (tmp_integer): Don't do bit shifting if have long doubles. + + Unrelated, from Andrew J. Schorr: + + * io.c (close_one): Check for RED_FILE|RED_WRITE, not just RED_FILE. + +Mon Apr 25 12:23:18 2005 Andrew J. Schorr + + * eval.c (r_tree_eval): In Node_assign_concat case, when copying string + constants, include the terminating zero byte. + +Fri Apr 1 06:26:31 2005 Arnold D. Robbins + + Update to Automake 1.9.5. + + * INSTALL, aclocal.m4, depcomp, install-sh, missing, + mkinstalldirs, ylwrap: Updated. + + Unrelated: + + * builtin.c (do_tolower, do_toupper): Remove old code + based on 8-bit character table. + +Wed Feb 23 08:23:22 2005 Arnold D. Robbins + + * bisonfix.awk: New file, fixes continued #ifdef for dumb compilers. + * Makefile.am (awkgram.c): Fix rule to use it. + (EXTRA_DIST): Include bisonfix.awk. + +Tue Feb 22 21:18:50 2005 Arnold D. Robbins + + * random.h: Remove include of config.h and move it to ... + * random.c: Here. Move include of random.h back to where it was. + + * regcomp.c, regex.c, regexec.c: NUKED all use of alloca not inside + `_LIBC' ifdef. Hooray! + +Sat Feb 19 20:13:28 2005 Pat Rankin + + Workarounds for bugs and missing C89 features in old VAX C compiler. + + * regex_internal.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT + is defined. + [MB_CUR_MAX]: Define as 1 if mbsupport.h hasn't defined it. + [ER_ERRMSG, ERRMSG_TYPE, ERRMSG_OFFSET, ERRMSG_SEPARATOR]: New macros + conditionalized upon gawk's NO_TOKEN_PASTING macro. + * regcomp.c: Use them. + (parse_dup_op): Use alternate initialization of start_token if + RE_TOKEN_INIT_BUG is defined. + * regexec.c (proceed_next_node): Compare push_fail_stack() result + explicitly against REG_NOERROR rather than implicitly against 0. + +Sat Feb 19 20:05:50 2005 Pat Rankin + + * dfa.c "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined. + +Wed Feb 16 20:43:07 2005 Pat Rankin + + * awk.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined. + * regex.h : Guard inclusion with HAVE_SYS_TYPES_H. + * regex.c : Likewise. + * random.c "random.h": Include this first to get config.h setup. + : Guard inclusion with HAVE_FCNTL_H. + : Guard inclusion with HAVE_UNISTD_H. + * io.c [#if defined(MSDOS) ||... defined(__CYGWIN__)]: Splice the + backslash continuation back into one long line. + +Wed Feb 16 10:11:21 2005 Arnold D. Robbins + + * node.c (unref, format_val): Add assertions checking that both + `tmp->wstptr != NULL' and `(tmp->flags & WSTRCUR) != 0' before + freeing `tmp->wstptr'. Thanks to kimura.koichi@canon.co.jp. + + * random.c (HAVE_UNISTD_H): Conditionalize include of . + Thanks to Scott Deifik . + +Sun Feb 13 18:24:50 2005 Arnold D. Robbins + + * io.c (socketopen): Move `#ifdef MSG_PEEK' up to above + declarations too. Thanks to Michal Jaegermann. + + * config.guess, config.sub: Updated from Savannah. + +Thu Feb 10 15:48:48 2005 Arnold D. Robbins + + * regex_internal.c (re_dfa_add_node): Remove variable `type' + and just use `token.type' directly in RE_ENABLE_I18N code below. + Saves a compiler warning, and a good compiler will handle it anyway. + * regexec.c (check_arrival_add_next_nodes): Move decl of `err' + inside #ifdef RE_ENABLE_I18N code where it's used. + * awkgram.y (yylex): Add casts to int before use of `strlen' results + for printf-style precision. Avoid a compiler warning. + * io.c (redirect, do_close): Same for use of tmp->stlen. + + Thanks to Michal Jaegermann . + +Wed Feb 9 10:19:15 2005 Stepan Kasal + + * Makefile.am (datadir, libexecdir): Removed. + (awkdatadir): Renamed to pkgdatadir. + (pkgdatadir, LDADD): Use the make syntax to refer to other variables, + not @...@. + +Wed Feb 9 10:05:46 2005 Arnold D. Robbins + + * node.c (r_dupnode): Assign NULL to r->wstr after `getnode'. + Fix count of bytes to copy in call to `memcpy'. + Thanks to Kimura Koichi, . + +Tue Feb 8 19:26:22 2005 Pat Rankin + + * regcomp.c (init_dfa): Avoid strcasecmp() since regex.c doesn't + use awk.h and none of the assorted other included header files + are guaranteed to declare it. + (parse_expression): Modify casts for the string arguments passed to + build_charclass_op() to fix char * vs unsigned char * mismatch. + (parse_bracket_exp): Likewise add cast for the string argument + passed to build_charclass(). + +Mon Feb 7 15:04:09 2005 Arnold D. Robbins + + * eval.c (make_scalar): Don't use P() macro in definition. + Thanks to Juergen Kahrs . + +Wed Feb 2 16:36:19 2005 Arnold D. Robbins + + * main.c (main): Call `close_io', without its result affecting + the exit status. Super small, super dark corner. + + See test/exitval2.awk. + +Tue Feb 1 11:58:29 2005 Arnold D. Robbins + + * regex.h (__APPLE_CC__): Removed test and definition of __restrict. + Not needed for current MacOS X compiler. + +Sun Jan 30 13:56:37 2005 Arnold D. Robbins + + Fresh merge with CVS regex routines. Fixes handling of \B. + See tests/gnureop3.awk and also + http://sources.redhat.com/bugzilla/show_bug.cgi?id=693. + + CVS base versions: + + * regcomp.c: Version 1.92, Thu Jan 27 19:05:20 2005. + * regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005. + * regex_internal.c: Version 1.49, Thu Jan 27 19:07:15 2005. + * regex_internal.h: Version 1.60, Wed Jan 26 22:40:50 2005. + * regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005. + +Sat Jan 22 22:30:40 2005 Arnold D. Robbins + + Reinstate patch of 18 Nov 2001, for VMS, at least: + + * random.c (srandomdev): ifdef-out. Lots of compile time + problems on multiple platforms, and gawk doesn't even + use the routine. The heck with fine-grained solutions. + +Thu Jan 20 14:15:32 2005 Arnold D. Robbins + + * awkgram.y (LEX_FOR): Free NAME tokens in transformation of + `for (iggy in foo) delete foo[iggy]' into `delete foo'. + Thanks and a tip of the hatlo to Valgrind. + + * dfa.c (_): Clean up stuff here by just including "gettext.h". + Per Bruno Haible. + +Wed Jan 19 18:29:23 2005 Arnold D. Robbins + + * awkgram.y (yylex): Improve parsing of numeric constants + and hex values, via a push from Paul Eggert. See test/hex.awk. + + * regex_internal.c (re_node_set_alloc): If `size' is 0, just + zero out the structure. From valgrind. + +Tue Jan 18 17:23:25 2005 Arnold D. Robbins + + Make gawk multibyte aware. This means that index(), length(), + substr() and match() all work in terms of characters, not bytes. + + * awk.h (NODE): Add `wsp' and `wslen' elements to value for wide + string. + (WSTRCUR, wstptr, wstlen, force_wstring): New macros. + (str2wstr, wstrstr, wcasestrstr): New declarations. + * builtin.c (do_index, do_length, do_substr, do_match): Handle wide + strings. + * eval.c (flags2str): Add WSTRCUR. + * node.c (format_val, r_dupnode, mk_number, make_str_node, unref): + Add code to deal with wide strings. + (str2wstr, dump_wstr, wstrstr, wcasestrstr): New functions. + +Sun Jan 16 15:10:35 2005 Arnold D. Robbins + + * random.h (int32_t): Define this type. + +Thu Jan 13 14:38:13 2005 Arnold D. Robbins + + Cause `configure --disable-nls' to still allow locale-correct + formating of numeric values. + + * builtin.c (format_tree): Change #ifdefs to only test HAVE_LOCALE_H. + Improve code for ' flag so that extraneous separator is not included if + number of digits is multiple of locale separater count (3, 6, 9, etc.) + * dfa.c (dfaparse): Change ifdef to only test #ifdef LC_COLLATE. + * eval.c (fmt_ok): Remove ENABLE_NLS from #ifdef test. + * gettext.h: Include on both sides of test. Should really + be factored out. + * main.c (loc): Remove ENABLE_NLS from #ifdef test. + (main): Same in call to localeconv(). + * node.c (isnondecimal): Remove ENABLE_NLS from #ifdef test. + + Unrelated: + + * regcomp.c (init_dfa): Change `codeset' to `codeset_name' in two + places. + +Mon Jan 10 11:49:56 2005 Arnold D. Robbins + + Annual sync with glibc. + + * getopt_int.h: New file. + * Makefile.am (base_sources): Add it. + * getopt.h, getopt.c, getopt1.c: Updated. + * regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h, + regexec.c: Updated. + + Original versions: + + getopt_int.h, 1.1, Tue Mar 9 10:31:19 2004 + getopt1.c, 1.10, Tue Mar 9 10:35:37 2004 + getopt.h, 1.21, Fri Mar 19 00:19:32 2004 + getopt.c, 1.53, Wed Mar 10 23:13:26 2004 + regcomp.c, 1.87, Mon Dec 6 02:56:42 2004 + regex.c, 1.126, Fri Jan 30 05:19:58 2004 + regex.h, 1.33, Thu Nov 18 23:50:57 2004 + regex_internal.c, 1.46, Thu Jan 6 20:59:49 2005 + regex_internal.h, 1.57, Mon Dec 27 16:29:05 2004 + regexec.c, 1.75, Mon Dec 27 16:29:52 2004 + + * regex.h: Add check for __APPLE_CC__ and definition of __restrict. + * regex.c: Add check for _MSC_VER and include . + * regex_internal.h (_RE_ENABLE_I18N): Change test. + (re_realloc): Add check/fix for SunOS 4.1.x. + * regex_internal.c (build_wcs_upper_buffer): ifdef label + `offsets_needed', add cast in call to `wcrtomb'. + * regcomp.c (build_charclass, build_charclass_op): Remove `unsigned' + from declarations of `char *' params. + (regerror): Remove use of mempcpy. + (peek_token): Disallow \s and \S for gawk. + (build_charclass): Change decl of `class_name' and use it directly. + Nuke variable `name'. + (build_charclass_op): Change decl of `class_name' and `extra'. + +Thu Jan 6 16:44:32 2005 Arnold D. Robbins + + Improve autoconfiscation stuff for wide character use. + + * builtin.c (do_tolower, do_toupper): Conditionally compile + call to `wide_tolower_toupper'. + (wide_tolower_toupper): Conditionally compile typedefs and function. + * mbsupport.h: Add check for having `wint_t', and `iswlower', + `iswupper', `towlower' and `towupper'. + * configure.ac (HAVE_WINT_T): Add test. + (AC_CHECK_FUNCS): Add `wint_t', `iswlower', `iswupper', `towlower' + and `towupper'. + + Unrelated change: + + * hard-locale.h (hard_locale): Add decl of `xmalloc' to prevent + redeclaration problems on some compilers. + +Wed Jan 5 10:20:17 2005 Arnold D. Robbins + + Update to Bison 2.0. + + * bisonfix.sed: Removed, no longer needed. + * Makefile.am (EXTRA_DIST): Removed bisonfix.sed. + (awkgram.c): Fix build rule. + * awkgram.c: Regenerated. + +Tue Jan 4 18:47:56 2005 Arnold D. Robbins + + Update to Automake 1.9.4. + + * alocal.m4, config.guess, config.sub, install-sh: Updated. + +Mon Jan 3 14:08:27 2005 Arnold D. Robbins + + Update to Automake 1.9.3. + + * INSTALL, alocal.m4, config.guess, config.sub, depcomp, + install-sh, missing, ylwrap: Updated. + +Mon Jan 3 11:23:36 2005 Arnold D. Robbins + + Fix obscure issue. ^ in RS should only match at the very + beginning of the input. Essentially, the file is one long + string. To do this, use the `not_bol' flag in the `struct + pattern_buffer'. Thanks to Stepan Kasal for pointing out the + problem and to Andreas Schwab for pointing out the mechanism + for a solution. + + * awk.h (RE_NEED_START, RE_NO_BOL): New flags for `research'. + (IOP_AT_START): New flag for IOBUF. + (research): Last parameter is now `flags'. + * builtin.c (do_match, sub_common): Change calls to `research'. + * eval.c (interpret, match_op): Same. + * field.c (re_parse_field): Same. + * io.c (spec_setup): Add IOP_AT_START flag. + (iop_alloc): Same. + (rsrescan): Modify logic to check IOP_AT_START and if not on to + add RE_NO_BOL to flags value in call to `research'. + (get_a_record): Clear IOP_AT_START upon return from `*matchrec'. + (iopflags2str): Add IOP_AT_START to table. Also IOP_CLOSED, + which was missing. (Ooops.) + * re.c (research): Last paramater is now flags. Modify logic to + handle RE_NO_BOL case by setting the right bit initially. Clean + up control flow so that it's cleared before returning. If RE_NO_BOL, + don't bother with the dfa matcher, as it doesn't have an analogous + capability. + +Wed Dec 22 12:33:48 2004 Arnold D. Robbins + + For --exec, don't allow x=y assignments where filenames would be. + Do allow -v. This is because we assume --exec is used mainly for + CGI stuff and we don't want var assigns to affect the code. + + Suggested by Stepan Kasal; motivated by reading about web security. + + * main.c (disallow_var_assigns): New variable. + (main): Set the var for --exec. + (arg_assign): Check it appropriately. + +Sun Dec 19 17:27:09 2004 Arnold D. Robbins + + * builtin.c (do_gensub): Make `global' flag smarter, such that + a string numeric constant (e.g., "3") acts like a numeric + constant. + * node.c (r_force_number): Not really related: Only set NUMCUR + if we actually convert some digits. + +Sun Dec 19 16:08:50 2004 Arnold D. Robbins + + * dfa.h, dfa.c: Synchronize with what's happening in GNU grep + development. Effectively only minor whitespace changes and some + slight code motion of ifdefs and includes. + * hard-locale.h: New file, extracted from old dfa.c. + * Makefile.am (base_sources): Add hard-locale.h. + +Sun Dec 19 11:13:45 2004 Arnold D. Robbins + + * io.c (socketopen): Change type of `readle' and `namelen' + variables to size_t. For QNX, but a good idea anyway. Thanks + to `Anthony' (rz1a@mail.ru). + +Mon Dec 6 11:11:22 2004 Arnold D. Robbins + + Undid change of Mar 9 2004, to add gofast patch. It gets things + wrong for gawk. This removes the bandaid of ifdef-ing out the + main check. Eventually this'll all get straightened out in the + GNU grep code. + + * dfa.c (buf_offset): Removed. + (SKIP_REMAINS_MB_IF_INITIAL_STATE): Removed use of buf_offset, do + free `mblen_buf', `inputwcs'. + (match_anychar, match_mb_charset, transit_state_consume_1char, + transit_state): Remove use of buf_offset in mblen_buf. + (dfaexec): Use `free' and `malloc', not `realloc'. + +Mon Dec 6 10:55:37 2004 Fumitoshi UKAI + + Forwarded from james@nocrew.org, the Debian contact. + + * dfa.c (parse_bracket_exp_mb): + 1. Build range correctly when IGNORECASE for [a-a] to also get 'A'. + 2. For [:lower:] and [:upper:], if ignoring case, set type string + to "alpha". This parallels code in the regex routines. + 3. Reset wc1 to EOF when parsing bracket expressions. + +Mon Nov 29 18:36:25 2004 Arnold D. Robbins + + * io.c (redirect): When allocating a new struct redirect, set + rp->pid to -1, not 0, so that code checking for EOF on an + input pipe works correctly. + +Thu Nov 25 14:22:41 2004 Stepan Kasal + + * Makefile.am (MAINTAINERCLEANFILES): Add. + * version.in (version_string): Use PACKAGE_STRING. + +Tue Nov 23 17:27:38 2004 Stepan Kasal + + * re.c: Fix a typo in a comment. + +Mon Nov 22 16:47:00 2004 Arnold D. Robbins + + * awkgram.y (yylex): Add lint check for tawk style modifiers on + regexes, /.../i and /.../s. Not that it'll help anyone. + +Wed Oct 27 14:25:18 2004 Stepan Kasal + + * builtin.c (do_tolower, do_toupper): Fix the wide char handling, + especially when the lowercased char doesn't ocuppy the same + number of bytes as its uppercase equivalent. Make use of ... + (wide_tolower_toupper): ... this new static function. + +Mon Oct 25 11:51:14 2004 Arnold D. Robbins + + * builtin.c (bchunk, bchunk_one, cksize): Change type of `olen' + to size_t from long. It is the 21st century now, after all... + Thanks to Stepan Kasal. + +Mon Oct 11 10:49:09 2004 Arnold D. Robbins + + * awkgram.y (yylex): Improve lint warnings for non-decimal constants. + * node.c (isnondecimal): Made a little smarter, thanks to Stepan Kasal. + +Thu Oct 7 21:59:38 2004 Arnold D. Robbins + + * dfa.c (dfamust): Redo fix of 22 Sep to match code from + current GNU grep. + +Sun Oct 3 23:06:00 2004 Arnold D. Robbins + + * node.c (isnondecimal): Made smarter, so that 0xEE does + register as non-decimal. Added parameter to indicate use of + locale's decimal point and changed declaration and callers. + +Tue Sep 28 18:38:17 2004 Arnold D. Robbins + + * node.c (isnondecimal): New function, now smarter. + * awk.h (isnondecimal): Changed from macro to function. + +Wed Sep 22 11:24:46 2004 Arnold D. Robbins + + * dfa.c (dfamust): At end, check results of `malloc'. + Based on bug report from Sorav Bansal + for grep. + +Mon Sep 20 13:18:18 2004 Arnold D. Robbins + + New --exec option. Needed for gawk CGI scripts to prevent + arbitrary options and/or source getting passed in from the web. + + * main.c (optab): New long option, --exec. + (main): Catch it. Like -f but end option processing. + (usage): Add it to the usage message. + + Thanks to John DuBois and Don Stokes for their input. + + Unrelated: + + * dfa.c (dfaexec): Disabled caching into buffer that bypasses + multibyte initialization, since it can get things wrong. Thanks + to Andreas Schwab . + +Mon Sep 20 12:59:42 2004 Andreas Schwab + + * awkgram.y (nextc): Check for end of lexer buffer before + advancing ring buffer index. + +Wed Sep 8 09:54:53 2004 Arnold D. Robbins + + * main.c (main): Force LC_NUMERIC locale to "C" before parsing + the program, since a variable assignment with -v can leave the + locale set incorrectly. + + Thanks to Sirix for reporting the problem. + +Wed Aug 25 18:55:30 2004 Arnold D. Robbins + + * main.c (UPDATE_YEAR): New constant at top of file, where we + won't miss it. + (copyleft): Use it. + +Sun Aug 22 17:26:39 2004 Stepan Kasal + + Define gawk_mb_cur_max even if there is no mbs support, as + ``const int'' and assign 1 to it. + This fixes a bug in re.c where #ifdef MBS_SUPPORT was missing. + + * awk.h (gawk_mb_cur_max): Declare. + * main.c (gawk_mb_cur_max): Define. + * awkgram.y (nextc_is_1stbyte): Without mbs support, define to 1. + * builtin.c (index_multibyte_buffer): Define a dummy function + when there is no mbs support. + * awkgram.y, builtin.c, re.c: Remove some `#ifdef MBS_SUPPORT'. + +Sun Aug 15 22:08:04 2004 Arnold D. Robbins + + Import current FreeBSD random.c. Make it work for gawk. + Needed for cases where long is more than 32 bits. + + * random.c: Imported from FreeBSD. Header includes tweaked. + * random.h: Typdef gawk_uint32_t appropriately and #define uint32_t + to it. + * configure.ac: Add calls to AC_CHECK_SIZEOF for unsigned int + and unsigned long. + + Started with + http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/random.c + Thanks to Andreas Schwab for the pointer. + +Thu Aug 12 13:09:53 2004 Arnold D. Robbins + + * main.c (copyleft): Fix copyright year. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Aug 2 12:17:40 2004 Arnold D. Robbins + + * configure.ac: Fix the hack. Do the sed on `Makefile', + not `Makefile.in'. Sigh. + +Sun Aug 1 14:48:30 2004 Arnold D. Robbins + + * configure.ac: MAJOR HACK: At end, remove version.c from Makefile.in + variable `CONFIG_CLEAN_FILES' so that `make distclean' doesn't + remove version.c. + +Mon Jul 19 17:07:27 2004 Arnold D. Robbins + + * config.guess, config.sub: Updated from Savannah CVS. + +Fri Jul 16 10:59:07 2004 Arnold D. Robbins + + * re.c (make_regexp): Bracket code using `gawk_mb_cur_max' + inside `#ifdef MBS_SUPPORT'. + +Thu Jul 15 12:36:25 2004 Arnold D. Robbins + + * dfa.c (parse_bracket_exp_mb): If doing case folding, + include the other case for regular characters inside [...]. + + * re.c (make_regexp): Smarten up handling of IGNORECASE, + particularly for multibyte character sets. Sigh. + +Wed Jul 14 16:25:23 2004 John Haque + + * eval.c (interpret): For `Node_K_return', use `copynode' + and not `dupnode' for non-PERM, non-TEMP values. + (func_call): Don't add TEMP flag to returned value. + + These two fix a problem uncovered by the July 8 change in + `assoc_lookup'. + +Wed Jul 14 16:14:09 2004 Arnold D. Robbins + + * awkgram.y (node_common): Add check `lexeme >= lexptr_begin', + from valgrind run. + +Wed Jul 14 16:00:51 2004 John Haque + + * io.c (rsrescan): Fix off by one error at end of record. + +Thu Jul 8 16:59:51 2004 Stepan Kasal + + * awkgram.y (output_redir): Make sure not to dereference NULL + pointer. The bug was triggered by the following code: + + gawk 'BEGIN{print "date" |& getline}' + + No test case created, beacuse of the following: + Correct interpretation involves executing "1" or "0" -- as the user + may have defined this, we would have to override this in the test + script. It's not worth the hassle. + +Thu Jul 8 12:59:49 2004 Arnold D. Robbins + + * awk.h (load_casetable): Name changed from `load_ignorecase'. + * eval.c (load_casetable): Name changed from `load_ignorecase'. + Fix all uses. + +Thu Jul 8 12:32:13 2004 John Haque + + * awkgram.y (get_src_buf): Fix off-by-one error to avoid "does not end + in newline" messages. + * array.c (assoc_lookup): Small performance hack: for TEMP subs nodes, + use its string memory for ahname. + * ext.c (get_actual_argument): Minor code cleanup. + * builtin.c (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): + fixed to issue "non-numeric argument" lint warnings before using + `force_number'. + +Mon Jun 21 16:53:35 2004 Arnold D. Robbins + + More changes from John Haque to rationalize extension functions. + + * awk.h (get_curfunc_arg_count): Name changed from + `get_curfunc_parm_count'. + * eval.c (get_curfunc_arg_count): Ditto, body redone to count actual + args passed at call time. + * ext.c (get_argument): Update range check. + (get_actual_argument): Simplify the code. + +Mon Jun 14 14:01:16 2004 Arnold D. Robbins + + Changes from John Haque and ADR to rationalize extension functions. + + * awk.h (check_special, get_curfunc_parm_count, get_actual_argument): + new function declarations. + (get_scalar_argument, get_array_argument): New macros. + * awkgram.y (check_special): New function. + (yylex): Use `check_special' to search `tokentab'. + (dump_funcs): Always count functions, in order to get dynamic ones. + Removed bogus use of `static' on `tab' variable. + * eval.c (struct fcall): Change type of `count' to `size_t'. + (get_curfunc_parm_count): New function. + (push_args): Set `r->rnode' to NULL for local variable. + * ext.c (make_builtin): Add sanity checking for presence and + name of new function, and that it's not a redefinition. + (get_argument): Check that requested arg is within range of actual + number of parameters. Also clean up logic for Node_var_new, + Node_var_array, Node_array_ref. + (get_actual_argument): New function. + * profile.c (pp_builtin): Better handling of dynamic extension function. + +Sun Jun 13 14:32:22 2004 Arnold D. Robbins + + * io.c (redirect): Conditionalize checking for process recovery + on `#ifdef PIPES_SIMULATED'. Needed for MS-DOS and VMS. + * builtin.c (tmp_integer): Change bracketing of magic test to + `#ifdef HAVE_UINTMAX_T' which is more general and more correct. + +Wed Jun 9 21:36:01 2004 Arnold D. Robbins + + * re.c (make_regexp): Add dfa matching into IGNORECASE handling. + +Tue Jun 8 15:38:56 2004 Arnold D. Robbins + + * awk.h (casetable): Remove `const'. + * eval.c (casetable): Remove `const'. + (load_ignorecase): New function. Loads locale-correct values in + upper 128 bytes. + (set_IGNORECASE): Call `load_ignorecase'. + +Tue Jun 8 14:04:19 2004 Arnold D. Robbins + + * awkgram.y (get_src_buf): Make sure that value from + `optimal_bufsize' is reasonable. Increase it if not. + +Tue Jun 8 13:54:28 2004 John E. Haque + + * awkgram.y (statement:LEX_FOR): Fix bug in loop to `delete a' + optimization. + * io.c (format_tree): Check for out of range values for + positional specifiers. + +Mon Jun 7 17:02:48 2004 Arnold D. Robbins + + * builtin.c (tmp_integer): Bracket the magic test inside + `#ifndef VMS'. + + * awk.h (child_catcher): Remove declaration. + * main.c (main): Remove `signal' calls for SIGCLD, SIGCHLD. + * io.c (child_died, child_signo, child_catcher): Removed. + (get_a_record): Remove code checking for death of child. + (redirect): If `rp' matches and is at EOF and type is input + pipe, and `rp->pid' is not -1, call `wait_any' to reap the + child. This is a heuristic, but it works pretty well. + +Sun Jun 6 18:35:17 2004 Arnold D. Robbins + + * io.c (get_a_record): Restore use of `memmove' instead of + memcpy. Otherwise some tests break on some systems. We think. + (child_died): Don't reset signal handler; breaks on some S5 systems. + (get_a_record): Reset handler if child_died. Still flaky on Solaris. + * configure.ac (version.c): Made from version.in again, for + non-Unix systems. + * Makefile.am (base_sources): Add version.c back. + * version.in: Include config.h for definition of const. + * main.c (version_string): Add back declaration, don't + include "version.i". + (main): Don't install child_catcher on Sun. (HACK) + +Thu Jun 3 14:06:06 2004 Arnold D. Robbins + + * main.c (version_string): Removed declaration, since + version.i is included directly. + * version.in: Removed test for definition of const. + +Tue Jun 1 19:23:53 2004 Stepan Kasal + + * Makefile.am (base_sources): Don't mention version.c, so that + it doesn't get distributed. + * po/POTFILES.in: Remove version.c + * configure.ac: Create version.i from version.in. + * main.c: Include version.i. + +Tue Jun 1 18:33:32 2004 Arnold D. Robbins + + Fix problem reported by Stephen Marchant + on Thu, 30 Oct 2003 13:11:42 -0500. + + * regex_internal.h (re_realloc): Allow for SunOS pre-Standard C + `realloc' which doesn't accept NULL pointers. + * awk.h (erealloc): Same. + + Unrelated. Change suggested by Peter Sobisch , have + PROCINFO["version"] be the version of gawk: + + * main.c (load_procinfo): Add in version. + + Unrelated: Avoid warning: + + * main.c (main): Cast calls to `bindtextdomain' and `textdomain' to + void. Avoids diagnostic with `configure --disable-nls'. + * dfa.c (check_matching_with_multibyte_ops): Remove unneeded nested + #ifdef, per Scott Deifik (scottd@amgen.com). Also fix some spelling + errors in comments. + +Tue Jun 1 18:26:45 2004 Paul Eggert + + Fix a bug reported by Mike Romaniw + to bug-gnu-utils on 2003-09-27: compl(compl(0xf0f)) returned 0xfff + on hosts with 64-bit uintmax_t and 64-bit IEEE-764 double, due to + rounding errors. + + * doc/gawk.texi (Bitwise Functions): Leading nonzero bits are + removed in order to fit the result into a C 'double' without rounding + error. + * builtin.c: Include if available. + (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG): Define if not already defined. + (AWKSMALL_MANT_DIG, AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): New macros. + (tmp_integer): New function. + (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Use them. + +Tue Jun 1 17:40:47 2004 Stepan Kasal + + * eval.c (push_args): Set var_value to Nnull_string for + local variables. + +Mon May 31 11:49:20 2004 Stepan Kasal + + * replace.c: #undef DEBUG before including mktime.c, it has + different meaning there. + +Mon May 31 08:25:30 2004 Arnold D. Robbins + + * array.c (get_actual): Add extra error message for `delete f' + inside body of function `f'. + +Mon May 3 09:53:34 2004 Arnold D. Robbins + + * Makefile.in, */Makefile.in: Updated to automake 1.8.4. + * config.guess, config.sub: Same. + * aclocal.m4, depcomp, install-sh: Same. + +Mon May 3 09:24:45 2004 Arnold D. Robbins + + * configure.ac: Look for missing `strtoul'. + * replace.c: Include missing_d/stroul.c if not HAVE_STRTOUL. + * io.c (devopen): Use `strtoul' instead of `strtod' for + extracting fd number from "/dev/fd/N". (Thanks to Jim Meyering.) + * field.c (set_FIELDWIDTHS): Use `strtoul' instead of `strtod' + when parsing FIELDWIDTHS values. (Thanks to Jim Meyering.) + +Mon Apr 19 20:12:57 2004 Arnold D. Robbins + + * Makefile.in, */Makefile.in: Updated to automake 1.8.3. + * config.guess, config.sub: Same. + +2004-03-18 Stepan Kasal + + * eval.c (make_scalar): Comment clarification. + + * array.c (get_actual): Remove the condition ``canfatal'' + before ``cant_happen()''; if the data are consistent, we + simply cannot get there with a non-func Node_param_list, + no matter whether we are called via get_array or not. + + * awkgram.y (variable): Make one longer message, to help translators. + +Tue Mar 9 17:34:10 2004 Arnold D. Robbins + + Adapted `gofast' patch from Redhat Enterprise version of grep + to current dfa.c. + + * dfa.c (buf_offset): New variable. + (SKIP_REMAINS_MB_IF_INITIAL_STATE): Modified to use it, don't + free `mblen_buf', `inputwcs'. + (match_anychar, match_mb_charset, transit_state_consume_1char, + transit_state): Use buf_offset in mblen_buf. + (dfaexec): Realloc things instead of free and malloc. + +Thu Mar 4 16:46:55 2004 Arnold D. Robbins + + * configure.ac (AC_FUNC_MBRTOWC): Added. + (AC_CHECK_FUNCS): Removed `mbrtwoc'. + (REGEX_MALLOC): Removed. Not needed for new regex* routines. + + * re.c (research): Removed comment and check for return of -2 + since that was for old regex using alloca or REGEX_MALLOC. + +Wed Mar 3 17:10:16 2004 Arnold D. Robbins + + * io.c (close_one): Don't close stdout or stderr; can happen if + /dev/stdout or /dev/stderr are used in redirection and all the + open files get used. + +Sun Feb 29 12:17:37 2004 Arnold D. Robbins + + * regcomp.c (build_charclass, build_charclass_op): Change type of + `class_name' parameter to `const char *' from `const unsigned char *' + and adjust callers. + +Thu Feb 26 15:20:22 2004 Arnold D. Robbins + + * awkgram.y (get_src_buf): Rewritten to better manage input and + supplying newlines on command line programs. Fixes problems reading + source files on Cygwin. + + Unrelated fixes from mary1john8@earthlink.net: + + * node.c (format_val): For no malloc case, free s->stptr if necessary. + * io.c (nextfile): Add missing call to `unref(FILENAME_node->var_value)' + for no files case. + (close_redir): Remove file from redirection list even if fp is + stdout or stderr. + +Tue Feb 24 12:11:34 2004 Arnold D. Robbins + + * regex_internal.c (build_wcs_upper_buffer): Enclose `offsets_needed' + label in `#ifdef _LIBC' to silence `unused label' compiler warning. + +Tue Feb 24 11:57:18 2004 Nelson H.F. Beebe + + * regcomp.c (parse_expression): Add cast to (unsigned char *) in calls + to `build_charclass_op'. + * regex_internal.c (build_wcs_buffer): Add cast to char* in call to + `wcrtomb'. + * regex_internal.h (bitset_not, bitset_merge, bitset_not_merge, + bitset_mask, re_string_char_size_a, re_string_wchar_at, + re_string_elem_size_at): Change to use prototypes. + (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at): + Declare as `internal_function'. + + * Makefile.am: Add rule to make .i files. This assists in debugging. + * awk.h (m_tree_eval): Add casts to NULL. (Some compilers are just + dumb. ADR) + +Mon Feb 23 15:58:39 2004 Arnold D. Robbins + + Clean up occupied process slots of children that have died: + + * awk.h (child_catcher): New function, declare it. + * main.c (main): Catch SIGCHLD/SIGCLD with `child_catcher'. + * io.c (child_died): New static variable. + (child_catcher): New function, sets `child_died', reinstalls self + as signal handler. + (close_rp): New function: isolates actual fp/iop closing logic. + (close_redir): Call `close_rp'. + (get_a_record): Check `child_died' and call `wait_any(0)' if so. + Add descriptive comment. + + Unrelated clean up: + + * eval.c (fcalls): Renamed from `fcall_list'. All uses changed. + (pop_fcall, push_args, dump_fcall_stack): Adjusted to use indexing + on `fcalls' instead of a pointer into it. Avoids hassles if `fcalls' + is realloc-ed during recursive tree_evals. Thanks to BWK. + + * config.guess, config.sub: Updated from Savannah. + +2004-02-19 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1. + +Wed Feb 18 12:40:09 2004 Arnold D. Robbins + + * awkgram.y (rule): Use `msg' not `warning' for `must have an + an action part' message. `warning' is wrong, since it's a real error. + +Mon Feb 16 12:17:39 2004 Arnold D. Robbins + + * main.c, eval.c, builtin.c: Change test for `#ifdef HAVE_LOCALE_H' + to `#if ENABLE_NLS && defined(HAVE_LOCALE_H)' so that builds with + `configure --disable-nls' will actually work on non-glibc systems. + +Thu Feb 12 02:05:34 2004 Stepan Kasal + + Lots of misc changes from Stepan Kasal integrated. + + * array.c: Various variables and parameters of static functions + changed from int to long, in order to prevent overflow. + + * eval.c (make_scalar): New function; takes care of everything + that has to be done when a node of type Node_var_new or + Node_array_ref changes to a scalar variable. + (tree_eval, get_lhs): Call it. + (tree_eval): From now on, tree_eval(NULL) doesn't work; + it reports an internal error. + * awk.h (m_tree_eval): Likewise for the two macro versions. + * awkgram.y (statement): Make sure the Node_K_return's lnode is + always the return value, never NULL. + + * Makefile.am (install-exec-hook, uninstall-links): Make use of + $(VERSION). + (INCLUDES): Renamed to AM_CPPFLAGS. + (AM_CPPFLAGS): The file libintl.h is generated in the + build subdirectory intl, not in the directory $(srcdir)/intl. + (diffout): New target is an alias for ``make -C test diffout.'' + * awklib/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS. + + * README_d/README.hpux: Change the whitespace in the appended patch, + so that it applies to the current source. + * posix/gawkmisc.c: Change a tab to a space (needed for the above). + + Make version control more in the style of current autotools: + + * configure.ac: Remove obsolete versions of macros: + AM_INIT_AUTOMAKE doesn't need any parameters. + AC_OUTPUT shouldn't have any parameters either. + Its parameters go to a new macro: AC_CONFIG_FILES. + AC_CONFIG_HEADERS moved near the end of the file. + * configure.ac: Add [version.c:version.in] to AC_CONFIG_FILES + * version.in: Modify for autoconf substitutions. + * version.c: Remove, it's generated at configure time now. + * fixvers, patchlev.h, unsupported/tandem/ptchlvl.h: Nuke and ... + * Makefile.am, main.c: ... forget them. + +Mon Feb 9 12:57:00 2004 Arnold D. Robbins + + * awk.h builtin.c eval.c field.c (HUGE): Changed to `UNLIMITED'. + Avoids possible conflict with constant in svid-mode math.h. Thanks to + Roman.Putanowicz@iecn.u-nancy.fr for pointing out the problem. + +Fri Feb 6 12:09:55 2004 Arnold D. Robbins + + * configure.ac: Check for `wctype', `wcscoll' and `iswctype'. + * mbsupport.h: New file. Merges and centralizes testing for MBS support. + * Makefile.am (base_sources): Add mbsupport.h to list. + * dfa.c, dfa.h, awk.h (MBS_SUPPORT): Include "mbsupport.h" and use the + test there. + * regex_internal (RE_ENABLE_I18N): Same. + + * Makefile.am (CLEANFILES): Added. + +Thu Feb 5 18:05:12 2004 Arnold D. Robbins + + * configure.ac (HAVE_WCTYPE_T): New test code added. + * dfa.h (wctype_t): Define if system doesn't. Needed here too + for other files that include dfa.h. + * dfa.c (wctype_t): Define if system doesn't. + (lex): Manually fill in arrays used for char class range testing + so will work on c89 and older compilers. + (parse_bracket_exp_mb): Split up an assignment to avoid type complaints. + + * main.c (main): When checking for `close_io' failure, only set + `exit_val' to 1 if not already exiting. + + * regcomp.c (regerror): Remove use of mempcpy. Generates too + many compiler warnings. + * configure.ac (AC_CHECK_FUNCS): Don't bother checking for it. + +Wed Feb 4 17:34:47 2004 Arnold D. Robbins + + * getopt.h (__THROW): Only define it if C++. The __GNU_PREREQ + macro is a major headache. + +2004-02-02 Paolo Bonzini + + * regexec.c (check_matching): Add P_MATCH_FIRST parameter. + (re_search_internal): Pass new parameter to check_matching. + (check_matching): Unless a parenthesized group is found at the + beginning of the regexp, advance P_MATCH_FIRST until we entered + a state different from the initial state. + +Mon Feb 2 15:52:37 2004 Arnold D. Robbins + + * re.c (research): Change last param to re_search to pass + NULL if `need_start' is false. May give us a marginal speed gain. + +Thu Jan 29 17:04:51 2004 Arnold D. Robbins + + * builtin.c (sub_common): Fix logic for `&' in replacement for + multibyte case. Simplify code a bit. + +Tue Jan 20 10:41:45 2004 Arnold D. Robbins + + * configure.ac: Add check for `memmove'. + * replace.c: Include missing_d/memmove.c if don't have `memmove'. + +Sun Jan 18 12:01:29 2004 Arnold D. Robbins + + * builtin.c (sub_common): Add comment and support for 2001 POSIX + behavior when --posix in effect. The masses have been + clamoring for this one. + +2004-01-16 gettextize + + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.13.1. + * intl/*: Updated to 0.13.1. + +Fri Jan 16 08:16:38 2004 Arnold D. Robbins + + * getopt.h, getopt.c, getopt1.c: Synced to GLIBC version: + getopt.c: 1.51 + getopt.h: 1.18 + getopt1.c: 1.9 + +Thu Jan 15 15:28:48 2004 Arnold D. Robbins + + Here we go again: + + * regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c, + regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC + CVS versions: + + regcomp.c: 1.76 + regexec.c: 1.55 + regex.c: 1.125 + regex.h: 1.30 + regex_internal.c: 1.39 + regex_internal.h: 1.45 + regexec.c: 1.55 + + * acinclude.m4: Removed, not needed for automake 1.8.x. + * configure.ac: Updated to autoconf 2.59. + + Everything else updated to automake 1.8x and autoconf 2.59. + +Wed Jan 14 14:26:36 2004 Arnold D. Robbins + + * dfa.c, dfa.h: Updated manually with most of the changes in + grep 2.5.1. That version lost the ability to match newlines + in the data, so the merge had to be done by hand. Sigh. + +2004-01-12 Paolo Bonzini + + ALLOCA patch from + http://sources.redhat.com/ml/libc-alpha/2004-01/msg00099.html + added. + + * regcomp.c [_LIBC && !RE_ENABLE_I18N]: + Drop code to support this, it is never true. + (build_range_exp) [!_LIBC]: Do not create a range + in MBCSET for a single-byte character set. + (build_range_exp) [_LIBC]: Do not create a range + in MBCSET for a single-byte character set without + collation elements. + (init_dfa): Do not conditionalize on _LIBC, it + just makes the code less clear. + (parse_bracket_exp): Use NON_MATCH variable in + addition to "mbcset->non_match", not as an + alternative. + (build_charclass_op): Rename NOT parameter to + NON_MATCH, use it instead of declaring a variable. + (parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET + if the character set is single-byte. + +Wed Jan 7 15:23:04 2004 Arnold D. Robbins + + * awkgram.y (mk_rexp): Set n->re_cnt to 1. Makes reinstated + dfa code actually take effect! Don't know how I missed this. + + Unrelated: sync regex code to glibc. + + * regcomp.c, regex.h, regex.c, regex_internal.h, regex_internal.c, + regexec.c: Sync to GLIBC version, but with bug fixes. GLIBC + CVS versions: + + regcomp.c: 1.74 + regex.c: 1.124 + regex.h: 1.30 + regex_internal.c: 1.39 + regex_internal.h: 1.43 + regexec.c: 1.55 + + * regcomp.c (peek_token): Temporarily, we hope, disable \s and \S + operators. Too much trouble to document right now. + * dfa.c (lex): Add code for \s and \S but disable it until + next release. + +Wed Dec 24 15:28:57 2003 Arnold D. Robbins + + * eval.c (r_tree_eval): For Node_assign_concat, add + call `free_temp(r)'. Thanks to mary1john8@earthlink.net. + +Mon Dec 1 10:25:52 2003 Arnold D. Robbins + + CONSTVAL not needed if we test PERM instead. Thanks to + mary1john8@earthlink.net. See test/concat3.awk. + + * awk.h [CONSTVAL]: Removed. + * eval.c (flag2str): Removed CONSTVAL from table. + (r_tree_eval): For Node_assign_concat, it's enough to check + if l->flags has PERM clear. + * awkgram.y (yylex): Removed use of CONSTVAL for YSTRING and YNUMBER. + +Mon Nov 3 16:33:26 2003 Arnold D. Robbins + + * awkgram.y (get_src_buf): Replace `memmove' with `memcpy' for + marginal portability gain to older systems. + * io.c (get_a_record): Ditto. + +Sun Nov 2 15:59:27 2003 Arnold D. Robbins + + * awk.h [CONSTVAL]: Renamed from `STRCONST'. + * eval.c (flags2str): Fix in table. + (r_tree_eval): For Node_assign_concat, check for the flag for + both left and right hand sides. Also add a `force_string' call + for the right hand side and the left hand side. + * awkgram.y (yylex): Change flag value for YSTRING and add use + of flag for YNUMBER. + +Wed Oct 29 14:23:29 2003 Arnold D. Robbins + + * awk.h [STRCONST]: New flag value. + * eval.c (flags2str): Add it to table. + (r_tree_eval): For Node_assign_concat, check for the flag so that + we don't clobber string constants given: + s = "" + s = s something + * awkgram.y (yylex): For YSTRING, set STRCONST flag. + +Tue Oct 28 18:00:00 2003 Arnold D. Robbins + + Force SUBSEP to always have a string value. Per bug report + from mary1john8@earthlink.net. + + * awk.h (NODETYPE): New type, Node_SUBSEP. + (set_SUBSEP): Add declaration. + * awkgram.y (isnoeffect, isassignable): Add Node_SUBSPEP case. + * array.c (set_SUBSEP): New function. + * eval.c (nodetypes): Add Node_SUBSEP. + (r_tree_eval, r_get_lhs): Add code for Node_SUBSEP. + * main.c (varinit): Use Node_SUBSEP as type for SUBSEP. + * profile.c (tree_eval, pp_lhs, is_scalar, prec_level): Handle + Node_SUBSEP. + +Tue Oct 7 09:26:33 2003 Arnold D. Robbins + + * awk.h (NODETYPE): New member `Node_assign_concat'. + * awkgram.y (exp): Look for case of `x = x y' and if so, create a + Node_assign_concat. + * eval.c (interpret): Add case for Node_assign_concat. + * profile.c (prec_level): Ditto. + (tree_eval): Ditto. For variables, call new function `vname' to + print name; handles varname field for -v variables, which end up + including the value. + (vname): New function. + +Wed Sep 24 17:32:31 2003 Arnold D. Robbins + + Speed up `avoid_dfa' kludge, at least a little: + + * awk.h (struct Regexp): Add `has_anchor' member. Make it and + `dfa' member shorts; keeps space the same. + * re.c (make_regexp): Set `has_anchor' member correctly. + (avoid_dfa): Test for `has_anchor' member instead of searching + for it each time. + +Sun Sep 21 18:34:32 2003 Arnold D. Robbins + + * builtin.c (state): Only needs to be 256 bytes, initstate() can't + use any more than that. Well whadayaknow. + (do_rand, do_srand): Call `setstate' after calling `initstate'. + +Tue Sep 16 15:44:29 2003 Arnold D. Robbins + + * eval.c (interpret): For Node_K_switch, add kludge_need_start stuff + as used in `match_op'. Sigh. + * re.c (make_regexp): Add `no_dfa' variable, which is true if + GAWK_NO_DFA exists in the environment. This enables run time + testing of things with/without the dfa matcher. + +Mon Sep 15 18:36:38 2003 Arnold D. Robbins + + After much soul searching, reinstated old dfa code. The performance + of the new regex is just disastrous. Sigh. + + * awk.h (re_cnt): Reinstated old definition. + (struct Regexp): Added `dfareg' and `dfa' members. + (make_regexp): New last parameter in function, changed decl. + (avoid_dfa): Added declaration. + * awkgram.y (regexp, mk_rexp): Added use of `re_cnt'. Fixed call + to `make_regexp'. + * Makefile.am: Add dfa.h and dfa.c. + * eval.c (match_op): Complexified: added call to `avoid_dfa' and + `kludge_need_start' variable where used to 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): Added last paramter (`dfa') to function. + Complexified the code. + (re_update): Fixed call to `make_regexp'. + (research): Complexified the code, added calls to dfa stuff. + (dfaerror): New function. + (re_update): Fixed call to `make_regexp'. + (avoid_dfa): New function. + +Tue Sep 9 15:57:38 2003 Arnold D. Robbins + + * awkgram.y (get_src_buf): Fix calculation of `offset' when shifting + source lines around. In general, improve handling of things when + moving the source code line around. What a mess this code is. + +Mon Sep 8 19:08:55 2003 Arnold D. Robbins + + * eval.c (fmt_ok): Make provision for %F format and printf %'f flag + here too. + +2003-07-23 Christophe Bisiere (tiny change) + + * posix/regex.h (RE_TRANSLATE_TYPE): Define it to "unsigned char," + to avoid problems at hosts with signed char. + * posix/regexec.c (re_search_internal): Don't say + "unsigned RE_TRANSLATE_TYPE." + +Thu Aug 28 11:09:41 2003 Arnold D. Robbins + + * io.c (nextfile): Change use of variable `files' to make it + clearer that it's a boolean flag. + +Tue Aug 26 22:58:15 2003 Arnold D. Robbins + + * io.c (useropen): Add `defined (HAVE_GETGROUPS)' as first test + in `#ifdef'. Brings things in sync with same test in main.c and awk.h. + +Tue Aug 26 22:49:37 2003 Arnold D. Robbins + + * dbug.h: New file. + + * array.c, awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c, + main.c, msg.c, node.c, profile.c, re.c: Converted to use + Fred Fish's `dbug' library. By default compiled out, thus + not affecting speed. + + For the nonce, the `dbug' library itself is not shipped with + gawk, since I expect no-one else but me to be using it. + +Thu Aug 21 23:15:36 2003 Arnold D. Robbins + + * awkgram.y (numfiles): Change extern decl to long, to match what's + in main.c. Keeps things working on 64-bit systems. Thanks to bug + report from Jan Oravec . + +Wed Aug 20 14:53:47 2003 Arnold D. Robbins + + * eval.c (genflags2str): Move test for out-of-space inside test + for is the bit set. + +Mon Aug 11 11:26:51 2003 Arnold D. Robbins + + * regcomp.c (parse_bracket_exp): If `build_charclass' fails, just pass + its value on as the return value. + +Sun Aug 10 16:59:14 2003 Arnold D. Robbins + + * regcomp.c (build_range_exp): Make sure we don't + get WEOF on range characters. + +Tue Aug 5 21:49:32 2003 Arnold D. Robbins + + * array.c (get_actual): In `case Node_param_list' add test for + `&& (symbol->flags & FUNC) == 0' to the if. + +Sun Jul 13 18:28:38 2003 Arnold D. Robbins + + Further bug fix: + + * awkgram.y (variable): Give the new variable an lnode + of Nnull_string if it's not an array, even if it is + a Node_var_new. + +Fri Jul 11 09:32:21 2003 Arnold D. Robbins + + Bug fix: + + * eval.c (r_tree_eval): For Node_array_ref, set + tree->orig_array->var_value to Nnull_string too. + + Unrelated i18n and POSIX change: + + * configure.ac: Add check for local printf supporting %F format. + * awk.h (loc): New variable declaration. + * main.c (loc): Defined. + (main): Call `localeconv' to set loc. + * io.c (format_tree): Add support for printf quote flag, %'d for + decimal formats (not %e, %E), adds thousand separator into value. + +2003-07-10 Paul Eggert + + * io.c (two_way_open): If /bin/sh cannot be executed, exit + with status 126 consistently. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +Mon Jul 7 09:55:49 2003 Arnold D. Robbins + + * main.c (copyleft, usage): Make sure to fflush output fp. Per Jim + Meyering, if error, exit non-zero. + * ext.c (get_argument): Fix array paramater handling. + +2003-07-06 Paul Eggert + + * builtin.c (do_substr): Issue better diagnostics when + d_substr and d_length are NaN, or when 0 < d_length < 1. + Be careful when comparing double to SIZE_MAX, as + the comparison might return the "wrong" answer when + `(double) SIZE_MAX' is a number that is not equal to + SIZE_MAX. + (do_gensub): Watch out for HOW values that are out of range + or are NaN. + (do_dcngettext): dcngettext wants an argument of type + unsigned long, not long, so use a value of that type. + +Fri Jul 4 10:58:02 2003 Arnold D. Robbins + + * main.c (main): Make option letter 'D' fall through into default + unknown case if not debugging. Let's us have just one version of + `optlist'. + +Thu Jun 26 15:25:57 2003 Arnold D. Robbins + + * array.c (get_actual): Undo Stepan Kasal change of 2003-06-17. + See test/match2.awk. + +Wed Jun 25 15:26:08 2003 Arnold D. Robbins + + * builtin.c (do_rand): Change calculation so that result + obeys constraint: 0 <= N < 1. This is per history and POSIX. + Thanks to Nelson Beebe (beebe@math.utah.edu) for reporting + this issue. + +Mon Jun 23 15:13:39 2003 Arnold D. Robbins + + * io.c (rs1scan): Per advice from Bruno Haible, it's safe + to skip the multibyte checking code if RS is '\n'. See + the comment in the code. Big performance improvement for + multibyte locales. + +2003-06-20 Stepan Kasal + + * eval.c (comp_func): If memcmp returns 0, we have to compare + the lengths. + +2003-06-19 Stepan Kasal + + * eval.c (interpret) : Use NULL, not 0, to + initialize the variable list. + (comp_func): Array indices no longer are string values, + you have to use ahname_str, ahname_len. + +Tue Jun 17 11:53:46 2003 Arnold D. Robbins + + * array.c (get_actual): Make check for isparam + smarter: also check for FUNC flag. + +2003-06-17 Stepan Kasal + + * array.c (get_actual): Even if canfatal is FALSE, don't + tolerate existence of things which can't happen. + +Mon Jun 16 16:21:44 2003 Arnold D. Robbins + + * configure.ac: Removed m4/Makefile. + * m4/Makefile.am: Removed. + +2003-06-16 gettextize + + * configure.ac (AC_OUTPUT): Add m4/Makefile. + (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1. + +Sun Jun 15 20:45:43 2003 Arnold D. Robbins + + * io.c (get_a_record): Enhance logic to fill buffers to include + `|| no_data_left(iop)'. + (rs1scan): Fix logic for setting recm fields for multibyte + character case. + +2003-06-10 Stepan Kasal + + * awkgram.y (release_all_vars): Do not try to release a value of + Node_var_new; after get_lhs, use the lhs directly, do not try + to do (*lhs)->var_value; the Node_var case doesn't need + special treatment. + * builtin.c (do_match): `get_param' is successful iff it returns + Node_var_array---if the variable was new, get_param has already + changed the type. + * field.c (do_split): Likewise. + +Sun Jun 15 19:36:35 2003 Arnold D. Robbins + + * node.c (r_dupnode): Typo fix in hash tables: stptr -> ahname_str. + Thanks to mary1john8@earthlink.net. + * array.c (get_actual): Add `if (canfatal)' before call to + `cant_happen'. + +Sun Jun 15 19:25:49 2003 Patrick T.J. McPhee + + * awk.h (memcpy_ulong): Add ! WIN32 to ifdefs. + +Mon Jun 9 18:38:20 2003 Arnold D. Robbins + + * custom.h (hpux): Added stuff to (hopefully) get `tzset' + declared on HP/UX 10 and up. + +Mon Jun 9 17:12:24 2003 Patrick T.J. McPhee + + * awk.h (ATTRIBUTE_EXPORTED): New macro for dynamic libs on Windows32. + * CONVMFTidx, stack_ptr, do_lint, lintfunc: Now have this attribute. + +Mon Jun 9 13:11:33 2003 Arnold D. Robbins + + Clean up of Stepan's patches. + + * array.c (get_actual): Renamed from r_get_array. Added second + param canfatal if routine should print fatal message when not an array. + (get_actual): Renamed 'prm' to `isparam'. + (array_vname): Add static msglen var; only realloc string if it grows. + Don't use `s += sprintf(...)'. No good on old systems where sprintf + returns char *. Minor formatting cleanups. + (do_adump): Restored separate `a' and `r' variables; helps for debugging. + + * awk.h (SCALAR, UNINITIALIZED): Removed entirely, renumbered other flags. + (get_array, get_param): New macros, calls get_actual. + (get_actual): Declaration changed from that of r_get_array. + + * awkgram.y (release_all_vars): Restored previous version of code; new + version isn't right for Node_xx variables. + (variable): Minor code cleanup for readability. + + * builtin.c (do_match): Use get_param and print our own message when + third parameter is not an array. + + * eval.c: Added a few comments here and there, removed some no longer + needed comments. + + * field.c (do_split): Use get_param and print our own message when + second parameter is not an array. + +Mon Jun 9 11:46:21 2003 Arnold D. Robbins + + * array.c (do_delete): Initialize hash1 and last to keep gcc -Wall happy. + * io.c (rsnullscan): Comment out label skip_leading for same reason. + +Wed May 28 08:31:23 CEST 2003 Stepan Kasal + + * eval.c (forloops_active, in_function): Nuked. + (pop_all_forloops, pop_fcall_stack): Are now inline. + +Wed May 28 07:58:35 2003 Stepan Kasal + + * field.c, awk.h (Null_field): No longer static. + * field.c (init_fields): Initial value of $0 can be Nnull_string, + no need to copy it. + * eval.c (r_get_lhs) : Test for uninitialized field, + which is Nnull_string for $0 and Null_field for $(>0). + * builtin.c (do_print_rec): Test for uninitialized $0. + +Tue May 27 17:03:02 2003 Stepan Kasal + + * awk.h (Node_var_new): New node type for variables which can be + either scalar or array. From now on, Node_var is always scalar. + (Node_gvar_ref): Nuked, its role can be taken by Node_array_ref. + (orig_var): Removed, orig_array is enough. + (SCALAR, UNINITIALIZED): Flags nuked. + (var_uninitialized): New macro to distinguish uninitialized vars; + used in several other macros. + * array.c (r_get_array, array_vname, do_adump): Adapt to the + above changes. + * awkgram.y, eval.c, field.c, main.c, node.c, profile.c: Ditto. + +Tue May 27 14:27:50 2003 Stepan Kasal + + * array.c (r_get_array): New function, which goes all the way + through Node_param_list to actual Node_var_array; if it encounters + non scalar Node_var, it changes it to Node_var_array. + (in_array, do_delete, do_delete_loop, do_adump, assoc_sort_inplace): + Use get_array. + (assoc_lookup): The parameter must be a Node_var_array. + * awk.h (get_array, r_get_array): Declare the new function and define + a macro to speed it up. + * builtin.c (do_match): Use get_array. + * eval.c (interpret) : Ditto. + (r_get_lhs) : Ditto. + * field.c (do_split): Ditto. + +Tue May 27 08:23:51 2003 Stepan Kasal + + Changed node->vname meaning for type Node_array_ref and Node_gvar_ref. + It contains only the reference name; one has to (recursively) follow + node->prev_array to find out the call history for the array. + + * array.c (array_vname): New function to print the array name. + (assoc_lookup, do_delete): Use array_vname. + * eval.c (interpret, r_tree_eval, r_get_lhs): Use array_vname. + (push_args, pop_fcall): Things have simplified. + * awk.h (array_vname): Declare. + (prev_array): Define. + +Sun Jun 8 11:25:36 2003 Stepan Kasal + + * awkgram.y (append_right): When using savetail, remember that it + is not necessarily the tail of the list---it's just a pointer to + the last chunk appended. + +Thu Jun 5 12:01:41 2003 Arnold D. Robbins + + * builtin.c (do_strtonum): Make `strtonum(13)' work. + +Wed Jun 4 17:07:06 2003 Corinna Vinschen + + * io.c (binmode): Include function for __CYGWIN__ too. + +Tue Jun 3 12:40:50 2003 Arnold D. Robbins + + * eval.c (interpret): Node_K_switch. For regex case, don't + call `free_temp' on the result of `force_string' if it's equal to + switch_value. Thanks to John DuBois + for finding the problem. + +Sun Jun 1 13:08:22 2003 Arnold D. Robbins + + * builtin.c (format_tree): For %c, force precision to 1. + +Wed May 28 11:55:48 2003 Arnold D. Robbins + + * awkgram.y (isnoeffect, isassignable): Add Node_TEXTDOMAIN to + switches in both functions. + +Wed May 28 11:38:59 2003 Stepan Kasal + + * awkgram.y (switch_body): Remove rule ``switch_body:/*empty/'' + as ``switch_body:case_statements'' covers it---this disambiguation + fixes a reduce/reduce conflict. + +Sun May 25 16:23:43 2003 Corinna Vinschen + + * configure.ac: Remove linking against /usr/lib/automode.o. + * configure: Regenerate. + +Sun May 25 15:19:19 2003 Stepan Kasal + + * awk.h (get_lhs): For an initialized Node_var, you may return + the address of var_value pointer, no matter whether reference + bit was set or not. We were silly slowing down most of the + assignements. + + * (get_a_record): After grow_iop_buffer, move recm.rt_start even + if recm.len == 0. + +Mon May 19 16:55:59 2003 Arnold D. Robbins + + Code for C-style switch statements. Initial version contributed by + Michael Benzinger . + + Disabled by default, use `configure --enable-switch' to turn it on. + + * configure.ac: New AC_ARG_ENABLE for switch statements. + * awk.h (NODETYPE): New types for switch, case, default keywords + and respective lists. + * awkgram.y: New productions for switch statement. Does checking to + avoid duplicate cases. + * eval.c (nodetypes): New entries for new NODETYPEs. + (interpret): New code to do switch execution. + * profile.c (pprint): New code to print switch statements. + +Mon May 19 15:05:43 2003 Arnold D. Robbins + + * configure.ac: Renamed from configure.in. + * fixvers: Now looks in configure.ac. + * Makefile.am: Now cites configure.ac. + + * Misc other: Updated to Automake 1.7.5. + +Sun May 18 12:03:56 2003 Arnold D. Robbins + + * array.c (do_delete_loop): Fix bracing of logic for + tests. + +Wed May 14 09:01:16 2003 Stepan Kasal + + Misc patches: + + * builtin.c (do_match): If third parameter to `match' is supplied, + store all subexpressions which are applicable, even though there + are some unused between them. + + * awkgram.y (yylex): When returning from unterminated REGEXP + (which is /* kludge */), take care to fake a yylval, to + prevent ``internal error'' later. + +Sun May 11 15:51:00 2003 Stepan Kasal + + * io.c (rsnullscan, get_a_record): Boundary condition bug fixes. + +Sun May 11 15:15:20 2003 Scott Deifik + + * awk.h: Add decls for `memcpy_ulong', `memset_ulong', and + MSC defines. + * regex.c: Include if MSC for size_t. + +Mon May 5 15:11:06 2003 Arnold D. Robbins + + * io.c (get_a_record): Only tweak RT's value in place if the current + RS scanner is the same as the last one. Bug report submitted by + John DuBois (). + +Fri May 2 14:39:48 2003 Arnold D. Robbins + + * io.c (get_a_record): Add logic at end to be smart about setting + RT. Saves considerable time, esp for default case where RS = "\n". + +Wed Apr 30 11:44:38 2003 Arnold D. Robbins + + * field.c (do_split): Add check and code for Node_gvar_ref. + * array.c (in_array, do_delete, asort_actual): Same. + * builtin.c (do_split): Same for 3rd arg array parameter. + * eval.c (interpret): Same for Node_K_array_for. + (push_args): Same for evaluating extra args. + +Tue Apr 29 15:54:28 2003 Arnold D. Robbins + + Record reading code redone/simplified considerably. + + * awk.h (IOBUF): Removed total field, no longer used. + * io.c (at_eof, has_data, no_data_left): New macros. + (RECVALUE, SCANSTATE): New enumerated types. + (rs1get_a_record, rsnull_get_a_record, rsre_get_a_record): Removed. + (get_a_record): Rewritten, again. Now contains just buffer and + record code; searching code moved into these functions: + (rs1scan, rsnullscan, rsrescan): New functions to scan a buffer + for record contents and terminator. Fill in values in: + (struct recmatch): Holds found record and terminator. + (spec_setup): Set iop->dataend to indicate data is already in buffer. + (nextfile, inrec): Use new macros instead of flag and pointer tests. + (set_RS): Set scanning function instead of record function. + + FWIW, it all passes `make test'. + +Sun Apr 27 21:02:39 2003 Arnold D. Robbins + + * io.c (do_close): At end, if do_posix return 0. See comment in code. + +Tue Apr 15 09:56:03 2003 Isamu Hasegawa + + * configure.in: Check existence of wcrtomb, and wcscoll. + * configh.in: Likewise. + * configure: Re-generate. + Thanks to Kimura Koichi for reporting. + +Sun Apr 13 16:02:10 2003 Arnold D. Robbins + + * main.c (main): Add call to `setlocale' for LC_NUMERIC after program is + parsed. + (arg_assign): Switch back to "C" locale for LC_NUMERIC for command + line assignments; this is per POSIX that period is decimal point for + program and command line assignments and the locale's separator + applies for input, output, and string to number conversion. + +2003-03-26 Paul Eggert + + * builtin.c [HAVE_INTTYPES_H]: Include . + [!HAVE_INTTYPES_H && HAVE_STDINT_H]: Include . + (CHAR_BIT, INTMAX_MIN, UINTMAX_MAX): Define if the system does not. + (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): New macros, taken from + coreutils and many other GNU utilities. + (format_tree): When formatting, use widest possible integers + rather than settling with 'long'. + (do_lshift, do_rshift, do_and, do_or, do_xor, do_compl): Likewise, + when doing bitwise operations. + * configure.in (jm_AC_TYPE_LONG_LONG, jm_AC_TYPE_UNSIGNED_LONG_LONG, + jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Add, since the mainline + code now needs this. + * doc/gawk.texi (Control Letters, Bitwise Functions): Document this. + * m4/intmax_t.m4: New file, taken from coreutils (but renamed to + avoid collision with our m4/inttypes.m4). + * m4/longlong.m4: New file, taken from coreutils. + * m4/uintmax_t.m4, m4/ulonglong.m4: Remove; superseded by the above + new m4 files. + + * builtin.c (BITS_PER_BYTE): Remove; use CHAR_BIT instead, since + it's the standard name. + (do_lshift, do_rshift): Complain if the shift width is exactly equal + to the word size, too. + +Thu Mar 27 10:44:11 2003 Arnold D. Robbins + + * io.c (rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record): + Enhance check for no data left in file to be only if file has + non-zero size. Linux files such as /proc/filesystems stat as a + regular file of size 0, but actually have contents. Ugh. + Thanks to Martin Schlemmer for the bug report. + +Wed Mar 26 12:19:32 2003 Arnold D. Robbins + + * builtin.c (format_tree): Add a lint warning at label `out_of_range'. + +Tue Mar 25 12:24:38 2003 Arnold D. Robbins + + * awkgram.y (variable): For array subscript, if NAME is in the + symbol table, but not a variable, array, or parameter, generate + a syntax error. + (isarray): New function, tests if a symbol can be an array. + + * custom.h: Add check for HP/UX, needed for GCC. + +Mon Mar 17 09:21:09 2003 Arnold D. Robbins + + Allow simultaneous manipulation of a global array directly + and when passed as a parameter. + + * awk.h (Node_gvar_ref): New nodetype. + [orig_var]: New macro. + * array.c (do_delete_loop, do_delete): Add logic to handle + seeing Node_gvar_ref. + * eval.c (nodetypes): Add Node_gvar_ref. + (r_tree_eval, r_get_lhs): Add Node_gvar_ref case. + +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. + +Wed May 1 16:07:49 2002 Arnold D. Robbins + + * getopt.c: Installed latest version from glibc. + +Sun Apr 28 17:19:07 2002 Arnold D. Robbins + + * fixvers: Changed patterns to allow test versions of the + form `gawk-3.1.1a'. + * patchlev.h: Patchlevel is now a string constant. + * main.c (version): Print patchlevel using %s, not %d. + * Makefile.am: Rework DEFPATH stuff and datadir stuff yet again. + + * config.sub: Updated with current version from ftp.gnu.org. + * config.guess: Ditto. + + Upgrade to gettext-0.11.2: + + * ABOUT-NLS: Replaced with version from gettext 0.11.2. + * config.rpath: Replaced with version from gettext 0.11.2. + * intl/*: Replaced with version from gettext 0.11.2. + * po/Makefile.in.in: Replaced with version from gettext 0.11.2. + * po/Makevars.template: Replaced with version from gettext 0.11.2. + * po/Rules-quot: Replaced with version from gettext 0.11.2. + * po/boldquot.sed: Replaced with version from gettext 0.11.2. + * po/en@boldquot.header: Replaced with version from gettext 0.11.2. + * po/en@quot.header: Replaced with version from gettext 0.11.2. + * po/insert-header.sin: Replaced with version from gettext 0.11.2. + * po/quot.sed: Replaced with version from gettext 0.11.2. + * po/remove-potcdate.sin: Replaced with version from gettext 0.11.2. + * m4/codeset.m4: Replaced with version from gettext 0.11.2. + * m4/gettext.m4: Replaced with version from gettext 0.11.2. + * m4/glibc21.m4: Replaced with version from gettext 0.11.2. + * m4/iconv.m4: Replaced with version from gettext 0.11.2. + * m4/isc-posix.m4: Replaced with version from gettext 0.11.2. + * m4/lcmessage.m4: Replaced with version from gettext 0.11.2. + * m4/lib-ld.m4: Replaced with version from gettext 0.11.2. + * m4/lib-link.m4: Replaced with version from gettext 0.11.2. + * m4/lib-prefix.m4: Replaced with version from gettext 0.11.2. + * m4/progtest.m4: Replaced with version from gettext 0.11.2. + +Wed Apr 17 15:09:45 2002 Arnold D. Robbins + + * regex.c (PREFIX): Change test for token concatenation ability + to `#ifdef HAVE_STRINGIZE'. If a cpp has one, it ought to have + the other. + +Tue Apr 16 12:26:06 2002 Arnold D. Robbins + + * profile.c (tree_eval): Make unary minus case smarter, + use is_scalar test and if false parenthesize expression. + Add Node_TEXTDOMAIN case. + (pp_lhs, is_scalar, prec_level): Add Node_TEXTDOMAIN cases. + +Thu Apr 11 21:28:33 2002 Arnold D. Robbins + + * array.c (do_adump): Spelling fix in output message. + * builtin.c: Ditto, in multiple routines. + (do_toupper, do_tolower): Add cast to size_t in assigment to mbclen + for some compilers. + * re.c (research): Fix way returning is done to silence some + compiler diagnostics. + +Wed Apr 10 19:30:51 2002 Arnold D. Robbins + + * Makefile.am (datadir): Set directly to have `/awk'. + (DEFPATH): Go back to using $(datadir) for path. + +Tue Apr 9 17:34:09 2002 Arnold D. Robbins + + Upgraded to gettext 0.11.1. + + * Makefile.am (LDADD): Use @LIBINTL@ instead of @INTLLIBS@. + * ABOUT-NLS: Version from 0.11.1. + * config.rpath: Version from 0.11.1. + * aclocal.m4: Regenerated based on new files. + * intl/*: Replaced with version from 0.11.1. + * m4/ChangeLog: New file. + * m4/codeset.m4: New file. + * m4/gettext.m4: Version from 0.11.1. + * po/ChangeLog: New file. + * po/Makefile.in.in: Version from 0.11.1. + * po/remove-potcdate.sin: New file. + +Mon Apr 8 22:22:58 2002 Arnold D. Robbins + + * Makefile.am (libexecdir): Set directly to have `/awk'. + (DEFPATH): Use $(pkgdatadir) for path. + (install-exec-hook): Add version link for pgawk. + (uninstall-links): Remove pgawk version link. + +Wed Mar 20 13:44:21 2002 Isamu Hasegawa + + * regex.c (__alignof__): Definition for non-GCC compilers. + +Sun Mar 17 17:41:55 2002 Arnold D. Robbins + + * io.c (do_pathopen): Malloc buffers to hold constructed + filenames: No Arbitrary Limits! Thanks to keoki@techie.com + for the bug report. + +Sun Mar 10 16:59:06 2002 Scott Deifik + + * awk.h (LOCALEDIR): Provide a definition in case not using + i18n stuff. + +Wed Mar 6 18:14:44 2002 Arnold D. Robbins + + * main.c (usage): Add some explanatory text and examples at end. + +Sun Mar 3 16:42:50 2002 Arnold D. Robbins + + * getopt.h, getopt.c, getopt1.c: Update to current version + from glibc CVS. + +Fri Feb 22 15:53:38 2002 Isamu Hasegawa + + * dfa.c (fetch_wc): Fix type from wchar_t to wint_t. + (parse_bracket_exp_mb): Likewise. + * regex.c (extract_number): Retrieve the sign information from + byte-code in case of AIX. + +Thu Feb 21 16:44:24 2002 Arnold D. Robbins + + * re.c (resetup): Moved setting re_max_failures into regex.c. + * regex.c (re_max_failures): Set to really big if REGEX_MALLOC + defined. Do this in both places that define re_max_failures. + +Thu Feb 21 19:02:22 2002 Isamu Hasegawa + + * builtin.c (sub_common): Avoid index_multibyte_buffer invocation + in single byte character environments. + +Thu Feb 21 10:08:56 2002 Isamu Hasegawa + + * dfa.c (parse_bracket_exp_mb): For ':', use wctype_t in MALLOC, + not wchar_t. + +Thu Feb 21 09:52:16 2002 Arnold D. Robbins + + Upgraded to automake 1.5 and gettext-0.11. + Also bug fix to multibyte code. + + * ABOUT-NLS: Upgraded. + * config.guess, config.sub, config.rpath, gettext.h, ylwrap: New files. + * Makefile.am: Added above to appropriate places. + * awk.h: Replace libintl.h and macros with include of gettext.h. + (emalloc, erealloc): Add num bytes to error message, put string inside _(). + (index_multibyte_buffer): Removed decl. + * awklib/Makefile.am: Use $(EXEEXT) for grcat and pwcat targets. + * builtin.c (index_multibyte_buffer): Made static to this file. + (sub_common): Add checks that replacement string is length > 0 so + that we don't try to malloc(0): this fails on some systems. + * configure.in (AM_GNU_GETTEXT): Update macro for gettext 0.11. + (ALL_LINGUAS): Removed. + * m4/codeset.m4: New file. + * m4/gettext.m4: Updated. + * m4/glibc21.m4: New file. + * m4/iconv.m4: New file. + * m4/isc-posix.m4: New file. + * m4/lcmessage.m4: Updated. + * m4/lib-ld.m4: New file. + * m4/lib-link.m4: New file. + * m4/lib-prefix.m4: New file. + * m4/progtest.m4: Updated. + * intl/*: Replaced with version from gettext 0.11. + * po/*: Revised for gettext 0.11. + +Mon Feb 18 14:42:39 2002 Arnold D. Robbins + + * builtin.c (nondec2awknum): Change assert to runtime check + in case user passed in bad data. + +2002-02-17 Paul Eggert + + * re.c (resetup): Try to avoid silly limitation of regex.c by + setting re_max_failures to the largest reasonable value. + +Sun Feb 17 14:57:43 2002 Arnold D. Robbins + + * builtin.c (research): If re_search() returns -2, the + match failed since regex couldn't allocate enough memory + for what it needed. Fail with a fatal message instead. + This is a workaround, not a fix, but I don't mess with + regex.[ch]. + +Fri Feb 8 16:01:11 2002 Arnold D. Robbins + + * awkgram.y (LEX_FOR): Fix case of array loop with body of single + delete statement to actually check the right things to make the + optimization. + * profile.c (tree_eval): Add case for Node_K_delete_loop. + (prec_level): Ditto. + +Mon Feb 4 10:38:00 2002 Bruno Haible + + * awk.h (dcngettext): New macro. + (do_dcngettext): New declaration. + * awkgram.y (tokentab): Add dcngettext. + (snode): Add a warning for incorrect use of dcngettext. + (dumpintlstr): fflush at the end, not in the middle. + (dumpintlstr2): New function. + * builtin.c (localecategory_from_argument): New function, extracted + from do_dcgettext. + (do_dcgettext): Call it. + (do_dcngettext): New function. + +Sun Feb 3 17:56:20 2002 Bruno Haible + + * builtin.c (do_bindtextdomain): Don't free the same variable twice. + * main.c (main): Call setlocale for LC_MESSAGE, to make dcgettext + function work on glibc systems. + +Wed Jan 23 15:03:36 2002 Andreas Buening + + * configure.in (PATH_SEPARATOR): Code added for OS/2. + Makefile.am (PATH_SEPARATOR): Added. + (DEFPATH): Make use of PATH_SEPARATOR. + +Wed Jan 23 14:46:04 2002 Arnold D. Robbins + + * awkgram.y (yylex): Add test for lasttok != '$' when looking + at _"...". See comments in code. + +Wed Aug 15 07:43:10 2001 Isamu Hasegawa + + * regex.c : Implements the codes for exactn_bin to work correctly + in multibyte environments, in case of invalid multibyte sequence. + +Wed Aug 15 07:36:56 2001 Isamu Hasegawa + + * regex.c : Implements the codes for charset/charset_not to + work in multibyte environments. + +Wed Aug 15 05:04:34 2001 Isamu Hasegawa + + * regex.c : Add some comments. + +Wed Aug 15 05:04:15 2001 Isamu Hasegawa + + * regex.c (count_mbs_length): New function, check the mutibyte + strings and count how many wchar_t the substring occupy. + (CHAR_T): New macro, character type depending on + environments(singlebyte/multibyte). + (UCHAR_T): New macro, unsigned character type. + (COMPILED_BUFFER_VAR): New macro, the buffer containing + the compiled buffer. + Adapt singlebyte/multibyte environments with CHAR_T, UCHAR_T, + and COMPILED_BUFFER_VAR. + +Mon Jun 25 09:00:41 2001 Isamu Hasegawa + + * regex.c : Reorganize code to build code twice. byte_* are + for single byte, wcs_* are for multibyte character sets. + Chose functions according to current locale dynamically. + * regex.c (convert_mbs_to_wcs): New function, convert multibyte + strings to wide character strings for multibyte environments. + +Fri Jun 22 05:43:50 2001 Isamu Hasegawa + + * regex.c (MBS_SUPPORT): New macro, defined if the environment + can handle multibyte characters. + (OFFSET_ADDRESS_SIZE): Offset address size in the + compiled buffer. + Rewrite offset addresses with OFFSET_ADDRESS_SIZE. + +Thu Apr 26 08:03:17 2001 Isamu Hasegawa + + * builtin.c (index_multibyte_buffer): Inspect the buffer and write + the index. + (sub_common): In multibyte environment, skip multibyte characters + when we check special characters. + * awk.h (index_multibyte_buffer): Add prototype. + * eval.c (cmp_nodes): In multibyte environment, compare per character. + * field.c (re_parse_field): In multibyte environment, avoid to + call research() on invalid boundary. + (sc_parse_field): In multibyte environment, avoid to compare on + invalid boundary. + (null_parse_field): In multibyte environment, split per + character, not per byte. + * io.c (get_a_record): In multibyte environment, avoid to compare + on invalid boundary. + +Wed Apr 25 08:29:47 2001 Isamu Hasegawa + + * awk.h (strncasecmpmbs): Add prototype. + * builtin.c (strncasecmpmbs): New function like strncasecmp but for + multibyte strings. + (do_index): In multibyte environment, compare per character. + * builtin.c (do_tolower): In multibyte environment, user towlower + instead of TOLOWER. + (do_toupper): In multibyte environment, user towupper instead + of TOUPPER. + +Tue Apr 24 10:38:06 2001 Isamu Hasegawa + + In multibyte environments, handle multibyte characters as single + characters in bracket expressions. + + * dfa.h (mb_char_classes): New structure. + (mbcsets): New variable. + (nmbcsets): New variable. + (mbcsets_alloc): New variable. + * dfa.c (prtok): Handle MBCSET. + (fetch_wc): New function to fetch a wide character. + (parse_bracket_exp_mb): New function to handle multibyte character + in lex(). + (lex): Invoke parse_bracket_exp_mb() for multibyte bracket expression. + (atom): Handle MBCSET. + (epsclosure): Likewise. + (dfaanalyze): Likewise. + (dfastate): Likewise. + (match_mb_charset): New function to judge whether a bracket match + with a multibyte character. + (check_matching_with_multibyte_ops): Handle MBCSET. + (dfainit): Initialize new variables. + (dfafree): Free new variables. + +Mon Apr 23 01:40:09 2001 Isamu Hasegawa + + Implement the mechanism to match with multibyte characters, + and use it for `period' in multibyte environments. + + * dfa.h (mbps): New variable. + * dfa.c (prtok): Handle ANYCHAR. + (lex): Use ANYCHAR for `period' in multibyte environments. + (atom): Handle ANYCHAR. + (state_index): Initialize mbps in multibyte environments. + (epsclosure): Handle ANYCHAR. + (dfaanalyze): Handle ANYCHAR. + (dfastate): Handle ANYCHAR. + (realloc_trans_if_necessary): New function. + (transit_state_singlebyte): New function. + (match_anychar): New function. + (check_matching_with_multibyte_ops): New function. + (transit_state_consume_1char): New function. + (transit_state): New function. + (dfaexec): Invoke transit_state if expression can match with + a multibyte character in multibyte environments. + (dfamust): Handle ANYCHAR. + +Fri Apr 20 11:31:24 2001 Isamu Hasegawa + + Avoid incorrect state transition in multibyte environments. + + * dfa.h (nmultibyte_prop): New variable. + (multibyte_prop): New variable. + * dfa.c (addtok): Set inputwcs. + (dfastate): Avoid incorrect state transition in multibyte + environments. + (dfaexec): Likewise. + (dfainit): Init multibyte_prop. + (dfafree): Free multibyte_prop. + (inputwcs): New variable. + (mblen_buf): New variable contains the amount of remain byte + of corresponding multibyte character in the input string. + +Fri Apr 20 06:28:59 2001 Isamu Hasegawa + + Handle a multibyte character followed by '*', '+', and '{n,m}' + correctly. + + * dfa.c (update_mb_len_index): New function. + Support for multibyte string. + (FETCH): Call update_mb_len_index. + (lex): Check cur_mb_index not to misunderstand multibyte characters. + (atom): Make a tree from a multibyte character. + (dfaparse): Initialize new variables. + (mbs): New variable. + (cur_mb_len): New variable. + (cur_mb_index): New variable. + +Thu Apr 19 09:32:47 2001 Isamu Hasegawa + + * awkgram.y (cur_mbstate): New varialble containing means current + shift state. + (cur_char_ring): New varialbe reffering the buffer which contains + last some character from the buffer. + (cur_ring_idx): New variable containing the current index on + cur_char_ring. + (nextc_is_1stbyte): New macro, means that last nextc() return a + singlebyte character or 1st byte of a multibyte character. + (nextc): Check the buffer and update cur_ring_char in multibyte + environments. + (pushback): Adjust cur_ring_idx in multibyte environments. + (yylex): Add check whether nextc() returned 1st-byte in multibyte + environments. + * re.c (make_regexp): In multibyte environment, skip multibyte + characters when we check special characters. + +Wed Apr 18 07:58:20 2001 Isamu Hasegawa + + * awk.h (MBS_SUPPORT): New flag, means supporting multibyte strings. + * configure.in : Add check for wchar.h, wctype.h, mbrtowc, and mbrlen. + +Wed Jan 16 16:32:40 2002 Arnold D. Robbins + + * builtin.c (do_strtonum): Simplified. Check first if the + value matches a non-decimal number, and if so convert it. + Otherwise do a regular force_number. + +Mon Jan 7 22:12:15 2002 Arnold D. Robbins + + * awkgram.y (statement): Moved delete, print, and expressions into + new non-terminal `simple_stmt'. Allow opt_simple_stmt in the + first and third part of a for loop, per latest POSIX, which documents + an otherwise undocumented historical oddity in Unix awk. This has + the pleasant side effect of making line numbers more accurate for + messages involving delete statements. + (opt_simple_stmt, simple_stmt): New non-terminals. + + Based on bug report from drj@pobox.com. + +Mon Dec 24 14:04:02 2001 Arnold D. Robbins + + * configure.in: Changes for VMS with new strftime: + (AC_HEADER_TIME): Added. + (AC_CHECK_HEADERS): Check for sys/time.h. + (TIME_T_IN_SYS_TYPES_H): Add header check. + * acconfig.h (TIME_T_IN_SYS_TYPES_H): Added. + +Wed Dec 19 16:01:58 2001 Peter J. Farley III + + * configure.in: Add MS-DOS to getpgrp special case. + * dfa.c, getopt.c, regex.c: Fix code to work with --disable-nls. + +Wed Dec 19 15:59:25 2001 Eli Zaretskii + + * profile.c (init_profiling_signals) [__DJGPP__]: Use SIGINT + instead of SIGHUP and SIGQUIT instead of SIGUSR1. + +Tue Dec 18 20:56:07 2001 Andreas Buening + + More OS/2 stuff. + + * awk.h (O_BINARY): Don't redefine for EMX. + * io.c (gawk_popen): Add __EMX__ in case compiling DOS executable. + * configure.in: Add OS/2 to case for manual GETPGRP_VOID. + +Tue Dec 4 17:54:30 2001 Arnold D. Robbins + + New configure time option, --with-whiny-user-strftime. + + * configure.in (AC_ARG_WITH): Add appropriate code for autoconf. + * accondig.h (USE_INCLUDED_STRFTIME): Add #undef for it. + * custom.h (USE_INCLUDED_STRFTIME): Set things up write. + +Tue Dec 4 16:44:07 2001 Andreas Buening + + Mongo patch for updated OS/2 support. + + * awk.h (TOUPPER, TOLOWER): Define only if not already defined. + * awkgram.y (extproc feature): Add ifdef for __EMX__. + * gawkmisc.c (__EMX__): Include pc/gawkmisc.c directly. + * io.c (__EMX__): Added for a number of places in addition to OS2 def. + (two_way_open): Added OS/2 specific code added that uses spawn. + (gawk_popen): Ditto. + +Mon Dec 3 14:07:56 2001 Arnold D. Robbins + + Fix use of getgroups to use dynamic memory, solves + problem of systems where NGROUPS_MAX lies. + + * awk.h (groupset, ngroups): New extern variables. + * configure.in (AC_CHECK_FUNCS): Add getgroups to list. + * io.c (user_open): Use global ngroups and groupset variables, + don't call getgroups here. + * main.c (init_groupset): New function to init global + vars using malloc. Declare it at top. + (main): Call init_groupset(). + (load_procinfo): Use global ngroups and groupset variables. + +Sun Nov 18 11:56:01 2001 Arnold D. Robbins + + * random.c (srandomdev): ifdef-out. Lots of compile time + problems on multiple platforms, and gawk doesn't even + use the routine. The heck with fine-grained solutions. + +Wed Nov 14 16:12:40 2001 Pat Rankin + + * builtin.c (bchunk_one): Use `ofre < 1' instead of `ofre <= 0' + to avoid compiler complaint about suspicious comparison for + unsigned variable. (`ofre == 0' ought to suffice...) + +Tue Nov 13 17:27:52 2001 Arnold D. Robbins + + * awkgram.y (yyerror): Fix the code to behave like it + used to. Keep "no arbitrary limits" by mallocing the + buffer and freeing it. + +Wed Nov 7 16:46:20 2001 Arnold D. Robbins + + * awkgram.y (yyerror): Remove dependency upon buf[] to + hold prepended space and `^' pointer. Avoids core dumps + for long source lines. + +Sat Nov 3 22:27:21 2001 Arnold D. Robbins + + * m4/strtod.m4: Add missing `#endif'. Oops. + +Mon Oct 29 14:53:57 2001 Arnold D. Robbins + + * awkgram.y: Add semicolons in calls to count_args(). + Apparently bisoon adds a semicolon to each body + automatically and byacc doesn't. + +Sun Oct 28 16:53:18 2001 Arnold D. Robbins + + * builtin.c (format_tree): Fix off-by-one error in "ran out + for this one" diagnostic. Also fix lint check for too many + arguments vs. count in format string. + +Wed Oct 10 11:01:47 2001 Arnold D. Robbins + + * fixvers: Check that files exist before doing `cmp', in + case they're in a source code system and aren't there. + Fix from Grant Erickson (gerickson@brocade.com). + +Thu Oct 4 18:20:36 2001 Arnold D. Robbins + + * eval.c (r_tree_eval): For comparison, dupnode() results of + evaluation so that we can hang on to them and avoid memory + corruption. Change calls to free_temp() to unref(). + +Tue Sep 25 15:19:53 2001 Arnold D. Robbins + + * io.c (iop_open): Only call os_close_on_exec() for + fd > fileno(stderr). + +2001-09-07 Paul Eggert + + * io.c (redirect): When deciding to use the fdopen bug hack, + use "__sun" rather than "solaris". No compilers predefine + "solaris", but both GCC and Sun C predefine "__sun". + +Thu Aug 30 15:17:12 2001 Arnold D. Robbins + + * main.c (copyleft): Use a printf %d for last year of update + to avoid translation strings changing when the file + is updated from now on. Suggestion from Ulrich Drepper. + +Thu Aug 23 14:01:14 2001 Arnold D. Robbins + + * awkgram.y (unary minus production): Add check that value + isn't a string. Based on bug report from drj@pobox.com. + * profile.c (tree_eval): For node_val, only test NUMBER + to see if value is numeric, not NUM|NUMBER. + +Thu Aug 16 12:21:28 2001 Arnold D. Robbins + + * configure.in (ALL_LINGUAS): Added `fr' and `tr'. + * po/fr.po, po/tr.fo: New files. + +2001-08-13 Paul Eggert + + This patch fixes a bug that causes gawk to rewind standard + input incorrectly. It also removes all instances of fseek, + from the gawk source proper, which should make gawk a bit + more portable. + + (The original patch removed off_t & lseek too, but I need + that for something else. ADR.) + + * posix/gawkmisc.c (optimal_bufsize): + Don't use lseek on the input, because that might change + its state. Instead, just check whether it is a regular file. + This obviates the need to invoke isatty. + (Also, fix a spelling error in the first line of the source.) + * pc/gawkmisc.pc, unsupported/atari/gawkmisc.atr: Likewise. + + * awk.h (S_ISREG): Move this macro here ... + * io.c (S_ISREG): from here. + + * protos.h (fseek): Remove prototype; no longer used. + +Fri Aug 3 13:38:54 2001 Arnold D. Robbins + + * array.c (assoc_lookup): Change assert test on type to real test + to protect against FS[1] = "x" kinds of things. It'd be better + to do this in the grammar, but this is easier and just as + effective. + + Undid BECAMEARRAY changes of 25 June 2001 in favor of correct code: + * eval.c (pop_fcall): Change test and comment for freeing n->vname. + (flags2str): Removed BECAMEARRAY entry. + * awk.h (BECAMEARRAY): Removed define. + * array.c (assoc_lookup): Removed setting of BECAMEARRAY flag. + +Mon Jul 23 17:33:13 2001 Arnold D. Robbins + + * io.c (get_a_record): Handle case where RS = "" and input file + is only newlines. See test/onlynl. Bug report by + Michel Jouvin . + +Wed Jul 4 18:34:19 2001 Arnold D. Robbins + + * eval.c (assign_val): Don't allow negative values for NF. + * field.c (set_NF): Robustify field-freeing code to make sure + values are always positive. + +Sun Jul 1 19:15:01 2001 Arnold D. Robbins + + * builtin.c (do_index): If second string is "", return 1. + +Mon Jun 25 19:34:24 2001 Arnold D. Robbins + + Further rationalization of treatment of dynamic regexes, + so that profiling code works correctly. + + * awk.h (NODETYPE): New type, Node_dynregex. + * awkgram.y (mk_rexp): Use Node_dynregex. + * eval.c (nodetypes): Add Node_dynregex. + (r_tree_eval): Add Node_dynregex to case for match_op(). + * profile.c (tree_eval): Add Node_dynregex to case for pp_match_op(). + (pp_match_op): Handle Node_dynregex, simplify cases for ~ and !~. + * re.c (re_update): Add assertion that type is Node_regex when flags + indicate CONST. + + New lint warning. + + * awkgram.y (yylex): Added lint warning that constant with leading + zero is treated as octal or hex. + + Generalized code for those who are Strong In The Ways of the Source. + + * awk.h: New boolean variable. + * main.c (main): Set it. + * eval.c (interpret): For arrays, check it. Remove variable 'first', + not needed anymore. + * profile.c (pp_string_fp): Enable printing of non-ASCII characters + verbatim if variable set. + + Fix memory corruption on SCO for array vars as params changed globally. + + * awk.h (BECAMEARRAY): New flag. + * array.c (assoc_lookup): Set the flag as appropriate. + * eval.c (flags2str): Add the flag. + (pop_fcall): Check the flag, don't free memory if set. + +Wed Jun 13 18:07:06 2001 Arnold D. Robbins + + * eval.c (fmt_index): Actually call erealloc() to grow fmt_list + if that's really necessary. Bug report from David Jones, + djones@zoonami.com. + +Sun Jun 10 14:24:48 2001 Arnold D. Robbins + + * profile.c (pp_match_op): Rationalized the code. + +Thu Jun 7 11:54:36 2001 Arnold D. Robbins + + * awk.h (O_BINARY): Don't define if already defined + (as is true for cygwin/gcc --- oops). + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +Wed Apr 25 11:44:07 2001 Arnold Robbins + + * Makefile.am (AM_MAKEFLAGS): Add definition per advice from + Nelson Beebe. + +Tue Apr 24 14:28:00 2001 Arnold Robbins + + * io.c (devopen): Patch from Jeurgen to robustify pulling + out hostname, port numbers, etc, to avoid any buffer overrun + problems. + +Mon Apr 23 10:26:38 2001 Arnold Robbins + + * awkgram.y: Fix grammar so that `print ... |& ".." |& getline' + dies with a parse-time error message. + +Sun Apr 22 16:46:48 2001 Arnold Robbins + + * io.c (socketopen): Fix from Juergen in recursive call. + +Thu Apr 19 18:39:20 2001 Pat Rankin + + * awk.h: Really fix logic around include of . + + * awk.h (callresult): New name for `result' macro. + * eval.c (r_get_lhs, case Node_builtin): Use it. + +Thu Apr 19 16:31:09 2001 Pat Rankin + + * io.c: Move code around to allow compilation with DEC C. + +Thu Apr 19 16:21:56 2001 Arnold D. Robbins + + * random.h: Move decl of random() here. + * random.c: Remove decl of random(). + +Mon Apr 9 11:41:58 2001 Arnold D. Robbins + + * dfa.c (dfainit): Initialize more members in the structure, + based on bug report in bug.gnu.utils by aaronl@vitelus.com + (Aaron Lehmann). + * awk.h: Fix logic around include of . + +Thu Apr 5 20:12:05 2001 Pat Rankin + + * dfa.c: For VMS, #include instead of . + * missing_d/mktime.c: Likewise. + + * random.c: Reorder include directives to get gawk config info + from random.h sooner. + [fcntl.h]: Guard #include with HAVE_FCNTL_H test. + [unistd.h]: Guard #include with HAVE_UNISTD_H test. + + * random.c (srandomdev): Skip /dev/urandom usage if O_RDONLY + is not defined. + +Tue Mar 20 11:07:11 2001 Arnold D. Robbins + + * awkgram.y (function_body): Add opt_nls to end of production. + +Tue Mar 20 09:30:32 2001 Pat Rankin + + * awk.h (BROKEN_STRNCASECMP): Add decl of strcasecmp. + * io.c (two_way_open): Add `return FALSE;' for fussy compilers. + +Sun Mar 18 15:10:56 2001 Arnold D. Robbins + + * io.c (gawk_pclose): Set the exit value for close correctly + if the pipe died with a signal. + +Wed Mar 7 11:28:52 2001 Arnold D. Robbins + + * io.c (get_a_record): Correctly handle the case of a leading + single newline at the front of the file when RS = "". + +2001-02-26 Paul Eggert + + * COPYING: Incorporate latest version from FSF, which fixes a Y2k bug. + + * builtin.c (do_mktime): Allow the user to specify the + tm_isdst member as an optional trailing integer, and to + specify "out-of-range" members. Check for overflow when + subtracting 1 from month or 1900 from year. Allow years just + past INT_MAX, as they work on some hosts when INT_MAX - 1900 + is representable as an int. + + * doc/gawk.1, doc/gawk.texi: Document the above changes. + Also, document that the origin-zero Gregorian calendar is used. + Fix confusing wording about "midnight" by replacing it with 00:00 + ("midnight" is also 24:00, the end of the day). + Mention the typical range for time stamps. + Do not assume that years are nonnegative and are less than 10,000. + Suggest TZ=UTC0 instead of TZ=GMT0, as that's how recent versions + of GNU date behave. + GMT is not always the time of day in Greenwich these days. + Fix typos: "Emporer/Era", "1980's", "1970's". + + * m4/largefile.m4: Synchronized with latest version. + +Tue Feb 27 12:10:11 2001 Arnold D. Robbins + + * profile.c (pp_in_array): Change test to tree->type == Node_expression_list. + +Wed Feb 7 14:46:50 2001 Arnold D. Robbins + + * awkgram.y (LEX_FOR): Allow newline after `;' in for loops. + Per bug report from Brian Kernighan, bwk@research.bell-labs.com. + +Tue Feb 6 18:35:27 2001 Martin C. Brown + + * io.c (socket_open): Conditionalize various options based on + ifdef. Needed for BeOS port. + +Tue Feb 6 18:17:13 2001 Michal Jaegermann + + * regex.c (re_match_2_internal): Case maybe_pop_jump, for + charset and not_charset: Change cast from (unsigned char) + to (unsigned). Catches last 8 chars with high bit set + if backtracking. See test/rebt8b1.awk, test/rebt8b2.awk. + +Tue Feb 6 11:20:21 2001 Arnold D. Robbins + + Have `for (iggy in foo)' save the elements and loop over them. + Make sorted for loops a dynamic test instead of a compile time test. + Still requires being Strong In The Ways Of The Source. + + * awk.h: (struct search): Removed. + (assoc_scan, assoc_next): Removed declarations. + * array.c (assoc_scan, assoc_next): Removed functions. + * eval.c (interpret): Remove Node_K_array_sorted_for. Change code + at Node_K_arrayfor. + (nodetypes): Remove Node_K_array_sorted_for. + * configure.in: Removed array sorting test. + * awkgram.y: Removed sorted_in keyword and associated code. + +Sun Feb 4 14:57:49 2001 Arnold D. Robbins + + * eval.c (interpret): Use tree->rnode->exec_count to hold count of + times if was true. + profile.c (interpret): Ditto. + * main.c (pre_assign): Gross hack. malloc fresh copy of assign so can + clear the '=', otherwise screws up profiling print out. + +Sun Jan 28 16:16:02 2001 Arnold D. Robbins + + Per request from Nelson Beebe, SIGHUP to pgawk dumps profile + and function call stack and exits, SIGUSR1 dumps and continues + running. + + * eval.c (dump_fcall_stack): New function, dumps awk function call + stack. + * awk.h (dump_fcall_stack): Add declaration. + (init_profiling_signals): Ditto. + * main.c (main): Call init_profiling_signals. + * profile.c (init_profiling_signals, dump_and_exit, just_dump): New + functions. + +Sun Jan 28 15:50:02 2001 Eli Zaretskii + + * io.c (gawk_popen): Restore the mode of stdin before running the + child process and switch it back if BINMODE is in effect after the + child returns. + (redirect): Restore the mode of stdin before running the child + process. + (close_redir): Switch mode of stdin back to binary if BINMODE is + in effect, after the child returns. + + * builtin.c (do_system): Restore the mode of stdin before running + the child process and switch it back if BINMODE is in effect after + the child returns. + + * awk.h (os_restore_mode): Add prototype. + +Thu Jan 18 14:03:06 2001 Arnold D. Robbins + + * custom.h, README_d/README.ultrix: Fixes for Ultrix + from Juergen Kahrs. + +Wed Jan 17 11:03:40 2001 Eli Zaretskii + + * io.c (redirect) [F_GETFL && O_APPEND]: Use binmode in the call + to fdopen. + +Mon Jan 15 16:29:52 2001 Arnold D. Robbins + + * profile.c (prec_level): Made Node_K_getline higher than < + but lower than others. Allows use of getline with redirection + inside an if. + +Wed Jan 10 15:35:06 2001 Arnold D. Robbins + + * eval.c (set_BINMODE): Rationalized string assignment. + +Sun Jan 7 15:26:16 2001 Arnold D. Robbins + + * getopt.h: Removed names in prototypes for getopt_long + and getopt_long_only, fixes problems on MINGW32. + +Thu Jan 4 10:13:46 2001 Arnold D. Robbins + + * configure.in: Add check for mcheck.h + * main.c: Include mcheck.h if have it. + (main): If TIDYMEM turned on in environment, also call mtrace(). + +Wed Jan 3 16:41:33 2001 Arnold D. Robbins + + Fixed minor memory leaks. + * re.c (re_update): When IGNORECASE changed, unref(t->re_text). + * eval.c (pop_fcall): Fix the logic to correctly free the vname + when copying array args back to their underlying source. + + Fixed massive memory leaks. + * node.c (dupnode): If PERM is set, do nothing. + (unref): Fix logic. Always turn off TEMP. Check just for MALLOC + when incrementing the stref. + * array.c (assoc_lookup): Turn off PERM also when saving subscript. + * builtin.c (sub_common): Turn off PERM also when making private copy + of string. + + Add a minor memory cleanup facility (undocumented): + * awk.h (do_tidy_mem, release_all_vars): Add declarations. + * main.c (do_tidy_mem): Add declaration. + (main): If $TIDYMEM exists, do_tidy_mem is true, and call mtrace(). + * awkgram.y (release_all_vars): New function. + +Sun Dec 31 10:47:37 2000 Arnold D. Robbins + + * awkgram.y (in_end_rule): Renamed `parsing_end_rule' to avoid + conflict with global var of same name. + +Sun Dec 24 10:36:54 2000 Eli Zaretskii + + * awkgram.y (snode): Reword the error message about the number of + arguments for a builtin, so as not to use the English `s' as a + plural suffix. + +Tue Dec 12 08:38:03 2000 Arnold D. Robbins + + * ext.c (do_ext): ifdef out use of `dummy'. Duh. + * regex.c (re_error_msgid): Revert to array of `char *' so that can + compile on K&R compilers. Fix all uses appropriately. + (re_error_msgid_idx): Removed. + +Fri Dec 8 11:47:26 2000 Arnold D. Robbins + + * ext.c (dummy): Make gcc specific via ifdef. + * builtin.c (do_dcgettext): Make conditional compilation smarter. + * msg.c (warning, error, r_fatal): Finish switching back to + multi-version function header. + +Wed Dec 6 13:28:58 2000 Arnold D. Robbins + + * random.h: Include to get ssize_t definition. + * awkgram.y (yyerror): Restore multi-version function header, + it seems that what ansi2knr produces doesn't quite do the + job on old compilers. + msg.c (msg): Ditto. + +Tue Dec 5 15:05:35 2000 Arnold D. Robbins + + * configure.in (AC_C_INLINE): Added macro call. + * Makefile.am (LN): Define it for install hooks. + +Sun Dec 3 17:28:53 2000 Arnold D. Robbins + + * awk.h (os_setbinmode): Declare new function. + (setmode): Remove definition: conflicts with MacOS X. + * main.c (main): Change call of setmode to os_setbindmode. + + * builtin.c (do_dcgettext): Improve ifdef for code, fixes MacOS X. + * custom.h (__APPLE__): Force definition of HAVE_MKTIME, won't + link otherwise. Harumph. + +Sun Nov 26 11:58:52 2000 Arnold D. Robbins + + * builtin.c (do_dcgettext, do_bindtextdomain): Add calls to + free_temp the various arguments. Sigh. + * io.c (yylex): Nuked bstart variable, put all uses of mend variable + into TANDEM ifdef. + * main.c (load_environ): Removed cp variable, value never used. + * random.c: Remvoed uses of `inline' keyword. + * Makefile.am (install-exec-hook, uninstall-local): New targets. + Adds creation of gawk-X.Y.Z and awk links, as in 3.0.x. + * configure.in (GAWK_AC_TYPE_SSIZE_T): Added. + m4/ssize_t.m4: New file. + +Wed Nov 22 14:47:18 2000 Arnold D. Robbins + + After consultation with Brian Kernighan and Michael Brennan, + nuked the abort keyword. + + * awk.h (Node_K_abort): Removed. + * eval.c (aborting): Removed decl. + (interpret): Removed Node_K_abort case. + * io.c (do_input): Removed checks for aborting. + * main.c (aborting): Removed. + (main): Removed checks for aborting. + * profile.c (pprint): Removed Node_K_abort case. + * awk.y (LEX_ABORT): All stuff removed. + +Wed Nov 22 10:45:57 2000 Arnold D. Robbins + + * ext.c (dummy): Move inside #ifdef DYNAMIC. Helps on + PCs and other platforms that don't do dynamic loading. + * awk.h (RED_TCP): New flag, means use shutdown. + io.c (redflags2str): Add RED_TCP. + (SHUT_RD, SHUT_WR, SHUT_RDWR): Add conditional defines. + (redirect): Add RED_TCP to tflag if appropriate. Add more + #ifdef HAVE_SOCKETS as needed. + (close_redir): If RED_TCP set, shutdown(2) on each end of the socket. + +Tue Nov 21 16:25:41 2000 Arnold D. Robbins + + * awk.y: for (iggy in foo) loops: Add test that index + in delete statement is a simple variable. + +Tue Nov 14 16:11:39 2000 Arnold D. Robbins + + * awk.h: Add appropriate conditional versions of the gettext + functions if we don't have or if ENABLE_NLS + is not defined or zero. + * configure.in: Add check for libintl.h header. + + From Scott Deifik for PCs. + * awk.h (lintwarn): Call set_loc unconditionally, makes + compilation work on PCs. + * builtin.c (do_dcgettext): Compile out cat_tab and code + if not ENABLE_NLS. + * ext.c: For MSC, no long long variable. + * random.c: Use clock() instead of gettimeofday(). + * builtin.c: Fixed prototypes for new random functions (ADR). + +Sun Nov 12 17:45:44 2000 Arnold D. Robbins + + * builtin.c (parse_next_arg): Fix call to >= num_args so + running out of args check is correct, instead of core dumping. + (format_tree): Save and restore `the_args' and `args_size' + if a nested call is in progress, see explanatory comment. + See also tests/addcomma. + * Makefile.am: Fix things so that gawk/pgawk built first, + even if `make check' called before make. Add some + commentary. + +Wed Nov 8 14:39:20 2000 Arnold D. Robbins + + * configure.in: Only add -rdynamic for Linux. + * dfa.h, dfa.c: Upgraded to versions in grep 2.4.2. + +Tue Nov 7 18:17:17 2000 Arnold D. Robbins + + * All: Switched to ANSI function headers and added + `ansi2knr' automake option. Really cool. + +Tue Nov 7 16:57:49 2000 Arnold D. Robbins + + * io.c (redirect): Check for O_APPEND in flags when doing + fdopen() of /dev/fd/N. Thanks to bug report from + "John H. DuBois III" . + +Tue Nov 7 14:09:14 2000 Arnold D. Robbins + + * awk.h (os_is_setuid): Declare function. + * main.c (main): Call it if do_lint and warn if true. + * awkgram.y (tokentab): + - Made sure all extensions are actually marked as such. Ouch. + - Changed "sort" to "asort". Potential to break too much old code. + * getopt.h, getopt.c, getopt1.c: Replaced with current versions + from glibc CVS archive. + +Mon Nov 6 18:14:33 2000 Arnold D. Robbins + + * random.c: Replaced with recent version from FreeBSD. + +Mon Nov 6 15:37:12 2000 Arnold D. Robbins + + Major simplification of automake machinery. + + * configure.in: + - INSTALL is forced only if not provided in environment + - lots of Makefile.in files removed since move to automake 1.4a + * Makefile.am, */Makefile.am: Moved directories that don't need + the automake machinery into EXTRA_DIST as appropriate and + removed the Makefile{,.am,.in} files as needed. + * eval_p.c, profile_p.c: New files to make it easier with automake + to compile pgawk. + +Tue Oct 24 12:20:18 2000 Arnold D. Robbins + + * awkgram.y (valinfo, var_comp, dump_vars): New functions to dump + the list of global variables. + * awk.h: Declare dump_vars. + * main.c (optab): New option "dump-variables". + (main): Code to handle it, set the output file and then call + dump_vars() at the end. + (usage): New option added to usage message. + +Sat Oct 21 22:59:59 2000 Arnold D. Robbins + + * awkgram.y (parms_shadow): For a function, check if any + parameters shadow global variables and print a warning. + (shadow_funcs): Go through all functions and call parms_shadow(). + (isnoeffect, isassignable): Add Node_LINT and NODE_BINMODE. + * main.c (main): If do_lint, call shadow_funcs(). + * awk.h: Add declaration of shadow_funcs(). + * configure.in: Added m4/Makefile and awklib/eg/network/Makefile + to list of generated makefiles. + +Tue Oct 17 10:47:35 2000 Arnold D. Robbins + + * array.c (assoc_lookup): Reverted change that did dupnode of + array indices. Creates significant problems if index is + numeric value and CONVFMT changes. Added fix to set + bucket->ahname->stfmt to -1 so that force_string never recalculates + the string value, and also turned off NUM and turned on STR. + See test/arynasty.awk. + +Mon Oct 16 12:21:26 2000 Arnold D. Robbins + + * All: Cleaned up various lint warnings for consistent phrasing. + * awk.y (in_end_rule): New variable for warning about unredirected + getline. It's ok in a BEGIN, but not in an END. + +Sun Oct 15 14:14:05 2000 Arnold D. Robbins + + * field.c (set_FS): Add lint warning for FS = "". + (do_split): Ditto for 3rd arg = "". + +Fri Oct 13 09:17:04 2000 Arnold D. Robbins + + * io.c (close_redir): Clear rp->fp on all closes. Remove + rp from list if either closing both ends or both ends + have been closed separately. Add exitwarn message for + co-process. + (flush_io): Add warning message if fflush of co-process + fails. Rationalize return value to either 0 or -1. + * builtin.c (do_gensub): 3rd arg of zero generates a + warning. + (do_fflush): Rationalize return value: -1 for unopen or read-only + redirection, status of fflush otherwise. + +Wed Oct 11 22:11:19 2000 Arnold D. Robbins + + * awk.y (for loop): Check that there is a body as + part of the `is it a delete statement' check. + +Thu Oct 5 11:56:42 2000 Arnold D. Robbins + + * awk.h, awkgram.y, configure.in, eval.c: Enabled + `for (i in_sorted array)' loops for those who + are Strong In The Way Of The Source. So there. + +Mon Oct 2 10:09:32 2000 Arnold D. Robbins + + * io.c (do_close): Make close(x) for non-open x return -1 + and update ERRNO. close(FILENAME) no longer does anything + magic; this is all for better consistency with other awks + and is more logical, anyway. + +Thu Sep 28 17:27:16 2000 Arnold D. Robbins + + * io.c (close_one): Added a lint warning if it becomes + necessary to start multiplexing fd's, per ancient suggestion + from Scott Deifik, . + +Tue Sep 26 14:41:41 2000 Arnold D. Robbins + + * profile.c: Move enum for redirection placement to top + of file, and make the value a parameter to pp_redir. + Fix all the calls. This gets `|&' right everywhere. + +Sun Sep 24 16:38:04 2000 Arnold D. Robbins + + * awk.h (freenode): Set the flags straight to UNINITIALIZED. + * node.c (unref): Fix test for MALLOC|TEMP to test the + actual flags, not zero. + * builtin.c (format_tree): ala print and concat, dupnode + the temp nodes from tree_evaling the arguments. See + test/nasty2.awk. + +Mon Sep 18 10:16:58 2000 Arnold D. Robbins + + * awkgram.y (snode): Make match 3rd arg and close 2nd arg fatal + errors if --tradtional. + +Thu Sep 14 12:22:42 2000 Arnold D. Robbins + + * eval.c (update_ERRNO): Call gettext on result of strerror. + i18n rules. + +Wed Sep 13 14:56:11 2000 Arnold D. Robbins + + * eval.c (r_tree_eval): Case for Node_concat. Dupnode the + strings ala do_print to get more consistent results. + Compare gawk 3.0.6 to nawk/mawk on test/nasty.awk. + Thanks to Andrew Sumner (andrewsumner@yahoo.com) for + pointing this one out. + +Wed Sep 13 10:06:47 2000 Arnold D. Robbins + + * io.c (two_way_close_type): New enumerated type. + (close_redir): New third param of type two_way_close_type. + Add smarts to two-way case for different close types. + Only remove it from the redir list if closing is for both ends. + (gawk_pclose): Check that rp->iop != NULL before closing, + all three versions. + * awkgram.y (tokentab): Allow 2nd argument to close. + (snode): Add lint warning. + +Sun Sep 10 14:16:10 2000 Arnold D. Robbins + + * field.c (set_FIELDWIDTHS): Generate a fatal error upon + encountering a negative width. + +Sun Sep 10 10:37:35 2000 Arnold D. Robbins + + * awkgram.y (snode): If first argument to dcgettext is a + string constant and --gen-po, dump the string constant to + the .po file too. + * main.c (nostalgia): Add call to fflush(stderr). + * eval.c (r_tree_eval): Add entries for Node_LINT and for + NODE_TEXTDOMAIN. + +Thu Sep 7 10:46:20 2000 Arnold D. Robbins + + * builtin.c (do_dcgettext): Per suggestion from Ulrich Drepper, + make the awk interface: + + str = dcgettext(string [, domain [, category]]) + +Wed Sep 6 16:28:12 2000 Arnold D. Robbins + + Bring gettext features out to the awk level! + + * awk.h: Add declarations of new functions `do_dcgettext' + `do_bindtextdomain', `set_TEXTDOMAIN' and variables + `TEXTDOMAIN', `TEXTDOMAIN_node'. New NODETYPE enum + `Node_TEXTDOMAIN'. + * eval.c (nodetypes): Add Node_TEXTDOMAIN at end. + (set_TEXTDOMAIN): New function. + (r_get_lhs): Add case for Node_TEXTDOMAIN. + * main.c (varinit): Add entry for TEXTDOMAIN. + * node.c (format_val): If INTLSTR use dcgettext of string + and TEXTDOMAIN. + * awkgram.y (tokentab): Add entries for "dcgettext" and + "bindtextdomain". + * builtin.c (do_dcgettext, do_bindtextdomain): New functions. + +Tue Sep 5 17:01:34 2000 Arnold D. Robbins + + * profile.c (pp_string_fp): Use lower case versions of + isascii and isprint to avoid printing high-bit-set + characters. Make it smarter to break strings at 70 + chars or after embedded newline, for --gen-po. + Fix the calls to it everywhere for new boolean option + to yes/no break lines. + * m4/strtod.m4: New file, defines GAWK_AC_FUNC_STRTOD_C89. + * configure.in: GAWK_AC_FUNC_STRTOD_C89 call added + * acinclude.m4: Include strtod.m4. + * acconfig.h: Add entry for STRTOD_NOT_C89. + Remove entries for BITOPS and NON_DEC_DATA. + * missing/missing.c: Add check for STRTOD_NOT_C89, use ours + if set. + * missing/strtod.c: Make smarter for input like 0x345. + * awk.h: [STRTOD_NOT_C89]: Define strtod gawk_strtod to get + our version. Avoids linker weirdness. + +Mon Sep 4 09:16:43 2000 Arnold D. Robbins + + * field.c (set_record): Fix from Utz-Uwe Haus + to make sure there's + always enough room in the record. + * builtin.c (nondec2awknum): Fix octal conversions to exit + when hitting a non-digit, and not go to decimal. Make + check for non-octal better. Based on bug report from + Morris_Lee@tvratings.com. + +Sun Sep 3 13:52:11 2000 Arnold D. Robbins + + * builtin.c (format_tree): Allow positional parameters for + %*.* kinds of things. + + Made octal/hex constants and strtonum on by default. Made + --enable-non-decimal-data a runtime switch `--non-decimal-data'. + + * configure.in: Removed AC_ARG_ENABLE for --enable-bitops and + --enable-non-decimal-data. + In .developing check, remove the AC_DEFINEs. + * awk.h: Decls for bitwise functions now there by default. + Add decl of `do_non_decimal_data'. + * main.c (do_non_decimal_data): New variable + (optlist): Add new entry for `--non-decimal-data'. + (main): Turn off `do_non_decimal_data' if `do_traditional'. + (usage): Add the new option. + * node.c (r_force_number): Make check for non-decimal data a + runtime check based on do_non_decimal_data. + * awkgram.y (yylex): Make non-decimal constants a runtime check. + * builtin.c: Remove the ifdefs around the bit functions and + nondec2awknum. + +Tue Aug 29 18:45:56 2000 Arnold D. Robbins + + * configure.in: Go back to ARRAYDEBUG if .developing set. + * awkgram.y: Use ARRAYDEBUG for adump(), use multiple tests + for stopme(). + +Mon Aug 28 17:09:06 2000 Arnold D. Robbins + + * field.c (do_split): Add check for first arg is null string, + if so, skip the work and return zero. + +Mon Aug 14 23:01:55 2000 Arnold D. Robbins + + Add %COUNT$... handling to printf. + + * awk.h (printf_count): New define in NODE structure. + (format_tree): Added decl. + * awkgram.y (count_args): New function to set printf_count in + a node. + [print productions]: Call the function. + * (snode): For do_sprintf, call count_args, set the count + in the lnode. + * builtin.c (format_tree): New fourth arg is argument count. + Add smarts to handle the `$' in a format. + * (do_sprintf): Use new argument to format_tree. + node.c (format_val): Ditto. + +Sun Aug 13 11:10:41 2000 Arnold D. Robbins + + Changes from Alan J. Broder (ajb@woti.com): + - Array third arg to match puts subtexts into the array: + + * awk.y (tokentab): "match" gets third arg, and lint warning + * builtin.c (do_match): If third arg there, fill it with subtexts + + - New builtin sort function: + + * awk.h (do_sort): Declared. + * array.c (do_sort, dup_table, merge, merge_sort, assoc_from_list, + assoc_sort_inplace): New functions. + + * eval.c (tree_eval): In debug code, make uninitialized var + a warning, not a fatal error. Breaks too many things. + +Wed Aug 9 10:51:41 2000 Arnold D. Robbins + + * eval.c (func_call): Increment the exec_count on the + function's node; this allows printing a call count for + functions. + profile.c (pp_func): Print the count for functions. + * ALL: Changed DEBUG to GAWKDEBUG in all gawk files, so that + I don't get regex/dfa debugging. In some cases, changed + memory-related stuff to MEMDEBUG. Still have work to do. + * awk.h, node.c, profile.c: Removed exec_count_init variable; + code has been cleaned up to not need different values for + profiling/not profiling. + +Thu Jul 5 21:10:59 2000 Arnold D. Robbins + + * eval.c (casetable): Removed the USE_PURE_ASCII stuff; it + was never documented. Latin 1 forever. + * main.c (main): Only call `init_profiling' after arg parsing + if `do_profiling' is still false. Avoids resetting `prof_fp' + back to stderr. + +2000-02-17 Akim Demaille + + * m4: New directory. + * acinclude.m4: Removed, replaced by m4/*.m4. + * Makefile.am: Adjusted. + Added ACLOCAL_AMFLAGS. + * configure.in Adjusted. + Use AC_SYS_LARGEFILE not GAWK_AC_SYS_LARGEFILE, jm_FUNC_MKTIME, + not GAWK_FUNC_MKTIME. + * acconfig.h: Removed _FILE_OFFSET_BITS, _LARGEFILE_SOURCE and + _LARGE_FILES now templated by m4/largefile.m4. + +2000-02-15 Arnold Robbins + + * MOVED TO AUTOMAKE AND GETTEXT. + Just about every file touched. Work done by Arno Peters. + +Sun Jan 2 14:48:23 2000 Arnold D. Robbins + + First edit of the new millenium! + * awk.y (yylex): If lint checking, be obnoxious about gotos. + +Mon Oct 25 19:12:02 1999 Arnold D. Robbins + + * awk.h: Remove C_ALLOCA ifdef. + * main.c (main): Remove C_ALLOCA code. + * io.c (do_input): Ditto. + +Mon Aug 9 17:36:24 1999 Arnold D. Robbins + + * bisonfix.sed: Unconditionally #undef YYSTACK_USE_ALLOCA. + * configure.in: Remove all alloca and ALLOCA related stuff. + * Makefile.in: Ditto. + +Thu Jul 29 18:32:05 1999 Arnold D. Robbins + + * awk.h (NODE): exec_count now in #ifndef NO_PROFILING. + * Makefile.in: Changes to only recompile eval.c and profile.c to a + special version for profiling. + * custom.h [MSC_VER]: Turn on NO_PROFILING to omit the exec_count + and save space. + * node.c (more_nodes): Move setting of exec_count to + #ifndef NO_PROFILING. + +Thu Jul 1 12:12:05 1999 Arnold D. Robbins + + * configure.in (AC_PREREQ): Update to 2.13. + GAWK_AC_C_STRINGIZE: convert to AC_C_STRINGIZE. + * aclocal.m4 (GAWK_AC_C_STRINGIZE): Remove definition, now + part of autoconf. + * acconfig.h (HAVE_STRINGIZE): Ditto. + +Wed Apr 28 11:08:05 1999 Arnold D. Robbins + + * array.c (assoc_lookup): Fix call to free_temp(subs) to after + last use of subs. + +Sun Apr 25 16:48:06 1999 Arnold D. Robbins + + * io.c (redirect): Add lint warning when same file is used for + > and >>. + +Thu Apr 22 15:05:30 1999 Arnold D. Robbins + + * array.c (assoc_lookup): Fix call to fatal to lintwarn instead. + * node.c (r_force_number): Use `0 &&' to disable warnings about + conversions: they're overzealous, methinks. + +Thu Apr 8 14:27:58 1999 Arnold D. Robbins + + New features for profiling: + + * awk.h (NODE): Add `exec_count' member. + (freenode): Clear `exec_count' upon free. + * awk.y (func_count): New variable, counts total number of functions. + (func_install): Increment func_count. + (struct finfo): Information for use in sorting functions when + pretty printing. + (fcompare): Compare two finfo structures. + (dump_funcs): Print the functions in sorted order for profiling. + (getfname): Return the name of a builtin function. + * eval.c (INCREMENT): New macro for counting execution of nodes. + (interpret): Call INCREMENT() appropriately. + * main.c (do_profiling): New flag if doing profiling. + `--profiling': New option added to getopt_long machinery. + (main): For profiled version, set do_profile and output file. + Call `dump_prog' and `dump_funcs' if do_profiling at end. + (usage): Add new argument. + * node.c (more_nodes, freenode): Set exec_count to zero. + * profile.c: New file, does pretty printing and prints counts. + * Makefile.in: Update to create two versions of gawk, regular + and `pgawk' which does profiling. + +Wed Mar 10 21:38:14 1999 Arnold D. Robbins + + * io.c (close_redir): Use update_ERRNO() instead of manually + doing it. + +Mon Dec 21 15:58:21 1998 Arnold D. Robbins + + * configure.in: Add BeOS to list of cases where we hardwire + GETPGRP_VOID. + custom.h: Remove the #define from __be_os case. Cleaner to + do it all in configure. Based on email from Martin C. Brown, + mc@whoever.com. + +Mon Nov 30 20:52:52 1998 Arnold D. Robbins + + * eval.c (update_ERRNO): New function, mainly for use by + extension functions. + * awk.h: Add decl. + +Tue Nov 24 18:13:29 1998 Arnold D. Robbins + + * Changes based on submission from Christos Zoulas at D.E. Shaw + that adds the following features: + - checking for use of uninitialized variables + - checking if a string that's not a number converts to 0 + - ability to load a dynamic library to add built-ins + - VERSION variable (may or may not stay) + Additional change: + - --lint=fatal makes lint errors become fatal + - LINT="fatal" has the same effect, any other positive + value makes lint errors be just warnings + * Makefile.in (includedir): New variable for gawk header files + (ext.c, ext.o): New source and object files + (OTHERS, extension): New directory for macro with example extension + (install): Install header files + * acconfig.h (DYNAMIC): New macro, true if can do dynamic loading + * array.c (assoc_lookup): New parameter `reference' is true if we + want to do reference checking. Add appropriate reference checking + code. + * awk.h (UNITITIALIZED): New flag + (lintfunc): Function pointer for correct function to use + (lintwarn): New macro to produce warnings + (result): New macro for func call result, used in commented out + code in eval.c. + (getnode, freenode): Revised to set UNINITIALIZED. + (get_lhs): Third arg for reference checking, change all calls + -- Add appropriate decls of new/changed functions + * awk.y (tokentab): New builtin "extension" for adding extensions + (node_common): Set flags to UNINITIALIZED for Node_var. + * configure.in (dynamic linking): New check. Probably should + be a separate macro. + * eval.c (flag2str): Add UNINITIALIZED to the table. + (r_tree_eval): Add checks for UNINITIALIZED. + (push_args): Appropriate changes for UNINITIALIZED to work. + (r_get_lhs): New third argument for reference checking. + (set_LINT): Add code to handle setting `lintfunc' appropriately. + * ext.c: New file, for doing dynamic library extensions. + * extension/*: New directory with simple example code. + * main.c (VERSION_node, EXTENSION_node): New nodes for new vars. + (optab): Change for "lint" to allow optional argument. + (lintfunc): Definition. + (main): Add case in option processing for --lint. + (varinit): Add entries for VERSION and EXTENSION. + * node.c (r_force_number): Checks that string really is a number. + (morenodes): Set UNITIALIZED in the flags. + * re.c (all): Change `result' to `res' globally to avoid conflict + with new macro. + * GLOBAL: Change lint calls to warning() to lintwarn(). + * GLOBAL: Change all calls to get_lhs() to have 3rd arg. + * GLOBAL: Change all calls to assoc_lookup() to have 3rd arg. + +Sun Nov 22 17:07:39 1998 Arnold D. Robbins + + * patchlev.h: Renamed from patchlevel.h to make life + easier for the PC guys. + (main.c): Changed to include patchlev.h. + (Makefile.in): Changed to ref patchlev.h where needed. + +Sat Nov 7 21:29:52 1998 Arnold D. Robbins + + * eval.c (r_get_lhs): case Node_field_spec. Fix the lint + warnings for field reference of null string or non-numeric value. + When turned on, $0 generated a warning! Oops. + +Thu Nov 5 16:58:38 1998 Arnold D. Robbins + + * main.c (init_fds): New function to pre-open 0, 1, and 2 on + /dev/null if they're not open. Robustness, more or less. + (main): Call init_fds. + * io.c (str2mode): Add smarts for two-letter strings + such as "rw", "r+", "wr", "w+" and "a+". + +Mon Nov 2 16:55:46 1998 Arnold D. Robbins + + * builtin.c (do_*): Added lint checks for non-numeric + and/or non-string arguments, as appropriate. This should + have been done long ago. + +Tue Oct 20 21:56:06 1998 Arnold D. Robbins + + * awk.h (LINT_node): New variable for LINT special var + (Node_LINT): New node type. + (set_LINT): Declare function. + * main.c (varinit): Add LINT variable. + (usage): Print an emphatic pointer to the manual for bug reports. + * eval.c (nodetypes): New entry for Node_LINT. + (r_get_lhs): Case added for Node_LINT. + (set_LINT): Set do_lint from LINT variable. + +Mon Oct 19 22:35:46 1998 Arnold D. Robbins + + * configure.in: For GCC, add -Wall to get warnings for development. + * Makefile.in (awktab.c): Move sed stuff to separate script. + * bisonfix.sed: New script, with old fix and Solaris x86 fix. + * awk.h (nodetype2str): Add declaration. + (load_procinfo): Add declaration. + +Tue Oct 13 22:28:56 1998 Arnold D. Robbins + + Changes to make PROCINFO["FS"] reflect the use of FIELDWIDTHS or FS. + + * eval.c (assign_val): New function that does the mechanics of + assignment + * main.c (load_procinfo): Add setting of PROCINFO["FS"] to "FS". + * field.c (update_PROCINFO): New function to update the array. + (set_FS): Call update_PROCINFO. + (set_FIELDWIDTHS): Ditto. + +Sun Sep 27 10:18:05 1998 Arnold D. Robbins + + * awk.h (reisstring): New prototype. + * re.c (reisstring): New function, returns true if the re did + a simple string match. This is rather simplistic in its logic. + * io.c (get_a_record): In the case that RS is a regexp, AND + the re matched at the exact end of the buffer, add a call to + `reisstring' in case it's a simple string match. If so, we + don't need to read more into the buffer because we don't + have a regex like `x.*y' that might extend longer. + This should be very helpful for interactive /inet clients + where something like `RS = "\r\n"' happens. + +Thu Aug 13 22:07:40 1998 Arnold D. Robbins + + * io.c (socketopen): Fixes from Juergen Kahrs to socket + opening code for "any host". + +Tue Jul 14 19:02:33 1998 Arnold D. Robbins + + * aclocal.m4 (GAWK_AC_LIB_SOCKETS): Removed the caching; + configure gave different results the second time it was run! + +Fri Jul 10 09:11:06 1998 Arnold D. Robbins + + * eval.c (interpret): Minor cleanups: add variable name to + fatal error Node_K_array_for and other minor changes. + +Mon Jun 22 16:53:34 1998 Arnold D. Robbins + + * Makefile.in (tags, TAGS): Add $(LIBSRC). + +Tue Jun 2 15:23:05 1998 Arnold D. Robbins + + * io.c (devopen): Relax previous change, don't require "any", + just that a port be there. The user can put 0 if they + don't care. + +Wed May 27 21:33:45 1998 Arnold D. Robbins + + * io.c (devopen): For /inet, require that local and remote + ports and the remote hostname be there, and that `any' + be used for a port if they don't care. + +Thu May 21 14:13:46 1998 Arnold D. Robbins + + * node.c (parse_escape): Add warning that is always on + for \q for any unknown q inside string or regex constant. + I got bit by this myself once too often. Or else I'm + just getting old and senile. + +Mon May 4 12:42:49 1998 Arnold D. Robbins + + * awk.h (NODETYPE): Sorted the Node_xxx entries for the + builtin variables. Gotta look nice, don't we? + * eval.c (nodetypes): Ditto. + (genflags2str): Added code to check that we don't + overflow the static buffer. This is just a debugging + routine, not worth the hassle of dynamic allocation. + +Mon Mar 2 16:06:16 1998 Arnold D. Robbins + + * Makefile.in (dist): Remove any embedded copied RCS or CVS + directories. + +Mon Feb 23 00:09:52 1998 Arnold D. Robbins + + * awk.h (genflags2str): Add declaration. + * eval.c (genflags2str): New function. + (flags2str): Use new general purpose function. + * io.c (redflags2str): Same. + +Sun Feb 22 23:57:29 1998 Arnold D. Robbins + + Significant changes to add two-way i/o and sockets!!! + + * Makefile.in: Add @SOCKET_LIBS@ to LIBS variable. + * acconfig.h: Add HAVE_SOCKETS and HAVE_PORTALS defs. + * aclocal.m4: New macro GAWK_AC_LIB_SOCKETS. + * awk.h: New node type, Node_redirect_twoway, and new redirection + flags: RED_TWOWAY, and RED_SOCKET. + * awk.y (parser): Add TWOWAYIO token and appropriate productions. + (yylex): Recognize `|&' token if not traditional. + * builtin.c (do_print, do_printf): Flush buffer if TWOWAYIO. + * configure.in: Add header checks for networking header files, + add --enable-portals switch, call GAWK_AC_LIB_SOCKETS + * eval.c (nodetypes): Add string constant for Node_redirect_twoway. + * io.c (redflags2str): New function. + (redirect): Better error message in default case, add code for + Node_redirect_twoway. + (socketopen): New function. + (iop_open, devopen): Add recognition of `/inet/...'. + (two_way_open): New function. + +Sat Dec 13 21:15:07 1997 Arnold D. Robbins + + * awk.h (struct node): New member, `param_list' in union `x', becomes + `node->parmlist' in the code. + * awk.y (func_install): Rearranged a bit, to build up a list of + the function parameter names and to save it in the `parmlist' field. + * eval.c (push_args): New parameter, `varnames', which is the list + of variable names. Use this to set the vname field of each + parameter's value as it's created. Special case arrays to include + where they came from, mainly for array vs. scalar diagnostics. + (r_tree_eval): Don't set the `vname' field for parameters. + (pop_fcall): Free the `vname' field if it's an array. + (func_call): Pass in the `parmlist' field to call of push_args(). + (r_get_lhs): For Node_subscript, change error message to use + the `vname' field. + (stopme): New do-nothing function for use with debugging code + and setting breakpoints. + +Thu Dec 4 15:18:17 1997 Arnold D. Robbins + + * awk.y: Fixed several lint checks and moved some into + test for do_lint_old. + * eval.c (fmt_index): Add value of bad format spec to + error message. + +Tue Nov 18 22:19:02 1997 Arnold D. Robbins + + * Makefile.in (install): Strip the installed binary. + From Anatoly A. Orehovsky (tolik@mpeks.tomsk.su). + +Sun Nov 16 22:12:39 1997 Arnold D. Robbins + + * array.c (in_array, assoc_lookup): Add symbol->vname to + fatal calls for scalar in array context. + +Wed Nov 12 22:18:33 1997 Arnold D. Robbins + + * awk.h [ISASCII]: On all IS* macros, add cast to unsigned char. + [TOUPPER, TOLOWER]: New macros using unsigned char. + * awk.y: Change to use of IS* vs. is* macros. + * builtin.c (nondec2awknum): Change to use of IS* vs. is* macros, + change casts for casetable[] from int to unsigned char. + use new TOLOWER, TOUPPER macros + * dfa.c [ISASCII]: On all IS* macros, add cast to unsigned char. + (lex): Change isdigit to ISDIGIT. + [TOUPPER, TOLOWER]: New macros using unsigned char, now used. + * eval.c (fmt_ok): Change to use of IS* vs. is* macros. + * field.c (sc_parse_field): Change to use of IS* vs. is* macros, + change casts for casetable[] from int to unsigned char. + (set_FS): Change to use of IS* vs. is* macros. + * io.c (get_a_record): Change to use of IS* vs. is* macros, + change casts for casetable[] from int to unsigned char. + * main.c (main): Change to use of IS* vs. is* macros. + * node.c (r_force_number, parse_escape): Change to use of IS* vs. + is* macros. + * re.c (make_regexp): Change to use of IS* vs. is* macros. + * regex.c [ISASCII]: On all IS* macros, add cast to unsigned char. + +Sun Oct 19 12:36:47 1997 Arnold D. Robbins + + * ALL: Change email address to arnold@gnu.org in all relevant places. + +Wed Oct 15 03:38:12 1997 Arnold D. Robbins + + * awk.y (yylex): Don't allow newlines after ? or : if do_posix. + +Thu Oct 9 19:28:39 1997 Arnold D. Robbins + + * custom.h [SEQUENT]: Removed; not needed any more since the + mmap code was ripped out. + +Wed Oct 8 17:22:03 1997 Arnold D. Robbins + + * configure.in: Remove check for madvise; don't need it any more + after nuking use of mmap. + +Tue Oct 7 11:14:21 1997 Arnold D. Robbins + + * eval.c (flags2str): Made the code table driven. Shortened a lot. + +Tue Sep 30 20:59:17 1997 Arnold D. Robbins + + * eval.c (r_get_lhs): case Node_field_spec. Add lint warnings + for field reference of null string or non-numeric value. + Based on patch submitted by Alan Broder, ajb@dtmr.com. + +Wed Sep 24 20:47:59 1997 Arnold D. Robbins + + * custom.h [TANDEM]: New changes. Finishes up Tandem + integration. + +Mon Sep 22 00:42:34 1997 Arnold D. Robbins + + * custom.h [__be_os]: Remove BROKEN_TOKEN definition. + * dfa.c, dfa.h: Change `token' to `dfa_token' to avoid BeOS + compile problems. + +Thu Aug 7 22:35:17 1997 Arnold D. Robbins + + Changes for BeOS from mc@whoever.com + + * awk.h (strncasecmp): Bracket prototype. + custom.h [__be_os]: New stuff. + dfa.h, dfa.c [BROKEN_TOK]: New ifdefs to use dfa_token, not token. + +Fri Aug 1 13:32:49 1997 Arnold D. Robbins + + Tandem changes: + + * awk.h [TANDEM]: Misc additions, as needed. + * io.c (get_a_record): Changes for fixed length records; not used + on other systems. + * main.c (MRL): New variable, TANDEM specific. + (main): Update handling -mr option for TANDEM. + (load_environ): Comment out whole routine if TANDEM. + missing.c [TANDEM]: New includes. + gawkmisc.c [TANDEM]: Include `tmiscc'. + +Wed Jul 30 19:53:52 1997 Arnold D. Robbins + + Close-on-exec changes: + + * awk.h: (os_close_on_exec, os_isdir): New functions. + * gawkmisc.c: Add include fcntl.h. + * configure.in [AC_CHECK_HEADERS]: Add fcntl.h. + * io.c (devopen, iop_open): Change to use os_isdir(), not S_IFDIR(). + (redirect, devopen, iop_open, gawk_popen): Change all calls to + fcntl() to os_close_on_exec(). + +Tue Jul 29 11:09:45 1997 Arnold D. Robbins + + * eval.c (set_BINMODE): Fixed check for digits to use isdigit() + instead of looping over digits and using strchr(). Duh. + +Sat Jul 26 22:52:08 1997 Arnold D. Robbins + + * eval.c (set_BINMODE): Fix so that `-v BINMODE=w' works. + * node.c (r_force_number): Add decl of strtod(); makes things + work on MIPS. + * Makefile.in (install-strip): New target. + +Fri Jul 18 13:28:05 1997 Arnold D. Robbins + + * io.c (redirect, devopen, iop_open, gawk_popen): Set the + close-on-exec flag on all files and pipes opened for I/O. + Keeps children run via system() or other pipes from running out + of file descriptors. + + (Reported by Kenny McCormack, gazelle@yin.interaccess.com.) + +Tue Jul 8 22:18:00 1997 Arnold D. Robbins + + * awk.y [LEX_NEXT]: Removed support for `next file' as two words. + +Tue Jul 8 06:46:32 1997 Arnold D. Robbins + + * dfa.c: Changes from pjr@jet.UK (Paul J Rippin) from an old + bug report against 2.14.0 that speed up initialization and + rewrite the inner loop into readable code. + +Thu Jul 3 11:44:50 1997 Arnold D. Robbins + + * Atari support moved into new `unsupported' directory. + awk.h, Makefile.in, gawkmisc.c, and missing.c modified. + +Sun Jun 29 14:17:37 1997 Arnold D. Robbins + + * awk.y (exp): Fixed warning about `x = /foo/'. + +Wed Jun 25 09:07:57 1997 Arnold D. Robbins + + * PORTS: Removed from distribution. + * Makefile.in (MISC): Removed PORTS. + +Sun Jun 22 11:52:57 1997 Arnold D. Robbins + + BINMODE changes. + + * awk.h (Node_BINMODE): Added. + (struct redirect): Added mode field to save for io.c:close_one(). + (BINMODE, BINMODE_node, set_BINMODE): Add declarations. + * awk.y (isnoeffect): Add Node_BINMODE. + * eval.c (nodetypes): Add Node_BINMODE string. + (r_tree_eval, r_get_lhs): Add cases for Node_BINMODE. + (set_BINMODE): New function. + * io.c (binmode): New function. + (nextfile, redirect, gawk_popen): Add calls to binmode(). + * main.c (BINMODE, BINMODE_node): Add decls. + (main): Add call to setmode() if BINMODE is set. + (varinit): Add entry for BINMODE. + +Wed Jun 4 21:52:25 1997 Arnold D. Robbins + + * configure.in [AC_FUNC_MMAP]: Removed call. + * awk.h [struct iobuf]: Removed IOP_MMAPED flag and `getrec' member. + * io.c: Removed all mmap related code. + +Sun Apr 27 16:23:56 1997 Arnold D. Robbins + + * aclocal.m4 [GAWK_AC_FUNC_MKTIME]: New macro. + * configure.in (GAWK_AC_FUNC_MKTIME): Call it. + +Thu Apr 24 23:25:06 1997 Arnold D. Robbins + + * io.c (devopen): Remove stat test for /dev/foo files. Finally. + +Fri Jul 26 09:23:15 1996 Arnold D. Robbins + + Changes to add an abort statement, a la tawk. + + * awk.h (Node_K_abort): New enum value for NODETYPE. + * main.c (aborting): New flag variable. + (main): Add logic to handle aborting. + * eval.c (interpret): Add case for Node_K_abort. + * io.c (do_input): If aborting, break loop. + * awk.y (tokentab): Add entry for "abort" keyword + (PRODUCTIONS): Add production for LEX_ABORT. + +Wed Jul 24 12:49:52 1996 Arnold D. Robbins + + First cut at changes for i18n. + + * awk.h (do_intl): Declare new flag variable. + [INTLSTR]: New flag def. + (m_tree_eval): Fix definitions for INTLSTR. + (force_string): Fix definitions for INTLSTR. + * awk.y (yylex): Add _"..." for international strings. + (dumpintlstr): New function. + * main.c (do_intl): Define new flag variable. + (optab): Add "gen-po" entry. + (main): If do_intl, exit, don't run the program. + (gawkoption): Add "gen-po" entry. + * node.c (r_force_string): Call gettext if flags indicate INTLSTR. + +Thu Mar 14 06:29:42 1996 Arnold D. Robbins + + * awk.h (do_mktime): Added declaration of new function. + * builtin.c (do_mktime): New function. + * awk.y (tokentab): Added "mktime" to list of gawk extensions. + * missing.c [HAVE_MKTIME]: Added include of mktime.c if needed. + +Mon Feb 26 22:32:19 1996 Arnold D. Robbins + + * io.c (pidopen, useropen): Added warnings to use PROCINFO[], + not special files. + * main.c (load_procinfo): New function. + * awk.y (variable): Added call to load_procinfo() function. + +Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + +Thu Aug 3 17:47:53 2000 Greg McGary + + * regex.c: Patches for gcc bounded pointer handling. + +Thu Aug 3 13:09:09 2000 Arnold D. Robbins + + * array.c (in_array, do_delete): Fix tests for index equality + when searching through the array to work correctly when + index is "". + +Fri Jul 14 21:40:17 2000 Pat Rankin + + * builtin.c (format_tree): Workaround a DEC C V5.7 bug by + splitting `strcpy() + 3' into two expressions (the builtin + inline strcpy evidently has erroneous return type of void * + instead of char *; reputedly fixed in V6.1). + + * eval.c (C): New macro. + [casetable]: Use it to add explicit casts for the character + values outside the range of 0 to 127. + * missing/strncasecmp.c [C, charmap]: Likewise. + + * io.c (redirect): Add EIO check on failed open for VMS. + +Fri Jul 14 11:57:23 2000 Arnold D. Robbins + + Efficiency hack: turn `for (iggy in foo) delete foo[iggy]' + into moral equivalent of `delete foo'. + + * array.c (do_delete_loop): New routine. + * awk.h [NODETYPE]: New Node_K_delete_loop value. + Add declaration of do_delete_loop. + * awk.y [LEX_FOR]: Fix code to recognize special case. + * eval.c (nodetypes): New entry for Node_K_delete_loop. + (interpret): Add case for Node_K_delete_loop, add more + diagnostic info in default (cant_happen) case. + +Tue Jul 11 22:15:10 2000 Pat Rankin + + * awk.y (nextc): Recast unsigned char values back to int to + prevent VAX C from truncating EOF to 255. + +Tue Jul 11 14:08:23 2000 Arnold D. Robbins + + * array.c (do_delete): Switch to string comparison, not + cmp_nodes. + (assoc_find): Add call to force_string on subscript. + * eval.c (interpret): Case Node_K_arrayfor: check for + Node_array_ref and fetch original_array. Yowser. + +Fri Jun 30 21:57:00 2000 Arnold D. Robbins + + * array.c (assoc_lookup): Don't force the subscript + to be a string. Not a good idea after the change + to using dupnode. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed Jun 14 13:03:45 2000 Arnold D. Robbins + + * field.c (set_record): Manage a private buffer for $0. + Keeps things safe in case `getline var' rearranges the + IOBUF's contents that $0 is still pointing into. + +Tue Jun 13 16:27:55 2000 Paul Eggert + + Upgrade to latest and greatest version of largefile code. + + * configure.in (AC_CANONICAL_HOST): Remove. + (GAWK_AC_SYS_LARGEFILE): Defer until after AC_MINIX, + to avoid autoconf warnings. + + Rewrite largefile configuration so that we don't need to run + getconf and don't need AC_CANONICAL_HOST. + * config.guess, config.sub: Remove these files. + * Makefile.in (MISC): Remove config.guess, config.sub. + * m4/largefile.m4 (GAWK_AC_SYS_LARGEFILE_FLAGS, + GAWK_AC_SYS_LARGEFILE_SPACE_APPEND): Remove. + (GAWK_AC_SYS_LARGEFILE_TEST_INCLUDES): New macro. + (GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from + CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. + All uses changed. + Instead of inspecting the output of getconf, try to compile the + test program without and with the macro definition. + (GAWK_AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check + for getconf. Instead, check for the needed flags by compiling + test programs. + + (GAWK_AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be 500 to + work around glibc 2.1.3 bug. + + (GAWK_AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on IRIX if the + installer said otherwise. + + (GAWK_AC_SYS_LARGEFILE_FLAGS): Work around a bug in the QNX shell, + which doesn't propagate exit status of failed commands inside + shell assignments. + +Wed Jun 7 13:23:09 2000 Arnold D. Robbins + + * Updated copyright dates in appropriate files. + +Mon May 22 17:29:43 2000 Arnold D. Robbins + + * Makefile.in (clean): Get `*/core' too. + +Sun May 7 16:33:05 2000 Arnold D. Robbins + + * array.c (concat_exp): Change ref to `lnode->stlen' and + `lnode->stptr' for SUBSEP to use `var_value->...'. + +Tue May 2 09:54:29 2000 Arnold D. Robbins + + Fix referencing freed memory as shown by test/arynocls.* tests. + * awk.h [Node_array_ref]: New node type. + [orig_array]: New macro element in NODE structure. + * field.c (do_split): Handle case for Node_array_ref, fetch + the original array. + * array.c (in_array, do_delete): Ditto. + * eval.c (nodetypes[]): Add Node_array_ref string. + (r_tree_eval): Handle case for Node_array_ref. + (push_args): Push arrays as Node_array_ref, and pass them on. + (pop_fcall): Don't unref lnode if it's an array when releasing + local arguments. Check for both Node_array and Node_array_ref. + (r_get_lhs): Choke on Node_array_ref as for Node_array. + For Node_subscript, handle Node_array_ref. + +Tue May 2 09:52:12 2000 Bruno Haible + + * io.c (redirect): After reopening a `struct redirect', move it to + the head of the list. + +Sun Apr 2 17:51:40 2000 Arnold D. Robbins + + * re.c (re_update): Check if IGNORECASE has changed, and + if so recompute the re. See test/igncdym.awk. + +Mon Mar 20 16:18:34 2000 Arnold D. Robbins + + * io.c (set_RS): Added a lint warning about multicharacter RS, + per suggestion from Akim DeMaille (akim@epita.fr). + +Sun Feb 13 14:40:32 2000 Arnold D. Robbins + + * eval.c (push_args): Fix from Nide Naoyuki , + re-assign `f' in case tree_eval moved fcall_list around. + +Sun Feb 6 11:39:33 2000 Arnold D. Robbins + + * eval.c (op_assign): Fix it right. For ++ and --, get the lhs + in the operations, do the op, and then return. For += etc, + get the rhs FIRST, since the lhs can move around as a result, + *then* get the lhs and do the operation. See test/opasnidx.awk. + +Tue Feb 1 18:41:40 2000 Arnold D. Robbins + + * eval.c (op_assign): Reget the rval after regetting + the left hand side. See test/opasnslf.awk for why. + +Thu Jan 27 18:06:31 2000 Arnold D. Robbins + + * awk.y (yylex): Made ']' not one of the characters + that sets `want_assign' to false. `a[i] /= 2' was + broken. Per bug report from Kristofer T. Karas + . + +Wed Dec 22 15:06:37 1999 Arnold D. Robbins + + * awk.y: Removed declarations of functions before + definition of `tokentab[]'. They're redundant with + what's in awk.h. + +Thu Dec 9 17:01:07 1999 Arnold D. Robbins + + * node.c (parse_escape): Add lint warning for unrecognized + escape sequences. + +Mon Dec 6 15:17:34 1999 Arnold D. Robbins + + * main.c (usage): Changed bug reporting email addresses to + be a reference to `Bugs' node in the online and printed + doc, instead. + +Thu Dec 2 13:08:18 1999 Arnold D. Robbins + + * builtin.c (do_compl): Test `d' for negative inside the do_lint + test, not uval. Ooops. + +Fri Nov 26 10:58:36 1999 Arnold D. Robbins + + * array.c (assoc_find): ALWAYS compare indexes as strings, + don't use cmp_nodes in case they are numeric. Oh my. + Talk about a Day 1 bug! + +Tue Nov 23 11:58:53 1999 Arnold D. Robbins + + * regex.c (SYNTAX): Cast argument to `unsigned char' instead of + &-ing with 0xFF. Hopefully somewhat more portable, ala 21 Nov 99 + changes to awk.y. + +Sun Nov 21 22:25:27 1999 Paul Eggert + + * aclocal.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a + problem with the QNX 4.25 shell, which doesn't propagate exit + status of failed commands inside shell assignments. + +Sun Nov 21 20:33:35 1999 Arnold D. Robbins + + * awk.h (nextc): Remove declaration, don't need it here. + awk.y (nextc): Cast values to unsigned char so that latin-1 + characters in strings don't turn themselves into EOF. + Most notably y-umlaut, which is decimal 255. + +Mon Nov 1 20:00:25 1999 Arnold D. Robbins + + * regex.c (init_syntax_once): Move below definition of + ISALNUM etc., then use ISALNUM to init the table, so that + the word ops will work if i18n'ed. + (SYNTAX): And subscript with 0xFF for Latin-1 characters. + +Mon Oct 25 18:37:13 1999 Arnold D. Robbins + + * awk.h, main.c, io.c: Undo previous changes (22 Oct 1999). + * main.c (main): Move call to `init_fields()' to before + arg parsing. This allows `-v NF=blah' to work ok. + +Fri Oct 22 17:43:40 1999 Arnold D. Robbins + + * main.c (arg_assign): Add new arg, `initing' for icky special + casing of -v of special variables. Use it to check for NF. + May need to add other cases later. + (pre_assign): Change call arg_assign, passing initing=TRUE; + io.c (nextfile): Change call arg_assign, passing initing=FALSE; + awk.h: Change prototype for arg_assign. + +Tue Oct 19 16:06:48 1999 Paul Eggert + + * io.c (close_redir): Don't munge errno between setting it and + using it. + +Wed Oct 6 17:47:47 1999 Arnold D. Robbins + + * main.c (arg_assign): Return NULL on bad variable. Allows + things like `./3x=stuff' to work as a filename. + +Thu Sep 23 21:35:46 1999 Paul Eggert + + * aclocal.m4 (GAWK_AC_SYS_LARGEFILE_FLAGS): Work around GCC + 2.95.1 bug in HP-UX 10.20 or later. (Had to fix the fix. ADR. :-) + +Tue Sep 21 13:31:36 1999 Arnold D. Robbins + + * builtin.c (format_tree): For '0', only set zero_flag if we + haven't seen the field width or precision yet. + +Mon Aug 9 13:06:01 1999 Arnold D. Robbins + + * array.c (assoc_lookup): Removed code that gave each array + a private copy of each index. Balloons memory usage for + no good reason that I can see. Just use dupnode in all + cases. + * configure.in: Check for $srcdir/.developing adds extra + defines for my testing/debugging use. Yes, hack alert. + +Sun Aug 1 11:02:02 1999 Arnold D. Robbins + + * node.c (dupnode): Turn off FIELD when copying nodes. + * array.c (do_adump, assoc_dump): New functions for array debugging. + * awk.y (tokentab): Conditionally add "adump" function for debugging. + * awk.h: Delcare new functions. + +Thu Jul 29 23:26:40 1999 Arnold D. Robbins + + From wsanchez@apple.com: + * Makefile.in (install-strip): New target, coding stds. compatibility. + * config.guess, config.sub: Add MacOS X recognition. + +Thu Jul 29 19:09:19 1999 Arnold D. Robbins + + * awk.y (func_install): Make `function foo(foo)' a fatal error. + eval.c (r_tree_eval): Diagnose use of a function name as a + variable inside the function. + +Sun Jul 4 16:53:14 1999 Arnold D. Robbins + + * eval.c (eval_condition): Add extra braces to avoid + gcc warning. I'm not going to bother for the library + code like dfa and regex. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + +Wed Jun 30 16:10:11 1999 Arnold D. Robbins + + * awk.h: Add include of , and comment about config.h + having to be included before any system headers. Otherwise, + with egcs-2.91.66 and later on Linux systems, and possibly + others, things break badly, due to the LFS macros. + * awk.y, builtin.c, eval.c, field.c, io.c: Removed include + of assert.h + +Wed Jun 9 11:39:19 1999 Paul Eggert + + Port the large-file code to AIX, HP-UX, and IRIX. + Add cross-compilation support for large files. + + * config.guess, config.sub: New files. + + * configure.in (AC_CANONICAL_HOST): + Add; GAWK_AC_SYS_LARGEFILE needs this. + (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES. + + * aclocal.m4 (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES. + Add support for AIX and HP-UX. + (GAWK_AC_SYS_LARGEFILE_FLAGS, GAWK_AC_SYS_LARGEFILE_SPACE_APPEND, + GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): New macros. + + * acconfig.h (_FILE_OFFSET_BITS, _LARGEFILE_SOURCE, _LARGE_FILES): + New macros. + + * Makefile.in (MISC): Add config.guess and config.sub so they get + included in the distribution. + +Wed Jun 9 11:29:29 1999 Paul Eggert + + * io.c (iop_alloc): Don't mmap files whose sizes don't fit in `int'. + [ This isn't really needed, as HAVE_MMAP is #undef'ed at the top, + but it's there in case people want to take their life in their hands. ] + +Sun Jun 6 11:28:07 1999 Arnold D. Robbins + + * BETA Release 3.0.46: Release tar file made. + +Wed Jun 2 14:36:24 1999 Arnold D. Robbins + + * PORTS: Updated with a more recent list of systems + that gawk compiles and tests ok on. + +Tue Jun 1 14:24:59 1999 Arnold D. Robbins + + * BETA Release 3.0.45: Release tar file made. + +Tue May 25 16:32:37 1999 Arnold D. Robbins + + * builtin.c (format_tree): More smarts for weird cases, such as + zero precisions and zero values used with the `#' flag. + Thanks to Andreas Schwab (schwab@gnu.org) for pointing these out. + +Wed May 19 14:02:54 1999 Arnold D. Robbins + + * io.c (do_close): Move test for `close(FILENAME)' to after + loop through all open redirections. Fixes problems in obscure + cases with redirections in END rules. + +Sun May 16 14:08:39 1999 Arnold D. Robbins + + * awk.y (yylex): Fix group of characters including ',' to + set want_assign = FALSE. Fixes bizarre parsing problems in + function call lists, for example. + * io.c (get_a_record): Repair logic for single-leading-newline + case. + +Tue May 11 16:48:11 1999 Arnold D. Robbins + + * aclocal.m4 (GAWK_AC_AIX_TWEAK): New macro. + * configure.in: Call it + * Makefile.in: (awklib/all): Pass CFLAGS on to sub-make so + that password programs will get AIX magic defines. Avoids + having to tweak program code for those in doc/gawk.texi. + +Mon May 3 16:56:23 1999 Arnold D. Robbins + + * array.c (do_delete): Don't free_temp(subs) until after all + references to it are finished. + +Mon May 3 13:41:16 1999 Arnold D. Robbins + + * BETA Release 3.0.44: Release tar file made. + +Sun May 2 18:25:43 1999 Arnold D. Robbins + + * io.c (get_a_record): Do a really good job of stripping newlines + from the front of records when RS = "" and there's only one + newline at the front of the file, which the regex didn't catch. + +Wed Apr 28 12:27:49 1999 Arnold D. Robbins + + * configure.in: More HP stuff: fix the manual alloca code so that + gawk will compile and link on HP systems. See the comments. + +Sun Apr 25 13:39:16 1999 Arnold D. Robbins + + * Makefile.in (gawk): Add $(CFLAGS) to linking step. + * configure.in: Correctly do AC_FUNC_GETPGRP on HP systems too. + +Tue Apr 13 20:21:00 1999 Arnold D. Robbins + + * BETA Release 3.0.43: Release tar file made. + +Tue Apr 13 19:02:20 1999 Arnold D. Robbins + + * io.c (useropen, pidopen): Add casts to int on arguments to + silence gcc warnings. + * regex.c (regcomp,regexec,regfree): Add ifdef for APPLE. + +Thu Feb 4 10:38:02 1999 Arnold D. Robbins + + * custom.h: Hacks for BeOS. Not documented in the manual right now. + * configure.in: Hacks for BeOS. Check for HP-UX and define C_ALLOCA + if not using gcc. I wish they'd just fix bison already. + +Sun Dec 20 16:57:38 1998 Arnold D. Robbins + + * BETA Release 3.0.42: Release tar file made. + +Sun Nov 15 21:05:39 1998 Arnold D. Robbins + + * io.c (gawk_popen): Add WIN32 to list of systems that use + the non-real-pipe version. From the PC gawk guys. + +Wed Nov 4 11:32:24 1998 Arnold D. Robbins + + * BETA Release 3.0.41: Release tar file made. + +Tue Nov 3 16:24:35 1998 Arnold D. Robbins + + * eval.c (r_get_lhs): Fix the cases for the special variables, + don't unref their current value if it's the same as the internal + copy; perhaps the current one is used in a concatenation or some + other expression somewhere higher up in the call chain. Ouch. + See test/getnr2tm.awk. + +Sun Nov 1 15:24:52 1998 Arnold D. Robbins + + * builtin.c (format_tree): Improve handling of zero-fill + when a precision is present. See test/zeroflag.awk. + +Wed Oct 28 20:40:17 1998 Arnold D. Robbins + + * eval.c (r_tree_eval): Case for Node_concat. Get lengths + separately, in case one expression has a side effect that + that changes another. Ugly, but it keeps gawk from core + dumping. See test/nasty.awk. + +Sun Oct 18 21:27:24 1998 Arnold D. Robbins + + * awk.y (append_right): Bug fix, if `list' or `new' are NULL, + return `list', so that things don't break too badly. + * regex.c (re_compile_fastmap): Remove unused variable `num_regs'. + +Thu Oct 8 19:36:57 1998 Arnold D. Robbins + + * BETA Release 3.0.40: Release tar file made. + +Mon Jul 27 10:14:33 1998 Arnold D. Robbins + + * node.c (parse_escape): Remove assignment with side effects + from ISXDIGIT test. Thanks to "Mihai T. LAZARESCU" + for pointing this out. + +Mon Apr 27 11:31:32 1998 Arnold D. Robbins + + * main.c (usage): Fix the email address for the bug list. + (copyleft): Update the copyright year. + +Mon Mar 23 21:22:32 1998 Arnold D. Robbins + + * eval.c (r_get_lhs): Make sure that values of type + Node_param_list don't have the FUNC flag set. This means + we don't allow the use of a function name as a variable or + array from within the function. + +Sun Mar 22 19:12:32 1998 Paul Eggert + + * aclocal.m4 (GAWK_AC_LARGE_FILES): New macro that checks for + large file support, and updates CPPFLAGS, LDFLAGS, LIBS as + needed. + * configure.in: Call GAWK_AC_LARGE_FILES. + * Makefile.in (CPPFLAGS, LDFLAGS): Let autoconf configure. + (COMPFLAGS): Add $(CPPFLAGS). + +Mon Mar 16 14:06:41 1998 Arnold D. Robbins + + * field.c (using_FIELDWIDTHS): New macro. + (using_fieldwidths): Use new macro. + (do_split): In case for FS_DFLT, also check that + we're not using FIELDWIDTHS. Otherwise, split() would use + FIELDWIDTHS, not current value of FS. Oops. + +Sun Nov 16 20:08:59 1997 Arnold D. Robbins + + * builtin.c (sub_common): Fix for count of matches in gsub + from Geert.Debyser@esat.kuleuven.ac.be. + +Wed Oct 15 03:38:12 1997 Arnold D. Robbins + + * field.c (set_FS): Use `sc_parsefield' if the value of FS is not + alphabetic OR if not ignoring case. Bug fix if IGNORECASE + is true and FS happens to be '^'. Sheesh, talk about obscure. + (rebuild_record): Add more smarts to the code that sets up the + fields. Thanks to Alan J. Broder (ajb@dtmr.com). + +Sun Oct 5 11:56:52 1997 Arnold D. Robbins + + * configure.in: If ISC add -D_SYSV3 to CFLAGS, per email from + Mario Vanoni (vanonim@dial.eunet.ch). + +Fri Sep 26 00:57:49 1997 Arnold D. Robbins + + * awk.y (append_right): Return if either list is NULL. Prevents + syntax errors from causing core dumps. + +Wed Sep 17 15:34:15 1997 Arnold D. Robbins + + * field.c (rebuild_record): Set things up so that all fields point + into the new record and release any changed fields without + causing memory leaks. Avoids problems when fields are extended + with the value of $0 or other fields and then $0 is assigned to. + +Mon Sep 15 16:12:55 1997 Arnold D. Robbins + + * builtin.c (do_print): When testing for NUMBER, make sure + it's not a string too. Thanks to Michael Brennan for + clarifying the semantics. + +Sun Sep 14 19:55:12 1997 Arnold D. Robbins + + * node.c (format_val): Always format values ourselves: avoids + problems if OFMT is bizarre, like %s. + +Sun Sep 14 00:08:53 1997 Arnold D. Robbins + + * io.c (get_a_record): Replace all occurrences of the test + `grRS == FALSE' with `RS_is_null' which makes ` RS = "\0" ' + actually work, is clearer code, and actually makes use of + the `RS_is_null' variable! + +Sun Aug 17 07:15:12 1997 Arnold D. Robbins + + * field.c (set_FS): Change logic to always set parse_field, even + if FS hasn't changed. Thanks to Igor Sheyn for catching this. + +Wed Aug 6 21:04:37 1997 Arnold D. Robbins + + * io.c (VMS et al gawk_popen): Use pclose, not fclose, if + iop_alloc fails. + +Wed Jul 30 19:53:52 1997 Arnold D. Robbins + + * awk.y [variable]: Fix case for subscript if $3 == NULL. + +Sun Jul 27 22:47:30 1997 Arnold D. Robbins + + * awk.y (get_src_buf): Don't close file if it's stdin. + +Sun Jul 27 22:47:15 1997 Pat Rankin + + * io.c (#if VMS: vmsrtl_fileno): New routine. + (#if VMS: fileno): New macro substituted for stdio one. + +Thu Jul 17 20:05:59 1997 Arnold D. Robbins + + * builtin.c (do_print): When OFMT != CONVFMT, create a new + temporary node with just the numeric value valid and format it, + and use that for printing. Avoids memory corruption. + +Wed Jul 16 10:01:16 1997 Arnold D. Robbins + + * regex.c: When SYNTAX_TABLE is defined, but not emacs, then + CHAR_SET_SIZE is not defined, though used in regcomp. It should + be taken out of #ifdef SYNTAX_TABLE. Fix from bug group, from + Akim Demaille, demaille@inf.enst.fr. + * awk.h (isnondecimal): Make test a little smarter. + * builtin.c (nondec2awknum): Add bailout for decimal numbers, e.g. + `00.1'. Fix from Larry Schwimmer . + +Thu Jun 19 19:00:40 1997 Arnold D. Robbins + + * eval.c (interpret): case Node_K_next, Node_K_nextfile: fatal + error if called from BEGIN or END. + (Fixed completely Mon May 3 13:31:42 1999.) + +Mon Jun 9 22:40:04 1997 Arnold D. Robbins + + * builtin.c (nondec2awknum): Allow `f' and `F' in hexadecimal numbers. + Gotta get more sleep... + * array.c (assoc_lookup): Fix from Tom Karzes (karzes@equator.com) + for memory leak when forcing type to Node_var_array. + +Thu May 15 12:49:08 1997 Arnold D. Robbins + + * Release 3.0.3: Release tar file made. + +Wed May 14 08:06:08 1997 Arnold D. Robbins + + * io.c (do_close): Add lint warning if closing something that + isn't open. + +Tue May 13 12:14:12 1997 Arnold D. Robbins + + * random.c, builtin.c: Remove __GLIBC__ tests, since it breaks + `make test'. I prefer consistency across platforms. + * Makefile.in (gawk): Undid April 25 changes and added comment. + Putting COMPLAGS in breaks with -g on VMS POSIX. + +Sun May 11 14:48:04 1997 Darrell Hankerson + + * io.c [MSC_VER]: Add cases for WIN32. + * regex.c [MSC_VER]: Add cases for WIN32. + +Sun May 11 07:04:01 1997 Arnold D. Robbins + + * builtin.c (do_print): In the loop that evaluates each expression + to be printed, do a dupnode to avoid bizarre output. Thanks to + Michal for finding this problem. + * awk.y (yylex): Fix scanning of hexadecimal constants. + +Wed May 7 15:09:25 1997 Arnold D. Robbins + + * io.c (get_a_record): Fix casetable indexing with cast to int. + Keeps Michal happy. + +Tue May 6 16:40:19 1997 Arnold D. Robbins + + * eval.c (func_call): Removed unneeded variables. + +Mon May 5 21:17:37 1997 Pat Rankin + + * missing/strftime.c [case 'v', VMS_EXT]: For VMS date format, two + digit day of month should not be zero padded on the 1st through + the 9th. + +Mon May 5 06:33:47 1997 Arnold D. Robbins + + * regex.h, regex.c: Merge with current GLIBC version. + +Mon May 5 06:33:47 1997 Pat Rankin + + * io.c (nextfile): Move the check for null return from iop_open + in the normal case and add one for the "no args" case. + +Fri Apr 25 16:52:33 1997 Arnold D. Robbins + + * array.c (grow_table): Add a bunch more large primes so arrays + can get really big. Thanks to christos@deshaw.com. + * all files: Remove ifdef'ed out code and update copyrights. + * Makefile.in (gawk): Add $(COMPFLAGS) to command line. + * eval.c (flags2str): Added case for FIELD. + +Thu Apr 24 22:39:23 1997 Arnold D. Robbins + + * COPYING: Changed to current official version from FSF. + * regex.c: Merge with GLIBC version. + * awk.h [_GNU_SOURCE]: Bracket definition inside ifdef. + (NODE.source_line): Move name member out of `x' union and + into `nodep'; avoids problems doing diagnostics. + (nondec2num): Put decl into #if BITOPS || NONDECDATA + * posix/gawkmisc.c, missing/system.c, missing/strtod.c, + missing/strerror.c: Move to generic GPL statement at top. + * builtin.c (nondec2num): Put into #if BITOPS || NONDECDATA + +Wed Apr 23 22:14:14 1997 Arnold D. Robbins + + * dfa.c: Misc changes for really pedantic SGI compilers. + * builtin.c: Bracket defs of random() etc for GLIBC. + * random.c: Bracket whole file for GLIBC. + * configure.in: Extra goop for GETPGRP test for VMS POSIX. + * custom.h [VMS]: Remove hard definition of GETPGRP_VOID. + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Tue Apr 15 21:35:45 1997 Arnold D. Robbins + + NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE! + * acconfig.h [NONDECDATA]: New macro. + * awk.h: Add decl of do_strtonum. + * awk.y (tokentab): Add entry for strtonum function. + * builtin.c (do_strtonum): New function. + * configure.in (non-decimal-data): New --enable-* option. + * node.c (r_force_number): Change to allow non-decimal data inside + ifdef NONDECDATA. + +Tue Apr 15 06:32:50 1997 Pat Rankin + + * missing/strftime.c (malloc, realloc, getenv, strchr): Only + declare these when STDC_HEADERS is not defined. + : Include these when STDC_HEADERS is defined. + * awk.h (freenode, tree_eval, m_tree_eval): Reorganize definitions. + * alloca.c (malloc): If malloc is already defined as a macro, + presumeably by config.h, don't define or declare it. + +Wed Apr 9 22:45:27 1997 Arnold D. Robbins + + * Makefile.in [COMPFLAGS]: Per suggestion from Karl Berry, put + $(CFLAGS) last. + +Tue Apr 8 23:54:46 1997 Arnold D. Robbins + + * eval.c (interpret): For Node_K_break and Node_K_continue, if + treating them like `next', also check the function call stack + and pop it if necessary. + +Mon Apr 7 18:22:37 1997 Arnold D. Robbins + + * awk.h: Add decls of new routines do_compl() and set_loc(). + * awk.y (tokentab): Add entry for "compl" function. + * builtin.c (do_compl): New function to do ones complement. + (do_substr): Rationalized yet again, now notices negative start + and length parameters. + * eval.c (push_args): Fix if call_list gets realloc'ed in the + middle of things. Avoids crash for deeply nested function calls. + * main.c (catch_sig): Add call to set_loc(). + * msg.c (set_loc, srcfile, srcline): New function and private + variables to help out in tracing down source of error messages. + +Fri Mar 28 08:42:27 1997 Arnold D. Robbins + + * io.c (iop_alloc, iop_close): Undo changes of Feb 11, apparently + other cleanups in io.c made mmap stuff start working again. + BAH! It's a mess, the test suite still fails. I'm leaving the + mmap stuff undefined for now. It'll probably get ripped out in 3.1. + +Thu Mar 27 08:48:57 1997 Arnold D. Robbins + + * custom.h [_SEQUENT_]: Undef HAVE_MMAP. + +Wed Mar 26 09:08:16 1997 Arnold D. Robbins + + * io.c (iop_alloc): Fix definition to make it static. + +Mon Mar 24 23:09:07 1997 Arnold D. Robbins + + * field.c (init_fields, etc..): More clean up use of Null_field + and the various flags. + * node.c (unref): If a field, free the node itself. Fixes + memory leak problems. + +Sun Mar 23 22:51:09 1997 Arnold D. Robbins + + * awk.h [FIELD]: New flag for node->flags field. + * builtin.c (sub_common): If FIELD is set, dup the string. + * field.c (init_fields): Set up a new Null_field global var. + (init_fields, set_field, set_record) use the FIELD flag. + (getfield): Use Null_field instead of private variable. + * io.c (wait_any): Comment out calls to pclose and iop_close, + caused weird race conditions. See test/pipeio1.awk. Thanks + to Darrell Hankerson for tracing this one down. + +Tue Mar 18 20:57:18 1997 Arnold D. Robbins + + * dfa.c (inboth): Free templist; plugs memory leak. + * field.c (init_fields, grow_fields_arr, set_field, rebuild_record, + set_record): Remove PERM flag from entries in fields_arr[]. Fixes + nasty memory leak. + +Tue Mar 18 06:33:00 1997 Arnold D. Robbins + + * awk.y (dup_parms): Robustified against parameter errors. + +Sun Mar 16 21:31:40 1997 Arnold D. Robbins + + NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE! + * acconfig.h [BITOPS]: New macro. If set, do octal & hex and bit ops. + * awk.h [isnondecimal]: New macro, and decl of new functions. + * awk.y (yylex): Add recognition of octal and hex constants. + * builtin.c (do_and, do_or, do_xor, do_lshift, do_rshift): New + functions that do bit operations. + (nondec2awknum): New function to convert octal or hex to double. + * configure.in: Add AC_ARG_ENABLE for bit operations. + * node.c (r_force_number): Add octal and hex conversion. + +Sun Mar 16 21:28:56 1997 Arnold D. Robbins + + * awk.h [IOP_NOFREE_OBJ]: New macro. + * io.c (iop_open, iop_alloc): Add new third parameter, which is + either NULL, meaning allocate a new IOP, or the address of one + already allocated. Have a static one in the `nextfile' + routine, and use the IOP_NOFREE_OBJ flag for it. All of this + keeps us from reading freed memory. The `swaplns' test fails + otherwise. + (iop_close): If IOP_NOFREE_OBJ is set, don't free the IOBUF. + +Wed Feb 26 06:21:02 1997 Arnold D. Robbins + + * eval.c (in_function, pop_fcall_stack, pop_fcall, push_args): + New functions. These manage "frames" of awk function call arguments. + The problem is that a `next' or a `nextfile' from a function + leaks memory. These changes allow us to free up that memory. + (interpret): for Node_K_next and Node_K_nextfile, check if in + a function call and free all function call frames. + +Fri Feb 21 06:23:19 1997 Arnold D. Robbins + + Misc changes from Katsuyuki Okabe : + + * builtin.c (do_substr): Change a %d to %ld in warning message. + * eval.c (op_assign): Fix format string for warning about %=. + +Wed Feb 19 23:29:02 1997 Arnold D. Robbins + + * main.c (main): Add do_intervals to condition that causes + resetup() to be called again. Makes the --re-interval option + actually work. What a concept. + +Fri Feb 14 09:47:31 1997 Arnold D. Robbins + + * io.c [#include "awk.h"]: Undef HAVE_MMAP to just use the old code. + Something is causing a file descriptor leak, and this is getting to + be just too much hair. I reserve the right to rip out the mmap + code entirely at a future date. + +Tue Feb 11 06:28:29 1997 Arnold D. Robbins + + * io.c (iop_alloc): For an mmap'ed file, close the file descriptor, + and then touch each page to get a private copy. Fixes nasty case + of truncating our input file. + (iop_close): Don't call close on mmap'ed file. + +Wed Feb 5 17:59:04 1997 Arnold D. Robbins + + * eval.c (interpret): For Node_K_delete, just call do_delete; let + it handle the case of `delete array'. + * array.c (do_delete): Changed to handle case of `delete array', + and made smarter if the array is actually an uninitialized + parameter. + +Sun Jan 26 22:58:29 1997 Arnold D. Robbins + + * getopt.h, getopt.c, getopt1.c: Replaced with new versions from + GLIBC 2. + +Sun Jan 19 23:37:03 1997 Arnold D. Robbins + + * eval.c (nodetype2str): Not static, for debugging. + (flags2str): New function for debugging. + * field.c (get_field): Add new var that is like Nnull_string but + does not have numeric attributes, so that new fields are strings. + (set_record): Turn off PERM flag before unrefing fields and field 0. + * array.c (in_array): Always evaluate subscript, could have + side effects. + * builtin.c (do_strftime): Way increase size of buffer to make sure + we don't have overflow problem. Keeps Paul Eggert happy. + * custom.h [__amigaos__]: Define fork to vfork. From Fred Fish. + * dfa.c: Move include of config.h to top, for RSXNT. From Kai + Uwe Rommel. + (ISALPHA, etc): Change from Jacob Engelbrecht (jaen@novo.dk) + to better handle non-ASCII environments. + * gawkmisc.c: Remove amigados case, posix should now work fine. + * amiga/*: Nuked per previous entry. + * Makefile.in: Removed all references to amiga + * io.c [HAVE_SYS_PARAM_H]: Add #undef RE_DUP_MAX to avoid + spurious conflict with regex.h. + (flush_io): Remove amiga ifdefs, not needed anymore. + (spec_setup): Set getrec field for special files. Fix from + Mark Gray (markgray@pdt.net). + * node.c (more_nodes): Fix to get the last entry in the array. + +Wed Jan 8 17:42:37 1997 Andreas Schwab + + * io.c (mmap_get_record): Fix return value if file ends without + record separator. + +Fri Jan 3 19:57:16 1997 Pat Rankin + + * awk.y (get_src_buf): Test for an empty source file by detecting + an initial read of 0 bytes rather than by relying on info from + stat(). + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Wed Dec 25 11:17:32 1996 Arnold D. Robbins + + * Makefile.in (install, uninstall): Use $(srcdir)/patchlevel.h. + Thanks to Richard Levitte, LeViMS@stacken.kth.se. + (install): Remove chmod command; let $(INSTALL_PROGRAM) use -m. + +Mon Dec 23 20:36:59 1996 Pat Rankin + + * custom.h (#if VMS_POSIX): Define GETPGRP_VOID. + +Fri Dec 20 08:59:55 1996 Arnold D. Robbins + + * getopt.c, getopt1.c: Comment out the `#if defined (_LIBC) || + !defined (__GNU_LIBRARY__)' and `#endif' to force use of this + getopt, even on systems like Linux. This will be handled + better in 3.1 / glibc 2. + +Thu Dec 19 22:52:39 1996 Arnold D. Robbins + + * awk.y (yylex): In several places, after yyerror(), add call to + exit(). Otherwise, infinite messages. This should probably + be handled better. + +Wed Dec 18 22:42:10 1996 Darrel Hankerson + + * getopt.c (_getopt_internal): If 'W' and ';', if optind == argc, + return c, don't fall through. + +Wed Dec 18 10:09:44 1996 Arnold D. Robbins + + * configure.in [AC_PREREQ]: Update to 2.12 in order to switch to + autoconf 2.12. Lots of other files will be rebuilt automatically. + [AM_SANITY_CHECK_CC]: Removed, autoconf does it now. + * aclocal.m4 [AM_SANITY_CHECK_CC]: Removed, autoconf does it now. + +Tue Dec 17 22:23:16 1996 Arnold D. Robbins + + * builtin.c (do_strftime): Fix case if format string is "". + Also fix it if format is not "" but result of strftime is "". + See comments in code. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Tue Dec 10 22:39:41 1996 Arnold D. Robbins + + * Makefile.in (dist): Add dependency on `info'. Remove line that + does makeinfo. + (install): Use $(LN) not $(LN_S) to link gawk gawk-version. + +Sun Dec 8 07:53:44 1996 Arnold D. Robbins + + * Makefile.in (gawk): Took COMPFLAGS out of link line for help + on VMS posix. Shouldn't (I hope) affect anything else. + +Thu Nov 28 11:52:24 1996 Arnold D. Robbins + + * configure.in (AC_PROG_INSTALL): Set INSTALL to install-sh. + +Tue Nov 26 22:42:00 1996 Arnold D. Robbins + + * PORTS: Updated list of systems. + * Makefile.in (install): Fix some typos and add some improvements + for Ultrix. + +Sun Nov 24 22:16:26 1996 Arnold D. Robbins + + * builtin.c (do_printf): If no args, fatal error. Return silently + if --traditional. + +Thu Nov 7 20:54:43 1996 Arnold D. Robbins + + * io.c (inrec): Make sure EOF hasn't already happened before + trying to read; prevents accessing freed buffer. Thanks to + Michal Jaegermann. + * Makefile.in [AWKSRC]: Add random.h. + * random.h: New file, redefines names of the `random' functions. + * random.c, builtin.c: Add include of random.h. + +Thu Nov 7 09:06:21 1996 Arnold D. Robbins + + * awk.y (snode): Undo 4 Oct change, put do_split code back. + * field.c (do_split): Restore old code; add test for CONST, so + that re_parse_field is used if third arg to split is a regexp + constant. + +Mon Nov 4 12:57:11 1996 Arnold D. Robbins + + * main.c (main): Research -m[fr] options don't need literal '=' + characters. Brian's documentation was confusing. Fixed, not + that anyone actually uses these options with gawk. + +Sun Nov 3 11:23:21 1996 Arnold D. Robbins + + * field.c (def_parse_field): Add \n to list of acceptable white space. + (posix_def_parse_field): New routine, just like def_parse_field(), + but only allows space and tab as separators. + (do_split, set_FS): Make appropriate choice between the two + *def_parse_field() routines. + +Fri Oct 25 10:13:06 1996 Arnold D. Robbins + + * configure.in: Remove test for random. + * Makefile.in: Add random.c to list of files always compiled. + * missing.c: Remove HAVE_RANDOM test. + * builtin.c: Remove ifdef's for HAVE_RANDOM. + [GAWK_RAND_MAX]: Use constant we know works with our random(). + * random.c: New file - moved from missing/ directory. + +Wed Oct 23 19:46:01 1996 Pat Rankin + + * builtin.c (do_tolower, do_toupper): Add `unsigned char *' casts. + +Tue Oct 22 21:27:52 1996 Arnold D. Robbins + + * builtin.c [GAWK_RANDOM_MAX]: Try to make definition a bit + smarter; don't use RAND_MAX if it's equal to SHRT_MAX, blows + things up. + +Tue Oct 22 08:49:20 1996 Arnold D. Robbins + + * main.c (copyleft): Update copyright date to 1996. + * Too many files to list: Update copyright date to 1996. + +Sun Oct 20 12:21:09 1996 Arnold D. Robbins + + * awk.y, dfa.c, eval.c, io.c, re.c: Added various FIXME comments. + +Sat Oct 19 22:06:42 1996 Arnold D. Robbins + + * eval.c (nodetype2str): Make static, add prototype. + * field.c (sc_parse_field): Cast array subscripts to int to + shut up gcc warnings. + * gawkmisc.c: Add prototype for xmalloc. + * awk.h: Add prototype for getredirect. + * builtin.c (do_fflush): Remove extern decl of getredirect. + * io.c (get_a_record, mmap_get_record): Change decl of rs to int, + to shut up gcc warnings. + * awk.y (isassignable): Add a default to switch to quiet gcc. + * getopt.c (_getopt_internal): Give default value to `indfound'. + +Fri Oct 18 09:00:49 1996 Arnold D. Robbins + + * regex.h [RE_SYNTAX_AWK]: Add RE_CONTEXT_INDEP_ANCHORS. + +Thu Oct 17 22:32:55 1996 Arnold D. Robbins + + * aclocal.m4 [AM_SANITY_CHECK_CC]: Added. + * configure.in: Use it. + +Thu Oct 17 21:43:25 1996 Arnold D. Robbins + + * configure.in: Add checks for locale.h and setlocale(). + * awk.h: Include locale.h and define out setlocale() if not available. + * main.c (main): Call setlocale(). + * builtin.c (do_tolower, do_toupper): Use unsigned char pointers, + to get other charsets right in different locales. + +Wed Oct 16 21:32:53 1996 Arnold D. Robbins + + * builtin.c (format_tree): Change initial buffer size to 512 + and use a constant. Allows large values of %f per bug report + from sheyn@cs.bu.edu. + +Wed Oct 16 21:22:08 1996 Arnold D. Robbins + + * Makefile.in [MISC]: Removed TAGS and tags. + (local-distclean): Added TAGS and tags. + (maintainer-clean): Removed TAGS and tags. + +Wed Oct 16 12:28:43 1996 Arnold D. Robbins + + * main.c (version): Add call to copyleft(), per new standards. + version.c: Fix text of version string to match new standards. + +Sun Oct 6 22:19:45 1996 Arnold D. Robbins + + * regex.c: Updated to Emacs 19.34b base. + +Sun Oct 6 21:57:34 1996 Arnold D. Robbins + + * re.c (make_regexp): Fixed to handle \8 and \9 in the middle + of a regexp. + +Fri Oct 4 10:26:16 1996 Arnold D. Robbins + + * awk.y (snode): Remove case for do_split; always making the + third arg a Node_regex is wrong. + * field.c (do_split): Rationalized to distinguish `/ /' from `" "'. + Generally fixed up. + * node.c (parse_escape): Allow single digit \x escapes. + +1996-10-02 Paul Eggert + + * builtin.c (format_tree): Fix bug in %d and %i format: NaNs, and + values in the range LONG_MAX+1 .. ULONG_MAX, were mishandled. + Don't assume that double values <= -1 are converted to unsigned + long in the expected way; the C Standard doesn't guarantee this. + +1996-10-02 Paul Eggert + + * awk.h (INT_MAX): Remove unused symbol. + +Mon Sep 30 22:19:11 1996 Arnold D. Robbins + + * getopt.c (_getopt_internal): If 'W' is in the optstring followed + by a ';' then search through the long opts table. This makes + `-W foo=bar' same as `--foo=bar'. + * main.c (main): 'W' now prints an error message. + (gawk_option): Deleted the routine. + +Sun Sep 29 23:04:54 1996 Arnold D. Robbins + + * builtin.c (sub_common): Fix several bugs with gsub when + matching null strings. See test/gsubtest.awk. + +Fri Sep 20 17:35:54 1996 Pat Rankin + + * alloca.c (NULL): Don't define if has already done so. + +Fri Sep 20 11:54:31 1996 Arnold D. Robbins + + * builtin.c (do_print): Evaluate all the expressions first and + then print them. Avoids surprising behavior. See test/prtoeval.awk + for an example. + +Tue Sep 10 06:21:40 1996 Arnold D. Robbins + + * awk.h [FUNC]: New flag, marks a Node_parameter_list as really + being the function name; allows more checking in awk.y. + * awk.y (isassignable): Now takes a NODE * instead of a type, to + check if a function parameter is marked FUNC, then it's the function + name, which is not assignable. Fix call from snode(). + (function_prologue): Mark function name as FUNC. + (yyerror): Don't call exit() anymore; gawk will now report + all syntax errors. + +Sun Sep 1 19:36:30 1996 Arnold D. Robbins + + * field.c (rebuild_record): After building new field 0, go through + all old fields, and if they used to point into the old one, + have them point into the new one. Then turn off PERM flag before + unref-ing field 0. + +Wed Aug 28 19:13:34 1996 Arnold D. Robbins + + * eval.c (set_IGNORECASE): Correctly parenthesize bit operations + in test and fix logic for string value. + +Wed Aug 28 22:06:33 1996 Arnold D. Robbins + + * main.c (usage): Add email addresses for bug reporting, per + change in GNU Coding Standards from RMS. + +Sun Aug 11 23:13:22 1996 Arnold D. Robbins + + * Makefile.in (install): Correct use of $(INSTALL_PROGRAM). + +Thu Aug 8 23:29:43 1996 Arnold D. Robbins + + * parse.y (isassignable): New function, checks in type can + be assigned to. + (snode): Changed checking for 3rd arg of gsub to be more + general, supersedes earlier change. + +Thu Aug 8 13:58:26 1996 Arnold D. Robbins + + * parse.y (snode): If third arg to sub or gsub is builtin + function, complain, since can't substitute into result. + * eval.c (r_get_lhs): Diagnose Node_builtin as an error, instead + of falling through into default case and using cant_happen(). + +Thu Aug 1 07:13:14 1996 Arnold D. Robbins + + * regex.h [RE_DEBUG]: New macro. + [RE_SYNTAX_GNU_AWK]: Add RE_DEBUG. + [RE_SYNTAX_POSIX_AWK]: Add RE_INTERVALS. + * regex.c (re_set_syntax): Add #ifdef DEBUG code to turn on `debug' + flag if RE_DEBUG set, and turn off debug if not set and debug + was on. + * main.c (main): Remove `do_intervals = TRUE' from `if (do_posix)', + it's now handled in the definition of RE_SYNTAX_POSIX_AWK. + +Mon Jul 29 17:49:07 1996 Pat Rankin + + * io.c (O_ACCMODE): Define it if doesn't. + +Mon Jul 29 12:02:48 1996 Arnold D. Robbins + + * eval.c (set_IGNORECASE): Made somewhat smarter. gawk -v IGNORECASE=0 + was acting the same as -v IGNORECASE=1. Thanks to Darrell Hankerson + for the bug report. + +Fri Jul 26 12:04:43 1996 Arnold D. Robbins + + * awk.h (format_val): Add declaration of new routine. + * node.c (format_val): New routine, abstracts old guts of + r_forcestring; accepts format string and index as additional params. + (r_force_string): Changed to call format_val. + * builtin.c (do_print): Don't tree_eval the tree twice in case + OFMTidx != CONVFMTidx; doing so could cause side effects + (from bug report by Tobias Rettstadt, xassp@ipds.uni-kiel.de). + Instead, call format_val. + +Mon Jul 22 21:59:15 1996 Arnold D. Robbins + + * io.c (iop_close): Change check for "is $0 in the input buffer" + to use `< (iop->buf + iop->secsiz + iop->size)' instead of + `< iop->end'. The latter is bogus if EOF has been hit on the + file. Fix from Darrel Hankerson based on bug report by + Charles Howes (howes@grid.direct.ca). See test/eofsplit.awk. + +Thu Jul 18 19:43:20 1996 Arnold D. Robbins + + * builtin.c (sub_common): Backed out change of Feb 14 in favor of: + (do_gensub): Changed to use make_string and then to |= TEMP + flag, based on bug report and patch from Katsuyuki Okabe, + hgc02147@niftyserve.or.jp. + +Thu Jul 18 19:23:53 1996 Arnold D. Robbins + + * custom.h: Added ifdef for QNX, based on bug report from + Michael Hunter, mphunter@qnx.com. + +Mon Jul 15 09:31:01 1996 Arnold D. Robbins + + * io.c (redirect): When finding the rp pointer, if it's not + NULL, set str = rp->value. This gets the '\0' terminated + version. Motivated by bug report from John Hawkinson + (jhawk@bbnplanet.com). + +Sun Jul 14 18:40:26 1996 Arnold D. Robbins + + * configure.in: Added call to AC_CHECK_LIB(m, fmod), since + apparently some systems have fmod in the math library. + Portability: The Holy Grail. Sigh. + +Sun Jul 14 18:08:01 1996 Arnold D. Robbins + + * awk.h: Add Jim Meyerings ISASCII etc hacks for ctype macros. + * builtin.c (do_toupper, do_tolower, sub_common): Changed to use + upper-case versions of ctype macros. + * main.c (main): Ditto. + * node.c (r_force_number, parse_escape): Ditto. + +Sun Jul 14 06:34:18 1996 Arnold D. Robbins + + * field.c (set_record): Made it always do the PERM flag. + Fixes cases where $0 is assigned to, e.g. by gsub, keeps + the fields valid. + (get_field): Removed the call to reset_record in + case where ! field0_valid. We want to leave the fields alone + if they've been changed. + +Thu Jul 11 23:04:20 1996 Arnold D. Robbins + + * io.c (devopen): Change tests of (flag & O_fooONLY) to + (flag & O_ACCMODE) == O_fooONLY. Per (long standing) bug + report from Chapman Flack. + (close_redir): Change final conditional to just (status != 0) + so that ERRNO always set; the warning had its own `if (do_lint)' + anyway. + * eval.c (do_split): Force type of array to be Node_var_array + instead of Node_var. Per (long standing) bug report from + Chapman Flack. + +Thu Jul 11 22:17:14 1996 Arnold D. Robbins + + * Makefile.in (install): Added symlink of gawk to awk if + no awk in $(bindir). + (LN_S): New variable for symlinking. + (uninstall): Remove awk if it's the same gawk. + * Configure.in: Added call to AC_PROG_LN_S for Makefile.in. + +Sun Jul 7 15:47:13 1996 Arnold D. Robbins + + * main.c (main): Made `--posix' turn on interval expressions. + Gawk now matches its documentation. (What a concept!) + +Wed Jul 3 15:02:48 1996 Arnold D. Robbins + + * regex.h, regex.c: Upgraded to changes from Emacs 19.31. + +Fri May 17 08:46:07 1996 Arnold D. Robbins + + * io.c (get_a_record): Added `continued' flag. Fix from + Darrell Hankerson for when RS = "\n|something". + +Wed May 15 02:34:55 1996 Arnold D. Robbins + + * Makefile.in (awklib/all): Now depends on gawk, fixes problem + with parallel make. + +Tue May 14 15:02:52 1996 Arnold D. Robbins + + * builtin.c (format_tree): Fix handling of '*' to deal with + negative value for fieldwidth -- make positive and turn on + left justify. Per bug report from Michael Brennan. + +Sun May 12 20:42:06 1996 Arnold D. Robbins + + * eval.c (r_get_lhs): case Node_subscript. Check if array name + is actually a function, fatal error if so. + +Sun May 5 10:11:52 1996 Arnold D. Robbins + + * io.c (redirect): Call flush_io() before creating a new output pipe, + per bug report from Brian Kernighan (bwk@research.bell-labs.com). + +Fri Mar 15 06:38:33 1996 Arnold D. Robbins + + * Makefile.in (install): Use $(INSTALL_PROGRAM), not $(INSTALL). + (local-distclean): Add `*~' to list of files to be removed. + (CFLAGS): Now contains just @CFLAGS@. + (COMPFLAGS): Replaces use of CFLAGS, has CFLAGS plus all the + other stuff. + +Wed Mar 13 14:19:38 1996 Arnold D. Robbins + + * io.c (mmap_get_record): Fixed to not place sentinel at end + of mmap'ed object. Won't work if file is exact multiple of + disk block size. See comments in code for more info. + Thanks to Rick Adams (rick@uunet.uu.net) for help in testing. + +Sun Mar 10 22:50:23 1996 Arnold D. Robbins + + * io.c (do_close): Notice if we were called as `close(FILENAME)' + and arrange to close the current input file. This turns out + to be easy to do, just call `nextfile(TRUE)'. Based on bug report + from Pascal A. Dupuis, . + +Thu Mar 7 08:08:51 1996 Arnold D. Robbins + + * field.c (init_fields, grow_fields, set_field, rebuild_record): + Nuke the `nodes' array everywhere. Anytime a field is unref'ed, + allocate a new node that is a copy of Nnull_string. This avoids + subtle memory management problems when doing a lot of assignment + to fields, and tweaking of NF. Make sure that fields_arr[0] always + has a type of Node_val! + * field.c (set_NF): If NF is decremented, clear fields between + NF and parse_high_water, otherwise if NF incremented, clear + fields between parse_high_water and NF. + * eval.c (nodetype2str): New function, used for diagnostics. + (interpret): Use nodetype2str when finding invalid node. + +Mon Mar 4 09:02:28 1996 Arnold D. Robbins + + * builtin.c (do_toupper, do_tolower): Use isascii along with + isupper/islower before changing case, in case characters have + the high bit set. This is a hack. + +Mon Feb 26 22:24:44 1996 Arnold D. Robbins + + * builtin.c (sub_common): If no match, and called from gensub, + don't free the temporary string, since the tmp_number then + writes over it. + +Sun Feb 25 23:13:01 1996 Arnold D. Robbins + + * builtin.c (format_tree): Fixed %c to treat user input as + numeric also by adding test for MAYBE_NUM. + +Tue Feb 20 12:25:50 1996 Arnold D. Robbins + + * configure.in: Added AC_FUNC_MMAP call and add madvise to + list of functions to look for. + * awk.h [IOP_ISMAPPED]: New flag value for mmap support and new + `getrec' structure member in struct iobuf. + * io.c (iop_alloc, iop_close): Changed to map/unmap input file + into memory if possible. + (mmap_get_record): New function to actually retrieve the + record from mmaped file. + +Thu Feb 1 08:56:46 1996 Arnold D. Robbins + + * builtin.c (do_substr): Fixed lint message to use indx+1 when + start position is past end of string. + +Sun Jan 28 07:00:56 1996 Arnold D. Robbins + + * builtin.c (do_substr): Rationalized handling of missing length + argument, as well as various accompanying lint warnings. Previous + code was slightly bogus. Talk about your Day 1 bugs. + +Thu Jan 25 14:09:11 1996 Arnold D. Robbins + + * builtin.c (do_substr): If length exceeds length of actual + string, do computation of needed substring length *after* + the lint warning. + +Wed Jan 24 10:06:16 1996 Arnold D. Robbins + + * Makefile.in (gawk): Add $(CFLAGS) to link line. + (Makefile): Target depends on the Makefile.in files. + (OTHERS): Added TAGS and tags to the distribution. + (local-distclean): New rule. + (distclean): Use it. + (maintainer-clean): Don't `make distclean' before running submakes, + since that removes makefiles needed for the submakes. + * builtin.c (do_strftime): Remove hard coded limit on length of result. + Based on code from Paul Eggert (eggert@twinsun.com). + +Mon Jan 22 13:16:37 1996 Arnold D. Robbins + + * main.c (usage): Takes new fp parameter which is either + stdout for `--help' (per the GNU Coding Standards) or stderr + if an error occurs. Fix all calls. + (version): Prints to stdout per the coding stds. + (copyleft): Prints to stdout now, not stderr, and exits. + +Fri Jan 19 08:10:29 1996 Arnold D. Robbins + + * regex.h [RE_GNU_AWK]: Added RE_CONTEXT_INDEP_OPS to set of + bits we turn off for regular operation. Breaks things like + /^+[0-9]+/ to match a literal `+' at the beginning of, say, + a phone number. + +Wed Jan 10 23:19:36 1996 Arnold D. Robbins + + * 3.0.0 polished up and release tar file made. + +Wed Dec 27 11:46:16 1995 Arnold D. Robbins + + * 2.94.0 released to porting group (no, I haven't been good + about this file; I'll do better once 3.0 is released). + +Mon Aug 28 23:04:30 1995 Arnold D. Robbins + + * awk.h updated for NeXT - bracket TRUE/FALSE + * io.c (get_a_record): Removed shadowing of 'start' in + * Makefile.in and doc/Makefile.in: Fixed to use gawk.1 and gawk.texi, + instead of gawk.1.in and gawk.texi.in. + +Mon Aug 25 11:04:30 1995 Arnold D. Robbins + + * 2.90.0 released to porting group. + +Fri Aug 18 12:43:31 1995 Arnold D. Robbins + + * ChangeLog created. diff -Nru gawk-3.1.8+dfsg/FUTURES gawk-4.0.1+dfsg/FUTURES --- gawk-3.1.8+dfsg/FUTURES 2010-05-04 18:17:00.000000000 +0000 +++ gawk-4.0.1+dfsg/FUTURES 2012-03-28 19:47:53.000000000 +0000 @@ -1,4 +1,4 @@ - Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2010, 2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -9,93 +9,38 @@ mainly for use by the developers to help keep themselves on track, please don't bug us too much about schedules or what all this really means. -With the 3.0 release, we are acknowledging that awk is not PERL, nor should -it become PERL. (To paraphrase Dennis Ritchie, "If you want PERL, you -know where to get it.") - -The focus on the future is thus narrowed to performance and functional -enhancements, with only minor plans for significant new features. - -(OK, so 3.1 had a bad case of feature-itis. I think I'm mostly over it -now, though. :-) - -In 3.1 -====== - DONE: A PROCINFO array to replace /dev/pid, /dev/user, et al. - - DONE: Provide awk profiling. - - DONE: Integrate GNU NLS support. - - DONE: Bring out hooks for NLS support into gawk itself. - - DONE: Do a reference card. - - DONE: Switch to full ANSI C and use ansi2kr. - - Additional manual features: - DONE: Document NLS support - - DONE: Add %'d for putting in commas in formatting. - - DONE: Multibyte support for index, length, substr, match. - -For 3.1.8 + bytecode -==================== - Performance fixes / improvements - - Change @sourcefile to @include per awk.info poll and document it - - Update copyrights - - Document dgawk - -For 4.0 +For 4.1 ======= - Add a single letter option for all long options & document them. - - Remove support for all unsupported systems. - - Remove all old README* files. + Merge gawk/pgawk/dgawk into one executable - Enable \s, \S in regexes (regcomp.c and dfa.c) and document them. - - Integrate byte code changes and dgawk - Indirect functions - BEGINFILE, ENDFILE - - Simplify awk.h. + Consider removing use of and/or need for the protos.h file. Consider moving var_value info into Node_var itself to reduce memory usage. - Consider removing use of and/or need for the protos.h file. + Merge xmlgawk -l feature - Make POSIX 2001 behavior the default for sub/gsub. + Merge xmlgawk XML extensions - Add IPv6 support. + Integrate MPFR to provide high precision arithmetic. - Gnulib? + Continue code reviews / code cleanup - Move to git? + Consider making gawk output +nan for NaN values so that it + will accept its own output as input. - Additional manual features: - Remove all page breaks - Review internal notes about reorganization - Full front to back read through - -For 4.1 +For 4.2 ======= Implement designed API for loadable modules Redo the loadable modules interface from the awk level. - ? Move the loadable modules interface to libtool. - Rework management of array index storage. (Partially DONE.) DBM storage of awk arrays. Try to allow multiple dbm packages. + ? Move the loadable modules interface to libtool. + ? Add an optional base to strtonum, allowing 2-36. ? Optional third argument for index indicating where to start the @@ -106,9 +51,7 @@ ?? Use a new or improved dfa and/or regex library. -For 4.x: -======== - Look at ISO C 99 printf features. + ??? Gnulib Probably never: =============== @@ -122,9 +65,3 @@ Add a lint check if the return value of a function is used but the function did not supply a value. - - Additional manual features: - ? A section on where gawk is bounded - regex - i/o - sun fp conversions diff -Nru gawk-3.1.8+dfsg/Makefile.am gawk-4.0.1+dfsg/Makefile.am --- gawk-3.1.8+dfsg/Makefile.am 2010-04-22 18:28:32.000000000 +0000 +++ gawk-4.0.1+dfsg/Makefile.am 2012-03-28 19:47:53.000000000 +0000 @@ -1,7 +1,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2010 the Free Software Foundation, Inc. +# Copyright (C) 2000-2011 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -23,10 +23,7 @@ ## process this file with automake to produce Makefile.in -# Automatic de-ANSI-fication if needed, make .bz2 files also. -AUTOMAKE_OPTIONS = dist-bzip2 - -# This undocumented variable insures that aclocal runs +# This variable insures that aclocal runs # correctly after changing configure.ac ACLOCAL_AMFLAGS = -I m4 @@ -36,11 +33,13 @@ # Stuff to include in the dist that doesn't need it's own # Makefile.am files EXTRA_DIST = \ + ChangeLog.0 \ COPYING \ FUTURES \ INSTALL \ LIMITATIONS \ NEWS \ + NEWS.0 \ POSIX.STD \ PROBLEMS \ README_d \ @@ -53,17 +52,22 @@ m4 \ missing \ missing_d \ + po/README \ pc \ posix \ regcomp.c \ regex_internal.c \ regex_internal.h \ regexec.c \ - unsupported \ version.in \ vms \ ylwrap +# It's OK for the generated file `version.c' not to be removed by +# "make distclean". +distcleancheck_listfiles = \ + find . -type f -print | grep -v '^\./version\.c$$' + # The order to do things in. # Build explicitly in "." in order to build gawk first, so # that `make check' without a prior `make' works. @@ -75,7 +79,7 @@ test # what to make and install -bin_PROGRAMS = gawk pgawk +bin_PROGRAMS = gawk pgawk dgawk # sources for both gawk and pgawk base_sources = \ @@ -96,7 +100,6 @@ getopt1.c \ getopt_int.h \ gettext.h \ - hard-locale.h \ io.c \ mbsupport.h \ main.c \ @@ -114,9 +117,11 @@ gawk_SOURCES = $(base_sources) eval.c profile.c pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c +dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) +dgawk_LDADD = $(LDADD) @LIBREADLINE@ # Directory for gawk's data files. Automake supplies datadir. pkgdatadir = $(datadir)/awk @@ -144,14 +149,14 @@ (cd $(DESTDIR)$(bindir); \ $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ - if [ ! -f awk$(EXEEXT) ]; \ - then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ + if [ ! -f awk ]; \ + then $(LN_S) gawk$(EXEEXT) awk; \ 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 ; \ + if [ -f awk ] && cmp awk gawk$(EXEEXT) > /dev/null; then rm -f awk; fi ; \ rm -f gawk-$(VERSION)$(EXEEXT) pgawk-$(VERSION)$(EXEEXT); exit 0) uninstall-recursive: uninstall-links @@ -160,14 +165,21 @@ check-local: gawk$(EXEEXT) pgawk$(EXEEXT) # A little extra clean up when making distributions. +# And additional set up for the pc directory. dist-hook: cd $(distdir)/extension ; rm -f *.o *.so - cd $(distdir) ; find . -type d -name CVS | xargs rm -fr + cd $(srcdir)/pc ; \ + sed -n -f configpk.sed < ../configure.ac > tmp.sed ; \ + sed -f config.sed < ../configh.in > config.tmp ; \ + sed -f tmp.sed < config.tmp > config.h ; \ + $(RM) tmp.sed config.tmp # Special rules for individual files +# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build +# or work correctly. awkgram.c: awkgram.y $(YACC) $(AM_YFLAGS) $(YFLAGS) $< - sed 's/parse error/syntax error/g' < y.tab.c | $(AWK) -f $(srcdir)/bisonfix.awk > $*.c && rm y.tab.c + sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.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 @@ -175,6 +187,10 @@ version.c: config.status version.in $(SHELL) ./config.status --file=version.c:version.in +command.c: command.y + $(YACC) -p zz $< + sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk command > $*.c && rm y.tab.c + # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence @@ -184,5 +200,5 @@ valgrind: cd test; rm -f log.[0-9]*; \ - make check AWK="valgrind --log-file=log ../gawk"; \ + make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \ make valgrind-scan diff -Nru gawk-3.1.8+dfsg/Makefile.in gawk-4.0.1+dfsg/Makefile.in --- gawk-3.1.8+dfsg/Makefile.in 2010-05-06 17:55:45.000000000 +0000 +++ gawk-4.0.1+dfsg/Makefile.in 2012-03-28 20:03:23.000000000 +0000 @@ -18,7 +18,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2010 the Free Software Foundation, Inc. +# Copyright (C) 2000-2011 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -56,23 +56,25 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) +bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) dgawk$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/configh.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ - INSTALL NEWS awkgram.c config.guess config.rpath config.sub \ - depcomp install-sh missing mkinstalldirs ylwrap + INSTALL NEWS TODO awkgram.c command.c config.guess \ + config.rpath config.sub depcomp install-sh missing \ + mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -91,10 +93,16 @@ getopt1.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) msg.$(OBJEXT) \ node.$(OBJEXT) random.$(OBJEXT) re.$(OBJEXT) regex.$(OBJEXT) \ replace.$(OBJEXT) version.$(OBJEXT) +am_dgawk_OBJECTS = $(am__objects_1) eval_d.$(OBJEXT) profile.$(OBJEXT) \ + command.$(OBJEXT) debug.$(OBJEXT) +dgawk_OBJECTS = $(am_dgawk_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +dgawk_DEPENDENCIES = $(am__DEPENDENCIES_2) am_gawk_OBJECTS = $(am__objects_1) eval.$(OBJEXT) profile.$(OBJEXT) gawk_OBJECTS = $(am_gawk_OBJECTS) gawk_LDADD = $(LDADD) -am__DEPENDENCIES_1 = gawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_pgawk_OBJECTS = $(am__objects_1) eval_p.$(OBJEXT) \ @@ -113,8 +121,8 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) YLWRAP = $(top_srcdir)/ylwrap -SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) -DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) +SOURCES = $(dgawk_SOURCES) $(gawk_SOURCES) $(pgawk_SOURCES) +DIST_SOURCES = $(dgawk_SOURCES) $(gawk_SOURCES) $(pgawk_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -162,10 +170,9 @@ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print # Directory for gawk's data files. Automake supplies datadir. pkgdatadir = $(datadir)/awk @@ -204,6 +211,7 @@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ +LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ @@ -231,7 +239,6 @@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ -U = @U@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ @@ -290,10 +297,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -# Automatic de-ANSI-fication if needed, make .bz2 files also. -AUTOMAKE_OPTIONS = dist-bzip2 - -# This undocumented variable insures that aclocal runs +# This variable insures that aclocal runs # correctly after changing configure.ac ACLOCAL_AMFLAGS = -I m4 @@ -303,11 +307,13 @@ # Stuff to include in the dist that doesn't need it's own # Makefile.am files EXTRA_DIST = \ + ChangeLog.0 \ COPYING \ FUTURES \ INSTALL \ LIMITATIONS \ NEWS \ + NEWS.0 \ POSIX.STD \ PROBLEMS \ README_d \ @@ -320,18 +326,24 @@ m4 \ missing \ missing_d \ + po/README \ pc \ posix \ regcomp.c \ regex_internal.c \ regex_internal.h \ regexec.c \ - unsupported \ version.in \ vms \ ylwrap +# It's OK for the generated file `version.c' not to be removed by +# "make distclean". +distcleancheck_listfiles = \ + find . -type f -print | grep -v '^\./version\.c$$' + + # The order to do things in. # Build explicitly in "." in order to build gawk first, so # that `make check' without a prior `make' works. @@ -362,7 +374,6 @@ getopt1.c \ getopt_int.h \ gettext.h \ - hard-locale.h \ io.c \ mbsupport.h \ main.c \ @@ -380,9 +391,11 @@ gawk_SOURCES = $(base_sources) eval.c profile.c pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c +dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) +dgawk_LDADD = $(LDADD) @LIBREADLINE@ # stuff for compiling gawk/pgawk DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"' @@ -486,6 +499,9 @@ clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +dgawk$(EXEEXT): $(dgawk_OBJECTS) $(dgawk_DEPENDENCIES) + @rm -f dgawk$(EXEEXT) + $(LINK) $(dgawk_OBJECTS) $(dgawk_LDADD) $(LIBS) gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) @rm -f gawk$(EXEEXT) $(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) @@ -502,8 +518,11 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ @@ -748,6 +767,7 @@ dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) + dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) @@ -755,7 +775,6 @@ dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) @@ -775,7 +794,7 @@ dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -889,6 +908,7 @@ @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f awkgram.c + -rm -f command.c -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive @@ -996,14 +1016,14 @@ (cd $(DESTDIR)$(bindir); \ $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ - if [ ! -f awk$(EXEEXT) ]; \ - then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ + if [ ! -f awk ]; \ + then $(LN_S) gawk$(EXEEXT) awk; \ 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 ; \ + if [ -f awk ] && cmp awk gawk$(EXEEXT) > /dev/null; then rm -f awk; fi ; \ rm -f gawk-$(VERSION)$(EXEEXT) pgawk-$(VERSION)$(EXEEXT); exit 0) uninstall-recursive: uninstall-links @@ -1012,14 +1032,21 @@ check-local: gawk$(EXEEXT) pgawk$(EXEEXT) # A little extra clean up when making distributions. +# And additional set up for the pc directory. dist-hook: cd $(distdir)/extension ; rm -f *.o *.so - cd $(distdir) ; find . -type d -name CVS | xargs rm -fr + cd $(srcdir)/pc ; \ + sed -n -f configpk.sed < ../configure.ac > tmp.sed ; \ + sed -f config.sed < ../configh.in > config.tmp ; \ + sed -f tmp.sed < config.tmp > config.h ; \ + $(RM) tmp.sed config.tmp # Special rules for individual files +# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build +# or work correctly. awkgram.c: awkgram.y $(YACC) $(AM_YFLAGS) $(YFLAGS) $< - sed 's/parse error/syntax error/g' < y.tab.c | $(AWK) -f $(srcdir)/bisonfix.awk > $*.c && rm y.tab.c + sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.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 @@ -1027,6 +1054,10 @@ version.c: config.status version.in $(SHELL) ./config.status --file=version.c:version.in +command.c: command.y + $(YACC) -p zz $< + sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk command > $*.c && rm y.tab.c + # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence @@ -1036,7 +1067,7 @@ valgrind: cd test; rm -f log.[0-9]*; \ - make check AWK="valgrind --log-file=log ../gawk"; \ + make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \ make valgrind-scan # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru gawk-3.1.8+dfsg/NEWS gawk-4.0.1+dfsg/NEWS --- gawk-3.1.8+dfsg/NEWS 2010-05-02 18:06:21.000000000 +0000 +++ gawk-4.0.1+dfsg/NEWS 2012-03-28 19:47:53.000000000 +0000 @@ -1,2542 +1,123 @@ - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. -Changes from 3.1.7 to 3.1.8 +Changes from 4.0.0 to 4.0.1 --------------------------- -1. The zero flag no longer applies to %c and %s; apparently the standards - changed at some point. -2. Updated to latest infrastructure: Autoconf 2.65, Automake 1.11.1, - libtool 2.2.6b, Bison 2.4.2. +1. The default handling of backslash in sub() and gsub() has been reverted to + the behavior of 3.1. It was silly to think I could break compatibility that + way, even for standards compliance. -3. Failure to open a socket is no longer a fatal error. +2. Completed the implementation of Rational Range Interpretation. -4. dfa.h and dfa.c are now more-or-less in sync with GNU grep, for the first - time in many years. +3. Failure to get the group set is no longer a fatal error. -5. Gawk no longer includes its own copy of libsigsegv but it will use it if - installed on the build system. The --disable-libsigsegv configure option - is now gone. +4. Lots of minor bugs fixed and portability clean-ups along the way. See + the ChangeLog for details. -6. The ' flag (%'d) is now just ignored on systems that can't support it. - -7. Lots of bug fixes, see the ChangeLog. - -Changes from 3.1.6 to 3.1.7 ---------------------------- -1. Gawk now has support for z/OS (IBM S/390 architecture). - -2. Gawk now handles multibyte strings better in [s]printf with field - widths and such. - -3. Gawk now uses libsigsegv to print a message before core dumping. This - handles infinite recursion of an awk function a little better. - Use of the library can be disabled at configure time with the - --disable-libsigsegv option for unusual systems. - -4. The handling of BINMODE is now somewhat more sane. - -5. A getline from a directory is no longer fatal; instead it returns -1. - -6. Per POSIX, special variable names (like FS) cannot be used as function - parameter names. - -7. The new -O / --optimize option enables simple constant folding on - the parse tree during parsing. We hope that with time the number - of optimizations will increase. - -8. Updated to the latest autotools: Autoconf 2.63, Automake 1.11, - Libtool 2.2.6a, and Gettext 0.17. Also latest Bison: 2.4.1. - -9. Some improvement in testing for isinf / isnan in builtin.c. - -10. Improved the handling of `a = a b c' to be more general. - -11. Locale handling for %'d should now work on certain non-Unix / - non-Linux systems. - -12. Lots of bugs fixed, see the ChangeLog for the details. - -Changes from 3.1.5 to 3.1.6 ---------------------------- - -1. `gawk 'program' /non/existant/file' no longer core dumps. - -2. Too many people the world over have complained about gawk's use of the - locale's decimal point for parsing input data instead of the traditional - period. So, even though gawk was being nicely standards-compliant, in - a Triumph For The Users, gawk now only uses the locale's decimal point - if --posix is supplied or if POSIXLY_CORRECT is set. It is the sincere - hope that this change will eliminate this FAQ from being asked. - -3. `gawk -v BINMODE=1 ...' works again. - -4. Internal file names like `/dev/user' now work again. (Note that these - file names are obsolete and will go away eventually.) - -5. Problems with wide strings in non "C" locales have been straightened - out everywhere. (At least, we think so.) - -6. Use of `ansi2knr' is no longer supported. Please use an ANSI C compiler. - -7. Updated to Autoconf 2.61, Automake 1.10, and Gettext 0.16.1. - -8. The getopt* and regex* files were synchronized with current GLIBC CVS. - See the ChangeLog for the versions and minor edits made. - -9. There are additional --lint-old warnings. - -10. Gawk now uses getaddrinfo(3) to look up names and IP addresses. This - allows the use of an IPv6 format address and paves the way for - eventual addition of `/inet6/...' and `/inet4/...' hostnames. - -11. We believe gawk to now be valgrind clean. At least when run against - the test suite. - -12. A number of issues dealing with the formatting and printing of very - large numbers in integer formats have been dealt with and fixed. - -13. Gawk now converts "+inf", "-inf", "+nan" and "-nan" into the corresponding - magic IEEE floating point values. Only those strings (case independent) - work. With --posix, gawk calls the system strtod directly. You asked - for it, you got it, you deal with it. - -14. Defining YYDEBUG enables the -D command line option. - -15. Gawk should now work out of the box on Tandem NSK/OSS systems. - -16. Lint messages rationalized: many more of the messages are now printed - only once, instead of every time they are encountered. - -17. The strftime() function now accepts an optional third argument, which - if non-zero or non-null, indicates that the time should be formatted - as UTC instead of as local time. - -18. The precedence of concatenation and `| getline' (in something like - "echo " "date" | getline stuff) has been reverted to the earlier - behavior and now once again matches Unix awk. - -19. New configure time flag --disable-directories-fatal which causes - gawk to silently skip directories on the command line. This behavior - is also enabled for --traditional, since it's what Unix awk does. - -20. A new option, --use-lc-numeric, forces use of the locale's decimal - point without the rest of the draconian restrictions imposed by - --posix. This softens somewhat the stance taken in item #2. - -21. Everything relevant has been updated to the GPL 3. - -22. Array growth should be faster now, at no cost in space. - -23. Lots more tests. - -24. One new translation. - -25. Various bugs fixed, see the ChangeLog for details. - -Changes from 3.1.4 to 3.1.5 ---------------------------- - -1. The random() suite has been updated to a current FreeBSD version, which - works on systems with > 32-bit ints. - -2. A new option, `--exec' has been added. It's like -f but ends option - processing. It also disables `x=y' variable assignments, but not -v. - It's needed mainly for CGI scripts, so that source code can't be - passed in as part of the URL. - -3. dfa.[ch] have been synced with GNU grep development. This also fixes - multiple regex matching problems in multibyte locales. - -4. Updated to Automake 1.9.5. - -5. Updated to Bison 2.0. - -6. The getopt* and regex* files were synchronized with current GLIBC CVS. - See the ChangeLog for the versions and minor edits made. - -7. `configure --disable-nls' now disables just gawk's own translations. - Gawk continues to work with the locale's numeric formatting. This - includes a bug fix in handling the printf ' flag (e.g., %'d). - -8. Gawk is now multibyte aware. This means that index(), length(), - substr() and match() all work in terms of characters, not bytes. - -9. Gawk is now smarter about parsing numeric constants in corner cases. - -11. Not closing open redirections no longer causes gawk to exit non-zero. - -10. The VMS port has been updated. - -11. Changes from Andrew Schorr at the xmlgawk project to provide for - open hooks from extensions are now included. This will let the - xmlgawk extension work in the standard gawk. - -12. Updated to gettext 0.14.4. Gawk no longer includes its own copy - of the gettext `intl' library, following current GNU practice to - rely on there being an external version thereof. - -13. A regexp of the form `//' will now generate a warning that it - is not a C++ comment from --lint (awk.y). - -14. The ^ and ^= operators with an integer exponent now use Exponentiation - by Squaring. This simultaneously fixes a problem with ^= and a negative - integer exponent. - -15. length(array) now returns the number of elements in the array. This is - is a non-standard extension that will fail in POSIX mode. - -16. Carriage return characters are now ignored in program source code. - -17. Four new translations added. - -18. Various minor bugs fixed. See the ChangeLog for the details. - -Changes from 3.1.3 to 3.1.4 ---------------------------- - -1. Gawk now supports the POSIX %F format, falling back to %f if the local - system printf doesn't handle it. - -2. Gawk now supports the ' flag in printf. E.g., %'d in a locale with thousands - separators includes the thousands separator in the value, e.g. 12,345. - - This has one problem; the ' flag is next to impossible to use on the - command line, without major quoting games. Oh well, TANSTAAFL. - -3. The dfa code has been reinstated; the performance degradation was - just too awful. Sigh. (For fun, use `export GAWK_NO_DFA=1' to - see the difference.) - -4. The special case `x = x y' is now recognized in the grammar, and gawk - now uses `realloc' to append the new value to the end of the existing - one. This can speed up the common case of appending onto a string. - -5. The dfa code was upgraded with most of the fixes from grep 2.5.1, and - the regex code was upgraded with GLIBC as mid-January 2004. The regex - code is faster than it was, but still not as fast as the dfa code, so - the dfa code stays in. The getopt code was also synced to current GLIBC. - -6. Support code upgraded to Automake 1.8.5, Autoconf 2.59, and gettext 0.14.1. - -7. When --posix is in effect, sub/gsub now follow the 2001 POSIX behavior. - Yippee. This is even documented in the manual. - -8. Gawk will now recover children that have died (input pipelines, two-way - pipes), upon detecting EOF from them, thus avoiding filling - up the process table. Open file descriptors are not recovered - (unfortunately), since that could break awk semantics. See the - ChangeLog and the source code for the details. - -9. Handling of numbers like `0,1' in non-American locales ought to - work correctly now. - -10. IGNORECASE is now locale-aware for characters with values above 128. - The dfa matcher is now used for IGNORECASE matches too. - -11. Dynamic function loading is better. The documentation has been improved - and some new APIs for use by dynamic functions have been added. - -12. Gawk now has a fighting chance of working on older systems, - a la SunOS 4.1.x. - -13. Issues with multibyte support on HP-UX are now resolved. `configure' now - disables such support there, since it's not up to what gawk needs. - -14. There are now even more tests in the test suite. - -15. Various bugs fixed; see ChangeLog for the details. - -Changes from 3.1.2 to 3.1.3 ---------------------------- - -1. Gawk now follows POSIX in handling of local numeric formats for - input, output and number/string conversions. - -2. Multibyte detection improved. See README_d/README.multibyte for more - info about multibyte locales. - -3. Handling of `close' made more POSIX-compliant for POSIXLY_CORRECT, - see the documentation. - -4. The record reading code was redone, again. This time it's much - better. Really! - -5. For RS = "\n" and RS = "", gawk now only sets RT when it has changed. - This provides considerable performance improvement. - -6. `match' now sets all the subscripts in the third argument array - correctly, even if not all subexpressions matched. - -7. Updated to Automake 1.7.5. configure.in renamed configure.ac. - -8. C-style switch statements are available, but must be enabled at - compile time via `configure --enable-switch'. For 3.2 they'll be - enabled by default. Thanks to Michael Benzinger for the initial - code. - -9. %c now always prints no more than one character, whatever - precision is provided. - -10. strtonum() now works again. - -11. Gawk is now much better about scalar/array typing of global - uninitiailzed variables passed as parameters. Once the parameter - is then used one way or the other, the global var's type is - adjusted accordingly. Thanks to Stepan Kasal for the original - (considerable) changes. - -12. Dynamic function loading under Windows32 should now be possible. See - README_d/README.pcdynamic. Thanks to Patrick T.J. McPhee for the changes. - -13. Updated to gettext 0.12.1. - -14. Gawk now follows historical practice and POSIX for the return - value of `rand': It's now 0 <= N < 1. - -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 ---------------------------- - -1. Six new translations. - -2. Having more than 4 different values for OFMT and/or CONVFMT now works. - -3. The handling of dynamic regexes is now more more sane, esp. w.r.t. - the profiling code. The profiling code has been fixed in several - places. - -4. The return value of index("", "") is now 1. - -5. Gawk should no longer close fd 0 in child processes. - -6. Fixed test for strtod semantics and regenerated configure. - -7. Gawk can now be built with byacc; an accidental bison dependency was - removed. - -8. `yyerror' will no longer dump core on long source lines. - -9. Gawk now correctly queries getgroups(2) to figure out how many groups - the process has. - -10. New configure option to force use of included strftime, e.g. on - Solaris systems. See `./configure --help' for the details. Replaced - the included strftime.c with the one from textutils. - -11. OS/2 port has been updated. - -12. Multi-byte character support has been added, courtesy of IBM Japan. - -13. The `for (iggy in foo) delete foo[iggy]' -> `delete foo' optimisation - now works. - -14. Upgraded to gettext 0.11.2 and automake 1.5. - -15. Full gettext compatibility (new dcngettext function). - -16. The O'Reilly copyedits and indexing changes for the documentation have - been folded into the texinfo version of the manuals. - -17. A humongously long value for the AWKPATH environment variable will no - longer dump core. - -18. Configuration / Installation issues have been straightened out in - Makefile.am. - -Changes from 3.0.6 to 3.1.0 ---------------------------- - -1. A new PROCINFO array provides info about the process. The non-I/O /dev/xxx - files are now obsolete, and their use always generates a warning. - -2. A new `mktime' builtin function was added for creating time stamps. The - `mktime' function written in awk was removed from the user's guide. - -3. New `--gen-po' option creates GNU gettext .po files for strings marked - with a leading underscore. - -4. Gawk now completely interprets special file names internally, ignoring the - existence of real /dev/stdin, /dev/stdout files, etc. - -5. The mmap code was removed. It was a worthwhile experiment that just - didn't work out. - -6. The BINMODE variable is new; on non-UNIX systems it affects how gawk - opens files for text vs. binary. - -7. The atari port is now unsupported. - -8. Gawk no longer supports `next file' as two words. - -9. On systems that support it, gawk now sets the `close on exec' flag on all - files and pipes it opens. This makes sure that child processes run via - `system' or pipes have plenty of file descriptors available. - -10. New ports: Tandem and BeOS. The Tandem port is unsupported. - -11. If `--posix' is in effect, newlines are not allowed after ?:. - -12. Weird OFMT/CONVFMT formats no longer cause fatal errors. - -13. Diagnostics about array parameters now include the parameter's name, - not just its number. - -14. configure should now automatically add -D_SYSV3 for ISC Unix. - (This seems to have made it into the gawk 3.0.x line long ago.) - -15. It is now possible to open a two-way pipe via the `|&' operator. - See the discussion in the manual about putting `sort' into such a pipeline, - though. (NOTE! This is borrowed from ksh: it is not the same as - the same operator in csh!) - -16. The `close' function now takes an optional second string argument - that allows closing one or the other end of the two-way pipe to - a co-process. This is needed to use `sort' in a co-process, see - the doc. - -17. If TCP/IP is available, special file names beginning with `/inet' - can be used with `|&' for IPC. Thanks to Juergen Kahrs for the initial - code. - -18. With `--enable-portals' on the configure command line, gawk will also - treat file names that start with `/p/' as a 4.4 BSD type portal file, - i.e., a two-way pipe for `|&'. - -19. Unrecognized escapes, such as "\q" now always generate a warning. - -20. The LINT variable is new; it provides dynamic control over the --lint - option. - -21. Lint warnings can be made fatal by using --lint=fatal or `LINT = "fatal"'. - Use this if you're really serious about portable code. - -22. Due to an enhanced sed script, there is no longer any need to worry - about finding or using alloca. alloca.c is thus now gone. - -23. A number of lint warnings have been added. Most notably, gawk will - detect if a variable is used before assigned to. Warnings for - when a string that isn't a number gets converted to a number are - in the code but disabled; they seem to be too picky in practice. - - Also, gawk will now warn about function parameter names that shadow - global variable names. - -24. It is now possible to dynamically add builtin functions on systems - that support dlopen. This facility is not (yet) as portable or well - integrated as it might be. *** WARNING *** THIS FEATURE WILL EVOLVE! - -25. There are *many* new tests in the test suite. - -26. Profiling has been added! A separate version of gawk, named pgawk, is - built and generates a run-time execution profile. The --profile option - can be used to change the default output file. In regular gawk, this - option pretty-prints the parse tree. - -27. Gawk has been internationalized, using GNU gettext. Translations for - future distributions are most welcome. Simultaneously, gawk was switched - over to using automake. You need Automake 1.4a (from the CVS archive) - if you want to muck with the Makefile.am files. - -28. New `asort' function for sorting arrays. See the doc for details. - -29. The match function takes an optional array third argument to hold - the text matched by parenthesized sub-expressions. - -30. The bit op functions and octal and hex source code constants are on by - default, no longer a configure-time option. Recognition of non-decimal - data is now enabled at runtime with --non-decimal-data command line option. - -31. Internationalization features available at the awk level: new TEXTDOMAIN - variable and `bindtextdomain' and `dcgettext' functions. printf formats - may contain the "%2$3.5d" kind of notation for use in translations. See - the texinfo manual for details. - -32. The return value from `close' has been rationalized. Most notably, - closing something that wasn't open returns -1 but remains non-fatal. - -33. The array effeciency change from 3.0.5 was reverted; the semantics were - not right. Additionally, index values of previously stored elements - can no longer change dynamically. - -34. The new option --dump-variables dumps a list of all global variables and - their final types and values to a file you give, or to `awkvars.out'. - -35. Gawk now uses a recent version of random.c courtesy of the FreeBSD - project. - -36. The gawk source code now uses ANSI C function definitions (new style), - with ansi2knr to translate code for old compilers. - -37. `for (iggy in foo)' loops should be more robust now in the face of - adding/deleting elements in the middle; they loop over just the elements - that are present in the array when the loop starts. - -Changes from 3.0.5 to 3.0.6 ---------------------------- - -This is a bug fix release only, pending further development on 3.1.0. - -Bugs fixed and changes made: - -1. Subscripting an array with a variable that is just a number no - longer magically converts the variable into a string. - -2. Similarly, running a `for (iggy in foo)' loop where `foo' is a - function parameter now works correctly. - -3. Similarly, `i = ""; v[i] = a; if (i in v) ...' now works again. - -4. Gawk now special cases `for (iggy in foo) delete foo[iggy]' and - treats it as the moral equivalent of `delete foo'. This should be - a major efficiency win when portably deleting large arrays. - -5. VMS port brought up to date. - -Changes from 3.0.4 to 3.0.5 ---------------------------- - -This is a bug fix release only, pending further development on 3.1.0. - -Bugs Fixed: - - 1. `function foo(foo)' is now a fatal error. - - 2. Array indexing is now much more efficient: where possible, only one - copy of an index string is kept, even if used in multiple arrays. - - 3. Support was added for MacOS X and an `install-strip' target. - - 4. [s]printf formatting for `0' flag and floating point formats now - works correctly. - - 5. HP-UX large file support with GCC 2.95.1 now works. - - 6. Arguments that contain `=' but that aren't syntactically valid are - now treated as filenames, instead of as fatal errors. - - 7. `-v NF=foo' now works. - - 8. Non-ascii alphanumeric characters are now treated as such in the - right locales by regex.c. Similarly, a Latin-1 y-umlaut (decimal - value 255) in the program text no longer acts like EOF. - - 9. Array indexes are always compared as strings; fixes an obscure bug - when user input gets used for the `x in array' test. - -10. The usage message now points users to the documentation for how - to report bugs. - -11. `/=' now works after an array. - -12. `b += b += 1' now works correctly. - -13. IGNORECASE changing with calls `match' now works better. (Fix for - semi-obscure bug.) - -14. Multicharacter values for RS now generate a lint warning. - -15. The gawk open file caching is now much more efficient. - -16. Global arrays passed to functions are now managed better. In particular, - test/arynocls.awk won't crash referencing freed memory. - -17. In obscure cases, `getline var' can no longer clobber $0. - -Changes from 3.0.3 to 3.0.4 +Changes from 3.1.8 to 4.0.0 --------------------------- -This is a bug fix release only, pending further development on 3.1.0. - -Bugs Fixed: - - 1. A memory leak when turning a function parameter into an array was - fixed. - - 2. The non-decimal data option now works correctly. - - 3. Using an empty pair of brackets as an array subscript no longer causes - a core dump during parsing. In general, syntax errors should not - cause core dumps any more. - - 4. Standard input is no longer closed if it provides program source, - avoiding strange I/O problems. - - 5. Memory corruption during printing with `print' has been fixed. - - 6. The gsub function now correctly counts the number of matches. - - 7. A typo in doc/Makefile.in has been fixed, making installation work. - - 8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal. - - 9. Subtle problems in rebuilding $0 when fields were changed have been - fixed. - -10. `FS = FS' now correctly turns off the use of FIELDWIDTHS. - -11. Gawk now parses fields correctly when FS is a single character. - -12. It is now possible for RS to be the NUL character ("\0"). - -13. Weird problems with number conversions on MIPS and other systems - have been fixed. - -14. When parsing using FIELDWIDTHS is in effect, `split' with no third - argument will still use the value of FS. - -15. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at - compile time, thanks to Paul Eggert. - -16. Attempting to use the name of a function as a variable or array - from within the function is now caught as a fatal error, instead - of as a core dump. - -17. A bug in parsing hex escapes was fixed. - -18. A weird bug with concatenation where one expression has side effects - that changes another was fixed. - -19. printf/sprintf now behave much better for uses of the '0' and '#' flags - and with precisions and field widths. - -20. Further strangenesses with concatenation and multiple accesses of some - of the special variables was fixed. - -21. The Atari port is marked as no longer supported. - -22. Build problems on HP-UX have been fixed. - -23. Minor fixes and additional explanations added to the documentation. - -24. For RS = "", even a single leading newline is now correctly stripped. - -25. Obscure parsing problems for regex constants like /=.../ fixed, so - that a regex constant is recognized, and not the /= operator. - -26. Fixed a bug when closing a redirection that matched the current - or last FILENAME. - -27. Build problems on AIX fixed. - -Changes from 3.0.2 to 3.0.3 ---------------------------- - -The horrendous per-record memory leak introduced in 3.0.1 is gone, finally. - -The `amiga' directory is now gone; Amiga support is now entirely handled -by the POSIX support. - -Windows32 support has been added in the `pc' directory. See `README_d/README.pc' -for more info. - -The mmap changes are disabled in io.c, and will be removed entirely -in the next big release. They were an interesting experiment that just -really didn't work in practice. - -A minor memory leak that occurred when using `next' from within a -function has also been fixed. - -Problems with I/O from sub-processes via a pipe are now gone. - -Using "/dev/pid" and the other special /dev files no longer causes a core dump. - -The files regex.h, regex.c, getopt.h, getopt.c, and getopt1.c have been -merged with the versions in GNU libc. Thanks to Ulrich Drepper for his help. - -Some new undocumented features have been added. Use the source, Luke! -It is not clear yet whether these will ever be fully supported. - -Array performance should be much better for very very large arrays. "Virtual -memory required, real memory helpful." - -builtin.c:do_substr rationalized, again. - -The --re-interval option now works as advertised. - -The license text on some of the missing/* files is now generic. - -Lots more new test cases. - -Lots of other small bugs fixed, see the ChangeLog files for details. - -Changes from 3.0.1 to 3.0.2 ---------------------------- - -Gawk now uses autoconf 2.12. - -strftime now behaves correctly if passed an empty format string or if -the string formats to an empty result string. - -Several minor compilation and installation problems have been fixed. - -Minor page break issues in the user's guide have been fixed. - -Lexical errors no longer repeat ad infinitum. - -Changes from 3.0.0 to 3.0.1 ---------------------------- - -Troff source for a handy-dandy five color reference card is now provided. -Thanks to SSC for their macros. - -Gawk now behaves like Unix awk and mawk, in that newline acts as white -space for separating fields and for `split', by default. In posix mode, -only space and tab separate fields. The documentation has been updated to -reflect this. - -Tons and tons of small bugs fixed and new tests added, see the ChangeLogs. - -Lots fewer compile time warnings from gcc -Wall. Remaining ones aren't -worth fixing. - -Gawk now pays some attention to the locale settings. - -Fixes to gsub to catch several corner cases. - -The `print' statement now evaluates all expressions first, and then -prints them. This leads to less suprising behaviour if any expression has -output side effects. - -Miscellanious improvements in regex.h and regex.c. - -Gawk will now install itself as gawk-M.N.P in $(bindir), and link -`gawk' to it. This makes it easy to have multiple versions of gawk -simultaneously. It will also now install itself as `awk' in $(bindir) -if there is no `awk' there. This is in addition to installing itself as -`gawk'. This change benefits the Hurd, and possibly other systems. One -day, gawk will drop the `g', but not yet. - -`--posix' turns on interval expressions. Gawk now matches its documentation. - -`close(FILENAME)' now does something meaningful. - -Field management code in field.c majorly overhauled, several times. - -The gensub code has been fixed, several bugs are now gone. - -Gawk will use mmap for data file input if it is available. - -The printf/sprintf code has been improved. - -Minor issues in Makefile setup worked on and improved. - -builtin.c:do_substr rationalized. - -Regex matching fixed so that /+[0-9]/ now matches the leading +. - -For building on vms, the default compiler is now DEC C rather than VAX C. - -Changes from 2.15.6 to 3.0.0 ----------------------------- - -Fixed spelling of `Programming' in the copyright notice in all the files. - -New --re-interval option to turn on interval expressions. They're off -by default, except for --posix, to avoid breaking old programs. - -Passing regexp constants as parameters to user defined functions now -generates a lint warning. - -Several obscure regexp bugs fixed; alas, a small number remain. - -The manual has been thoroughly revised. It's now almost 50% bigger than -it used to be. - -The `+' modifier in printf is now reset correctly for each item. - -The do_unix variable is now named do_traditional. - -Handling of \ in sub and gsub rationalized (somewhat, see the manual for -the gory [and I do mean gory] details). - -IGNORECASE now uses ISO 8859-1 Latin-1 instead of straight ASCII. See the -source for how to revert to pure ASCII. - ---lint will now warn if an assignment occurs in a conditional context. -This may become obnoxious enough to need turning off in the future, but -"it seemed like a good idea at the time." - -%hf and %Lf are now diagnosed as invalid in printf, just like %lf. - -Gawk no longer incorrectly closes stdin in child processes used in -input pipelines. - -For integer formats, gawk now correctly treats the precision as the -number of digits to print, not the number of characters. - -gawk is now much better at catching the use of scalar values when -arrays are needed, both in function calls and the `x in y' constructs. - -New gensub function added. See the manual. - -If do_tradtional is true, octal and hex escapes in regexp constants are -treated literally. This matches historical behavior. - -yylex/nextc fixed so that even null characters can be included -in the source code. - -do_format now handles cases where a format specifier doesn't end in -a control letter. --lint reports an error. - -strftime() now uses a default time format equivalent to that of the -Unix date command, thus it can be called with no arguments. - -Gawk now catches functions that are used but not defined at parse time -instead of at run time. (This is a lint error, making it fatal could break -old code.) - -Arrays that max out are now handled correctly. - -Integer formats outside the range of an unsigned long are now detected -correctly using the SunOS 4.x cc compiler. - ---traditional option added as new preferred name for --compat, in keeping -with GCC. - ---lint-old option added, so that warnings about things not in old awk -are only given if explicitly asked for. - -`next file' has changed to one word, `nextfile'. `next file' is still -accepted but generates a lint warning. `next file' will go away eventually. - -Gawk with --lint will now notice empty source files and empty data files. - -Amiga support using the Unix emulation added. Thanks to fnf@ninemoons.com. - -test/Makefile is now "parallel-make safe". - -Gawk now uses POSIX regexps + GNU regex ops by default. --posix goes to -pure posix regexps, and --compat goes to traditional Unix regexps. However, -interval expressions, even though specified by POSIX, are turned off by -default, to avoid breaking old code. - -IGNORECASE now applies to string comparison as well as regexp operations. - -The AT&T Bell Labs Research awk fflush builtin function is now supported. -fflush is extended to flush stdout if no arg and everything if given -the null string as an argument. - -If RS is more than one character, it is treated as a regular expression -and records are delimited accordingly. The variable RT is set to the record -terminator string. This is disabled in compatibility mode. - -If FS is set to the null string (or the third arg. of split() is the null -string), splitting is done at every single character. This is disabled in -compatibility mode. - -Gawk now uses the Autoconf generated configure script, doing away with all -the config/* files and the machinery that went with them. The Makefile.in -has also changed accordingly, complete with all the standard GNU Makefile -targets. (Non-unix systems may still have their own config.h and Makefile; -see the appropriate README_d/README.* and/or subdirectory.) - -The source code has been cleaned up somewhat and the formatting improved. - -Changes from 2.15.5 to 2.15.6 ------------------------------ - -Copyrights updated on all changed files. - -test directory enhanced with four new tests. - -Gawk now generates a warning for \x without following hexadecimal digits. -In this case, it returns 'x', not \0. - -Several fixes in main.c related to variable initialization: - CONVFMT has a default value - resetup is called before initializing variables - the varinit table fixed up a bit (see the comments) - -gawk.1 updated with new BUG REPORTS section. - -A plain `print' inside a BEGIN or END now generates a lint warning (awk.y). - -Small fix in iop.c:get_a_record to avoid reading uninitialized memory. - -awk.y:yylex now does a better job of handling things if the source file -does not end in a newline. Probably there is more work to be done. - -Memory leaks fixed in awk.y, particularly in cases of duplicate function -parameters. Also, calling a function doesn't leak memory during parsing. - -Empty function bodies are now allowed (awk.y). - -Gawk now detects duplicate parameter names in functions (awk.y). - -New function `error' in msg.c added for use from awk.y. - -eval.c:r_get_lhs now checks if its argument is a parameter on the stack, -and pulls down the real variable. This catches more 'using an array as -a scalar' kinds of errors. - -main.c recovers C alloca space after parsing, this is important for -bison-based parsers. re.c recovers C alloca space after doing an research. -[Changes from Pat Rankin] - -builtin.c now declares the random() related functions based on -RANDOM_MISSING from config.h. [Suggested by Pat Rankin] - -awk.h now handles alloca correctly for HP-UX. [Kaveh Ghazi] - -regex.h and config/cray60 updated for Unicos 8.0. [Hal Peterson] - -Fixed re.c and dfa.c so that gawk no longer leaks memory when using -lots of dynamic regexps. - -Removed dependency on signed chars from `idx' variable in awk.h. Gawk -now passes its test suite if compiled with `gcc -fno-signed-char'. - -Fixed warning on close in io.c to go under lint control. Too many people -have complained about the spurious message, particularly when closing a -child pipeline early. - -Gawk now correctly handles RS = "" when input is from a terminal -(iop.c:get_a_record). - -Config file added for GNU. - -gawk 'BEGIN { exit 1 } ; END { exit }' now exits 1, as it should -(eval.c:interpret). - -sub and gsub now follow posix, \ escapes both & and \. Each \ must -be doubled initially in the program to get it into the string. -Thanks to Mike Brennan for pointing this out (builtin.c:sub_common). - -If FS is "", gawk behaves like mawk and nawk, making the whole record be $1. -Yet Another Dark Corner. Sigh (field.c:def_parse_field). - -Gawk now correctly recomputes string values for numbers if CONVFMT has -changed (awk.h:force_string, node.c:r_force_string). - -A regexp of the form `/* this looks like a comment but is not */' will -now generate a warning from --lint (awk.y). - -Gawk will no longer core dump if given an empty input file (awk.y:get_src_buf, -iop.c:optimal_bufsize). - -A printf format of the form %lf is handled correctly. The `l' generates -a lint warning (builtin.c:format_tree) [Thanks to Mark Moraes]. - -Lynxos config file added. - -`continue' outside a loop treated as `next' only in compatibility mode, -instead of by default; recent att nawk chokes on this now. `break' -outside a loop now treated as `next' in compatibility mode (eval.c). - -Bug fix in string concatenation, an arbitrary number of expressions -are allowed (eval.c). - -$1 += $2 now works correctly (eval.c). - -Changing IGNORECASE no longer resets field-splitting to FS if it was -using FIELDWIDTHS (eval.c, field.c). - -Major enhancement: $0 and NF for last record read are now preserved -into the END rule (io.c). - -Regexp fixes: - /./ now matches a newline (regex.h) - ^ and $ match beginning and end of string only, not any embedded - newlines (re.c) - regex.c should compile and work ok on 64-bit mips/sgi machines - -Changes from 2.15.4 to 2.15.5 ------------------------------ - -FUTURES file updated and re-arranged some with more rational schedule. - -Many prototypes handled better for ANSI C in protos.h. - -getopt.c updated somewhat. - -test/Makefile now removes junk directory, `bardargtest' renamed `badargs.' - -Bug fix in iop.c for RS = "". Eat trailing newlines off of record separator. - -Bug fix in Makefile.bsd44, use leading tab in actions. - -Fix in field.c:set_FS for FS == "\\" and IGNORECASE != 0. - -Config files updated or added: - cray60, DEC OSF/1 2.0, Utek, sgi405, next21, next30, atari/config.h, - sco. - -Fix in io.c for ENFILE as well as EMFILE, update decl of groupset to -include OSF/1. - -Rationalized printing as integers if numbers are outside the range of a long. -Changes to node.c:force_string and builtin.c. - -Made internal NF, NR, and FNR variables longs instead of ints. - -Add LIMITS_H_MISSING stuff to config.in and awk.h, and default defs for -INT_MAX and LONG_MAX, if no limits.h file. Add a standard decl of -the time() function for __STDC__. From ghazi@noc.rutgers.edu. - -Fix tree_eval in awk.h and r_tree_eval in eval.c to deal better with -function parameters, particularly ones that are arrays. - -Fix eval.c to print out array names of arrays used in scalar contexts. - -Fix eval.c in interpret to zero out source and sourceline initially. This -does a better job of providing source file and line number information. - -Fix to re_parse_field in field.c to not use isspace when RS = "", but rather -to explicitly look for blank and tab. - -Fix to sc_parse_field in field.c to catch the case of the FS character at the -end of a record. - -Lots of miscellanious bug fixes for memory leaks, courtesy Mark Moraes, -also fixes for arrays. - -io.c fixed to warn about lack of explicit closes if --lint. - -Updated missing/strftime.c to match posted strftime 6.2. - -Bug fix in builtin.c, in case of non-match in sub_common. - -Updated constant used for division in builtin.c:do_rand for DEC Alpha -and CRAY Y-MP. - -POSIXLY_CORRECT in the environment turns on --posix (fixed in main.c). - -Updated srandom prototype and calls in builtin.c. - -Fix awk.y to enforce posix semantics of unary +: result is numeric. - -Fix array.c to not rearrange the hash chain upon finding an index in -the array. This messed things up in cases like: - for (index1 in array) { - blah - if (index2 in array) # blew away the for - stuff - } - -Fixed spelling errors in the man page. - -Fixes in awk.y so that - gawk '' /path/to/file -will work without core dumping or finding parse errors. - -Fix main.c so that --lint will fuss about an empty program. -Yet another fix for argument parsing in the case of unrecognized options. - -Bug fix in dfa.c to not attempt to free null pointers. - -Bug fix in builtin.c to only use DEFAULT_G_PRECISION for %g or %G. - -Bug fix in field.c to achieve call by value semantics for split. - -Changes from 2.15.3 to 2.15.4 ------------------------------ - -Lots of lint fixes, and do_sprintf made mostly ANSI C compatible. - -Man page updated and edited. - -Copyrights updated. - -Arrays now grow dynamically, initially scaling up by an order of magnitude - and then doubling, up to ~ 64K. This should keep gawk's performance - graceful under heavy load. - -New `delete array' feature added. Only documented in the man page. - -Switched to dfa and regex suites from grep-2.0. These offer the ability to - move to POSIX regexps in the next release. - -Disabled GNU regex ops. - -Research awk -m option now recognized. It does nothing in gawk, since gawk - has no static limits. Only documented in the man page. - -New bionic (faster, better, stronger than before) hashing function. - -Bug fix in argument handling. `gawk -X' now notices there was no program. - Additional bug fixes to make --compat and --lint work again. - -Many changes for systems where sizeof(int) != sizeof(void *). - -Add explicit alloca(0) in io.c to recover space from C alloca. - -Fixed file descriptor leak in io.c. - -The --version option now follows the GNU coding standards and exits. - -Fixed several prototypes in protos.h. - -Several tests updated. On Solaris, warn that the out? tests will fail. - -Configuration files for SunOS with cc and Solaris 2.x added. - -Improved error messages in awk.y on gawk extensions if do_unix or do_compat. - -INSTALL file added. - -Fixed Atari Makefile and several VMS specific changes. - -Better conversion of numbers to strings on systems with broken sprintfs. - -Changes from 2.15.2 to 2.15.3 ------------------------------ - -Increased HASHSIZE to a decent number, 127 was way too small. - -FILENAME is now the null string in a BEGIN rule. - -Argument processing fixed for invalid options and missing arguments. - -This version will build on VMS. This included a fix to close all files - and pipes opened with redirections before closing stdout and stderr. - -More getpgrp() defines. - -Changes for BSD44: in io.c and Makefile.bsd44. - -All directories in the distribution are now writable. - -Separated LDFLAGS and CFLAGS in Makefile. CFLAGS can now be overridden by - user. - -Make dist now builds compressed archives ending in .gz and runs doschk. - -Amiga port. - -New getopt.c fixes Alpha OSF/1 problem. - -Make clean now removes possible test output. - -Improved algorithm for multiple adjacent string concatenations leads to - performance improvements. - -Fix nasty bug whereby command-line assignments, both with -v and at run time, - could create variables with syntactically illegal names. - -Fix obscure bug in printf with %0 flag and filling. - -Add a lint check for substr if provided length exceeds remaining characters - in string. - -Update atari support. - -PC support enhanced to include support for both DOS and OS/2. (Lots more - #ifdefs. Sigh.) - -Config files for Hitachi Unix and OSF/1, courtesy of Yoko Morishita - (morisita@sra.co.jp) - -Changes from 2.15.1 to 2.15.2 ------------------------------ - -Additions to the FUTURES file. - -Document undefined order of output when using both standard output - and /dev/stdout or any of the /dev output files that gawk emulates in - the absence of OS support. - -Clean up the distribution generation in Makefile.in: the info files are - now included, the distributed files are marked read-only and patched - distributions are now unpacked in a directory named with the patch level. - -Changes from 2.15 to 2.15.1 ---------------------------- - -Close stdout and stderr before all redirections on program exit. This allows - detection of write errors and also fixes the messages test on Solaris 2.x. - -Removed YYMAXDEPTH define in awk.y which was limiting the parser stack depth. - -Changes to config/bsd44, Makefile.bsd44 and configure to bring it into line - with the BSD4.4 release. - -Changed Makefile to use prefix, exec_prefix, bindir etc. - -make install now installs info files. - -make install now sets permissions on installed files. - -Make targets added: uninstall, distclean, mostlyclean and realclean. - -Added config.h to cleaner and clobber make targets. - -Changes to config/{hpux8x,sysv3,sysv4,ultrix41} to deal with alloca(). - -Change to getopt.h for portability. - -Added more special cases to the getpgrp() call. - -Added README.ibmrt-aos and config/ibmrt-aos. - -Changes from 2.14 to 2.15 ---------------------------- - -Command-line source can now be mixed with library functions. - -ARGIND variable tracks index in ARGV of FILENAME. - -GNU style long options in addition to short options. - -Plan 9 style special files interpreted by gawk: - /dev/pid - /dev/ppid - /dev/pgrpid - /dev/user - $1 = getuid - $2 = geteuid - $3 = getgid - $4 = getegid - $5 ... $NF = getgroups if supported - -ERRNO variable contains error string if getline or close fails. - -Very old options -a and -e have gone away. - -Inftest has been removed from the default target in test/Makefile -- the - results were too machine specific and resulted in too many false alarms. - -A README.amiga has been added. - -The "too many arguments supplied for format string" warning message is only - in effect under the lint option. - -Code improvements in dfa.c. - -Fixed all reported bugs: - - Writes are checked for failure (such as full filesystem). - - Stopped (at least some) runaway error messages. - - gsub(/^/, "x") does the right thing for $0 of 0, 1, or more length. - - close() on a command being piped to a getline now works properly. - - The input record will no longer be freed upon an explicit close() - of the input file. - - A NUL character in FS now works. - - In a substitute, \\& now means a literal backslash followed by what - was matched. - - Integer overflow of substring length in substr() is caught. - - An input record without a newline termination is handled properly. - - In io.c, check is against only EMFILE so that system file table - is not filled. - - Renamed all files with names longer than 14 characters. - - Escaped characters in regular expressions were being lost when - IGNORECASE was used. - - Long source lines were not being handled properly. - - Sourcefiles that ended in a tab but no newline were bombing. - - Patterns that could match zero characters in split() were not working - properly. - - The parsedebug option was not working. - - The grammar was being a bit too lenient, allowing some very dubious - programs to pass. - - Compilation with DEBUG defined now works. - - A variable read in with getline was not being treated as a potential - number. - - Array subscripts were not always of string type. - - -Changes from 2.13.2 to 2.14 ---------------------------- - -Updated manual! - -Added "next file" to skip efficiently to the next input file. - -Fixed potential of overflowing buffer in do_sprintf(). - -Plugged small memory leak in sub_common(). - -EOF on a redirect is now "sticky" -- it can only be cleared by close()ing - the pipe or file. - -Now works if used via a #! /bin/gawk line at the top of an executable file - when that line ends with whitespace. - -Added some checks to the grammar to catch redefinition of builtin functions. - This could eventually be the basis for an extension to allow redefining - functions, but in the mean time it's a good error catching facility. - -Negative integer exponents now work. - -Modified do_system() to make sure it had a non-null string to be passed - to system(3). Thus, system("") will flush any pending output but not go - through the overhead of forking an un-needed shell. - -A fix to floating point comparisons so that NaNs compare right on IEEE systems. - -Added code to make sure we're not opening directories for reading and such. - -Added code to do better diagnoses of weird or null file names. - -Allow continue outside of a loop, unless in strict posix mode. Lint option - will issue warning. - -New missing/strftime.c. There has been one change that affects gawk. Posix - now defines a %V conversion so the vms conversion has been changed to %v. - If this version is used with gawk -Wlint and they use %V in a call to - strftime, they'll get a warning. - -Error messages now conform to GNU standard (I hope). - -Changed comparisons to conform to the description found in the file POSIX. - This is inconsistent with the current POSIX draft, but that is broken. - Hopefully the final POSIX standard will conform to this version. - (Alas, this will have to wait for 1003.2b, which will be a revision to - the 1003.2 standard. That standard has been frozen with the broken - comparison rules.) - -The length of a string was a short and now is a size_t. - -Updated VMS help. - -Added quite a few new tests to the test suite and deleted many due to lack of - written releases. Test output is only removed if it is identical to the - "good" output. - -Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in - a BEGIN block. - -Fixed premature freeing in construct "$0 = $0". - -Removed the call to wait_any() in gawk_popen(), since on at least some systems, - if gawk's input was from a pipe, the predecessor process in the pipe was a - child of gawk and this caused a deadlock. - -Regexp can (once again) match a newline, if given explicitly. - -nextopen() makes sure file name is null terminated. - -Fixed VMS pipe simulation. Improved VMS I/O performance. - -Catch . used in variable names. - -Fixed bug in getline without redirect from a file -- it was quitting after the - first EOF, rather than trying the next file. - -Fixed bug in treatment of backslash at the end of a string -- it was bombing - rather than doing something sensible. It is not clear what this should mean, - but for now I issue a warning and take it as a literal backslash. - -Moved setting of regexp syntax to before the option parsing in main(), to - handle things like -v FS='[.,;]' - -Fixed bug when NF is set by user -- fields_arr must be expanded if necessary - and "new" fields must be initialized. - -Fixed several bugs in [g]sub() for no match found or the match is 0-length. - -Fixed bug where in gsub() a pattern anchored at the beginning would still - substitute throughout the string. - -make test does not assume that . is in PATH. - -Fixed bug when a field beyond the end of the record was requested after - $0 was altered (directly or indirectly). - -Fixed bug for assignment to field beyond end of record -- the assigned value - was not found on subsequent reference to that field. - -Fixed bug for FS a regexp and it matches at the end of a record. - -Fixed memory leak for an array local to a function. - -Fixed hanging of pipe redirection to getline - -Fixed coredump on access to $0 inside BEGIN block. - -Fixed treatment of RS = "". It now parses the fields correctly and strips - leading whitespace from a record if FS is a space. - -Fixed faking of /dev/stdin. - -Fixed problem with x += x - -Use of scalar as array and vice versa is now detected. - -IGNORECASE now obeyed for FS (even if FS is a single alphabetic character). - -Switch to GPL version 2. - -Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs. - -Renamed this file (CHANGES) to NEWS. - -Use fmod() instead of modf() and provide FMOD_MISSING #define to undo - this change. - -Correct the volatile declarations in eval.c. - -Avoid errant closing of the file descriptors for stdin, stdout and stderr. - -Be more flexible about where semi-colons can occur in programs. - -Check for write errors on all output, not just on close(). - -Eliminate the need for missing/{strtol.c,vprintf.c}. - -Use GNU getopt and eliminate missing/getopt.c. - -More "lint" checking. - - -Changes from 2.13.1 to 2.13.2 ------------------------------ - -Toward conformity with GNU standards, configure is a link to mkconf, the latter - to disappear in the next major release. - -Update to config/bsd43. - -Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2 - -sgi33.cc added for compilation using cc rather than gcc. - -Ultrix41 now propagates to config.h properly -- as part of a general - mechanism in configure for kludges -- #define anything from a config file - just gets tacked onto the end of config.h -- to be used sparingly. - -Got rid of an unnecessary and troublesome declaration of vprintf(). - -Small improvement in locality of error messages. - -Try to diagnose use of array as scalar and vice versa -- to be improved in - the future. - -Fix for last bug fix for Cray division code--sigh. - -More changes to test suite to explicitly use sh. Also get rid of - a few generated files. - -Fixed off-by-one bug in string concatenation code. - -Fix for use of array that is passed in from a previous function parameter. - Addition to test suite for above. - -A number of changes associated with changing NF and access to fields - beyond the end of the current record. - -Change to missing/memcmp.c to avoid seg. fault on zero length input. - -Updates to test suite (including some inadvertently left out of the last patch) - to invoke sh explicitly (rather than rely on #!/bin/sh) and remove some - junk files. test/chem/good updated to correspond to bug fixes. - -Changes from 2.13.0 to 2.13.1 ------------------------------ - -More configs and PORTS. - -Fixed bug wherein a simple division produced an erroneous FPE, caused by - the Cray division workaround -- that code is now #ifdef'd only for - Cray *and* fixed. - -Fixed bug in modulus implementation -- it was very close to the above - code, so I noticed it. - -Fixed portability problem with limits.h in missing.c - -Fixed portability problem with tzname and daylight -- define TZNAME_MISSING - if strftime() is missing and tzname is also. - -Better support for Latin-1 character set. - -Fixed portability problem in test Makefile. - -Updated PROBLEMS file. - -=============================== gawk-2.13 released ========================= -Changes from 2.12.42 to 2.12.43 -------------------------------- - -Typo in awk.y - -Fixed up strftime.3 and added doc. for %V. - -Changes from 2.12.41 to 2.12.42 -------------------------------- - -Fixed bug in devopen() -- if you had write permission in /dev, - it would just create /dev/stdout etc.!! - -Final (?) VMS update. - -Make NeXT use GFMT_WORKAROUND - -Fixed bug in sub_common() for substitute on zero-length match. Improved the - code a bit while I was at it. - -Fixed grammar so that $i++ parses as ($i)++ - -Put support/* back in the distribution (didn't I already do this?!) - -Changes from 2.12.40 to 2.12.41 -------------------------------- - -VMS workaround for broken %g format. - -Changes from 2.12.39 to 2.12.40 -------------------------------- - -Minor man page update. - -Fixed latent bug in redirect(). - -Changes from 2.12.38 to 2.12.39 -------------------------------- - -Updates to test suite -- remove dependence on changing gawk.1 man page. - -Changes from 2.12.37 to 2.12.38 -------------------------------- - -Fixed bug in use of *= without whitespace following. - -VMS update. - -Updates to man page. - -Option handling updates in main.c - -test/manyfiles redone and added to bigtest. - -Fixed latent (on Sun) bug in handling of save_fs. - -Changes from 2.12.36 to 2.12.37 -------------------------------- - -Update REL in Makefile-dist. Incorporate test suite into main distribution. - -Minor fix in regtest. - -Changes from 2.12.35 to 2.12.36 -------------------------------- - -Release takes on dual personality -- 2.12.36 and 2.13.0 -- any further - patches before public release won't count for 2.13, although they will for - 2.12 -- be careful to avoid confusion! patchlevel.h will be the last thing - to change. - -Cray updates to deal with arithmetic problems. - -Minor test suite updates. - -Fixed latent bug in parser (freeing memory). - -Changes from 2.12.34 to 2.12.35 -------------------------------- - -VMS updates. - -Flush stdout at top of err() and stderr at bottom. - -Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and - doing the force_number(). - -Included the missing manyfiles.awk and a new test to catch the above bug which - I am amazed wasn't already caught by the test suite -- it's pretty basic. - -Changes from 2.12.33 to 2.12.34 -------------------------------- - -Atari updates -- including bug fix. - -More VMS updates -- also nuke vms/version.com. - -Fixed bug in handling of large numbers of redirections -- it was probably never - tested before (blush!). - -Minor rearrangement of code in r_force_number(). - -Made chem and regtest tests a bit more portable (Ultrix again). - -Added another test -- manyfiles -- not invoked under any other test -- very Unix - specific. - -Rough beginning of LIMITATIONS file -- need my AWK book to complete it. - -Changes from 2.12.32 to 2.12.33 -------------------------------- - -Expunge debug.? from various files. - -Remove vestiges of Floor and Ceil kludge. - -Special case integer division -- mainly for Cray, but maybe someone else - will benefit. - -Workaround for iop_close closing an output pipe descriptor on Cray -- - not conditional since I think it may fix a bug on SGI as well and I don't - think it can hurt elsewhere. - -Fixed memory leak in assoc_lookup(). - -Small cleanup in test suite. - -Changes from 2.12.31 to 2.12.32 -------------------------------- - -Nuked debug.c and debugging flag -- there are better ways. - -Nuked version.sh and version.c in subdirectories. - -Fixed bug in handling of IGNORECASE. - -Fixed bug when FIELDWIDTHS was set via -v option. - -Fixed (obscure) bug when $0 is assigned a numerical value. - -Fixed so that escape sequences in command-line assignments work (as it already - said in the comment). - -Added a few cases to test suite. - -Moved support/* back into distribution. - -VMS updates. - -Changes from 2.12.30 to 2.12.31 -------------------------------- - -Cosmetic manual page changes. - -Updated sunos3 config. - -Small changes in test suite including renaming files over 14 chars. in length. - -Changes from 2.12.29 to 2.12.30 -------------------------------- - -Bug fix for many string concatenations in a row. - -Changes from 2.12.28 to 2.12.29 -------------------------------- - -Minor cleanup in awk.y - -Minor VMS update. - -Minor atari update. - -Changes from 2.12.27 to 2.12.28 -------------------------------- - -Got rid of the debugging goop in eval.c -- there are better ways. - -Sequent port. - -VMS changes left out of the last patch -- sigh! config/vms.h renamed - to config/vms-conf.h. - -Fixed missing/tzset.c - -Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than - sprintf("%g") and caused all sorts of portability headaches. - -Tuned get_field() -- it was unnecessarily parsing the whole record on reference - to $0. - -Tuned interpret() a bit in the rule_node loop. - -In r_force_number(), worked around bug in Uglix strtod() and got rid of - ugly do{}while(0) at Michal's urging. - -Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster. - -Got rid of assign_number() -- contrary to comment, it was no faster than - just making a new node and freeing the old one. - -Replaced make_number() and tmp_number() with macros that call mk_number(). - -Changed freenode() and newnode() into macros -- the latter is getnode() - which calls more_nodes() as necessary. - -Changes from 2.12.26 to 2.12.27 -------------------------------- - -Completion of Cray 2 port (includes a kludge for floor() and ceil() - that may go or be changed -- I think that it may just be working around - a bug in chem that is being tweaked on the Cray). - -More VMS updates. - -Moved kludge over yacc's insertion of malloc and realloc declarations - from protos.h to the Makefile. - -Added a lisp interpreter in awk to the test suite. (Invoked under - bigtest.) - -Cleanup in r_force_number() -- I had never gotten around to a thorough - profile of the cache code and it turns out to be not worth it. - -Performance boost -- do lazy force_number()'ing for fields etc. i.e. - flag them (MAYBE_NUM) and call force_number only as necessary. - -Changes from 2.12.25 to 2.12.26 -------------------------------- - -Rework of regexp stuff so that dynamic regexps have reasonable - performance -- string used for compiled regexp is stored and - compared to new string -- if same, no recompilation is necessary. - Also, very dynamic regexps cause dfa-based searching to be turned - off. - -Code in dev_open() is back to returning fileno(std*) rather than - dup()ing it. This will be documented. Sorry for the run-around - on this. - -Minor atari updates. - -Minor vms update. - -Missing file from MSDOS port. - -Added warning (under lint) if third arg. of [g]sub is a constant and - handle it properly in the code (i.e. return how many matches). - -Changes from 2.12.24 to 2.12.25 -------------------------------- - -MSDOS port. - -Non-consequential changes to regexp variables in preparation for - a more serious change to fix a serious performance problem. - -Changes from 2.12.23 to 2.12.24 -------------------------------- - -Fixed bug in output flushing introduced a few patches back. This caused - serious performance losses. - -Changes from 2.12.22 to 2.12.23 -------------------------------- - -Accidentally left config/cray2-60 out of last patch. - -Added some missing dependencies to Makefile. - -Cleaned up mkconf a bit; made yacc the default parser (no alloca needed, - right?); added rs6000 hook for signed characters. - -Made regex.c with NO_ALLOCA undefined work. - -Fixed bug in dfa.c for systems where free(NULL) bombs. - -Deleted a few cant_happen()'s that *really* can't hapen. - -Changes from 2.12.21 to 2.12.22 -------------------------------- - -Added to config stuff the ability to choose YACC rather than bison. - -Fixed CHAR_UNSIGNED in config.h-dist. - -Second arg. of strtod() is char ** rather than const char **. - -stackb is now initially malloc()'ed since it may be realloc()'ed. - -VMS updates. - -Added SIZE_T_MISSING to config stuff and a default typedef to awk.h. - (Maybe it is not needed on any current systems??) - -re_compile_pattern()'s size is now size_t unconditionally. - -Changes from 2.12.20 to 2.12.21 -------------------------------- - -Corrected missing/gcvt.c. - -Got rid of use of dup2() and thus DUP_MISSING. - -Updated config/sgi33. - -Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in - POSIX 1003.2 for relational comparisons. - -Small updates to test suite. - -Changes from 2.12.19 to 2.12.20 -------------------------------- - -Sloppy, sloppy, sloppy!! I didn't even try to compile the last two - patches. This one fixes goofs in regex.c. - -Changes from 2.12.18 to 2.12.19 -------------------------------- - -Cleanup of last patch. - -Changes from 2.12.17 to 2.12.18 -------------------------------- - -Makefile renamed to Makefile-dist. - -Added alloca() configuration to mkconf. (A bit kludgey.) Just - add a single line containing ALLOCA_PW, ALLOCA_S or ALLOCA_C - to the appropriate config file to have Makefile-dist edited - accordingly. - -Reorganized output flushing to correspond with new semantics of - devopen() on "/dev/std*" etc. - -Fixed rest of last goof!! - -Save and restore errno in do_pathopen(). - -Miscellaneous atari updates. - -Get rid of the trailing comma in the NODETYPE definition (Cray - compiler won't take it). - -Try to make the use of `const' consistent since Cray compiler is - fussy about that. See the changes to `basename' and `myname'. - -It turns out that, according to section 3.8.3 (Macro Replacement) - of the ANSI Standard: ``If there are sequences of preprocessing - tokens within the list of arguments that would otherwise act as - preprocessing directives, the behavior is undefined.'' That means - that you cannot count on the behavior of the declaration of - re_compile_pattern in awk.h, and indeed the Cray compiler chokes on it. - -Replaced alloca with malloc/realloc/free in regex.c. It was much simpler - than expected. (Inside NO_ALLOCA for now -- by default no alloca.) - -Added a configuration file, config/cray60, for Unicos-6.0. - -Changes from 2.12.16 to 2.12.17 -------------------------------- - -Ooops. Goofed signal use in last patch. - -Changes from 2.12.15 to 2.12.16 -------------------------------- - -RENAMED *_dir to just * (e.g. missing_dir). - -Numerous VMS changes. - -Proper inclusion of atari and vms files. - -Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE - -- please comment on these! - -Moved pathopen() to io.c (sigh). - -Put local directory ahead in default AWKPATH. - -Added facility in mkconf to echo comments on stdout: lines beginning - with "#echo " will have the remainder of the line echoed when mkconf is run. - Any lines starting with "#" will otherwise be treated as comments. The - intent is to be able to say: - "#echo Make sure you uncomment alloca.c in the Makefile" - or the like. - -Prototype fix for V.4 - -Fixed version_string to not print leading @(#). - -Fixed FIELDWIDTHS to work with strict (turned out to be easy). - -Fixed conf for V.2. - -Changed semantics of /dev/fd/n to be like on real /dev/fd. - -Several configuration and updates in the makefile. - -Updated manpage. - -Include tzset.c and system.c from missing_dir that were accidently left out of - the last patch. - -Fixed bug in cmdline variable assignment -- arg was getting freed(!) in - call to variable. - -Backed out of parse-time constant folding for now, until I can figure out - how to do it right. - -Fixed devopen() so that getline <"-" works. - -Changes from 2.12.14 to 2.12.15 -------------------------------- - -Changed config/* to a condensed form that can be used with mkconf to generate - a config.h from config.h-dist -- much easier to maintain. Please check - carefully against what you had before for a particular system and report - any problems. vms.h remains separate since the stuff at the bottom - didn't quite fit the mkconf model -- hopefully cleared up later. - -Fixed bug in grammar -- didn't allow function definition to be separated from - other rules by a semi-colon. - -VMS fix to #includes in missing.c -- should we just be including awk.h? - -Updated README for texinfo.tex version. - -Updating of copyright in all .[chy] files. - -Added but commented out Michal's fix to strftime. - -Added tzset() emulation based on Rick Adams' code. Added TZSET_MISSING to - config.h-dist. - -Added strftime.3 man page for missing_dir - -More posix: func, **, **= don't work in -W posix - -More lint: ^, ^= not in old awk - -gawk.1: removed ref to -DNO_DEV_FD, other minor updating. - -Style change: pushbak becomes pushback() in yylex(). - -Changes from 2.12.13 to 2.12.14 -------------------------------- - -Better (?) organization of awk.h -- attempt to keep all system dependencies - near the top and move some of the non-general things out of the config.h - files. - -Change to handling of SYSTEM_MISSING. - -Small change to ultrix config. - -Do "/dev/fd/*" etc. checking at runtime. - -First pass at VMS port. - -Improvements to error handling (when lexeme spans buffers). - -Fixed backslash handling -- why didn't I notice this sooner? - -Added programs from book to test suite and new target "bigtest" to Makefile. - -Changes from 2.12.12 to 2.12.13 -------------------------------- - -Recognize OFS and ORS specially so that OFS = 9 works without efficiency hit. - Took advantage of opportunity to tune do_print*() for about 10% win on a - print with 5 args (i.e. small but significant). - -Somewhat pervasive changes to reconcile CONVFMT vs. OFMT. - -Better initialization of builtin vars. - -Make config/* consistent wrt STRTOL_MISSING. - -Small portability improvement to alloca.s - -Improvements to lint code in awk.y - -Replaced strtol() with a better one by Chris Torek. - -Changes from 2.12.11 to 2.12.12 -------------------------------- - -Added PORTS file to record successful ports. - -Added #define const to nothing if not STDC and added const to strtod() header. - -Added * to printf capabilities and partially implemented ' ' and '+' (has an - effect for %d only, silently ignored for other formats). I'm afraid that's - as far as I want to go before I look at a complete replacement for - do_sprintf(). - -Added warning for /regexp/ on LHS of MATCHOP. - -Changes from 2.12.10 to 2.12.11 -------------------------------- - -Small Makefile improvements. - -Some remaining nits from the NeXT port. - -Got rid of bcopy() define in awk.h -- not needed anymore (??) - -Changed private in builtin.c -- it is special on Sequent. - -Added subset implementation of strtol() and STRTOL_MISSING. - -A little bit of cleanup in debug.c, dfa.c. - -Changes from 2.12.9 to 2.12.10 ------------------------------- - -Redid compatability checking and checking for # of args. - -Removed all references to variables[] from outside awk.y, in preparation - for a more abstract interface to the symbol table. - -Got rid of a remaining use of bcopy() in regex.c. - -Changes from 2.12.8 to 2.12.9 ------------------------------ - -Portability improvements for atari, next and decstation. - -Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly. - -Manpage updates. - -Moved support from src release to doc release. - -Updated FUTURES file. - -Added some "lint" warnings. - -Changes from 2.12.7 to 2.12.8 ------------------------------ - -Changed time() to systime(). - -Changed warning() in snode() to fatal(). - -strftime() now defaults second arg. to current time. - -Changes from 2.12.6 to 2.12.7 ------------------------------ - -Fixed bug in sub_common() involving inadequate allocation of a buffer. - -Added some missing files to the Makefile. - -Changes from 2.12.5 to 2.12.6 ------------------------------ - -Fixed bug wherein non-redirected getline could call iop_close() just - prior to a call from do_input(). - -Fixed bug in handling of /dev/stdout and /dev/stderr. - -Changes from 2.12.4 to 2.12.5 ------------------------------ - -Updated README and support directory. - -Changes from 2.12.3 to 2.12.4 ------------------------------ - -Updated CHANGES and TODO (should have been done in previous 2 patches). - -Changes from 2.12.2 to 2.12.3 ------------------------------ - -Brought regex.c and alloca.s into line with current FSF versions. - -Changes from 2.12.1 to 2.12.2 ------------------------------ - -Portability improvements; mostly moving system prototypes out of awk.h - -Introduction of strftime. - -Use of CONVFMT. - -Changes from 2.12 to 2.12.1 ------------------------------ - -Consolidated treatment of command-line assignments (thus correcting the --v treatment). - -Rationalized builtin-variable handling into a table-driven process, thus -simplifying variable() and eliminating spc_var(). - -Fixed bug in handling of command-line source that ended in a newline. - -Simplified install() and lookup(). - -Did away with double-mallocing of identifiers and now free second and later -instances of a name, after the first gets installed into the symbol table. - -Treat IGNORECASE specially, simplifying a lot of code, and allowing -checking against strict conformance only on setting it, rather than on each -pattern match. - -Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was -added). - -Fixed bug where $0 was not being marked as valid, even after it was rebuilt. -This caused mangling of $0. - - -Changes from 2.11.1 to 2.12 ------------------------------ - -Makefile: - -Portability improvements in Makefile. -Move configuration stuff into config.h - -FSF files: - -Synchronized alloca.[cs] and regex.[ch] with FSF. - -array.c: - -Rationalized hash routines into one with a different algorithm. -delete() now works if the array is a local variable. -Changed interface of assoc_next() and avoided dereferencing past the end of the - array. - -awk.h: - -Merged non-prototype and prototype declarations in awk.h. -Expanded tree_eval #define to short-circuit more calls of r_tree_eval(). - -awk.y: - -Delinted some of the code in the grammar. -Fixed and improved some of the error message printing. -Changed to accomodate unlimited length source lines. -Line continuation now works as advertised. -Source lines can be arbitrarily long. -Refined grammar hacks so that /= assignment works. Regular expressions - starting with /= are recognized at the beginning of a line, after && or || - and after ~ or !~. More contexts can be added if necessary. -Fixed IGNORECASE (multiple scans for backslash). -Condensed expression_lists in array references. -Detect and warn for correct # args in builtin functions -- call most of them - with a fixed number (i.e. fill in defaults at parse-time rather than at - run-time). -Load ENVIRON only if it is referenced (detected at parse-time). -Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time. -Fold constant expressions at parse time. -Do make_regexp() on third arg. of split() at parse tiem if it is a constant. - -builtin.c: - -srand() returns 0 the first time called. -Replaced alloca() with malloc() in do_sprintf(). -Fixed setting of RSTART and RLENGTH in do_match(). -Got rid of get_{one,two,three} and allowance for variable # of args. at - run-time -- this is now done at parse-time. -Fixed latent bug in [g]sub whereby changes to $0 would never get made. -Rewrote much of sub_common() for simplicity and performance. -Added ctime() and time() builtin functions (unless -DSTRICT). ctime() returns - a time string like the C function, given the number of seconds since the epoch - and time() returns the current time in seconds. -do_sprintf() now checks for mismatch between format string and number of - arguments supplied. - -dfa.c - -This is borrowed (almost unmodified) from GNU grep to provide faster searches. - -eval.c - -Node_var, Node_var_array and Node_param_list handled from macro rather - than in r_tree_eval(). -Changed cmp_nodes() to not do a force_number() -- this, combined with a - force_number() on ARGV[] and ENVIRON[] brings it into line with other awks -Greatly simplified cmp_nodes(). -Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs(). -All adjacent string concatenations now done at once. - -field.c - -Added support for FIELDWIDTHS. -Fixed bug in get_field() whereby changes to a field were not always - properly reflected in $0. -Reordered tests in parse_field() so that reference off the end of the buffer - doesn't happen. -set_FS() now sets *parse_field i.e. routine to call depending on type of FS. -It also does make_regexp() for FS if needed. get_field() passes FS_regexp - to re_parse_field(), as does do_split(). -Changes to set_field() and set_record() to avoid malloc'ing and free'ing the - field nodes repeatedly. The fields now just point into $0 unless they are - assigned to another variable or changed. force_number() on the field is - *only* done when the field is needed. - -gawk.1 - -Fixed troff formatting problem on .TP lines. - -io.c - -Moved some code out into iop.c. -Output from pipes and system() calls is properly synchronized. -Status from pipe close properly returned. -Bug in getline with no redirect fixed. - -iop.c - -This file contains a totally revamped get_a_record and associated code. - -main.c - -Command line programs no longer use a temporary file. -Therefore, tmpnam() no longer required. -Deprecated -a and -e options -- they will go away in the next release, - but for now they cause a warning. -Moved -C, -V, -c options to -W ala posix. -Added -W posix option: throw out \x -Added -W lint option. - - -node.c - -force_number() now allows pure numerics to have leading whitespace. -Added make_string facility to optimize case of adding an already malloc'd - string. -Cleaned up and simplified do_deref(). -Fixed bug in handling of stref==255 in do_deref(). - -re.c - -contains the interface to regexp code - -Changes from 2.11.1 to FSF version of same ------------------------------------------- -Thu Jan 4 14:19:30 1990 Jim Kingdon (kingdon at albert) - - * Makefile (YACC): Add -y to bison part. - - * missing.c: Add #include . - -Sun Dec 24 16:16:05 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) - - * Makefile: Add (commented out) default defines for Sony News. - - * awk.h: Move declaration of vprintf so it will compile when - -DVPRINTF_MISSING is defined. - -Mon Nov 13 18:54:08 1989 Robert J. Chassell (bob at apple-gunkies.ai.mit.edu) - - * gawk.texinfo: changed @-commands that are not part of the - standard, currently released texinfmt.el to those that are. - Otherwise, only people with the as-yet unreleased makeinfo.c can - format this file. - -Changes from 2.11beta to 2.11.1 (production) --------------------------------------------- - -Went from "beta" to production status!!! - -Now flushes stdout before closing pipes or redirected files to -synchronize output. - -MS-DOS changes added in. - -Signal handler return type parameterized in Makefile and awk.h and -some lint removed. debug.c cleaned up. - -Fixed FS splitting to never match null strings, per book. - -Correction to the manual's description of FS. - -Some compilers break on char *foo = "string" + 4 so fixed version.sh and -main.c. - -Changes from 2.10beta to 2.11beta ---------------------------------- - -This release fixes all reported bugs that we could reproduce. Probably -some of the changes are not documented here. - -The next release will probably not be a beta release! - -The most important change is the addition of the -nostalgia option. :-) - -The documentation has been improved and brought up-to-date. - -There has been a lot of general cleaning up of the code that is not otherwise -documented here. There has been a movement toward using standard-conforming -library routines and providing them (in missing.d) for systems lacking them. -Improved (hopefully) configuration through Makfile modifications and missing.c. -In particular, straightened out confusion over vprintf #defines, declarations -etc. - -Deleted RCS log comments from source, to reduce source size by about one third. -Most of them were horribly out-of-date, anyway. - -Renamed source files to reflect (for the most part) their contents. - -More and improved error messages. Cleanup and fixes to yyerror(). -String constants are not altered in input buffer, so error messages come out -better. Fixed usage message. Make use of ANSI C strerror() function -(provided). - -Plugged many more memory leaks. The memory consumption is now quite -reasonable over a wide range of programs. - -Uses volatile declaration if STDC > 0 to avoid problems due to longjmp. - -New -a and -e options to use awk or egrep style regexps, respectively, -since POSIX says awk should use egrep regexps. Default is -a. - -Added -v option for setting variables before the first file is encountered. -Version information now uses -V and copyleft uses -C. - -Added a patchlevel.h file and its use for -V and -C. - -Append_right() optimized for major improvement to programs with a *lot* -of statements. - -Operator precedence has been corrected to match draft Posix. - -Tightened up grammar for builtin functions so that only length -may be called without arguments or parentheses. - -/regex/ is now a normal expression that can appear in any expression -context. - -Allow /= to begin a regexp. Allow ..[../..].. in a regexp. - -Allow empty compound statements ({}). - -Made return and next illegal outside a function and in BEGIN/END respectively. - -Division by zero is now illegal and causes a fatal error. - -Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1. - -Fixed do_sqrt, do_log, and do_exp to do argument/return checking and -print an error message, per the manual. - -Fixed main to catch SIGSEGV to get source and data file line numbers. - -Fixed yyerror to print the ^ at the beginning of the bad token, not the end. - -Fix to substr() builtin: it was failing if the arguments -weren't already strings. - -Added new node value flag NUMERIC to indicate that a variable is -purely a number as opposed to type NUM which indicates that -the node's numeric value is valid. This is set in make_number(), -tmp_number and r_force_number() when appropriate and used in -cmp_nodes(). This fixed a bug in comparison of variables that had -numeric prefixes. The new code uses strtod() and eliminates is_a_number(). -A simple strtod() is provided for systems lacking one. It does no -overflow checking, so could be improved. - -Simplification and efficiency improvement in force_string. - -Added performance tweak in r_force_number(). - -Fixed a bug with nested loops and break/continue in functions. - -Fixed inconsistency in handling of empty fields when $0 has to be rebuilt. -Happens to simplify rebuild_record(). - -Cleaned up the code associated with opening a pipe for reading. Gawk -now has its own popen routine (gawk_popen) that allocates an IOBUF -and keeps track of the pid of the child process. gawk_pclose -marks the appropriate child as defunct in the right struct redirect. - -Cleaned up and fixed close_redir(). - -Fixed an obscure bug to do with redirection. Intermingled ">" and ">>" -redirects did not output in a predictable order. - -Improved handling of output buffering: now all print[f]s redirected to a tty -or pipe are flushed immediately and non-redirected output to a tty is flushed -before the next input record is read. +1. The special files /dev/pid, /dev/ppid, /dev/pgrpid and /dev/user are + now completely gone. Use PROCINFO instead. -Fixed a bug in get_a_record() where bcopy() could have copied over -a random pointer. +2. The POSIX 2008 behavior for `sub' and `gsub' are now the default. + THIS CHANGES BEHAVIOR!!!! -Fixed a bug when RS="" and records separated by multiple blank lines. +3. The \s and \S escape sequences are now recognized in regular expressions. -Got rid of SLOWIO code which was out-of-date anyway. +4. The split() function accepts an optional fourth argument which is an array + to hold the values of the separators. -Fix in get_field() for case where $0 is changed and then $(n) are -changed and then $0 is used. +5. The new -b / --characters-as-bytes option means "hands off my data"; gawk + won't try to treat input as a multibyte string. -Fixed infinite loop on failure to open file for reading from getline. -Now handles redirect file open failures properly. +6. There is a new --sandbox option; see the doc. -Filenames such as /dev/stdin now allowed on the command line as well as -in redirects. +7. Indirect function calls are now available. -Fixed so that gawk '$1' where $1 is a zero tests false. +8. Interval expressions are now part of default regular expressions for + GNU Awk syntax. -Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1', -for example. +9. --gen-po is now correctly named --gen-pot. -The return from a user-defined function now defaults to the Null node. -This fixes a core-dump-causing bug when the return value of a function -is used and that function returns no value. +10. switch / case is now enabled by default. There's no longer a need + for a configure-time option. -Now catches floating point exceptions to avoid core dumps. +11. Gawk now supports BEGINFILE and ENDFILE. See the doc for details. -Bug fix for deleting elements of an array -- under some conditions, it was -deleting more than one element at a time. +12. Directories named on the command line now produce a warning, not + a fatal error, unless --posix or --traditional. -Fix in AWKPATH code for running off the end of the string. +13. The new FPAT variable allows you to specify a regexp that matches + the fields, instead of matching the field separator. The new patsplit() + function gives the same capability for splitting. -Fixed handling of precision in *printf calls. %0.2d now works properly, -as does %c. [s]printf now recognizes %i and %X. +14. All long options now have short options, for use in `#!' scripts. -Fixed a bug in printing of very large (>240) strings. +15. Support for IPv6 is added via the /inet6/... special file. /inet4/... + forces IPv4 and /inet chooses the system default (probably IPv4). -Cleaned up erroneous behaviour for RS == "". +16. Added a warning for /[:space:]/ that should be /[[:space:]]/. -Added IGNORECASE support to index(). +17. Merged with John Haque's byte code internals. Adds dgawk debugger and + possibly improved performance. -Simplified and fixed newnode/freenode. +18. `break' and `continue' are no longer valid outside a loop, even with + --traditional. -Fixed reference to $(anything) in a BEGIN block. +19. POSIX character classes work with --traditional (BWK awk supports them). -Eliminated use of USG rand48(). +20. Nuked redundant --compat, --copyleft, and --usage long options. -Bug fix in force_string for machines with 16-bit ints. +21. Arrays of arrays added. See the doc. -Replaced use of mktemp() with tmpnam() and provided a partial implementation of -the latter for systems that don't have it. +22. Per the GNU Coding Standards, dynamic extensions must now define + a global symbol indicating that they are GPL-compatible. See + the documentation and example extensions. + THIS CHANGES BEHAVIOR!!!! -Added a portability check for includes in io.c. +23. In POSIX mode, string comparisons use strcoll/wcscoll. + THIS CHANGES BEHAVIOR!!!! -Minor portability fix in alloc.c plus addition of xmalloc(). +24. The option for raw sockets was removed, since it was never implemented. -Portability fix: on UMAX4.2, st_blksize is zero for a pipe, thus breaking -iop_alloc() -- fixed. +25. Gawk now treats ranges of the form [d-h] as if they were in the C + locale, no matter what kind of regexp is being used, and even if + --posix. The latest POSIX standard allows this, and the documentation + has been updated. Maybe this will stop all the questions about + [a-z] matching uppercase letters. + THIS CHANGES BEHAVIOR!!!! -Workaround for compiler bug on Sun386i in do_sprintf. +26. PROCINFO["strftime"] now holds the default format for strftime(). -More and improved prototypes in awk.h. +27. Updated to latest infrastructure: Autoconf 2.68, Automake 1.11.1, + Gettext 0.18.1, Bison 2.5. -Consolidated C escape parsing code into one place. +28. Many code cleanups. Removed code for many old, unsupported systems: + - Atari + - Amiga + - BeOS + - Cray + - MIPS RiscOS + - MS-DOS with Microsoft Compiler + - MS-Windows with Microsoft Compiler + - NeXT + - SunOS 3.x, Sun 386 (Road Runner) + - Tandem (non-POSIX) + - Prestandard VAX C compiler for VAX/VMS + - Probably others that I've forgotten -strict flag is now turned on only when invoked with compatability option. -It now applies to fewer things. +29. If PROCINFO["sorted_in"] exists, for(iggy in foo) loops sort the + indices before looping over them. The value of this element + provides control over how the indices are sorted before the loop + traversal starts. See the manual. -Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *). -Hopefully this is right for the systems that use this code (I don't). +30. A new isarray() function exists to distinguish if an item is an array + or not, to make it possible to traverse multidimensional arrays. -Support for pipes under MSDOS added. +31. asort() and asorti() take a third argument specifying how to sort. + See the doc. diff -Nru gawk-3.1.8+dfsg/NEWS.0 gawk-4.0.1+dfsg/NEWS.0 --- gawk-3.1.8+dfsg/NEWS.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/NEWS.0 2011-04-24 12:38:10.000000000 +0000 @@ -0,0 +1,2542 @@ + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + +Changes from 3.1.7 to 3.1.8 +--------------------------- +1. The zero flag no longer applies to %c and %s; apparently the standards + changed at some point. + +2. Updated to latest infrastructure: Autoconf 2.65, Automake 1.11.1, + libtool 2.2.6b, Bison 2.4.2. + +3. Failure to open a socket is no longer a fatal error. + +4. dfa.h and dfa.c are now more-or-less in sync with GNU grep, for the first + time in many years. + +5. Gawk no longer includes its own copy of libsigsegv but it will use it if + installed on the build system. The --disable-libsigsegv configure option + is now gone. + +6. The ' flag (%'d) is now just ignored on systems that can't support it. + +7. Lots of bug fixes, see the ChangeLog. + +Changes from 3.1.6 to 3.1.7 +--------------------------- +1. Gawk now has support for z/OS (IBM S/390 architecture). + +2. Gawk now handles multibyte strings better in [s]printf with field + widths and such. + +3. Gawk now uses libsigsegv to print a message before core dumping. This + handles infinite recursion of an awk function a little better. + Use of the library can be disabled at configure time with the + --disable-libsigsegv option for unusual systems. + +4. The handling of BINMODE is now somewhat more sane. + +5. A getline from a directory is no longer fatal; instead it returns -1. + +6. Per POSIX, special variable names (like FS) cannot be used as function + parameter names. + +7. The new -O / --optimize option enables simple constant folding on + the parse tree during parsing. We hope that with time the number + of optimizations will increase. + +8. Updated to the latest autotools: Autoconf 2.63, Automake 1.11, + Libtool 2.2.6a, and Gettext 0.17. Also latest Bison: 2.4.1. + +9. Some improvement in testing for isinf / isnan in builtin.c. + +10. Improved the handling of `a = a b c' to be more general. + +11. Locale handling for %'d should now work on certain non-Unix / + non-Linux systems. + +12. Lots of bugs fixed, see the ChangeLog for the details. + +Changes from 3.1.5 to 3.1.6 +--------------------------- + +1. `gawk 'program' /non/existant/file' no longer core dumps. + +2. Too many people the world over have complained about gawk's use of the + locale's decimal point for parsing input data instead of the traditional + period. So, even though gawk was being nicely standards-compliant, in + a Triumph For The Users, gawk now only uses the locale's decimal point + if --posix is supplied or if POSIXLY_CORRECT is set. It is the sincere + hope that this change will eliminate this FAQ from being asked. + +3. `gawk -v BINMODE=1 ...' works again. + +4. Internal file names like `/dev/user' now work again. (Note that these + file names are obsolete and will go away eventually.) + +5. Problems with wide strings in non "C" locales have been straightened + out everywhere. (At least, we think so.) + +6. Use of `ansi2knr' is no longer supported. Please use an ANSI C compiler. + +7. Updated to Autoconf 2.61, Automake 1.10, and Gettext 0.16.1. + +8. The getopt* and regex* files were synchronized with current GLIBC CVS. + See the ChangeLog for the versions and minor edits made. + +9. There are additional --lint-old warnings. + +10. Gawk now uses getaddrinfo(3) to look up names and IP addresses. This + allows the use of an IPv6 format address and paves the way for + eventual addition of `/inet6/...' and `/inet4/...' hostnames. + +11. We believe gawk to now be valgrind clean. At least when run against + the test suite. + +12. A number of issues dealing with the formatting and printing of very + large numbers in integer formats have been dealt with and fixed. + +13. Gawk now converts "+inf", "-inf", "+nan" and "-nan" into the corresponding + magic IEEE floating point values. Only those strings (case independent) + work. With --posix, gawk calls the system strtod directly. You asked + for it, you got it, you deal with it. + +14. Defining YYDEBUG enables the -D command line option. + +15. Gawk should now work out of the box on Tandem NSK/OSS systems. + +16. Lint messages rationalized: many more of the messages are now printed + only once, instead of every time they are encountered. + +17. The strftime() function now accepts an optional third argument, which + if non-zero or non-null, indicates that the time should be formatted + as UTC instead of as local time. + +18. The precedence of concatenation and `| getline' (in something like + "echo " "date" | getline stuff) has been reverted to the earlier + behavior and now once again matches Unix awk. + +19. New configure time flag --disable-directories-fatal which causes + gawk to silently skip directories on the command line. This behavior + is also enabled for --traditional, since it's what Unix awk does. + +20. A new option, --use-lc-numeric, forces use of the locale's decimal + point without the rest of the draconian restrictions imposed by + --posix. This softens somewhat the stance taken in item #2. + +21. Everything relevant has been updated to the GPL 3. + +22. Array growth should be faster now, at no cost in space. + +23. Lots more tests. + +24. One new translation. + +25. Various bugs fixed, see the ChangeLog for details. + +Changes from 3.1.4 to 3.1.5 +--------------------------- + +1. The random() suite has been updated to a current FreeBSD version, which + works on systems with > 32-bit ints. + +2. A new option, `--exec' has been added. It's like -f but ends option + processing. It also disables `x=y' variable assignments, but not -v. + It's needed mainly for CGI scripts, so that source code can't be + passed in as part of the URL. + +3. dfa.[ch] have been synced with GNU grep development. This also fixes + multiple regex matching problems in multibyte locales. + +4. Updated to Automake 1.9.5. + +5. Updated to Bison 2.0. + +6. The getopt* and regex* files were synchronized with current GLIBC CVS. + See the ChangeLog for the versions and minor edits made. + +7. `configure --disable-nls' now disables just gawk's own translations. + Gawk continues to work with the locale's numeric formatting. This + includes a bug fix in handling the printf ' flag (e.g., %'d). + +8. Gawk is now multibyte aware. This means that index(), length(), + substr() and match() all work in terms of characters, not bytes. + +9. Gawk is now smarter about parsing numeric constants in corner cases. + +11. Not closing open redirections no longer causes gawk to exit non-zero. + +10. The VMS port has been updated. + +11. Changes from Andrew Schorr at the xmlgawk project to provide for + open hooks from extensions are now included. This will let the + xmlgawk extension work in the standard gawk. + +12. Updated to gettext 0.14.4. Gawk no longer includes its own copy + of the gettext `intl' library, following current GNU practice to + rely on there being an external version thereof. + +13. A regexp of the form `//' will now generate a warning that it + is not a C++ comment from --lint (awk.y). + +14. The ^ and ^= operators with an integer exponent now use Exponentiation + by Squaring. This simultaneously fixes a problem with ^= and a negative + integer exponent. + +15. length(array) now returns the number of elements in the array. This is + is a non-standard extension that will fail in POSIX mode. + +16. Carriage return characters are now ignored in program source code. + +17. Four new translations added. + +18. Various minor bugs fixed. See the ChangeLog for the details. + +Changes from 3.1.3 to 3.1.4 +--------------------------- + +1. Gawk now supports the POSIX %F format, falling back to %f if the local + system printf doesn't handle it. + +2. Gawk now supports the ' flag in printf. E.g., %'d in a locale with thousands + separators includes the thousands separator in the value, e.g. 12,345. + + This has one problem; the ' flag is next to impossible to use on the + command line, without major quoting games. Oh well, TANSTAAFL. + +3. The dfa code has been reinstated; the performance degradation was + just too awful. Sigh. (For fun, use `export GAWK_NO_DFA=1' to + see the difference.) + +4. The special case `x = x y' is now recognized in the grammar, and gawk + now uses `realloc' to append the new value to the end of the existing + one. This can speed up the common case of appending onto a string. + +5. The dfa code was upgraded with most of the fixes from grep 2.5.1, and + the regex code was upgraded with GLIBC as mid-January 2004. The regex + code is faster than it was, but still not as fast as the dfa code, so + the dfa code stays in. The getopt code was also synced to current GLIBC. + +6. Support code upgraded to Automake 1.8.5, Autoconf 2.59, and gettext 0.14.1. + +7. When --posix is in effect, sub/gsub now follow the 2001 POSIX behavior. + Yippee. This is even documented in the manual. + +8. Gawk will now recover children that have died (input pipelines, two-way + pipes), upon detecting EOF from them, thus avoiding filling + up the process table. Open file descriptors are not recovered + (unfortunately), since that could break awk semantics. See the + ChangeLog and the source code for the details. + +9. Handling of numbers like `0,1' in non-American locales ought to + work correctly now. + +10. IGNORECASE is now locale-aware for characters with values above 128. + The dfa matcher is now used for IGNORECASE matches too. + +11. Dynamic function loading is better. The documentation has been improved + and some new APIs for use by dynamic functions have been added. + +12. Gawk now has a fighting chance of working on older systems, + a la SunOS 4.1.x. + +13. Issues with multibyte support on HP-UX are now resolved. `configure' now + disables such support there, since it's not up to what gawk needs. + +14. There are now even more tests in the test suite. + +15. Various bugs fixed; see ChangeLog for the details. + +Changes from 3.1.2 to 3.1.3 +--------------------------- + +1. Gawk now follows POSIX in handling of local numeric formats for + input, output and number/string conversions. + +2. Multibyte detection improved. See README_d/README.multibyte for more + info about multibyte locales. + +3. Handling of `close' made more POSIX-compliant for POSIXLY_CORRECT, + see the documentation. + +4. The record reading code was redone, again. This time it's much + better. Really! + +5. For RS = "\n" and RS = "", gawk now only sets RT when it has changed. + This provides considerable performance improvement. + +6. `match' now sets all the subscripts in the third argument array + correctly, even if not all subexpressions matched. + +7. Updated to Automake 1.7.5. configure.in renamed configure.ac. + +8. C-style switch statements are available, but must be enabled at + compile time via `configure --enable-switch'. For 3.2 they'll be + enabled by default. Thanks to Michael Benzinger for the initial + code. + +9. %c now always prints no more than one character, whatever + precision is provided. + +10. strtonum() now works again. + +11. Gawk is now much better about scalar/array typing of global + uninitiailzed variables passed as parameters. Once the parameter + is then used one way or the other, the global var's type is + adjusted accordingly. Thanks to Stepan Kasal for the original + (considerable) changes. + +12. Dynamic function loading under Windows32 should now be possible. See + README_d/README.pcdynamic. Thanks to Patrick T.J. McPhee for the changes. + +13. Updated to gettext 0.12.1. + +14. Gawk now follows historical practice and POSIX for the return + value of `rand': It's now 0 <= N < 1. + +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 +--------------------------- + +1. Six new translations. + +2. Having more than 4 different values for OFMT and/or CONVFMT now works. + +3. The handling of dynamic regexes is now more more sane, esp. w.r.t. + the profiling code. The profiling code has been fixed in several + places. + +4. The return value of index("", "") is now 1. + +5. Gawk should no longer close fd 0 in child processes. + +6. Fixed test for strtod semantics and regenerated configure. + +7. Gawk can now be built with byacc; an accidental bison dependency was + removed. + +8. `yyerror' will no longer dump core on long source lines. + +9. Gawk now correctly queries getgroups(2) to figure out how many groups + the process has. + +10. New configure option to force use of included strftime, e.g. on + Solaris systems. See `./configure --help' for the details. Replaced + the included strftime.c with the one from textutils. + +11. OS/2 port has been updated. + +12. Multi-byte character support has been added, courtesy of IBM Japan. + +13. The `for (iggy in foo) delete foo[iggy]' -> `delete foo' optimisation + now works. + +14. Upgraded to gettext 0.11.2 and automake 1.5. + +15. Full gettext compatibility (new dcngettext function). + +16. The O'Reilly copyedits and indexing changes for the documentation have + been folded into the texinfo version of the manuals. + +17. A humongously long value for the AWKPATH environment variable will no + longer dump core. + +18. Configuration / Installation issues have been straightened out in + Makefile.am. + +Changes from 3.0.6 to 3.1.0 +--------------------------- + +1. A new PROCINFO array provides info about the process. The non-I/O /dev/xxx + files are now obsolete, and their use always generates a warning. + +2. A new `mktime' builtin function was added for creating time stamps. The + `mktime' function written in awk was removed from the user's guide. + +3. New `--gen-po' option creates GNU gettext .po files for strings marked + with a leading underscore. + +4. Gawk now completely interprets special file names internally, ignoring the + existence of real /dev/stdin, /dev/stdout files, etc. + +5. The mmap code was removed. It was a worthwhile experiment that just + didn't work out. + +6. The BINMODE variable is new; on non-UNIX systems it affects how gawk + opens files for text vs. binary. + +7. The atari port is now unsupported. + +8. Gawk no longer supports `next file' as two words. + +9. On systems that support it, gawk now sets the `close on exec' flag on all + files and pipes it opens. This makes sure that child processes run via + `system' or pipes have plenty of file descriptors available. + +10. New ports: Tandem and BeOS. The Tandem port is unsupported. + +11. If `--posix' is in effect, newlines are not allowed after ?:. + +12. Weird OFMT/CONVFMT formats no longer cause fatal errors. + +13. Diagnostics about array parameters now include the parameter's name, + not just its number. + +14. configure should now automatically add -D_SYSV3 for ISC Unix. + (This seems to have made it into the gawk 3.0.x line long ago.) + +15. It is now possible to open a two-way pipe via the `|&' operator. + See the discussion in the manual about putting `sort' into such a pipeline, + though. (NOTE! This is borrowed from ksh: it is not the same as + the same operator in csh!) + +16. The `close' function now takes an optional second string argument + that allows closing one or the other end of the two-way pipe to + a co-process. This is needed to use `sort' in a co-process, see + the doc. + +17. If TCP/IP is available, special file names beginning with `/inet' + can be used with `|&' for IPC. Thanks to Juergen Kahrs for the initial + code. + +18. With `--enable-portals' on the configure command line, gawk will also + treat file names that start with `/p/' as a 4.4 BSD type portal file, + i.e., a two-way pipe for `|&'. + +19. Unrecognized escapes, such as "\q" now always generate a warning. + +20. The LINT variable is new; it provides dynamic control over the --lint + option. + +21. Lint warnings can be made fatal by using --lint=fatal or `LINT = "fatal"'. + Use this if you're really serious about portable code. + +22. Due to an enhanced sed script, there is no longer any need to worry + about finding or using alloca. alloca.c is thus now gone. + +23. A number of lint warnings have been added. Most notably, gawk will + detect if a variable is used before assigned to. Warnings for + when a string that isn't a number gets converted to a number are + in the code but disabled; they seem to be too picky in practice. + + Also, gawk will now warn about function parameter names that shadow + global variable names. + +24. It is now possible to dynamically add builtin functions on systems + that support dlopen. This facility is not (yet) as portable or well + integrated as it might be. *** WARNING *** THIS FEATURE WILL EVOLVE! + +25. There are *many* new tests in the test suite. + +26. Profiling has been added! A separate version of gawk, named pgawk, is + built and generates a run-time execution profile. The --profile option + can be used to change the default output file. In regular gawk, this + option pretty-prints the parse tree. + +27. Gawk has been internationalized, using GNU gettext. Translations for + future distributions are most welcome. Simultaneously, gawk was switched + over to using automake. You need Automake 1.4a (from the CVS archive) + if you want to muck with the Makefile.am files. + +28. New `asort' function for sorting arrays. See the doc for details. + +29. The match function takes an optional array third argument to hold + the text matched by parenthesized sub-expressions. + +30. The bit op functions and octal and hex source code constants are on by + default, no longer a configure-time option. Recognition of non-decimal + data is now enabled at runtime with --non-decimal-data command line option. + +31. Internationalization features available at the awk level: new TEXTDOMAIN + variable and `bindtextdomain' and `dcgettext' functions. printf formats + may contain the "%2$3.5d" kind of notation for use in translations. See + the texinfo manual for details. + +32. The return value from `close' has been rationalized. Most notably, + closing something that wasn't open returns -1 but remains non-fatal. + +33. The array effeciency change from 3.0.5 was reverted; the semantics were + not right. Additionally, index values of previously stored elements + can no longer change dynamically. + +34. The new option --dump-variables dumps a list of all global variables and + their final types and values to a file you give, or to `awkvars.out'. + +35. Gawk now uses a recent version of random.c courtesy of the FreeBSD + project. + +36. The gawk source code now uses ANSI C function definitions (new style), + with ansi2knr to translate code for old compilers. + +37. `for (iggy in foo)' loops should be more robust now in the face of + adding/deleting elements in the middle; they loop over just the elements + that are present in the array when the loop starts. + +Changes from 3.0.5 to 3.0.6 +--------------------------- + +This is a bug fix release only, pending further development on 3.1.0. + +Bugs fixed and changes made: + +1. Subscripting an array with a variable that is just a number no + longer magically converts the variable into a string. + +2. Similarly, running a `for (iggy in foo)' loop where `foo' is a + function parameter now works correctly. + +3. Similarly, `i = ""; v[i] = a; if (i in v) ...' now works again. + +4. Gawk now special cases `for (iggy in foo) delete foo[iggy]' and + treats it as the moral equivalent of `delete foo'. This should be + a major efficiency win when portably deleting large arrays. + +5. VMS port brought up to date. + +Changes from 3.0.4 to 3.0.5 +--------------------------- + +This is a bug fix release only, pending further development on 3.1.0. + +Bugs Fixed: + + 1. `function foo(foo)' is now a fatal error. + + 2. Array indexing is now much more efficient: where possible, only one + copy of an index string is kept, even if used in multiple arrays. + + 3. Support was added for MacOS X and an `install-strip' target. + + 4. [s]printf formatting for `0' flag and floating point formats now + works correctly. + + 5. HP-UX large file support with GCC 2.95.1 now works. + + 6. Arguments that contain `=' but that aren't syntactically valid are + now treated as filenames, instead of as fatal errors. + + 7. `-v NF=foo' now works. + + 8. Non-ascii alphanumeric characters are now treated as such in the + right locales by regex.c. Similarly, a Latin-1 y-umlaut (decimal + value 255) in the program text no longer acts like EOF. + + 9. Array indexes are always compared as strings; fixes an obscure bug + when user input gets used for the `x in array' test. + +10. The usage message now points users to the documentation for how + to report bugs. + +11. `/=' now works after an array. + +12. `b += b += 1' now works correctly. + +13. IGNORECASE changing with calls `match' now works better. (Fix for + semi-obscure bug.) + +14. Multicharacter values for RS now generate a lint warning. + +15. The gawk open file caching is now much more efficient. + +16. Global arrays passed to functions are now managed better. In particular, + test/arynocls.awk won't crash referencing freed memory. + +17. In obscure cases, `getline var' can no longer clobber $0. + +Changes from 3.0.3 to 3.0.4 +--------------------------- + +This is a bug fix release only, pending further development on 3.1.0. + +Bugs Fixed: + + 1. A memory leak when turning a function parameter into an array was + fixed. + + 2. The non-decimal data option now works correctly. + + 3. Using an empty pair of brackets as an array subscript no longer causes + a core dump during parsing. In general, syntax errors should not + cause core dumps any more. + + 4. Standard input is no longer closed if it provides program source, + avoiding strange I/O problems. + + 5. Memory corruption during printing with `print' has been fixed. + + 6. The gsub function now correctly counts the number of matches. + + 7. A typo in doc/Makefile.in has been fixed, making installation work. + + 8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal. + + 9. Subtle problems in rebuilding $0 when fields were changed have been + fixed. + +10. `FS = FS' now correctly turns off the use of FIELDWIDTHS. + +11. Gawk now parses fields correctly when FS is a single character. + +12. It is now possible for RS to be the NUL character ("\0"). + +13. Weird problems with number conversions on MIPS and other systems + have been fixed. + +14. When parsing using FIELDWIDTHS is in effect, `split' with no third + argument will still use the value of FS. + +15. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at + compile time, thanks to Paul Eggert. + +16. Attempting to use the name of a function as a variable or array + from within the function is now caught as a fatal error, instead + of as a core dump. + +17. A bug in parsing hex escapes was fixed. + +18. A weird bug with concatenation where one expression has side effects + that changes another was fixed. + +19. printf/sprintf now behave much better for uses of the '0' and '#' flags + and with precisions and field widths. + +20. Further strangenesses with concatenation and multiple accesses of some + of the special variables was fixed. + +21. The Atari port is marked as no longer supported. + +22. Build problems on HP-UX have been fixed. + +23. Minor fixes and additional explanations added to the documentation. + +24. For RS = "", even a single leading newline is now correctly stripped. + +25. Obscure parsing problems for regex constants like /=.../ fixed, so + that a regex constant is recognized, and not the /= operator. + +26. Fixed a bug when closing a redirection that matched the current + or last FILENAME. + +27. Build problems on AIX fixed. + +Changes from 3.0.2 to 3.0.3 +--------------------------- + +The horrendous per-record memory leak introduced in 3.0.1 is gone, finally. + +The `amiga' directory is now gone; Amiga support is now entirely handled +by the POSIX support. + +Windows32 support has been added in the `pc' directory. See `README_d/README.pc' +for more info. + +The mmap changes are disabled in io.c, and will be removed entirely +in the next big release. They were an interesting experiment that just +really didn't work in practice. + +A minor memory leak that occurred when using `next' from within a +function has also been fixed. + +Problems with I/O from sub-processes via a pipe are now gone. + +Using "/dev/pid" and the other special /dev files no longer causes a core dump. + +The files regex.h, regex.c, getopt.h, getopt.c, and getopt1.c have been +merged with the versions in GNU libc. Thanks to Ulrich Drepper for his help. + +Some new undocumented features have been added. Use the source, Luke! +It is not clear yet whether these will ever be fully supported. + +Array performance should be much better for very very large arrays. "Virtual +memory required, real memory helpful." + +builtin.c:do_substr rationalized, again. + +The --re-interval option now works as advertised. + +The license text on some of the missing/* files is now generic. + +Lots more new test cases. + +Lots of other small bugs fixed, see the ChangeLog files for details. + +Changes from 3.0.1 to 3.0.2 +--------------------------- + +Gawk now uses autoconf 2.12. + +strftime now behaves correctly if passed an empty format string or if +the string formats to an empty result string. + +Several minor compilation and installation problems have been fixed. + +Minor page break issues in the user's guide have been fixed. + +Lexical errors no longer repeat ad infinitum. + +Changes from 3.0.0 to 3.0.1 +--------------------------- + +Troff source for a handy-dandy five color reference card is now provided. +Thanks to SSC for their macros. + +Gawk now behaves like Unix awk and mawk, in that newline acts as white +space for separating fields and for `split', by default. In posix mode, +only space and tab separate fields. The documentation has been updated to +reflect this. + +Tons and tons of small bugs fixed and new tests added, see the ChangeLogs. + +Lots fewer compile time warnings from gcc -Wall. Remaining ones aren't +worth fixing. + +Gawk now pays some attention to the locale settings. + +Fixes to gsub to catch several corner cases. + +The `print' statement now evaluates all expressions first, and then +prints them. This leads to less suprising behaviour if any expression has +output side effects. + +Miscellanious improvements in regex.h and regex.c. + +Gawk will now install itself as gawk-M.N.P in $(bindir), and link +`gawk' to it. This makes it easy to have multiple versions of gawk +simultaneously. It will also now install itself as `awk' in $(bindir) +if there is no `awk' there. This is in addition to installing itself as +`gawk'. This change benefits the Hurd, and possibly other systems. One +day, gawk will drop the `g', but not yet. + +`--posix' turns on interval expressions. Gawk now matches its documentation. + +`close(FILENAME)' now does something meaningful. + +Field management code in field.c majorly overhauled, several times. + +The gensub code has been fixed, several bugs are now gone. + +Gawk will use mmap for data file input if it is available. + +The printf/sprintf code has been improved. + +Minor issues in Makefile setup worked on and improved. + +builtin.c:do_substr rationalized. + +Regex matching fixed so that /+[0-9]/ now matches the leading +. + +For building on vms, the default compiler is now DEC C rather than VAX C. + +Changes from 2.15.6 to 3.0.0 +---------------------------- + +Fixed spelling of `Programming' in the copyright notice in all the files. + +New --re-interval option to turn on interval expressions. They're off +by default, except for --posix, to avoid breaking old programs. + +Passing regexp constants as parameters to user defined functions now +generates a lint warning. + +Several obscure regexp bugs fixed; alas, a small number remain. + +The manual has been thoroughly revised. It's now almost 50% bigger than +it used to be. + +The `+' modifier in printf is now reset correctly for each item. + +The do_unix variable is now named do_traditional. + +Handling of \ in sub and gsub rationalized (somewhat, see the manual for +the gory [and I do mean gory] details). + +IGNORECASE now uses ISO 8859-1 Latin-1 instead of straight ASCII. See the +source for how to revert to pure ASCII. + +--lint will now warn if an assignment occurs in a conditional context. +This may become obnoxious enough to need turning off in the future, but +"it seemed like a good idea at the time." + +%hf and %Lf are now diagnosed as invalid in printf, just like %lf. + +Gawk no longer incorrectly closes stdin in child processes used in +input pipelines. + +For integer formats, gawk now correctly treats the precision as the +number of digits to print, not the number of characters. + +gawk is now much better at catching the use of scalar values when +arrays are needed, both in function calls and the `x in y' constructs. + +New gensub function added. See the manual. + +If do_tradtional is true, octal and hex escapes in regexp constants are +treated literally. This matches historical behavior. + +yylex/nextc fixed so that even null characters can be included +in the source code. + +do_format now handles cases where a format specifier doesn't end in +a control letter. --lint reports an error. + +strftime() now uses a default time format equivalent to that of the +Unix date command, thus it can be called with no arguments. + +Gawk now catches functions that are used but not defined at parse time +instead of at run time. (This is a lint error, making it fatal could break +old code.) + +Arrays that max out are now handled correctly. + +Integer formats outside the range of an unsigned long are now detected +correctly using the SunOS 4.x cc compiler. + +--traditional option added as new preferred name for --compat, in keeping +with GCC. + +--lint-old option added, so that warnings about things not in old awk +are only given if explicitly asked for. + +`next file' has changed to one word, `nextfile'. `next file' is still +accepted but generates a lint warning. `next file' will go away eventually. + +Gawk with --lint will now notice empty source files and empty data files. + +Amiga support using the Unix emulation added. Thanks to fnf@ninemoons.com. + +test/Makefile is now "parallel-make safe". + +Gawk now uses POSIX regexps + GNU regex ops by default. --posix goes to +pure posix regexps, and --compat goes to traditional Unix regexps. However, +interval expressions, even though specified by POSIX, are turned off by +default, to avoid breaking old code. + +IGNORECASE now applies to string comparison as well as regexp operations. + +The AT&T Bell Labs Research awk fflush builtin function is now supported. +fflush is extended to flush stdout if no arg and everything if given +the null string as an argument. + +If RS is more than one character, it is treated as a regular expression +and records are delimited accordingly. The variable RT is set to the record +terminator string. This is disabled in compatibility mode. + +If FS is set to the null string (or the third arg. of split() is the null +string), splitting is done at every single character. This is disabled in +compatibility mode. + +Gawk now uses the Autoconf generated configure script, doing away with all +the config/* files and the machinery that went with them. The Makefile.in +has also changed accordingly, complete with all the standard GNU Makefile +targets. (Non-unix systems may still have their own config.h and Makefile; +see the appropriate README_d/README.* and/or subdirectory.) + +The source code has been cleaned up somewhat and the formatting improved. + +Changes from 2.15.5 to 2.15.6 +----------------------------- + +Copyrights updated on all changed files. + +test directory enhanced with four new tests. + +Gawk now generates a warning for \x without following hexadecimal digits. +In this case, it returns 'x', not \0. + +Several fixes in main.c related to variable initialization: + CONVFMT has a default value + resetup is called before initializing variables + the varinit table fixed up a bit (see the comments) + +gawk.1 updated with new BUG REPORTS section. + +A plain `print' inside a BEGIN or END now generates a lint warning (awk.y). + +Small fix in iop.c:get_a_record to avoid reading uninitialized memory. + +awk.y:yylex now does a better job of handling things if the source file +does not end in a newline. Probably there is more work to be done. + +Memory leaks fixed in awk.y, particularly in cases of duplicate function +parameters. Also, calling a function doesn't leak memory during parsing. + +Empty function bodies are now allowed (awk.y). + +Gawk now detects duplicate parameter names in functions (awk.y). + +New function `error' in msg.c added for use from awk.y. + +eval.c:r_get_lhs now checks if its argument is a parameter on the stack, +and pulls down the real variable. This catches more 'using an array as +a scalar' kinds of errors. + +main.c recovers C alloca space after parsing, this is important for +bison-based parsers. re.c recovers C alloca space after doing an research. +[Changes from Pat Rankin] + +builtin.c now declares the random() related functions based on +RANDOM_MISSING from config.h. [Suggested by Pat Rankin] + +awk.h now handles alloca correctly for HP-UX. [Kaveh Ghazi] + +regex.h and config/cray60 updated for Unicos 8.0. [Hal Peterson] + +Fixed re.c and dfa.c so that gawk no longer leaks memory when using +lots of dynamic regexps. + +Removed dependency on signed chars from `idx' variable in awk.h. Gawk +now passes its test suite if compiled with `gcc -fno-signed-char'. + +Fixed warning on close in io.c to go under lint control. Too many people +have complained about the spurious message, particularly when closing a +child pipeline early. + +Gawk now correctly handles RS = "" when input is from a terminal +(iop.c:get_a_record). + +Config file added for GNU. + +gawk 'BEGIN { exit 1 } ; END { exit }' now exits 1, as it should +(eval.c:interpret). + +sub and gsub now follow posix, \ escapes both & and \. Each \ must +be doubled initially in the program to get it into the string. +Thanks to Mike Brennan for pointing this out (builtin.c:sub_common). + +If FS is "", gawk behaves like mawk and nawk, making the whole record be $1. +Yet Another Dark Corner. Sigh (field.c:def_parse_field). + +Gawk now correctly recomputes string values for numbers if CONVFMT has +changed (awk.h:force_string, node.c:r_force_string). + +A regexp of the form `/* this looks like a comment but is not */' will +now generate a warning from --lint (awk.y). + +Gawk will no longer core dump if given an empty input file (awk.y:get_src_buf, +iop.c:optimal_bufsize). + +A printf format of the form %lf is handled correctly. The `l' generates +a lint warning (builtin.c:format_tree) [Thanks to Mark Moraes]. + +Lynxos config file added. + +`continue' outside a loop treated as `next' only in compatibility mode, +instead of by default; recent att nawk chokes on this now. `break' +outside a loop now treated as `next' in compatibility mode (eval.c). + +Bug fix in string concatenation, an arbitrary number of expressions +are allowed (eval.c). + +$1 += $2 now works correctly (eval.c). + +Changing IGNORECASE no longer resets field-splitting to FS if it was +using FIELDWIDTHS (eval.c, field.c). + +Major enhancement: $0 and NF for last record read are now preserved +into the END rule (io.c). + +Regexp fixes: + /./ now matches a newline (regex.h) + ^ and $ match beginning and end of string only, not any embedded + newlines (re.c) + regex.c should compile and work ok on 64-bit mips/sgi machines + +Changes from 2.15.4 to 2.15.5 +----------------------------- + +FUTURES file updated and re-arranged some with more rational schedule. + +Many prototypes handled better for ANSI C in protos.h. + +getopt.c updated somewhat. + +test/Makefile now removes junk directory, `bardargtest' renamed `badargs.' + +Bug fix in iop.c for RS = "". Eat trailing newlines off of record separator. + +Bug fix in Makefile.bsd44, use leading tab in actions. + +Fix in field.c:set_FS for FS == "\\" and IGNORECASE != 0. + +Config files updated or added: + cray60, DEC OSF/1 2.0, Utek, sgi405, next21, next30, atari/config.h, + sco. + +Fix in io.c for ENFILE as well as EMFILE, update decl of groupset to +include OSF/1. + +Rationalized printing as integers if numbers are outside the range of a long. +Changes to node.c:force_string and builtin.c. + +Made internal NF, NR, and FNR variables longs instead of ints. + +Add LIMITS_H_MISSING stuff to config.in and awk.h, and default defs for +INT_MAX and LONG_MAX, if no limits.h file. Add a standard decl of +the time() function for __STDC__. From ghazi@noc.rutgers.edu. + +Fix tree_eval in awk.h and r_tree_eval in eval.c to deal better with +function parameters, particularly ones that are arrays. + +Fix eval.c to print out array names of arrays used in scalar contexts. + +Fix eval.c in interpret to zero out source and sourceline initially. This +does a better job of providing source file and line number information. + +Fix to re_parse_field in field.c to not use isspace when RS = "", but rather +to explicitly look for blank and tab. + +Fix to sc_parse_field in field.c to catch the case of the FS character at the +end of a record. + +Lots of miscellanious bug fixes for memory leaks, courtesy Mark Moraes, +also fixes for arrays. + +io.c fixed to warn about lack of explicit closes if --lint. + +Updated missing/strftime.c to match posted strftime 6.2. + +Bug fix in builtin.c, in case of non-match in sub_common. + +Updated constant used for division in builtin.c:do_rand for DEC Alpha +and CRAY Y-MP. + +POSIXLY_CORRECT in the environment turns on --posix (fixed in main.c). + +Updated srandom prototype and calls in builtin.c. + +Fix awk.y to enforce posix semantics of unary +: result is numeric. + +Fix array.c to not rearrange the hash chain upon finding an index in +the array. This messed things up in cases like: + for (index1 in array) { + blah + if (index2 in array) # blew away the for + stuff + } + +Fixed spelling errors in the man page. + +Fixes in awk.y so that + gawk '' /path/to/file +will work without core dumping or finding parse errors. + +Fix main.c so that --lint will fuss about an empty program. +Yet another fix for argument parsing in the case of unrecognized options. + +Bug fix in dfa.c to not attempt to free null pointers. + +Bug fix in builtin.c to only use DEFAULT_G_PRECISION for %g or %G. + +Bug fix in field.c to achieve call by value semantics for split. + +Changes from 2.15.3 to 2.15.4 +----------------------------- + +Lots of lint fixes, and do_sprintf made mostly ANSI C compatible. + +Man page updated and edited. + +Copyrights updated. + +Arrays now grow dynamically, initially scaling up by an order of magnitude + and then doubling, up to ~ 64K. This should keep gawk's performance + graceful under heavy load. + +New `delete array' feature added. Only documented in the man page. + +Switched to dfa and regex suites from grep-2.0. These offer the ability to + move to POSIX regexps in the next release. + +Disabled GNU regex ops. + +Research awk -m option now recognized. It does nothing in gawk, since gawk + has no static limits. Only documented in the man page. + +New bionic (faster, better, stronger than before) hashing function. + +Bug fix in argument handling. `gawk -X' now notices there was no program. + Additional bug fixes to make --compat and --lint work again. + +Many changes for systems where sizeof(int) != sizeof(void *). + +Add explicit alloca(0) in io.c to recover space from C alloca. + +Fixed file descriptor leak in io.c. + +The --version option now follows the GNU coding standards and exits. + +Fixed several prototypes in protos.h. + +Several tests updated. On Solaris, warn that the out? tests will fail. + +Configuration files for SunOS with cc and Solaris 2.x added. + +Improved error messages in awk.y on gawk extensions if do_unix or do_compat. + +INSTALL file added. + +Fixed Atari Makefile and several VMS specific changes. + +Better conversion of numbers to strings on systems with broken sprintfs. + +Changes from 2.15.2 to 2.15.3 +----------------------------- + +Increased HASHSIZE to a decent number, 127 was way too small. + +FILENAME is now the null string in a BEGIN rule. + +Argument processing fixed for invalid options and missing arguments. + +This version will build on VMS. This included a fix to close all files + and pipes opened with redirections before closing stdout and stderr. + +More getpgrp() defines. + +Changes for BSD44: in io.c and Makefile.bsd44. + +All directories in the distribution are now writable. + +Separated LDFLAGS and CFLAGS in Makefile. CFLAGS can now be overridden by + user. + +Make dist now builds compressed archives ending in .gz and runs doschk. + +Amiga port. + +New getopt.c fixes Alpha OSF/1 problem. + +Make clean now removes possible test output. + +Improved algorithm for multiple adjacent string concatenations leads to + performance improvements. + +Fix nasty bug whereby command-line assignments, both with -v and at run time, + could create variables with syntactically illegal names. + +Fix obscure bug in printf with %0 flag and filling. + +Add a lint check for substr if provided length exceeds remaining characters + in string. + +Update atari support. + +PC support enhanced to include support for both DOS and OS/2. (Lots more + #ifdefs. Sigh.) + +Config files for Hitachi Unix and OSF/1, courtesy of Yoko Morishita + (morisita@sra.co.jp) + +Changes from 2.15.1 to 2.15.2 +----------------------------- + +Additions to the FUTURES file. + +Document undefined order of output when using both standard output + and /dev/stdout or any of the /dev output files that gawk emulates in + the absence of OS support. + +Clean up the distribution generation in Makefile.in: the info files are + now included, the distributed files are marked read-only and patched + distributions are now unpacked in a directory named with the patch level. + +Changes from 2.15 to 2.15.1 +--------------------------- + +Close stdout and stderr before all redirections on program exit. This allows + detection of write errors and also fixes the messages test on Solaris 2.x. + +Removed YYMAXDEPTH define in awk.y which was limiting the parser stack depth. + +Changes to config/bsd44, Makefile.bsd44 and configure to bring it into line + with the BSD4.4 release. + +Changed Makefile to use prefix, exec_prefix, bindir etc. + +make install now installs info files. + +make install now sets permissions on installed files. + +Make targets added: uninstall, distclean, mostlyclean and realclean. + +Added config.h to cleaner and clobber make targets. + +Changes to config/{hpux8x,sysv3,sysv4,ultrix41} to deal with alloca(). + +Change to getopt.h for portability. + +Added more special cases to the getpgrp() call. + +Added README.ibmrt-aos and config/ibmrt-aos. + +Changes from 2.14 to 2.15 +--------------------------- + +Command-line source can now be mixed with library functions. + +ARGIND variable tracks index in ARGV of FILENAME. + +GNU style long options in addition to short options. + +Plan 9 style special files interpreted by gawk: + /dev/pid + /dev/ppid + /dev/pgrpid + /dev/user + $1 = getuid + $2 = geteuid + $3 = getgid + $4 = getegid + $5 ... $NF = getgroups if supported + +ERRNO variable contains error string if getline or close fails. + +Very old options -a and -e have gone away. + +Inftest has been removed from the default target in test/Makefile -- the + results were too machine specific and resulted in too many false alarms. + +A README.amiga has been added. + +The "too many arguments supplied for format string" warning message is only + in effect under the lint option. + +Code improvements in dfa.c. + +Fixed all reported bugs: + + Writes are checked for failure (such as full filesystem). + + Stopped (at least some) runaway error messages. + + gsub(/^/, "x") does the right thing for $0 of 0, 1, or more length. + + close() on a command being piped to a getline now works properly. + + The input record will no longer be freed upon an explicit close() + of the input file. + + A NUL character in FS now works. + + In a substitute, \\& now means a literal backslash followed by what + was matched. + + Integer overflow of substring length in substr() is caught. + + An input record without a newline termination is handled properly. + + In io.c, check is against only EMFILE so that system file table + is not filled. + + Renamed all files with names longer than 14 characters. + + Escaped characters in regular expressions were being lost when + IGNORECASE was used. + + Long source lines were not being handled properly. + + Sourcefiles that ended in a tab but no newline were bombing. + + Patterns that could match zero characters in split() were not working + properly. + + The parsedebug option was not working. + + The grammar was being a bit too lenient, allowing some very dubious + programs to pass. + + Compilation with DEBUG defined now works. + + A variable read in with getline was not being treated as a potential + number. + + Array subscripts were not always of string type. + + +Changes from 2.13.2 to 2.14 +--------------------------- + +Updated manual! + +Added "next file" to skip efficiently to the next input file. + +Fixed potential of overflowing buffer in do_sprintf(). + +Plugged small memory leak in sub_common(). + +EOF on a redirect is now "sticky" -- it can only be cleared by close()ing + the pipe or file. + +Now works if used via a #! /bin/gawk line at the top of an executable file + when that line ends with whitespace. + +Added some checks to the grammar to catch redefinition of builtin functions. + This could eventually be the basis for an extension to allow redefining + functions, but in the mean time it's a good error catching facility. + +Negative integer exponents now work. + +Modified do_system() to make sure it had a non-null string to be passed + to system(3). Thus, system("") will flush any pending output but not go + through the overhead of forking an un-needed shell. + +A fix to floating point comparisons so that NaNs compare right on IEEE systems. + +Added code to make sure we're not opening directories for reading and such. + +Added code to do better diagnoses of weird or null file names. + +Allow continue outside of a loop, unless in strict posix mode. Lint option + will issue warning. + +New missing/strftime.c. There has been one change that affects gawk. Posix + now defines a %V conversion so the vms conversion has been changed to %v. + If this version is used with gawk -Wlint and they use %V in a call to + strftime, they'll get a warning. + +Error messages now conform to GNU standard (I hope). + +Changed comparisons to conform to the description found in the file POSIX. + This is inconsistent with the current POSIX draft, but that is broken. + Hopefully the final POSIX standard will conform to this version. + (Alas, this will have to wait for 1003.2b, which will be a revision to + the 1003.2 standard. That standard has been frozen with the broken + comparison rules.) + +The length of a string was a short and now is a size_t. + +Updated VMS help. + +Added quite a few new tests to the test suite and deleted many due to lack of + written releases. Test output is only removed if it is identical to the + "good" output. + +Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in + a BEGIN block. + +Fixed premature freeing in construct "$0 = $0". + +Removed the call to wait_any() in gawk_popen(), since on at least some systems, + if gawk's input was from a pipe, the predecessor process in the pipe was a + child of gawk and this caused a deadlock. + +Regexp can (once again) match a newline, if given explicitly. + +nextopen() makes sure file name is null terminated. + +Fixed VMS pipe simulation. Improved VMS I/O performance. + +Catch . used in variable names. + +Fixed bug in getline without redirect from a file -- it was quitting after the + first EOF, rather than trying the next file. + +Fixed bug in treatment of backslash at the end of a string -- it was bombing + rather than doing something sensible. It is not clear what this should mean, + but for now I issue a warning and take it as a literal backslash. + +Moved setting of regexp syntax to before the option parsing in main(), to + handle things like -v FS='[.,;]' + +Fixed bug when NF is set by user -- fields_arr must be expanded if necessary + and "new" fields must be initialized. + +Fixed several bugs in [g]sub() for no match found or the match is 0-length. + +Fixed bug where in gsub() a pattern anchored at the beginning would still + substitute throughout the string. + +make test does not assume that . is in PATH. + +Fixed bug when a field beyond the end of the record was requested after + $0 was altered (directly or indirectly). + +Fixed bug for assignment to field beyond end of record -- the assigned value + was not found on subsequent reference to that field. + +Fixed bug for FS a regexp and it matches at the end of a record. + +Fixed memory leak for an array local to a function. + +Fixed hanging of pipe redirection to getline + +Fixed coredump on access to $0 inside BEGIN block. + +Fixed treatment of RS = "". It now parses the fields correctly and strips + leading whitespace from a record if FS is a space. + +Fixed faking of /dev/stdin. + +Fixed problem with x += x + +Use of scalar as array and vice versa is now detected. + +IGNORECASE now obeyed for FS (even if FS is a single alphabetic character). + +Switch to GPL version 2. + +Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs. + +Renamed this file (CHANGES) to NEWS. + +Use fmod() instead of modf() and provide FMOD_MISSING #define to undo + this change. + +Correct the volatile declarations in eval.c. + +Avoid errant closing of the file descriptors for stdin, stdout and stderr. + +Be more flexible about where semi-colons can occur in programs. + +Check for write errors on all output, not just on close(). + +Eliminate the need for missing/{strtol.c,vprintf.c}. + +Use GNU getopt and eliminate missing/getopt.c. + +More "lint" checking. + + +Changes from 2.13.1 to 2.13.2 +----------------------------- + +Toward conformity with GNU standards, configure is a link to mkconf, the latter + to disappear in the next major release. + +Update to config/bsd43. + +Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2 + +sgi33.cc added for compilation using cc rather than gcc. + +Ultrix41 now propagates to config.h properly -- as part of a general + mechanism in configure for kludges -- #define anything from a config file + just gets tacked onto the end of config.h -- to be used sparingly. + +Got rid of an unnecessary and troublesome declaration of vprintf(). + +Small improvement in locality of error messages. + +Try to diagnose use of array as scalar and vice versa -- to be improved in + the future. + +Fix for last bug fix for Cray division code--sigh. + +More changes to test suite to explicitly use sh. Also get rid of + a few generated files. + +Fixed off-by-one bug in string concatenation code. + +Fix for use of array that is passed in from a previous function parameter. + Addition to test suite for above. + +A number of changes associated with changing NF and access to fields + beyond the end of the current record. + +Change to missing/memcmp.c to avoid seg. fault on zero length input. + +Updates to test suite (including some inadvertently left out of the last patch) + to invoke sh explicitly (rather than rely on #!/bin/sh) and remove some + junk files. test/chem/good updated to correspond to bug fixes. + +Changes from 2.13.0 to 2.13.1 +----------------------------- + +More configs and PORTS. + +Fixed bug wherein a simple division produced an erroneous FPE, caused by + the Cray division workaround -- that code is now #ifdef'd only for + Cray *and* fixed. + +Fixed bug in modulus implementation -- it was very close to the above + code, so I noticed it. + +Fixed portability problem with limits.h in missing.c + +Fixed portability problem with tzname and daylight -- define TZNAME_MISSING + if strftime() is missing and tzname is also. + +Better support for Latin-1 character set. + +Fixed portability problem in test Makefile. + +Updated PROBLEMS file. + +=============================== gawk-2.13 released ========================= +Changes from 2.12.42 to 2.12.43 +------------------------------- + +Typo in awk.y + +Fixed up strftime.3 and added doc. for %V. + +Changes from 2.12.41 to 2.12.42 +------------------------------- + +Fixed bug in devopen() -- if you had write permission in /dev, + it would just create /dev/stdout etc.!! + +Final (?) VMS update. + +Make NeXT use GFMT_WORKAROUND + +Fixed bug in sub_common() for substitute on zero-length match. Improved the + code a bit while I was at it. + +Fixed grammar so that $i++ parses as ($i)++ + +Put support/* back in the distribution (didn't I already do this?!) + +Changes from 2.12.40 to 2.12.41 +------------------------------- + +VMS workaround for broken %g format. + +Changes from 2.12.39 to 2.12.40 +------------------------------- + +Minor man page update. + +Fixed latent bug in redirect(). + +Changes from 2.12.38 to 2.12.39 +------------------------------- + +Updates to test suite -- remove dependence on changing gawk.1 man page. + +Changes from 2.12.37 to 2.12.38 +------------------------------- + +Fixed bug in use of *= without whitespace following. + +VMS update. + +Updates to man page. + +Option handling updates in main.c + +test/manyfiles redone and added to bigtest. + +Fixed latent (on Sun) bug in handling of save_fs. + +Changes from 2.12.36 to 2.12.37 +------------------------------- + +Update REL in Makefile-dist. Incorporate test suite into main distribution. + +Minor fix in regtest. + +Changes from 2.12.35 to 2.12.36 +------------------------------- + +Release takes on dual personality -- 2.12.36 and 2.13.0 -- any further + patches before public release won't count for 2.13, although they will for + 2.12 -- be careful to avoid confusion! patchlevel.h will be the last thing + to change. + +Cray updates to deal with arithmetic problems. + +Minor test suite updates. + +Fixed latent bug in parser (freeing memory). + +Changes from 2.12.34 to 2.12.35 +------------------------------- + +VMS updates. + +Flush stdout at top of err() and stderr at bottom. + +Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and + doing the force_number(). + +Included the missing manyfiles.awk and a new test to catch the above bug which + I am amazed wasn't already caught by the test suite -- it's pretty basic. + +Changes from 2.12.33 to 2.12.34 +------------------------------- + +Atari updates -- including bug fix. + +More VMS updates -- also nuke vms/version.com. + +Fixed bug in handling of large numbers of redirections -- it was probably never + tested before (blush!). + +Minor rearrangement of code in r_force_number(). + +Made chem and regtest tests a bit more portable (Ultrix again). + +Added another test -- manyfiles -- not invoked under any other test -- very Unix + specific. + +Rough beginning of LIMITATIONS file -- need my AWK book to complete it. + +Changes from 2.12.32 to 2.12.33 +------------------------------- + +Expunge debug.? from various files. + +Remove vestiges of Floor and Ceil kludge. + +Special case integer division -- mainly for Cray, but maybe someone else + will benefit. + +Workaround for iop_close closing an output pipe descriptor on Cray -- + not conditional since I think it may fix a bug on SGI as well and I don't + think it can hurt elsewhere. + +Fixed memory leak in assoc_lookup(). + +Small cleanup in test suite. + +Changes from 2.12.31 to 2.12.32 +------------------------------- + +Nuked debug.c and debugging flag -- there are better ways. + +Nuked version.sh and version.c in subdirectories. + +Fixed bug in handling of IGNORECASE. + +Fixed bug when FIELDWIDTHS was set via -v option. + +Fixed (obscure) bug when $0 is assigned a numerical value. + +Fixed so that escape sequences in command-line assignments work (as it already + said in the comment). + +Added a few cases to test suite. + +Moved support/* back into distribution. + +VMS updates. + +Changes from 2.12.30 to 2.12.31 +------------------------------- + +Cosmetic manual page changes. + +Updated sunos3 config. + +Small changes in test suite including renaming files over 14 chars. in length. + +Changes from 2.12.29 to 2.12.30 +------------------------------- + +Bug fix for many string concatenations in a row. + +Changes from 2.12.28 to 2.12.29 +------------------------------- + +Minor cleanup in awk.y + +Minor VMS update. + +Minor atari update. + +Changes from 2.12.27 to 2.12.28 +------------------------------- + +Got rid of the debugging goop in eval.c -- there are better ways. + +Sequent port. + +VMS changes left out of the last patch -- sigh! config/vms.h renamed + to config/vms-conf.h. + +Fixed missing/tzset.c + +Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than + sprintf("%g") and caused all sorts of portability headaches. + +Tuned get_field() -- it was unnecessarily parsing the whole record on reference + to $0. + +Tuned interpret() a bit in the rule_node loop. + +In r_force_number(), worked around bug in Uglix strtod() and got rid of + ugly do{}while(0) at Michal's urging. + +Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster. + +Got rid of assign_number() -- contrary to comment, it was no faster than + just making a new node and freeing the old one. + +Replaced make_number() and tmp_number() with macros that call mk_number(). + +Changed freenode() and newnode() into macros -- the latter is getnode() + which calls more_nodes() as necessary. + +Changes from 2.12.26 to 2.12.27 +------------------------------- + +Completion of Cray 2 port (includes a kludge for floor() and ceil() + that may go or be changed -- I think that it may just be working around + a bug in chem that is being tweaked on the Cray). + +More VMS updates. + +Moved kludge over yacc's insertion of malloc and realloc declarations + from protos.h to the Makefile. + +Added a lisp interpreter in awk to the test suite. (Invoked under + bigtest.) + +Cleanup in r_force_number() -- I had never gotten around to a thorough + profile of the cache code and it turns out to be not worth it. + +Performance boost -- do lazy force_number()'ing for fields etc. i.e. + flag them (MAYBE_NUM) and call force_number only as necessary. + +Changes from 2.12.25 to 2.12.26 +------------------------------- + +Rework of regexp stuff so that dynamic regexps have reasonable + performance -- string used for compiled regexp is stored and + compared to new string -- if same, no recompilation is necessary. + Also, very dynamic regexps cause dfa-based searching to be turned + off. + +Code in dev_open() is back to returning fileno(std*) rather than + dup()ing it. This will be documented. Sorry for the run-around + on this. + +Minor atari updates. + +Minor vms update. + +Missing file from MSDOS port. + +Added warning (under lint) if third arg. of [g]sub is a constant and + handle it properly in the code (i.e. return how many matches). + +Changes from 2.12.24 to 2.12.25 +------------------------------- + +MSDOS port. + +Non-consequential changes to regexp variables in preparation for + a more serious change to fix a serious performance problem. + +Changes from 2.12.23 to 2.12.24 +------------------------------- + +Fixed bug in output flushing introduced a few patches back. This caused + serious performance losses. + +Changes from 2.12.22 to 2.12.23 +------------------------------- + +Accidentally left config/cray2-60 out of last patch. + +Added some missing dependencies to Makefile. + +Cleaned up mkconf a bit; made yacc the default parser (no alloca needed, + right?); added rs6000 hook for signed characters. + +Made regex.c with NO_ALLOCA undefined work. + +Fixed bug in dfa.c for systems where free(NULL) bombs. + +Deleted a few cant_happen()'s that *really* can't hapen. + +Changes from 2.12.21 to 2.12.22 +------------------------------- + +Added to config stuff the ability to choose YACC rather than bison. + +Fixed CHAR_UNSIGNED in config.h-dist. + +Second arg. of strtod() is char ** rather than const char **. + +stackb is now initially malloc()'ed since it may be realloc()'ed. + +VMS updates. + +Added SIZE_T_MISSING to config stuff and a default typedef to awk.h. + (Maybe it is not needed on any current systems??) + +re_compile_pattern()'s size is now size_t unconditionally. + +Changes from 2.12.20 to 2.12.21 +------------------------------- + +Corrected missing/gcvt.c. + +Got rid of use of dup2() and thus DUP_MISSING. + +Updated config/sgi33. + +Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in + POSIX 1003.2 for relational comparisons. + +Small updates to test suite. + +Changes from 2.12.19 to 2.12.20 +------------------------------- + +Sloppy, sloppy, sloppy!! I didn't even try to compile the last two + patches. This one fixes goofs in regex.c. + +Changes from 2.12.18 to 2.12.19 +------------------------------- + +Cleanup of last patch. + +Changes from 2.12.17 to 2.12.18 +------------------------------- + +Makefile renamed to Makefile-dist. + +Added alloca() configuration to mkconf. (A bit kludgey.) Just + add a single line containing ALLOCA_PW, ALLOCA_S or ALLOCA_C + to the appropriate config file to have Makefile-dist edited + accordingly. + +Reorganized output flushing to correspond with new semantics of + devopen() on "/dev/std*" etc. + +Fixed rest of last goof!! + +Save and restore errno in do_pathopen(). + +Miscellaneous atari updates. + +Get rid of the trailing comma in the NODETYPE definition (Cray + compiler won't take it). + +Try to make the use of `const' consistent since Cray compiler is + fussy about that. See the changes to `basename' and `myname'. + +It turns out that, according to section 3.8.3 (Macro Replacement) + of the ANSI Standard: ``If there are sequences of preprocessing + tokens within the list of arguments that would otherwise act as + preprocessing directives, the behavior is undefined.'' That means + that you cannot count on the behavior of the declaration of + re_compile_pattern in awk.h, and indeed the Cray compiler chokes on it. + +Replaced alloca with malloc/realloc/free in regex.c. It was much simpler + than expected. (Inside NO_ALLOCA for now -- by default no alloca.) + +Added a configuration file, config/cray60, for Unicos-6.0. + +Changes from 2.12.16 to 2.12.17 +------------------------------- + +Ooops. Goofed signal use in last patch. + +Changes from 2.12.15 to 2.12.16 +------------------------------- + +RENAMED *_dir to just * (e.g. missing_dir). + +Numerous VMS changes. + +Proper inclusion of atari and vms files. + +Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE + -- please comment on these! + +Moved pathopen() to io.c (sigh). + +Put local directory ahead in default AWKPATH. + +Added facility in mkconf to echo comments on stdout: lines beginning + with "#echo " will have the remainder of the line echoed when mkconf is run. + Any lines starting with "#" will otherwise be treated as comments. The + intent is to be able to say: + "#echo Make sure you uncomment alloca.c in the Makefile" + or the like. + +Prototype fix for V.4 + +Fixed version_string to not print leading @(#). + +Fixed FIELDWIDTHS to work with strict (turned out to be easy). + +Fixed conf for V.2. + +Changed semantics of /dev/fd/n to be like on real /dev/fd. + +Several configuration and updates in the makefile. + +Updated manpage. + +Include tzset.c and system.c from missing_dir that were accidently left out of + the last patch. + +Fixed bug in cmdline variable assignment -- arg was getting freed(!) in + call to variable. + +Backed out of parse-time constant folding for now, until I can figure out + how to do it right. + +Fixed devopen() so that getline <"-" works. + +Changes from 2.12.14 to 2.12.15 +------------------------------- + +Changed config/* to a condensed form that can be used with mkconf to generate + a config.h from config.h-dist -- much easier to maintain. Please check + carefully against what you had before for a particular system and report + any problems. vms.h remains separate since the stuff at the bottom + didn't quite fit the mkconf model -- hopefully cleared up later. + +Fixed bug in grammar -- didn't allow function definition to be separated from + other rules by a semi-colon. + +VMS fix to #includes in missing.c -- should we just be including awk.h? + +Updated README for texinfo.tex version. + +Updating of copyright in all .[chy] files. + +Added but commented out Michal's fix to strftime. + +Added tzset() emulation based on Rick Adams' code. Added TZSET_MISSING to + config.h-dist. + +Added strftime.3 man page for missing_dir + +More posix: func, **, **= don't work in -W posix + +More lint: ^, ^= not in old awk + +gawk.1: removed ref to -DNO_DEV_FD, other minor updating. + +Style change: pushbak becomes pushback() in yylex(). + +Changes from 2.12.13 to 2.12.14 +------------------------------- + +Better (?) organization of awk.h -- attempt to keep all system dependencies + near the top and move some of the non-general things out of the config.h + files. + +Change to handling of SYSTEM_MISSING. + +Small change to ultrix config. + +Do "/dev/fd/*" etc. checking at runtime. + +First pass at VMS port. + +Improvements to error handling (when lexeme spans buffers). + +Fixed backslash handling -- why didn't I notice this sooner? + +Added programs from book to test suite and new target "bigtest" to Makefile. + +Changes from 2.12.12 to 2.12.13 +------------------------------- + +Recognize OFS and ORS specially so that OFS = 9 works without efficiency hit. + Took advantage of opportunity to tune do_print*() for about 10% win on a + print with 5 args (i.e. small but significant). + +Somewhat pervasive changes to reconcile CONVFMT vs. OFMT. + +Better initialization of builtin vars. + +Make config/* consistent wrt STRTOL_MISSING. + +Small portability improvement to alloca.s + +Improvements to lint code in awk.y + +Replaced strtol() with a better one by Chris Torek. + +Changes from 2.12.11 to 2.12.12 +------------------------------- + +Added PORTS file to record successful ports. + +Added #define const to nothing if not STDC and added const to strtod() header. + +Added * to printf capabilities and partially implemented ' ' and '+' (has an + effect for %d only, silently ignored for other formats). I'm afraid that's + as far as I want to go before I look at a complete replacement for + do_sprintf(). + +Added warning for /regexp/ on LHS of MATCHOP. + +Changes from 2.12.10 to 2.12.11 +------------------------------- + +Small Makefile improvements. + +Some remaining nits from the NeXT port. + +Got rid of bcopy() define in awk.h -- not needed anymore (??) + +Changed private in builtin.c -- it is special on Sequent. + +Added subset implementation of strtol() and STRTOL_MISSING. + +A little bit of cleanup in debug.c, dfa.c. + +Changes from 2.12.9 to 2.12.10 +------------------------------ + +Redid compatability checking and checking for # of args. + +Removed all references to variables[] from outside awk.y, in preparation + for a more abstract interface to the symbol table. + +Got rid of a remaining use of bcopy() in regex.c. + +Changes from 2.12.8 to 2.12.9 +----------------------------- + +Portability improvements for atari, next and decstation. + +Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly. + +Manpage updates. + +Moved support from src release to doc release. + +Updated FUTURES file. + +Added some "lint" warnings. + +Changes from 2.12.7 to 2.12.8 +----------------------------- + +Changed time() to systime(). + +Changed warning() in snode() to fatal(). + +strftime() now defaults second arg. to current time. + +Changes from 2.12.6 to 2.12.7 +----------------------------- + +Fixed bug in sub_common() involving inadequate allocation of a buffer. + +Added some missing files to the Makefile. + +Changes from 2.12.5 to 2.12.6 +----------------------------- + +Fixed bug wherein non-redirected getline could call iop_close() just + prior to a call from do_input(). + +Fixed bug in handling of /dev/stdout and /dev/stderr. + +Changes from 2.12.4 to 2.12.5 +----------------------------- + +Updated README and support directory. + +Changes from 2.12.3 to 2.12.4 +----------------------------- + +Updated CHANGES and TODO (should have been done in previous 2 patches). + +Changes from 2.12.2 to 2.12.3 +----------------------------- + +Brought regex.c and alloca.s into line with current FSF versions. + +Changes from 2.12.1 to 2.12.2 +----------------------------- + +Portability improvements; mostly moving system prototypes out of awk.h + +Introduction of strftime. + +Use of CONVFMT. + +Changes from 2.12 to 2.12.1 +----------------------------- + +Consolidated treatment of command-line assignments (thus correcting the +-v treatment). + +Rationalized builtin-variable handling into a table-driven process, thus +simplifying variable() and eliminating spc_var(). + +Fixed bug in handling of command-line source that ended in a newline. + +Simplified install() and lookup(). + +Did away with double-mallocing of identifiers and now free second and later +instances of a name, after the first gets installed into the symbol table. + +Treat IGNORECASE specially, simplifying a lot of code, and allowing +checking against strict conformance only on setting it, rather than on each +pattern match. + +Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was +added). + +Fixed bug where $0 was not being marked as valid, even after it was rebuilt. +This caused mangling of $0. + + +Changes from 2.11.1 to 2.12 +----------------------------- + +Makefile: + +Portability improvements in Makefile. +Move configuration stuff into config.h + +FSF files: + +Synchronized alloca.[cs] and regex.[ch] with FSF. + +array.c: + +Rationalized hash routines into one with a different algorithm. +delete() now works if the array is a local variable. +Changed interface of assoc_next() and avoided dereferencing past the end of the + array. + +awk.h: + +Merged non-prototype and prototype declarations in awk.h. +Expanded tree_eval #define to short-circuit more calls of r_tree_eval(). + +awk.y: + +Delinted some of the code in the grammar. +Fixed and improved some of the error message printing. +Changed to accomodate unlimited length source lines. +Line continuation now works as advertised. +Source lines can be arbitrarily long. +Refined grammar hacks so that /= assignment works. Regular expressions + starting with /= are recognized at the beginning of a line, after && or || + and after ~ or !~. More contexts can be added if necessary. +Fixed IGNORECASE (multiple scans for backslash). +Condensed expression_lists in array references. +Detect and warn for correct # args in builtin functions -- call most of them + with a fixed number (i.e. fill in defaults at parse-time rather than at + run-time). +Load ENVIRON only if it is referenced (detected at parse-time). +Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time. +Fold constant expressions at parse time. +Do make_regexp() on third arg. of split() at parse tiem if it is a constant. + +builtin.c: + +srand() returns 0 the first time called. +Replaced alloca() with malloc() in do_sprintf(). +Fixed setting of RSTART and RLENGTH in do_match(). +Got rid of get_{one,two,three} and allowance for variable # of args. at + run-time -- this is now done at parse-time. +Fixed latent bug in [g]sub whereby changes to $0 would never get made. +Rewrote much of sub_common() for simplicity and performance. +Added ctime() and time() builtin functions (unless -DSTRICT). ctime() returns + a time string like the C function, given the number of seconds since the epoch + and time() returns the current time in seconds. +do_sprintf() now checks for mismatch between format string and number of + arguments supplied. + +dfa.c + +This is borrowed (almost unmodified) from GNU grep to provide faster searches. + +eval.c + +Node_var, Node_var_array and Node_param_list handled from macro rather + than in r_tree_eval(). +Changed cmp_nodes() to not do a force_number() -- this, combined with a + force_number() on ARGV[] and ENVIRON[] brings it into line with other awks +Greatly simplified cmp_nodes(). +Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs(). +All adjacent string concatenations now done at once. + +field.c + +Added support for FIELDWIDTHS. +Fixed bug in get_field() whereby changes to a field were not always + properly reflected in $0. +Reordered tests in parse_field() so that reference off the end of the buffer + doesn't happen. +set_FS() now sets *parse_field i.e. routine to call depending on type of FS. +It also does make_regexp() for FS if needed. get_field() passes FS_regexp + to re_parse_field(), as does do_split(). +Changes to set_field() and set_record() to avoid malloc'ing and free'ing the + field nodes repeatedly. The fields now just point into $0 unless they are + assigned to another variable or changed. force_number() on the field is + *only* done when the field is needed. + +gawk.1 + +Fixed troff formatting problem on .TP lines. + +io.c + +Moved some code out into iop.c. +Output from pipes and system() calls is properly synchronized. +Status from pipe close properly returned. +Bug in getline with no redirect fixed. + +iop.c + +This file contains a totally revamped get_a_record and associated code. + +main.c + +Command line programs no longer use a temporary file. +Therefore, tmpnam() no longer required. +Deprecated -a and -e options -- they will go away in the next release, + but for now they cause a warning. +Moved -C, -V, -c options to -W ala posix. +Added -W posix option: throw out \x +Added -W lint option. + + +node.c + +force_number() now allows pure numerics to have leading whitespace. +Added make_string facility to optimize case of adding an already malloc'd + string. +Cleaned up and simplified do_deref(). +Fixed bug in handling of stref==255 in do_deref(). + +re.c + +contains the interface to regexp code + +Changes from 2.11.1 to FSF version of same +------------------------------------------ +Thu Jan 4 14:19:30 1990 Jim Kingdon (kingdon at albert) + + * Makefile (YACC): Add -y to bison part. + + * missing.c: Add #include . + +Sun Dec 24 16:16:05 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * Makefile: Add (commented out) default defines for Sony News. + + * awk.h: Move declaration of vprintf so it will compile when + -DVPRINTF_MISSING is defined. + +Mon Nov 13 18:54:08 1989 Robert J. Chassell (bob at apple-gunkies.ai.mit.edu) + + * gawk.texinfo: changed @-commands that are not part of the + standard, currently released texinfmt.el to those that are. + Otherwise, only people with the as-yet unreleased makeinfo.c can + format this file. + +Changes from 2.11beta to 2.11.1 (production) +-------------------------------------------- + +Went from "beta" to production status!!! + +Now flushes stdout before closing pipes or redirected files to +synchronize output. + +MS-DOS changes added in. + +Signal handler return type parameterized in Makefile and awk.h and +some lint removed. debug.c cleaned up. + +Fixed FS splitting to never match null strings, per book. + +Correction to the manual's description of FS. + +Some compilers break on char *foo = "string" + 4 so fixed version.sh and +main.c. + +Changes from 2.10beta to 2.11beta +--------------------------------- + +This release fixes all reported bugs that we could reproduce. Probably +some of the changes are not documented here. + +The next release will probably not be a beta release! + +The most important change is the addition of the -nostalgia option. :-) + +The documentation has been improved and brought up-to-date. + +There has been a lot of general cleaning up of the code that is not otherwise +documented here. There has been a movement toward using standard-conforming +library routines and providing them (in missing.d) for systems lacking them. +Improved (hopefully) configuration through Makfile modifications and missing.c. +In particular, straightened out confusion over vprintf #defines, declarations +etc. + +Deleted RCS log comments from source, to reduce source size by about one third. +Most of them were horribly out-of-date, anyway. + +Renamed source files to reflect (for the most part) their contents. + +More and improved error messages. Cleanup and fixes to yyerror(). +String constants are not altered in input buffer, so error messages come out +better. Fixed usage message. Make use of ANSI C strerror() function +(provided). + +Plugged many more memory leaks. The memory consumption is now quite +reasonable over a wide range of programs. + +Uses volatile declaration if STDC > 0 to avoid problems due to longjmp. + +New -a and -e options to use awk or egrep style regexps, respectively, +since POSIX says awk should use egrep regexps. Default is -a. + +Added -v option for setting variables before the first file is encountered. +Version information now uses -V and copyleft uses -C. + +Added a patchlevel.h file and its use for -V and -C. + +Append_right() optimized for major improvement to programs with a *lot* +of statements. + +Operator precedence has been corrected to match draft Posix. + +Tightened up grammar for builtin functions so that only length +may be called without arguments or parentheses. + +/regex/ is now a normal expression that can appear in any expression +context. + +Allow /= to begin a regexp. Allow ..[../..].. in a regexp. + +Allow empty compound statements ({}). + +Made return and next illegal outside a function and in BEGIN/END respectively. + +Division by zero is now illegal and causes a fatal error. + +Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1. + +Fixed do_sqrt, do_log, and do_exp to do argument/return checking and +print an error message, per the manual. + +Fixed main to catch SIGSEGV to get source and data file line numbers. + +Fixed yyerror to print the ^ at the beginning of the bad token, not the end. + +Fix to substr() builtin: it was failing if the arguments +weren't already strings. + +Added new node value flag NUMERIC to indicate that a variable is +purely a number as opposed to type NUM which indicates that +the node's numeric value is valid. This is set in make_number(), +tmp_number and r_force_number() when appropriate and used in +cmp_nodes(). This fixed a bug in comparison of variables that had +numeric prefixes. The new code uses strtod() and eliminates is_a_number(). +A simple strtod() is provided for systems lacking one. It does no +overflow checking, so could be improved. + +Simplification and efficiency improvement in force_string. + +Added performance tweak in r_force_number(). + +Fixed a bug with nested loops and break/continue in functions. + +Fixed inconsistency in handling of empty fields when $0 has to be rebuilt. +Happens to simplify rebuild_record(). + +Cleaned up the code associated with opening a pipe for reading. Gawk +now has its own popen routine (gawk_popen) that allocates an IOBUF +and keeps track of the pid of the child process. gawk_pclose +marks the appropriate child as defunct in the right struct redirect. + +Cleaned up and fixed close_redir(). + +Fixed an obscure bug to do with redirection. Intermingled ">" and ">>" +redirects did not output in a predictable order. + +Improved handling of output buffering: now all print[f]s redirected to a tty +or pipe are flushed immediately and non-redirected output to a tty is flushed +before the next input record is read. + +Fixed a bug in get_a_record() where bcopy() could have copied over +a random pointer. + +Fixed a bug when RS="" and records separated by multiple blank lines. + +Got rid of SLOWIO code which was out-of-date anyway. + +Fix in get_field() for case where $0 is changed and then $(n) are +changed and then $0 is used. + +Fixed infinite loop on failure to open file for reading from getline. +Now handles redirect file open failures properly. + +Filenames such as /dev/stdin now allowed on the command line as well as +in redirects. + +Fixed so that gawk '$1' where $1 is a zero tests false. + +Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1', +for example. + +The return from a user-defined function now defaults to the Null node. +This fixes a core-dump-causing bug when the return value of a function +is used and that function returns no value. + +Now catches floating point exceptions to avoid core dumps. + +Bug fix for deleting elements of an array -- under some conditions, it was +deleting more than one element at a time. + +Fix in AWKPATH code for running off the end of the string. + +Fixed handling of precision in *printf calls. %0.2d now works properly, +as does %c. [s]printf now recognizes %i and %X. + +Fixed a bug in printing of very large (>240) strings. + +Cleaned up erroneous behaviour for RS == "". + +Added IGNORECASE support to index(). + +Simplified and fixed newnode/freenode. + +Fixed reference to $(anything) in a BEGIN block. + +Eliminated use of USG rand48(). + +Bug fix in force_string for machines with 16-bit ints. + +Replaced use of mktemp() with tmpnam() and provided a partial implementation of +the latter for systems that don't have it. + +Added a portability check for includes in io.c. + +Minor portability fix in alloc.c plus addition of xmalloc(). + +Portability fix: on UMAX4.2, st_blksize is zero for a pipe, thus breaking +iop_alloc() -- fixed. + +Workaround for compiler bug on Sun386i in do_sprintf. + +More and improved prototypes in awk.h. + +Consolidated C escape parsing code into one place. + +strict flag is now turned on only when invoked with compatability option. +It now applies to fewer things. + +Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *). +Hopefully this is right for the systems that use this code (I don't). + +Support for pipes under MSDOS added. diff -Nru gawk-3.1.8+dfsg/POSIX.STD gawk-4.0.1+dfsg/POSIX.STD --- gawk-3.1.8+dfsg/POSIX.STD 2007-10-22 07:05:31.000000000 +0000 +++ gawk-4.0.1+dfsg/POSIX.STD 2011-03-31 20:38:25.000000000 +0000 @@ -1,182 +1,43 @@ - Copyright (C) 1992, 1995, 1998, 2001, 2006, 2007 + Copyright (C) 1992, 1995, 1998, 2001, 2006, 2007, 2010, 2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. -------------------------------------------------------------------------- -Mon May 7 14:38:32 IDT 2007 +Thu Mar 31 22:31:57 IST 2011 ============================ +This file documents several things related to the 2008 POSIX standard +that I noted after reviewing it. -Thanks to Andrew Schorr for some of the wording here. +1. POSIX leaves undefined what happens for something like - -The Open Group awk specification says that a string value shall -be converted to a numeric value using the ISO C standard atof() -function. The awk spec is here: - - http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html - -And the ISO C standard says that atof() shall work the same way -as strtod(), and strtod() must recognize the IEEE special values -for NaN (not-a-number) and Infinity. - - -As a result, more than one gawk user has come to the conclusion that -gawk is not standard compliant since it does not support converting -these special values. - -Similar reasoning has led other users to conclude that gawk must also -support input data in the format of C99-style hexadecimal floating point -numbers. - -I, Arnold Robbins, the gawk maintainer, feel that while these interpretations -of the standard can be made, they are _unintended_ side effects of the -change in the POSIX standard to refer to the ISO C99 standard everywhere. - -With resepct to hexadecimal floating point, historically, AWK has always -supported the input of only decimal numbers. Adding such a facility is -likely to break many programs, very badly, and is a very big departure -from historical practice. - -With respect to "NaN" and "Inf" values, many people point out that Unix -awk and mawk "support the standard" and print such values in their output. -This is _accidental_ support, since these programs are relying on the -system library version of strtod/atof to do the work. If compiled on a -system without such library support, those programs do NOT support the -special IEEE values. - -These special interpretations introduce a large departure from existing -practice: - - # Thanks to Brian Kernighan for this great example - $ nawk 'BEGIN { print "Nancy Reagan" + 0 }' - nan - -This is just plain wrong. String values with no leading digits must -continue to convert to numeric zero. - -The POSIX people have been asked to clarify these issues, and not recently, -but have not, to my knowledge, done so. Further discussion is provided -in the node "POSIX Floating Point Problems" in the gawk manual. - ----------- Stuff below this line is of historical interest only ---------- -March 2001: - -It looks like the revised 1003.2 standard will actually follow the -rules given below. Hallelujah! - -October 1998: - -The 1003.2 work has been at a stand-still for ages. Who knows if or -when a new revision will actually happen... - -August 1995: - -Although the published 1003.2 standard contained the incorrect -comparison rules of 11.2 draft as described below, no actual implementation -of awk (that I know of) actually used those rules. - -A revision of the 1003.2 standard is in progress, and in the May 1995 -draft, the rules were fixed (based on my submissions for interpretation -requests) to match the description given below. Thus, the next version -of the standard will have a correct description of the comparison -rules. - -June 1992: - -Right now, the numeric vs. string comparisons are screwed up in draft -11.2. What prompted me to check it out was the note in gnu.bug.utils -which observed that gawk was doing the comparison $1 == "000" -numerically. I think that we can agree that intuitively, this should -be done as a string comparison. Version 2.13.2 of gawk follows the -current POSIX draft. Following is how I (now) think this -stuff should be done. - -1. A numeric literal or the result of a numeric operation has the NUMERIC - attribute. - -2. A string literal or the result of a string operation has the STRING - attribute. - -3. Fields, getline input, FILENAME, ARGV elements, ENVIRON elements and the - elements of an array created by split() that are numeric strings - have the STRNUM attribute. Otherwise, they have the STRING attribute. - Uninitialized variables also have the STRNUM attribute. - -4. Attributes propagate across assignments, but are not changed by - any use. (Although a use may cause the entity to acquire an additional - value such that it has both a numeric and string value -- this leaves the - attribute unchanged.) - -When two operands are compared, either string comparison or numeric comparison -may be used, depending on the attributes of the operands, according to the -following (symmetric) matrix: - - +---------------------------------------------- - | STRING NUMERIC STRNUM ---------+---------------------------------------------- - | -STRING | string string string - | -NUMERIC | string numeric numeric - | -STRNUM | string numeric numeric ---------+---------------------------------------------- - -So, the following program should print all OKs. - -echo '0e2 0a 0 0b -0e2 0a 0 0b' | -$AWK ' -NR == 1 { - num = 0 - str = "0e2" - - print ++test ": " ( (str == "0e2") ? "OK" : "OOPS" ) - print ++test ": " ( ("0e2" != 0) ? "OK" : "OOPS" ) - print ++test ": " ( ("0" != $2) ? "OK" : "OOPS" ) - print ++test ": " ( ("0e2" == $1) ? "OK" : "OOPS" ) - - print ++test ": " ( (0 == "0") ? "OK" : "OOPS" ) - print ++test ": " ( (0 == num) ? "OK" : "OOPS" ) - print ++test ": " ( (0 != $2) ? "OK" : "OOPS" ) - print ++test ": " ( (0 == $1) ? "OK" : "OOPS" ) - - print ++test ": " ( ($1 != "0") ? "OK" : "OOPS" ) - print ++test ": " ( ($1 == num) ? "OK" : "OOPS" ) - print ++test ": " ( ($2 != 0) ? "OK" : "OOPS" ) - print ++test ": " ( ($2 != $1) ? "OK" : "OOPS" ) - print ++test ": " ( ($3 == 0) ? "OK" : "OOPS" ) - print ++test ": " ( ($3 == $1) ? "OK" : "OOPS" ) - print ++test ": " ( ($2 != $4) ? "OK" : "OOPS" ) # 15 -} -{ - a = "+2" - b = 2 - if (NR % 2) - c = a + b - print ++test ": " ( (a != b) ? "OK" : "OOPS" ) # 16 and 22 - - d = "2a" - b = 2 - if (NR % 2) - c = d + b - print ++test ": " ( (d != b) ? "OK" : "OOPS" ) - - print ++test ": " ( (d + 0 == b) ? "OK" : "OOPS" ) - - e = "2" - print ++test ": " ( (e == b "") ? "OK" : "OOPS" ) - - a = "2.13" - print ++test ": " ( (a == 2.13) ? "OK" : "OOPS" ) - - a = "2.130000" - print ++test ": " ( (a != 2.13) ? "OK" : "OOPS" ) - - if (NR == 2) { - CONVFMT = "%.6f" - print ++test ": " ( (a == 2.13) ? "OK" : "OOPS" ) - } -}' + awk '{ print ; exit }' if=42 /etc/passwd + + Mawk diagnoses this. Gawk and BWK awk do not. This doesn't seem to be + worth the effort to add the code, but at least I'm aware of it. + +2. The 2001-2004 standards accidentally required support for hexadecimal + floating point constants and for Infinity and Not-A-Number (NaN) values. + + The 2008 standard now explicitly allows, but does not require, such + support. + + More discussion is provided in the node `POSIX Floating Point Problems' + in gawk.texi. + +3. String comparison with <, <= etc is supposed to take the locale's collating + sequence into account. By default gawk doesn't do this. Rather, gawk + will do this only if --posix is in effect. + +The following things aren't described by POSIX but ought to be: + +1. The value of $0 in an END rule + +2. The return value of a function that either does return with no value + or that falls off the end of the function body. + +3. What happens with substr() if start is <= 0, or greater than the length + of the string, or if length is <= 0. + +4. Whether "next" can be invoked from a function body. diff -Nru gawk-3.1.8+dfsg/README gawk-4.0.1+dfsg/README --- gawk-3.1.8+dfsg/README 2010-04-20 08:25:57.000000000 +0000 +++ gawk-4.0.1+dfsg/README 2012-03-28 19:47:53.000000000 +0000 @@ -1,4 +1,5 @@ - Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2012 + Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -6,9 +7,9 @@ README: -This is GNU Awk 3.1.8. It is upwardly compatible with the Bell Labs -research version of awk. It is almost completely compliant with the -2004 POSIX 1003.1 standard for awk. (See the note below about POSIX.) +This is GNU Awk 4.0.1. It is upwardly compatible with Brian Kernighan's +version of Unix awk. It is almost completely compliant with the +2008 POSIX 1003.1 standard for awk. (See the note below about POSIX.) This is a bug fix release. See NEWS and ChangeLog for details. @@ -18,7 +19,7 @@ Read the file POSIX.STD for a discussion of issues where the standard says one thing but gawk does something different. -To format the documentation with TeX, use at least version 2000-10-27.17 +To format the documentation with TeX, use at least version 2010-12-23.17 of texinfo.tex. There is a usable copy of texinfo.tex in the doc directory. INSTALLATION: @@ -34,12 +35,8 @@ modifying awkgram.y without bison or yacc will be difficult, at best. You might want to get a copy of bison from the FSF too.) -If you have a Windows32, MS-DOS or OS/2 system, use the stuff in the `pc' -directory. Similarly, there is a separate directory for VMS and for -some other operating systems. - -Ports for the Atari and old Tandem systems are supplied, but they are -unsupported. Thus, their code appears in the `unsupported' directory. +If you have an MS-DOS, MS-Windows, or OS/2 system, use the stuff in the `pc' +directory. Similarly, there is a separate directory for VMS. Appendix B of ``GAWK: Effective Awk Programming'' discusses configuration in detail. The configuration process is based on GNU Autoconf and @@ -58,7 +55,8 @@ be necessary for printing the manual. Use `make dvi' to get a DVI file from the manual. In the `doc' directory, use `make postscript' to get PostScript versions of the manual, the man page, and the reference card. -Use `make pdf' to get PDF versions of the manuals. +Use `make pdf' to get PDF versions of the manuals, the man page and +the reference card. BUG REPORTS AND FIXES (Un*x systems): @@ -67,47 +65,29 @@ is about the worst place to post a gawk bug report. Please, use the mechanisms outlined in the manual. -Email should be sent to bug-gawk@gnu.org. This address sends mail to -Arnold Robbins and the general GNU utilities bug list. The advantage -to using this address is that bug reports are archived at GNU Central. +Email should be sent to bug-gawk@gnu.org. This is now a separate mailing +list at GNU Central. The advantage to using this address is that bug +reports are archived at GNU Central. Arnold Robbins BUG REPORTS AND FIXES, non-Unix systems: -Amiga: - Unsupported. - -Alpha/Linux: - Michal Jaegermann - michal@harddata.com - -BeOS: - Unsupported. - -MS-DOS: +MS-DOS with DJGPP: Scott Deifik scottd.mail@sbcglobal.net -MS-Windows: - Unsupported. +MS-Windows with MinGW: + Eli Zaretskii + eliz@gnu.org OS/2: Andreas Buening andreas.buening@nexgo.de -Tandem: - Stephen Davies - scldad@sdc.com.au - (Original Tandem port) - - Ralf Wildenhues - - POSIX-compliant Tandem systems - VMS: Pat Rankin - rankin@pactechdata.com + r.pat.rankin@gmail.com z/OS (OS/390): Dave Pitts diff -Nru gawk-3.1.8+dfsg/README_d/ChangeLog gawk-4.0.1+dfsg/README_d/ChangeLog --- gawk-3.1.8+dfsg/README_d/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/ChangeLog 2012-03-28 20:02:12.000000000 +0000 @@ -0,0 +1,17 @@ +2012-03-28 Arnold D. Robbins + + * 4.0.1: Release tar ball made. + +2011-07-29 Arnold D. Robbins + + * README.pc: Add download location info for DJGPP version. + +2011-07-15 Arnold D. Robbins + + * README.solaris: Info added on using the Solaris C compiler. + +2011-06-23 Arnold D. Robbins + + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/README_d/ChangeLog.0 gawk-4.0.1+dfsg/README_d/ChangeLog.0 --- gawk-3.1.8+dfsg/README_d/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/ChangeLog.0 2010-12-25 17:17:47.000000000 +0000 @@ -0,0 +1,8 @@ +2010-12-18 Eli Zaretskii + + * README.pc: Update and simplify. Remove lots of + outdated stuff for systems and configurations no longer supported. + +2010-12-18 Arnold Robbins + + * ChangeLog: Created. diff -Nru gawk-3.1.8+dfsg/README_d/OBSOLETE/README.FIRST gawk-4.0.1+dfsg/README_d/OBSOLETE/README.FIRST --- gawk-3.1.8+dfsg/README_d/OBSOLETE/README.FIRST 2007-06-11 02:37:48.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/OBSOLETE/README.FIRST 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -Sat Feb 18 23:07:55 EST 1995 - -Starting with 2.15.6, gawk will preserve the value of NF and $0 for -the last record read into the END rule(s). This is important to you -if your program uses - - print - -in an END rule to mean - - print "" - -(i.e., print nothing). Examine your awk programs carefully to make sure -that they use `print ""' instead of `print', otherwise you will get -strange results. - -If you send me email about this, without having read this -file, I will yell at you. - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/OBSOLETE/README.linux gawk-4.0.1+dfsg/README_d/OBSOLETE/README.linux --- gawk-3.1.8+dfsg/README_d/OBSOLETE/README.linux 2007-06-11 02:38:42.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/OBSOLETE/README.linux 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -Thu Apr 17 14:41:17 EDT 1997 - -Some Linux systems, notably RedHat systems through RedHat 4.1, have the -symbolic links for /dev/stdin and /dev/stdout messed up. Specifically, -/dev/stdin is linked to ../proc/self/fd/1 and /dev/stdout to -../proc/self/fd/0. This is backwards. This causes strange behavior -when using those files from within gawk. - -Removing and redoing the symlinks fixes the problem. It is fixed in -post-4.1 RedHat Linux. - -Arnold Robbins -arnold@skeeve.com - -Sun Aug 3 15:07:06 EDT 1997 - -As of version 3.1 of gawk, this is no longer a problem, since gawk now -completely interprets the special file names internally. - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/OBSOLETE/README.sco gawk-4.0.1+dfsg/README_d/OBSOLETE/README.sco --- gawk-3.1.8+dfsg/README_d/OBSOLETE/README.sco 2007-06-11 02:39:08.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/OBSOLETE/README.sco 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -Tue Dec 24 22:41:39 EST 1996 - -SCO's awk has a -e option which is similar to gawk's --source option, -allowing you to specify the script anywhere on the awk command line. - -This can be a problem, since gawk will install itself as `awk' in -$(bindir). If this is ahead of /bin and /usr/bin in the search path, -several of SCO's scripts that use -e will break, since gawk does not -accept this option. - -The solution is simple. After doing a `make install', do: - - rm -f /usr/local/bin/awk # or wherever it is installed. - -This removes the `awk' symlink so that SCO's programs will continue -to work. - -If you complain to me about this, I will fuss at you for not having -done your homework. - -Arnold Robbins -arnold@skeeve.com - ---------------------------- -Date: 14 Oct 1997 12:17 +0000 -From: Leigh Hebblethwaite -To: bug-gnu-utils@prep.ai.mit.edu - -I've just built gawk 3.0.3 on my system and have experienced a problem -with the routine pipeio2.awk in the test suite. However the problem -appears to be in the tr command rather than gawk. - -I'm using SCO Open Server 5. On the version I have there appears to be -a problem with tr such that: - - tr [0-9]. ........... - -does NOT translate 9s. This means that the output from: - - echo " 5 6 7 8 9 10 11" | tr [0-9]. ........... - -is: - - . . . . 9 .. .. - -This problem causes the pipeio2 test to be reported as a failure. - -Note that the following variation on the tr command works fine: - - tr 0123456789. ........... - -For your info the details of my system are summarised by the out put -of the uname -X command, which is: - -System = SCO_SV -Node = sgscos5 -Release = 3.2v5.0.2 -KernelID = 96/01/23 -Machine = Pentium -BusType = EISA -Serial = 4EC023443 -Users = 5-user -OEM# = 0 -Origin# = 1 -NumCPU = 1 - - diff -Nru gawk-3.1.8+dfsg/README_d/OBSOLETE/README.sony gawk-4.0.1+dfsg/README_d/OBSOLETE/README.sony --- gawk-3.1.8+dfsg/README_d/OBSOLETE/README.sony 2007-06-11 02:39:31.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/OBSOLETE/README.sony 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -Sun Jan 19 23:13:50 EST 1997 - -> Machine: SONY NWS-5000 (MIPS r4000) -> OS : NEWS-OS 4.2.1 (4.3BSD compatible) -> This OS doesn't have `uname' -> Tools : gcc-2.7.2.1, bison-1.25, cmp-2.7, bash-2.0 - -This system has the same problem with the test/tweakfld case that Ultrix MIPS -has. See the README.ultrix file for details. - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/OBSOLETE/README.ultrix gawk-4.0.1+dfsg/README_d/OBSOLETE/README.ultrix --- gawk-3.1.8+dfsg/README_d/OBSOLETE/README.ultrix 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/OBSOLETE/README.ultrix 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -When compiling on DECstation running Ultrix 4.0 a command 'cc -c -O -regex.c' is causing an infinite loop in an optimizer. Other sources -compile fine with -O flag. If you are going to use this flag either -add a special rule to Makefile for a compilation of regex.c, or issue -'cc -c regex.c' before hitting 'make'. - -From: Steve Simmons -Subject: Non-bug report on gawk 2.13.2 -To: david@cs.dal.ca, arnold@skeeve.atl.ga.us -Date: Thu, 25 Jul 1991 13:45:38 -0300 - -Just fyi -- it passes tests with flying colors under Ultrix 4.2. The -README.ultrix file applies more than ever. You might want to add -these paragraphs to it: - - As of Ultrix 4.2 the optimise works for regex.c, but you must give an - additional switch to get everything optimised. Using '-Olimit 1500' - does the job. Without the switch gawk will compile and run correctly, - but you will get complaints about lost optimisations in builtin.c, - awk.tab.c and regex.c. - -From: Arnold Robbins -Date: Sun Sep 8 07:05:07 EDT 1996 - -On Decstations using Ultrix 4.3, the tweakfld test case will fail. It -appears that routines in the math library return very small but non-zero -numbers in cases where most other systems return zero. - -From: Juergen Kahrs -Date: Wed Jan 17 13:15:34 MET 2001 - -On Ultrix 4.3, configure like this: - - ./configure --disable-nls - -In custom.h, we defined HAVE_MKTIME in order to avoid a linker error. -If you compile with - - make check - -every test will pass, except for the badargs test: - - *** Error code 1 (ignored) - -This shouldnt cause problems. - diff -Nru gawk-3.1.8+dfsg/README_d/OBSOLETE/README.yacc gawk-4.0.1+dfsg/README_d/OBSOLETE/README.yacc --- gawk-3.1.8+dfsg/README_d/OBSOLETE/README.yacc 2007-06-11 02:40:13.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/OBSOLETE/README.yacc 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Sat Jan 28 22:07:17 EST 1995 - -Some older versions of yacc (notably Ultrix's) have limits on the depth -of the parse stack. This only shows up when gawk is dealing with deeply -nested control structures, such as those in `awf'. - -The problem goes away if you use either bison or Berkeley yacc. - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/README.aix gawk-4.0.1+dfsg/README_d/README.aix --- gawk-3.1.8+dfsg/README_d/README.aix 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.aix 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -Tue Mar 11 13:21:26 IST 2003 -============================ - -On AIX 4.2 systems, you need: - - ./configure --disable-nls && make all check install diff -Nru gawk-3.1.8+dfsg/README_d/README.atari gawk-4.0.1+dfsg/README_d/README.atari --- gawk-3.1.8+dfsg/README_d/README.atari 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.atari 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -Sun May 2 18:40:46 IDT 1999 - -See the README.1st file in the atari directory. - --------------------------------------------------------- -Gawk on the Atari has been compiled and tested using gcc, both -with and without -mshort flag. Other compilers can be used but if -sizeof(pointer) != sizeof(int) this code will not compile correctly -with a non-ANSI compiler (prototypes and library). - -Compiled executables were tested and passed successfully a test suite -similar to 'make test'. Required changes are minor and minor -modifications are due to differences in environment and/or shell. If -a need will arise a modified test suite with a driving Makefile (for -gulam) is available on a request from Michal Jaegermann, -michal@gortel.phys.ualberta.ca or michal@ellpspace.math.ualberta.ca, -via e-mail. - -Sample files atari/Makefile.st, atari/Makefile.awklib and -atari/config.h assume gcc compilation and execution under TOS; it is -likely that one would want to change it for another setup. If they -are ok then copy atari/Makefile.st to Makefile, atari/config.h to -config.h and atari/Makefile.awklib to awklib/Makefile.. Pay attention -to code fragments bracketed by '#ifdef atarist ... #endif'. These -modifications may not be required/desired with a different OS and/or -libraries. diff -Nru gawk-3.1.8+dfsg/README_d/README.beos gawk-4.0.1+dfsg/README_d/README.beos --- gawk-3.1.8+dfsg/README_d/README.beos 2009-07-03 08:22:12.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.beos 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -Fri Jul 3 11:21:56 IDT 2009 -============================ -The BeOS port is unsupported. - - -README for GNU awk under BeOS -Last updated MCB, Tue Feb 6 10:15:46 GMT 2001 -============================================= - -BeOS port contact: Martin C Brown (mc@whoever.com) - -Building/Installing --------------------------- - -Since BeOS DR9, all the tools that you should need to build gawk are now -included with BeOS. The process is basically identical to the Unix process -of running configure and then make. Full instructions are given below: - -You can compile gawk under BeOS by extracting the standard sources, -and running the configure script. You MUST specify the location prefix -for the installation directory. Under BeOS DR9 and beyond the best -directory to use is /boot/home/config, so the configure command -would be: - -$ configure --prefix=/boot/home/config - -This will install the compiled application into /boot/home/config/bin, -which is already specified in the standard PATH. - -Once the configuration process has been completed, you can run make and -then make install: - -$ make -.... -$ make install - -Socket Notes ----------------------- - -Due to the socket implementation under BeOS not all of the features under -gawk's socket implementation may work properly. In particular: - - BeOS does not support a BSD SO_LINGER option, so sockets cannot remain - open after a close if data is still present on the incoming buffer. - - BeOS does not allow data to be read from a socket without removing the data - from the buffer (peek). If you need to use this feature in gawk, create a - separate input buffer and peek into your own copy, rather than the OS version. - - BeOS does not support RAW socket connections, only UDP or TCP. - -Note that these are BeOS Unix-layer compatibility problems, and only affect certain -aspects of network communication. Most socket based gawk scripts, and any scripts -that do not rely on sockets should work fine (excepting any other notes in this section). - -File Handle Notes ---------------------------- - -Expect the multiple file test (when running make check) to fail. The reason for this is -explained in the email shown below: - -------------------------------------------------------- -From mc@whoever.com Sun Jul 23 17:06:38 2000 -Date: Sun, 23 Jul 2000 07:23:49 +0100 -Subject: Re: gawk-3.0.5 results on BeOS -From: Martin C Brown -To: Aharon Robbins , - -Arnold/Bruno, - -> This is a known BeOS problem. I am cc'ing the BeOS port person. -> Sorry I don't have a fix. - -This problem is directly related to the FOPEN_MAX/OPEN_MAX parameter used in -the stdio library by the BeOS. It seems that the BeOS strictly enforces this -number to the point that opening the 128th file causes all previously opened -files (except stdin/out/err) to be closed - hence the bad number. - -I've tried this outside of gawk and the same thing happens, so it's not a -gawk problem. - -I've spent the past few days trying to find a suitable workaround, but it's -obviously difficult trying to patch a kernel from the outside :)) - -I'll be reporting this as a bug to Be shortly. - -MC - --- -Martin 'MC' Brown, mc@mcslp.com http://www.mcwords.com -Writer, Author, Consultant -'Life is pain, anyone who says differently is selling something' diff -Nru gawk-3.1.8+dfsg/README_d/README.bootstrap gawk-4.0.1+dfsg/README_d/README.bootstrap --- gawk-3.1.8+dfsg/README_d/README.bootstrap 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.bootstrap 2011-12-08 19:12:16.000000000 +0000 @@ -0,0 +1,32 @@ +Tue Dec 6 21:33:19 IST 2011 +============================ + +As documented in the mail below, if you are using a system without any +version of awk installed, you will have bootstrapping problems (i.e., running +configure). The solution is to install mawk or Brian Kernighan's awk +first. + +Arnold Robbins +------------------------------------ +From: Simon Josefsson +To: bug-gawk@gnu.org +Date: Sat, 19 Nov 2011 15:24:22 +0100 +Message-ID: <87r514faw9.fsf@latte.josefsson.org> +Subject: [bug-gawk] building gawk requires an awk? + +Hello, + +I was not able to build gawk 4.0.0 on a GNU/Hurd machine that didn't +have any awk, the ./configure script failed at the end: + +config.status: creating Makefile +./config.status: line 1169: awk: command not found +config.status: error: could not create Makefile + +Is this a known bootstrapping issue? Same happened for 3.1.8. I looked +in README but didn't find anything obvious. + +Btw, building 'mawk' first and then gawk 4.0.0 works. Running self +checks didn't work because there is no 'cmp' on the system either... + +/Simon diff -Nru gawk-3.1.8+dfsg/README_d/README.cygwin-dynamic gawk-4.0.1+dfsg/README_d/README.cygwin-dynamic --- gawk-3.1.8+dfsg/README_d/README.cygwin-dynamic 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.cygwin-dynamic 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -From: courierdavid@hotmail.com -Newsgroups: comp.lang.awk -Subject: Re: Compiling gawk extensions under Cygwin -Date: 14 Mar 2005 20:47:09 -0800 -Organization: http://groups.google.com -Lines: 67 -Message-ID: <1110862029.175727.109280@o13g2000cwo.googlegroups.com> -References: <1e4e8dbe.0501140813.18248833@posting.google.com> - -NNTP-Posting-Host: 194.237.142.24 -Mime-Version: 1.0 -Content-Type: text/plain; charset="iso-8859-1" -X-Trace: posting.google.com 1110862033 8921 127.0.0.1 (15 Mar 2005 04:47:13 GMT) -X-Complaints-To: groups-abuse@google.com -NNTP-Posting-Date: Tue, 15 Mar 2005 04:47:13 +0000 (UTC) -User-Agent: G2/0.2 -Complaints-To: groups-abuse@google.com -Injection-Info: o13g2000cwo.googlegroups.com; posting-host=194.237.142.24; - posting-account=Iz4C5wwAAABx1yG_ft8eEAI99Wu1Tku1 -Path: news.012.net.il!seanews2.seabone.net!newsfeed.albacom.net!news.mailgate.org!newsfeed.stueberl.de!proxad.net!64.233.160.134.MISMATCH!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail -Xref: news.012.net.il comp.lang.awk:21835 - -Thanks for your help there Michael. I wouldn't have thought of that one -myself without your help :-) - -Anyway - for those who must stick with Cygwin here's a method that -works using the mingw32 makefiles and some modifications: - -Basically you need to extract all exportable symbol names from the -gawk.exe file into a text file and then create a dummy library file -which we can link against on Cygwin. You then throw the library file -away because in reality we use the gawk.exe file as the provider of -those functions. - -1. First grab the gawk source, e.g. gawk-3.1.4.tar.bz2 and decompress -it. -2. Move to the gawk-3.1.4 directory you just created. -3. cp pc/* . (copy the pc directory into the main one) -4. edit makefile - uncomment lines "DYN_FLAGS", "DYN_EXP", "DYN_OBJ" -and "DYN_MAKEXP=$(DMEmingw32) -5. make mingw32 (make a gawk.exe) -6. run "gcc -o gawk.exe array.o builtin.o eval.o field.o gawkmisc.o -io.o main.o ext.o msg.o node.o profile.o re.o version.o dlfcn.o -gawk.exp awkgram.o getid.o popen.o getopt.o getopt1.o dfa.o regex.o -random.o" (i.e. remove the -s from the compile command from the -makefile so the symbols are left in gawk.exe) - -now export all symbols from gawk.exe into foo.def so that we can put -these in our library -7. echo EXPORTS > foo.def -8. nm gawk.exe | grep -E ' [TBD] _' | sed 's/.* [TBD] _//' >> foo.def -9. cp foo.def gawkw32.def - -build the new library with all symbols included -10. make mingw32 - -Now you will see a file "libgawk.a" which you can link against to -create extensions. For example to build an extension called "file" run: - -gcc -shared -dll -DHAVE_CONFIG_H -I . extension/file.c -o file.dll -L . --lgawk - -Then you can load it in gawk using the expression: - -extension("./file.dll", "dlload"); - -You must use the gawk you compiled from source though. It won't work -with any other gawk unfortunately :-( But that's OK because the -stripped gawk is not too big in size. - -Cheers, -Dave. - -Michael Heiming wrote: -> In comp.lang.awk David Smith : -> > Has anyone managed to compile gawk extensions (such as "filefuncs") -> > under Cygwin? -> -> Solution is pretty simple, install a real OS, Linux/*BSD or any -> other unix and this and further problems won't happen. -> -> Good luck -> -> -- -> Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94) -> mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' -> #bofh excuse 242: Software uses US measurements, but the OS -> is in metric... diff -Nru gawk-3.1.8+dfsg/README_d/README.hpux gawk-4.0.1+dfsg/README_d/README.hpux --- gawk-3.1.8+dfsg/README_d/README.hpux 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.hpux 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -Wed Jul 28 16:28:42 IDT 2004 -============================ -As of gawk 3.1.4, configure should correctly handle HP-UX and -I18N issues. -- Arnold --------------------------------------------------------------- -2003-12-10 15:19:38 EST -Michael Elizabeth Chastain - -I built and tested gawk on hppa-hp-hpux11.11 and ia64-hp-hpux11.23. -All the tests in the test suite passed. - -I built with these compilers: - - gcc 3.3.2 - hp ansi C from /opt/ansic/bin - hp aCC from /opt/aCC/bin - -I ran into these problems: - - NLS does not work; configure with --disable-nls. - -D_XOPEN_SOURCE=500 does not work. - Multibyte support is not available. - -To get multibyte support, the following ugly hack might work: ---- gawk-3.1.3.orig/custom.h 2003-06-09 17:45:53.000000000 +0200 -+++ gawk-3.1.3/custom.h 2003-12-17 15:55:04.000000000 +0100 -@@ -101,4 +101,7 @@ - #undef HAVE_TZSET - #define HAVE_TZSET 1 - #define _TZSET 1 -+/* an ugly hack: */ -+#include -+#define HAVE_MBRTOWC 1 - #endif - -------------------------------- -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 - -diff -ur gawk-3.1.3.a0/posix/gawkmisc.c gawk-3.1.3.a1/posix/gawkmisc.c ---- gawk-3.1.3.a0/posix/gawkmisc.c Sun May 25 15:26:19 2003 -+++ gawk-3.1.3.a1/posix/gawkmisc.c Fri Jul 11 08:56:03 2003 -@@ -126,7 +126,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 diff -Nru gawk-3.1.8+dfsg/README_d/README.ia64 gawk-4.0.1+dfsg/README_d/README.ia64 --- gawk-3.1.8+dfsg/README_d/README.ia64 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.ia64 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -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. - -Wed Apr 25 17:17:01 IDT 2001 -============================ - -The Intel IA-64 emulation environment that sits on top of 32-bit Linux -has problems. Gawk does not work on it. - -1. The `sgicc' compiler lies to `configure' and pretends it's gcc. But it -really isn't, and several things don't work. - -2. Even if used with gcc, the executable doesn't run; somehow quoted -strings don't stay as one argument to gawk, which is, of course, -disastrous. - -3. It's flaky; initially `configure' wouldn't even get past the getpgrp -test. Then later it would. - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/README.macos gawk-4.0.1+dfsg/README_d/README.macos --- gawk-3.1.8+dfsg/README_d/README.macos 2007-06-11 02:37:32.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.macos 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -Mon Jun 11 05:37:03 IDT 2007 -============================ - -The notes below no longer seem to apply. - -Mon Jul 4 09:55:22 IDT 2005 -============================ - -If you use GCC 4.0 under Mac OS X to compile gawk with optimization, -AND multibyte support is *disabled*, the `ignrcas2' test fails. This is -a compiler bug. Either compile it without optimization, or use gcc-3.3. - -All the other tests pass. - -Happily, the default is for the multibyte support to be enabled, so all -the tests pass by defualt. - - -Sun Dec 3 18:11:09 IST 2000 -============================ - -The `posix' test will fail because of output format differences but this -is apparently otherwise benign. - -Gawk uses the system's mktime(3) routine, even though Autoconf thinks -it's broken, so Caveat Emptor. - -If you ask me about either of these I will fuss at you for not having -done your homework. - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/README.os2 gawk-4.0.1+dfsg/README_d/README.os2 --- gawk-3.1.8+dfsg/README_d/README.os2 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.os2 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,22 @@ +Date: Mon, 16 Aug 2010 08:19:37 +0200 +From: Andreas =?iso-8859-1?Q?B=FCning?= +To: Aharon Robbins +Subject: Re: how alive is OS/2? + +Hello! + +Aharon Robbins schrieb: + +> Is OS/2 still viable? Or can I look to start removing support for it +> also? + +I apologize for the late response. Yes, OS/2 is still "alive" in some sense. +At least, licenses are still sold but under the name "eComStation" (eCS) +instead of OS/2. The (only) distributor is a small company "Serenity Systems", +see www.ecomstation.com for details. + +So I would be pleased if you don't remove the code during the next years. :-) + +Thanks. + +Andreas diff -Nru gawk-3.1.8+dfsg/README_d/README.pc gawk-4.0.1+dfsg/README_d/README.pc --- gawk-3.1.8+dfsg/README_d/README.pc 2009-07-21 19:35:52.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.pc 2011-11-01 20:09:44.000000000 +0000 @@ -1,47 +1,32 @@ -This is the README for GNU awk 3.1 under Windows32, OS/2, and DOS. +This is the README for GNU awk 4 under Windows32, OS/2, and DOS. Gawk has been compiled and tested under OS/2, DOS, and Windows32 using the GNU development tools from DJ Delorie (DJGPP; DOS with special -support for long filenames under Win95), Eberhard Mattes (EMX; OS/2, +support for long filenames on Windows), Eberhard Mattes (EMX; OS/2, DOS, and Windows32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan -(Mingw32; Windows32). Microsoft Visual C/C++ can be used to build a Windows32 -version for Windows 9x/NT, and MSC can be used to build 16-bit versions -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.) +(Mingw32; Windows32). - The cygwin environment (http://www.cygwin.com) may also be used -to compile and run gawk under Windows. For cygwin, building and + The Cygwin environment (http://cygwin.com) may also be used +to compile and run gawk under Windows. For Cygwin, building and installation is the same as under Unix: - tar -xvpzf gawk-3.1.x.tar.gz - cd gawk-3.1.x + tar -xvpzf gawk-4.0.x.tar.gz + cd gawk-4.0.x ./configure && make The `configure' step takes a long time, but works otherwise. ******************************** N O T E ********************************** -* The `|&' operator only works when gawk is compiled for cygwin. Neither * +* The `|&' operator only works when gawk is compiled for Cygwin. Neither * * socket support nor two-way pipes work in any other Windows environment! * *************************************************************************** Building gawk ------------- -Building on DOS or Windows environments can be troublesome, in part due -to shell limitations, the long filename issue, and various Windows32 pipe -considerations. The situation is somewhat better on OS/2. The general -recommendation is to use tools (especially make) which are compatible -or built with the compiler to be used on gawk. - -Building versions which do not understand long filenames on systems -that offer long names is a special case. The maintainers unpack the -distribution and process using utilities (unzip, make, cmp) which do not -use long filenames. (For example, the djgpp tools will work if LFN=n is -set in the environment.) - Copy the files in the `pc' directory (EXCEPT for `ChangeLog') to the directory with the rest of the gawk sources. (The subdirectories of -`pc' need not be copied.) The makefile contains a configuration +`pc' need not be copied.) The Makefile contains a configuration section with comments, and may need to be edited in order to work with your make utility. @@ -85,279 +70,17 @@ facility to gawk (and which require sh). -Notes ------ - -1. Collections containing gawk and various utilities for OS/2 or DOS -include the GNUish Project, Rommel's OS/2 collection at LEO, and the -djgpp collection. - -The GNUish Project was designed to bring GNU-like programs to small -systems running OS/2 and DOS. Binary distributions of gawk are -maintained in GNUish, and include 16bit OS/2 and DOS, 32bit djgpp, -and Windows32 versions. Information on GNUish is available via - - http://www.simtel.net/simtel.net/ -or - ftp://ftp.simtel.net/simtelnet/gnu/gnuish - -Documentation appears in gnuish.htm (html) or gnuish.inf (info). - -Kai Uwe Rommel maintains a (mostly OS/2) collection at - - http://www.leo.org/archiv/os2 or ftp://ftp.leo.org - -It contains emx-compiled (32bit) versions of gawk for OS/2, DOS, and Windows32, -along with many OS/2 utilities. - -The djgpp collection at - - ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/ - -contains a djgpp-compiled (32bit) version of gawk, along with many -djgpp-compiled utilities. - -The Mingw32 collection at http://www.mingw.org contains links to ported -software. The site by Jan-Jaap van der Heijden - - http://agnes.dida.physik.uni-essen.de/~janjaap/ - -is apparently no longer maintained, but it was accessible as of Jan 2001 -and may contain files of interest. - - -2. The following table illustrates some of the differences among the various -compiled versions of gawk. For example, the djgpp version runs on all the -systems, but with differing capabilities: it supports long filenames under -Win-9x but not under NT, and it runs as a DPMI application under OS/2 (which -translates into "works in the DOS-box under OS/2, but not as a true OS/2 -application"). - - DOS Win/WfW Win9x NT OS/2 - ------------------------------------------------------- - djgpp | DPMI DPMI DPMI DPMI,NoLFN DPMI - emx(1) | N N N N OS2 - emxbnd(2) | VCPI,DPMI DPMI DPMI,NoLFN DPMI,NoLFN DPMI,OS2 - emxnt(3) | N N Windows32 Windows32 N - msc(4) | 16 16 16,NoLFN 16,NoLFN 16,DOS - msc6bnd | 16 16 16,NoLFN 16,NoLFN 16,DOS,OS2 - msc6os2 | N N N N 16,OS2 - vcWin32 | N N Windows32 Windows32 N - mingw32 | N N Windows32 Windows32 N - - (1) Requires emxrt. - - (2) May run as a DPMI app in plain DOS and in a DOS-shell under OS/2 - or Windows, and as a true OS/2 application under OS/2. DPMI - requires rsxnt, and VCPI or use as an OS/2 app requires emxrt. - - (3) Requires rsxnt. - - (4) When compiling, MSC 8, when run in Windows 9x, will require that if - files are listed in #include statements with LFNs - (eg. ), that the file be named with the LFN. - - 16 16bit; limited capacity, especially under DOS. - - DOS Runs as a DOS application. - - DPMI Dos Protected Mode Interface; program runs as a DOS application. - Under plain DOS, a DPMI server (such as csdpmi from the djgpp - archives) is required. See also VCPI. - - emxrt The emx runtime, available from LEO. - - N Not supported. - - NoLFN No long filename support. - - OS2 Runs as an OS/2 application. - - rsxnt Runtimes for use with DPMI or Windows32. - - VCPI Virtual Control Program Interface; program runs as a DOS app. - Memory managers (such as emm386) may need adjustment. VCPI cannot - be used under OS/2, Win/WfW, Win-95, or NT. See also DPMI. - -Windows32 Uses/supports Windows32 features (such as long filenames). - -Reportedly, NTEmacs (another Windows32 program) can run programs such as -Windows32-gawk asynchronously. Similarly, as native OS/2 versions are a -plus under OS/2 even for command-line programs, native Windows32 versions -may be desired under NT and Win95. - -Users interested in Windows32 applications may also wish to examine the -Cygnus cygwin project at http://sources.redhat.com/cygwin/ or the -Mingw32 work at http://www.mingw.org. Windows32 gawk will often require -that utilities run from within gawk be Windows32 (e.g., the tests place this -requirement on the cat utility). - - -3. An sh-like shell may be useful for awk programming (and is essential -for running "make test"). Stewartson's sh (OS/2 and DOS) is a good -choice, and may be found in GNUish. - -Stewartson's shell uses a configuration file (see "Command Line Building" -in the sh manual page), and it may be necessary to edit the entry for -gawk. The following entries are suggested: - - -- $(EXTENDED_LINE) -- -- Comment only, not part of file -- - gawk = unix ignoretype # emxbnd - gawk = unix # djgpp; msc* with Stewartson's stdargv - # No entry for emx or for msc* without stdargv - gawk = ignoretype # if you want something which which always work - # --but without the use of @-include files. - -However, users of djgpp versions of gawk may prefer "dos" over "unix" -in the above, due to the way djgpp handles @-include files. Entries -for other other utilities (such as sed and wc) may need to be edited -in order to match your specific collection of programs. - -Daisuke Aoyama has ported Bash 1.14.7 to djgpp. -This version worked flawlessly in tests with djgpp gawk and make. bash -is now part of the djgpp collection; the older port may be found on - - http://www.neongenesis.com/~jack/djgpp-work/beta/index.html - -Under OS/2, bash should be a good choice; however, there has been some -trouble getting a solid version. As of Feb-95, there are two bash ports, -available at LEO under shells/gnu/. - -LEO also contains a Korn shell (ksh), tcsh, zsh, and a demo of -Hamilton's C shell, but these have not been tested with gawk by the -maintainers. Reports are welcomed. - -Users of the emx versions of gawk may wish to set EMXSHELL, which -overrides COMSPEC when running shells from emx programs. Similarly, -the djgpp version of gawk respects SHELL. - -Compatibility among shells and various utilities (including gawk) -continues to be a problem. Stewartson's shell may be the best choice -for emx-compiled programs (although djgpp-bash almost works with -emx on DOS). GNU make is recommended if using djgpp-bash. - -Beginning with 3.0.4, the MSC (DOS/Windows32) and Mingw32 versions write -pipe and system() commands to a temporary file, and then execute -with SHELL or COMSPEC. The current mechanism defaults to dos-style -shell conventions unless the shell is one of sh, bash, csh, tcsh, sh32, -sh16, or ksh. - - -4. GNU make is available at LEO for OS/2, in the djgpp collection -for DOS, and in the Mingw32 collection for Windows32. - -dmake is by Dennis Vadura (dvadura@watdragon.uwaterloo.ca), CS -Dept., University of Waterloo. OS/2 and DOS versions can be found as -part of the GNUish project. Note that DOS users will need the DOS-only -version (due to the swap requirement). - -Ndmake is by D.G. Kneller. This ShareWare program was later released -as Opus Make (which is available for OS/2 and DOS). Ndmake 4.5 is -available at - - ftp://ftp.simtel.net/simtelnet/msdos/c/ndmake45.zip - - -5. Stewartson's shell contains sources for a setargv-replacement -for MSC, which can add enhanced command-line processing capabilities -to gawk. See the makefile. Note that there is a fatal bug in -stdargv.c, triggered in the case of no closing quote. The following -patch treats this case as if a quote was inserted as the last -character on the command-line. - -478,479c478,482 -< else -< spos = &spos[strlen (cpos)]; ---- -> else { -> /* No matching quote. Fake it. */ -> spos = cpos + strlen (cpos) + 1; -> break; -> } - - -Known bugs ----------- - -1. DJGPP version 1 has known problems with signals, and in the way it -handles command-lines. Older versions of this file contain notes on -other bugs, and on a few bugs uncovered in the v2 betas. Testing of -gawk with DJGPP v1 ended with gawk-3.0. djgpp-2.01 and djgpp ports of -GNU make 3.75 or later are strongly preferred, in part due to enhanced -support for sh-like shells. - -2. emx does not support DST. On 2-Jan-96, Mattes writes: - - Quotation from ISO 9899-1990: - - 7.12.3.5 The strftime function - [...] - %Z is replaced by the time zone name or abbreviation, or by no - characters if no time zone is determinable. - - As emx does not yet support DST, it does not know which one of the two - time zones (with DST vs. without DST) applies. In consequence, `no - time zone is determinable'. - -As a workaround, it may be possible to edit do_strftime() of builtin.c -according to Mattes' recommendation: - - If you happen to know whether DST applies or not for a given struct - tm, just set its tm_isdst to a positive value or to zero, respectively. - Then, strftime() will replace %Z with the name of the time zone. - -However, this probably won't yield a generic solution given that the rules -for when DST starts and stops vary depending upon your location and the -rules have changed over time. Most versions of UNIX maintain this -information in a database (of sorts). In Solaris, for instance, it can be -found in /usr/share/zoneinfo/*. The setting of the TZ environment variable -(eg. TZ=US/Pacific) is then used to lookup the specifics for that locale. - -3. The 16-bit DOS version can exhaust memory on scripts such as Henry -Spencer's "awf". Use GNU C versions if possible. - -4. builtin.c of gawk-3.0.[1-6] triggers a bug in MSC 6.00A. The makefile -works around the bug by compiling builtin.c without optimizations (-Od). -In limited testing, it appears that inserting some dummy code in -builtin.c can provide a better solution than disabling optimizations. - -5. There are problems with system() when using the rsx package with emx -programs (rsx is used in DPMI environments such as MS-Win). The djgpp -versions are preferred in this case. - -6. In contrast to getpid() on UNIX, the getpid() in Microsoft C/C++ 1.52 -(AKA 8.0) sometimes returns negative numbers. The DOS Gawk developers felt -that it was best to use Microsoft's built-in function; but at the same time, -we are placing this warning here, because this behavior will undoubtably be -surprising to many. - -7. MSC 6 fails the strftlng test. The funstack test exhausts memory -on the 16bit DOS versions. - -8. Eli Zaretskii writes: "Make can crash with SIGFPE after finishing all -the tests. This happens on Windows 95 only, and Gawk 3.0.3 does that as -well (as do older versions of Make). The cause for this is the log(-1) -call in the last test. Based on some limited testing, I'd say that the -problem is in sloppy Windows handling of the FPU: it doesn't clean up the -FPU after a program exits, so if Make has SIGFPE unmasked, it crashes." - -9. gawk built from the mingw32 and vcWin32 targets continues to have -problems with pipes; in particular, the pipeio1 test fails. - -10. As mentioned above, `|&' only works with cygwin. - - Gawk thanks ----------- -The DOS maintainers wish to express their thanks to Eli Zaretskii - for his work and for the many conversations -concerning gawk, make, and djgpp. His FAQ for djgpp is essential -reading, and he was always willing to answer our questions (even when -we didn't read the relevant portions of the FAQ :). +The DOS maintainers wish to express their thanks to Eli Zaretskii + for his work and for the many conversations concerning +gawk, make, and djgpp. His FAQ for djgpp is essential reading, and he +was always willing to answer our questions (even when we didn't read +the relevant portions of the FAQ :). -We are indebted to Juan Grigera for the -Visual C++ target, and for additional help on changes for Windows32. +We are indebted to Juan Grigera for +additional help on changes for Windows32. ---- @@ -369,4 +92,30 @@ andreas.buening@nexgo.de (OS/2 version) Support for Windows32 started in gawk-3.0.3. -This is no longer supported. + +---- +From: Eric Pement +Newsgroups: comp.lang.awk +Subject: djgpp Gawk ver. 4.0 available +Date: Tue, 26 Jul 2011 06:42:00 -0700 (PDT) +MS Windows users: + +The DJGPP compilation of GNU awk v4.0.0 is now available here: + + ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/gwk400b.zip + +For those who don't know the difference between the DGJPP compile and +other versions compiled for Windows, the most noticeable to me is that +it supports Unix-style use of 'single' and "double" quoting. Example: + + [c:\tmp]> :: normal Windows awk requires complex quoting + [c:\tmp]> gawk "BEGIN{ print \"hello, world\" }" + hello, world + [c:\tmp]> :: DJGPP compile of awk permits Unix quoting in CMD + [c:\tmp]> djgawk 'BEGIN{ print "hello, world" }' + hello, world + +Syntactic sugar? Sure. But it makes life easier in a Windows +environment, and without installing Cygwin ... + +Eric P. diff -Nru gawk-3.1.8+dfsg/README_d/README.pcdynamic gawk-4.0.1+dfsg/README_d/README.pcdynamic --- gawk-3.1.8+dfsg/README_d/README.pcdynamic 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.pcdynamic 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -This is the README for dynamic extension support for GNU awk 3.1.2 under Windows32 -This part of the README is directed to the gawk maintainers. - -The implementation consists of - -pc/dlfcn.h -pc/dlfcn.c - An implementation of the POSIX dynamic loading functions for Windows32. - Bugs and limitations: - the RTLD_* flags are ignored - passing NULL as the module name is not really supported. - dlerror() doesn't always generate useful output. - -pc/w32dynamic.patch - A patch to pc/Makefile. This adds macros to allow dynamic loading - to be compiled in. The macros (DYN_EXP, DYN_OBJ, DYN_FLAGS, and - DYN_MAKEXP) are commented-out by default (which is the default on - Unix as well). I've added definitions only for MS VC and MinGW. - I also added support for pgawk under MS VC and MinGW. - -pc/gawkw32.def - A list of functions to export from gawk.exe. Every function used - in an extension DLL needs to be in this file. I've added the ones - required by the provided examples, but some thought should go into - determining a useful set of API functions. From a maintenance - perspective, it's important that the ordinals (the number following @) - never change. You can use an existing DLL with a gawk.exe which has - new exported functions, but if you change the ordinal of an existing - function, you have to recompile all the extensions that use it. - -extension/Makefile.pc - A make file which compiles a few of the extension examples. - Only readfile, ordchr, and arrayparm are built, since the - other functions didn't compile without sizeable modifications. - -extension/pcext.def - A module definition file which exports dlload. - -extension/w32dynamic.patch - A patch to readfile.c to have it open files in binary mode. Without - this, the bytes read doesn't always match the file size. - -w32dynamic.patch - A patch to awk.h. This makes the temporary variable _t static and - adds an attribute to some data declarations when WIN32_EXTENSION is - defined. The issue is that data imported from a separate module has - a different level of indirection from the same data in the - original module. The difference can be made transparent by adding - __declspec(dllimport)) to the declarations used in the importing module. - Since _t doesn't actually have to be shared, I've just made it - static to the extension module and avoided the problem. - -README_d/README.pcdynamic - This file. - -The remainder of the file is intended for people installing and using gawk -and probably ought to be added to README.pc ---- -To compile gawk with dynamic extension support, uncomment the -definitions of DYN_FLAGS, DYN_EXP, DYN_OBJ, and DYN_MAKEXP in the -configuration section of Makefile. There are two definitions for -DYN_MAKEXP -- pick the one that matches your target. - -To build some of the example extension libraries, cd to the extension -directory and copy Makefile.pc to Makefile. You can then build using the same -two targets. To run the example awk scripts, you'll need to either change the -call to the `extension' function to match the name of the library (for -instance, change "./ordchr.so" to "ordchr.dll" or simply "ordchr"), or rename -the library to match the call (for instance, rename ordchr.dll to ordchr.so). - -If you build gawk.exe with one compiler but want to build an extension library -with the other, you need to copy the import library. Visual C uses a library -called gawk.lib, while MinGW uses a library called libgawk.a. These files -are equivalent and will interoperate if you give them the correct name. -The resulting shared libraries are also interoperable. - -To create your own extension library, you can use the examples as models, but -you're essentially on your own. Post to comp.lang.awk or send e-mail to -ptjm@interlog.com if you have problems getting started. If you need to access -functions or variables which are not exported by gawk.exe, add them to -gawkw32.def and rebuild. You should also add ATTRIBUTE_EXPORTED to the -declaration in awk.h of any variables you add to gawkw32.def. - -Note that extension libraries have the name of the awk executable embedded in -them at link time, so they will work only with gawk.exe. In particular, they won't -work if you rename gawk.exe to awk.exe or if you try to use pgawk.exe. You can -perform profiling by temporarily renaming pgawk.exe to gawk.exe. You can resolve -this problem by changing the program name in the definition of DYN_MAKEXP for -your compiler. - -On Windows32, libraries are sought first in the current directory, then in the -directory containing gawk.exe, and finally through the PATH environment -variable. diff -Nru gawk-3.1.8+dfsg/README_d/README.sgi gawk-4.0.1+dfsg/README_d/README.sgi --- gawk-3.1.8+dfsg/README_d/README.sgi 2007-06-11 02:39:16.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.sgi 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Tue Jan 30 10:51:39 IST 2001 - -There will be linker warnings on SGI Irix will be building gawk. -These are related to use of dlopen and the dynamic loading of -builtins. The warnings can be ignored. -====================================== -Tue May 2 11:40:54 IDT 2000 - -GCC and gawk often don't mix on SGI systems. Use the native C compiler to -compile gawk. `make test' should work ok, although the `tweakfld' test -may fail. That's ok; see README.ultrix for the details on that one. - -Note that the SGI compiler will complain about some constructs in -regex.c and dfa.c. It's ok to ignore those complaints. - -If you ask me about this, I will fuss at you for not having done -your homework! - -Arnold Robbins -arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/README_d/README.solaris gawk-4.0.1+dfsg/README_d/README.solaris --- gawk-3.1.8+dfsg/README_d/README.solaris 2010-04-20 08:34:29.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.solaris 2011-11-01 20:09:44.000000000 +0000 @@ -1,147 +1,20 @@ -Tue Apr 20 11:33:20 IDT 2010 +Fri Jul 15 14:24:00 IDT 2011 ============================ -The lc_num1 test fails on Solaris 10 systems. This is a bug with Solaris, -not gawk. - -Arnold Robbins -arnold@skeeve.com - ------- Stuff below here is probably only of historical interest ---------- -Solaris Problem #1: -=================== -From: carson@lehman.com -Date: Fri, 7 Feb 1997 01:05:58 -0500 -To: arnold@gnu.ai.mit.edu -Subject: Solaris 2.5.1 x86 bug in gawk-3.0.2 - -awktab.c has the following bogus logic: - -#ifndef alloca -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -#include -#else /* not sparc */ - -Solaris x86 obviously dosn't define sparc or __sparc. - -What you _meant_ to say was: - -if (defined(__sun) && defined(__SVR4)) +It looks like you need to use -(which identifies Solaris 2.x under both Sun's cc and gcc) + -Xc -D_XPG4_2 --- -Carson Gaspar -- carson@cs.columbia.edu carson@lehman.com -http://www.cs.columbia.edu/~carson/home.html - +on Solaris 10 with the Sun C compiler when compiling gawk in order for +libsigsegv to be found correctly, and - * * * * * * * + -Xc -D_XPG4_2 -Duint64_t=upad64_t -Solution to Problem #1: -======================= -Tue Oct 20 21:25:11 IST 1998 +on Solaris 9. -This has been fixed in 3.1.0 with the bisonfix.sed script. - -Arnold Robbins -arnold@skeeve.com - -Solaris Problem #2: -=================== -Tue Apr 13 16:57:45 IDT 1999 - -There is a known problem in that the `manyfiles' test will fail under -Solaris if you set your soft limit on the number of file descriptors to -above 256. This is due to a "feature" of fdopen that an fd must be -less than 256 (see fdopen(3)). - -IMHO this is Sun's problem, not mine. +Tue Apr 20 11:33:20 IDT 2010 +============================ +The lc_num1 test fails on Solaris 10 systems. This is a bug with Solaris, +not gawk. Arnold Robbins arnold@skeeve.com - -Solution (a) to Problem #2: -=========================== -Now fixed in the code via Paul Eggert's 2001-09-0 patch. See the -ChangeLog. - -Solution (b) to Problem #2: -=========================== -From: Paul Nevai -Subject: Re: gawk-3.0.4 -To: arnold@skeeve.com (Aharon Robbins) -Date: Tue, 6 Jul 1999 09:09:05 -0400 (EDT) - -Dear Aharon: - -Toda raba. Why don't you add something like that to README_d/README.solaris -file: - -for the SunOS do in - -/bin/sh: ulimit -n 256; ulimit -a; make test -/bin/tcsh: limit descriptors 256; ulimit -a; make test - -otherwise "make test" will fail - -Shalom, Paul - -Aharon Robbins wrote to Paul Nevai: -# >From the README_d/README.solaris file: -# -# Tue Apr 13 16:57:45 IDT 1999 -# -# There is a known problem in that the `manyfiles' test will fail under -# Solaris if you set your soft limit on the number of file descriptors to -# above 256. This is due to a "feature" of fdopen that an fd must be -# less than 256 (see fdopen(3)). -# -# IMHO this is Sun's problem, not mine. -# -# Arnold Robbins -# arnold@skeeve.com -# -# Double check your settings with ulimit; I suspect that this is -# your problem. -# -# Thanks, -# -# Arnold -# -- -# Aharon (Arnold) Robbins arnold@skeeve.com [ <<=== NOTE: NEW ADDRESS!! ] -# P.O. Box 354 Home Phone: +972 8 979-0381 Fax: +1 603 761-6761 -# Nof Ayalon Cell Phone: +972 51 297-545 (See www.efax.com) -# D.N. Shimshon 99784 Laundry increases exponentially in the -# ISRAEL number of children. -- Miriam Robbins -# -# - - - -Paul Nevai pali+@osu.edu -Department of Mathematics nevai@math.ohio-state.edu -The Ohio State University http://www.math.ohio-state.edu/~nevai/ -231 West Eighteenth Avenue http://www.math.ohio-state.edu/~jat/ -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 -Nru gawk-3.1.8+dfsg/README_d/README.sunos4 gawk-4.0.1+dfsg/README_d/README.sunos4 --- gawk-3.1.8+dfsg/README_d/README.sunos4 2007-06-11 02:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.sunos4 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -Sun Jan 7 23:49:46 EST 1996 - -GCC and Autoconf disagree about the type of the array argument passed -to getgroups(2). You can thus ignore the warning that gcc will -generate under SunOS 4.1.x for io.c. - -If you send me email about this without having read this file, I will -fuss at you! - -Arnold Robbins -arnold@skeeve.com - -Tue Jan 30 07:01:39 EST 1996 - -The manyfiles test fails under SunOS 4.1.4. There appears to be some -bug in libc (shared and static) for SunOS 4.1.4. I got a working gawk -binary by linking in /usr/5lib/libc.a statically. - - -,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-, - Jim Farrell | phone 610-940-6020 | Platinum technology -Systems Administrator | vmail 800-526-9096 x7512 | 620 W. Germantown Pike - jwf@platinum.com | fax 610-940-6021 | Plymouth Meeting,Pa,19462 -'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~' diff -Nru gawk-3.1.8+dfsg/README_d/README.tandem gawk-4.0.1+dfsg/README_d/README.tandem --- gawk-3.1.8+dfsg/README_d/README.tandem 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.tandem 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -The Tandem port was done on a Cyclone machine running D20. -The port is pretty clean and all facilities seem to work except for -some of the I/O piping stuff which is just too foreign a concept for -Tandem. - -Usage is as for UNIX except that D20 requires all "{" and "}" characters -to be escaped with "~" on the command line (not in script files) and the -standard Tandem syntax for "/in filename,out filename/" must be used -instead of the usual UNIX "<" and ">" for file redirection. (Redirection -options on getline, print etc are supported.) - -The -mr=val option has been "stolen" to enable Tandem users to -process fixed-length records with no "end-of-line" character. That -is, -mr=74 tells gawk to read the input file as fixed 74-byte -records. - -To build a Tandem executable from source, down-load all of the files -so that the file names on the Tandem box are, for example ARRAYC or -AWKH. That is, make all of the file names conform to the restrictions -of D20. The "totally Tandem-specific" files are in the tandem -"subvolume" and should be copied to the main src directory before -building gawk. - -The file compit can then be used to compile and bind an executable. -Sorry, no make and no autoconfig. - -This is my first UNIX port to Tandem so I may well have missed the best -way of doing things: I just desperately needed a working awk at a -Tandem shop. - -Cheers, -Stephen Davies -(scldad@sdc.com.au) diff -Nru gawk-3.1.8+dfsg/README_d/README.zos gawk-4.0.1+dfsg/README_d/README.zos --- gawk-3.1.8+dfsg/README_d/README.zos 2008-01-25 10:38:01.000000000 +0000 +++ gawk-4.0.1+dfsg/README_d/README.zos 2010-12-25 17:17:19.000000000 +0000 @@ -1,4 +1,4 @@ -Fri Jan 25 12:36:16 2008 +Fri Dec 24 10:58:16 2010 Dave Pitts ---------------------------- @@ -6,7 +6,7 @@ 1. To unpack the tarball: - $ gunzip -c gawk-3.1.6.tar.gz | pax -rv from=ISO8859-1,to=IBM-1047 + $ gunzip -c gawk-4.0.0.tar.gz | pax -rv from=ISO8859-1,to=IBM-1047 This will extract the files and convert them from ASCII to EBCDIC. @@ -14,12 +14,12 @@ the operation on another system and copy the tar file to z/OS. Then unpack as follows: - $ pax -rv from=ISO8859-1,to=IBM-1047 -f gawk-3.1.6.tar + $ pax -rv from=ISO8859-1,to=IBM-1047 -f gawk-4.0.0.tar 2. To Build - $ ./configure + $ ./configure CC=c89 $ make You will get compilation warnings of the form: diff -Nru gawk-3.1.8+dfsg/TODO gawk-4.0.1+dfsg/TODO --- gawk-3.1.8+dfsg/TODO 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/TODO 2011-06-23 06:30:32.000000000 +0000 @@ -0,0 +1,57 @@ +Add debugger commands to reference card +Review all FIXME and TODO comments + +FIX regular field splitting to use FPAT algorithm. + +Look at function order within files. + +regex.h - remove underscores in param names (for 4.1) + +Really make failure to open a socket a non-fatal error (for 4.1). + +?? Scope IDs for IPv6 addresses ?? + +------ + +Code Review: +awkgram.y +awkprintf.h +cmd.h +command.y +debug.c +eval.c +ext.c +field.c +floatcomp.c +floatmagic.h +gawkmisc.c +io.c +profile.c +protos.h + +DONE: +awk.h +array.c +builtin.c +node.c +mbsupport.h +xalloc.h +version.c +re.c +replace.c +msg.c +hard-locale.h +custom.h +main.c + +------ + +Add in gawk/mp + +Design and implement I/O plugin API. + +Implement C function call API per man pages + +xgawk features (@load, -l, others) + +Add tests for patches in emails diff -Nru gawk-3.1.8+dfsg/aclocal.m4 gawk-4.0.1+dfsg/aclocal.m4 --- gawk-3.1.8+dfsg/aclocal.m4 2010-05-06 17:55:42.000000000 +0000 +++ gawk-4.0.1+dfsg/aclocal.m4 2012-03-28 20:03:22.000000000 +0000 @@ -13,64 +13,12 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# intlmacosx.m4 serial 1 (gettext-0.17) -dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Checks for special options needed on MacOS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in MacOS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - gt_cv_func_CFPreferencesCopyAppValue, - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include ], - [CFPreferencesCopyAppValue(NULL, NULL)], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) - # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -793,32 +741,6 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -AC_DEFUN([AM_C_PROTOTYPES], -[AC_REQUIRE([AC_C_PROTOTYPES]) -if test "$ac_cv_prog_cc_stdc" != no; then - U= ANSI2KNR= -else - U=_ ANSI2KNR=./ansi2knr -fi -# Ensure some checks needed by ansi2knr itself. -AC_REQUIRE([AC_HEADER_STDC]) -AC_CHECK_HEADERS([string.h]) -AC_SUBST([U])dnl -AC_SUBST([ANSI2KNR])dnl -_AM_SUBST_NOTMAKE([ANSI2KNR])dnl -]) - -AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) - # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 @@ -1031,6 +953,7 @@ m4_include([m4/codeset.m4]) m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) +m4_include([m4/intlmacosx.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttypes_h.m4]) m4_include([m4/isc-posix.m4]) @@ -1043,6 +966,7 @@ m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) +m4_include([m4/readline.m4]) m4_include([m4/socket.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/uintmax_t.m4]) diff -Nru gawk-3.1.8+dfsg/array.c gawk-4.0.1+dfsg/array.c --- gawk-3.1.8+dfsg/array.c 2010-04-15 15:37:48.000000000 +0000 +++ gawk-4.0.1+dfsg/array.c 2012-03-28 19:47:53.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "awk.h" + /* * Tree walks (``for (iggy in foo)'') and array deletions use expensive * linear searching. So what we do is start out with small arrays and @@ -34,58 +36,191 @@ * ``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 + * We make the constant a variable, so that it can be tweaked * via environment variable. */ -static int AVG_CHAIN_MAX = 2; /* 11/2002: Modern machines are bigger, cut this down from 10. */ - -#include "awk.h" +static size_t AVG_CHAIN_MAX = 2; /* Modern machines are bigger, reduce this from 10. */ -static NODE *assoc_find P((NODE *symbol, NODE *subs, unsigned long hash1)); -static void grow_table P((NODE *symbol)); +static size_t SUBSEPlen; +static char *SUBSEP; -static unsigned long gst_hash_string P((const char *str, size_t len, unsigned long hsize, size_t *code)); -static unsigned long scramble P((unsigned long x)); -static unsigned long awk_hash P((const char *s, size_t len, unsigned long hsize, size_t *code)); +static NODE *assoc_find(NODE *symbol, NODE *subs, unsigned long hash1, NODE **last); +static void grow_table(NODE *symbol); -unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize, size_t *code)) = awk_hash; +static unsigned long gst_hash_string(const char *str, size_t len, unsigned long hsize, size_t *code); +static unsigned long scramble(unsigned long x); +static unsigned long awk_hash(const char *s, size_t len, unsigned long hsize, size_t *code); + +unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code) = awk_hash; + +/* qsort comparison function */ +static int sort_up_index_string(const void *, const void *); +static int sort_down_index_string(const void *, const void *); +static int sort_up_index_number(const void *, const void *); +static int sort_down_index_number(const void *, const void *); +static int sort_up_value_string(const void *, const void *); +static int sort_down_value_string(const void *, const void *); +static int sort_up_value_number(const void *, const void *); +static int sort_down_value_number(const void *, const void *); +static int sort_up_value_type(const void *, const void *); +static int sort_down_value_type(const void *, const void *); -/* array_init --- possibly temporary function for experimentation purposes */ +/* array_init --- check relevant environment variables */ 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'; + char *endptr; + size_t newval; - AVG_CHAIN_MAX = newval; + if ((val = getenv("AVG_CHAIN_MAX")) != NULL && isdigit((unsigned char) *val)) { + newval = strtoul(val, & endptr, 10); + if (endptr != val && newval > 0) + AVG_CHAIN_MAX = newval; } if ((val = getenv("AWK_HASH")) != NULL && strcmp(val, "gst") == 0) hash = gst_hash_string; } +/* make_aname --- construct a 'vname' for a (sub)array */ + +static char * +make_aname(const NODE *symbol) +{ + static char *aname = NULL; + static size_t alen; + static size_t max_alen; +#define SLEN 256 + + if (symbol->parent_array != NULL) { + size_t slen; + + (void) make_aname(symbol->parent_array); + slen = strlen(symbol->vname); /* subscript in parent array */ + if (alen + slen + 4 > max_alen) { /* sizeof("[\"\"]") = 4 */ + max_alen = alen + slen + 4 + SLEN; + erealloc(aname, char *, (max_alen + 1) * sizeof(char *), "make_aname"); + } + alen += sprintf(aname + alen, "[\"%s\"]", symbol->vname); + } else { + alen = strlen(symbol->vname); + if (aname == NULL) { + max_alen = alen + SLEN; + emalloc(aname, char *, (max_alen + 1) * sizeof(char *), "make_aname"); + } else if (alen > max_alen) { + max_alen = alen + SLEN; + erealloc(aname, char *, (max_alen + 1) * sizeof(char *), "make_aname"); + } + memcpy(aname, symbol->vname, alen + 1); + } + return aname; +#undef SLEN +} + +/* + * array_vname --- print the name of the array + * + * Returns a pointer to a statically maintained dynamically allocated string. + * It's appropriate for printing the name once; if the caller wants + * to save it, they have to make a copy. + */ + +char * +array_vname(const NODE *symbol) +{ + static char *message = NULL; + static size_t msglen = 0; + char *s; + size_t len; + int n; + const NODE *save_symbol = symbol; + const char *from = _("from %s"); + const char *aname; + + if (symbol->type != Node_array_ref + || symbol->orig_array->type != Node_var_array + ) { + if (symbol->type != Node_var_array || symbol->parent_array == NULL) + return symbol->vname; + return make_aname(symbol); + } + + /* First, we have to compute the length of the string: */ + + len = 2; /* " (" */ + n = 0; + while (symbol->type == Node_array_ref) { + len += strlen(symbol->vname); + n++; + symbol = symbol->prev_array; + } + + /* Get the (sub)array name */ + if (symbol->parent_array == NULL) + aname = symbol->vname; + else + aname = make_aname(symbol); + len += strlen(aname); + + /* + * Each node contributes by strlen(from) minus the length + * of "%s" in the translation (which is at least 2) + * plus 2 for ", " or ")\0"; this adds up to strlen(from). + */ + len += n * strlen(from); + + /* (Re)allocate memory: */ + if (message == NULL) { + emalloc(message, char *, len, "array_vname"); + msglen = len; + } else if (len > msglen) { + erealloc(message, char *, len, "array_vname"); + msglen = len; + } /* else + current buffer can hold new name */ + + /* We're ready to print: */ + symbol = save_symbol; + s = message; + /* + * Ancient systems have sprintf() returning char *, not int. + * If you have one of those, use sprintf(..); s += strlen(s) instead. + */ + + s += sprintf(s, "%s (", symbol->vname); + for (;;) { + symbol = symbol->prev_array; + if (symbol->type != Node_array_ref) + break; + s += sprintf(s, from, symbol->vname); + s += sprintf(s, ", "); + } + s += sprintf(s, from, aname); + strcpy(s, ")"); + + return message; +} + + /* - * get_actual --- proceed to the actual Node_var_array, + * get_array --- proceed to the actual Node_var_array, * change Node_var_new to an array. * If canfatal and type isn't good, die fatally, * otherwise return the final actual value. */ - + NODE * -get_actual(NODE *symbol, int canfatal) +get_array(NODE *symbol, int canfatal) { - int isparam = (symbol->type == Node_param_list - && (symbol->flags & FUNC) == 0); NODE *save_symbol = symbol; + int isparam = FALSE; - if (isparam) { - save_symbol = symbol = stack_ptr[symbol->param_cnt]; + if (symbol->type == Node_param_list && (symbol->flags & FUNC) == 0) { + save_symbol = symbol = GET_PARAM(symbol->param_cnt); + isparam = TRUE; if (symbol->type == Node_array_ref) symbol = symbol->orig_array; } @@ -94,6 +229,7 @@ case Node_var_new: symbol->type = Node_var_array; symbol->var_array = NULL; + symbol->parent_array = NULL; /* main array has no parent */ /* fall through */ case Node_var_array: break; @@ -108,6 +244,9 @@ default: /* notably Node_var but catches also e.g. FS[1] = "x" */ if (canfatal) { + if (symbol->type == Node_val) + fatal(_("attempt to use a scalar value as array")); + if ((symbol->flags & FUNC) != 0) fatal(_("attempt to use function `%s' as an array"), save_symbol->vname); @@ -115,7 +254,7 @@ fatal(_("attempt to use scalar parameter `%s' as an array"), save_symbol->vname); else - fatal(_("attempt to use scalar `%s' as array"), + fatal(_("attempt to use scalar `%s' as an array"), save_symbol->vname); } else break; @@ -124,185 +263,73 @@ return symbol; } -/* - * array_vname --- print the name of the array - * - * Returns a pointer to a statically maintained dynamically allocated string. - * It's appropriate for printing the name once; if the caller wants - * to save it, they have to make a copy. - * - * Setting MAX_LEN to a positive value (eg. 140) would limit the length - * of the output to _roughly_ that length. - * - * If MAX_LEN == 0, which is the default, the whole stack is printed. - */ -#define MAX_LEN 0 -char * -array_vname(register const NODE *symbol) +/* set_SUBSEP --- update SUBSEP related variables when SUBSEP assigned to */ + +void +set_SUBSEP() { - if (symbol->type == Node_param_list) - symbol = stack_ptr[symbol->param_cnt]; - - if (symbol->type != Node_array_ref || symbol->orig_array->type != Node_var_array) - return symbol->vname; - else { - static char *message = NULL; - static size_t msglen = 0; - char *s; - size_t len; - int n; - const NODE *save_symbol = symbol; - const char *from = _("from %s"); - -#if (MAX_LEN <= 0) || !defined(HAVE_SNPRINTF) - /* This is the default branch. */ - - /* First, we have to compute the length of the string: */ - len = strlen(symbol->vname) + 2; /* "%s (" */ - n = 0; - do { - symbol = symbol->prev_array; - len += strlen(symbol->vname); - n++; - } while (symbol->type == Node_array_ref); - /* - * Each node contributes by strlen(from) minus the length - * of "%s" in the translation (which is at least 2) - * plus 2 for ", " or ")\0"; this adds up to strlen(from). - */ - len += n * strlen(from); - - /* (Re)allocate memory: */ - if (message == NULL) { - emalloc(message, char *, len, "array_vname"); - msglen = len; - } else if (len > msglen) { - erealloc(message, char *, len, "array_vname"); - msglen = len; - } /* else - current buffer can hold new name */ - - /* We're ready to print: */ - symbol = save_symbol; - s = message; - /* - * Ancient systems have sprintf() returning char *, not int. - * Thus, `s += sprintf(s, from, name);' is a no-no. - */ - sprintf(s, "%s (", symbol->vname); - s += strlen(s); - for (;;) { - symbol = symbol->prev_array; - sprintf(s, from, symbol->vname); - s += strlen(s); - if (symbol->type != Node_array_ref) - break; - sprintf(s, ", "); - s += strlen(s); - } - sprintf(s, ")"); - -#else /* MAX_LEN > 0 */ - - /* - * The following check fails only on - * abnormally_long_variable_name. - */ -#define PRINT_CHECK \ - if (n <= 0 || n >= len) \ - return save_symbol->vname; \ - s += n; len -= n -#define PRINT(str) \ - n = snprintf(s, len, str); \ - PRINT_CHECK -#define PRINT_vname(str) \ - n = snprintf(s, len, str, symbol->vname); \ - PRINT_CHECK - - if (message == NULL) - emalloc(message, char *, MAX_LEN, "array_vname"); - - s = message; - len = MAX_LEN; - - /* First, print the vname of the node. */ - PRINT_vname("%s ("); - - for (;;) { - symbol = symbol->prev_array; - /* - * When we don't have enough space and this is not - * the last node, shorten the list. - */ - if (len < 40 && symbol->type == Node_array_ref) { - PRINT("..., "); - symbol = symbol->orig_array; - } - PRINT_vname(from); - if (symbol->type != Node_array_ref) - break; - PRINT(", "); - } - PRINT(")"); - -#undef PRINT_CHECK -#undef PRINT -#undef PRINT_vname -#endif /* MAX_LEN <= 0 */ - - return message; - } -} -#undef MAX_LEN + SUBSEP = force_string(SUBSEP_node->var_value)->stptr; + SUBSEPlen = SUBSEP_node->var_value->stlen; +} /* concat_exp --- concatenate expression list into a single string */ NODE * -concat_exp(register NODE *tree) +concat_exp(int nargs, int do_subsep) { - register NODE *r; + /* do_subsep is false for Node-concat */ + NODE *r; char *str; char *s; size_t len; - int offset; - size_t subseplen; - const char *subsep; - - if (tree->type != Node_expression_list) - return force_string(tree_eval(tree)); - r = force_string(tree_eval(tree->lnode)); - if (tree->rnode == NULL) - return r; - subseplen = SUBSEP_node->var_value->stlen; - subsep = SUBSEP_node->var_value->stptr; - len = r->stlen + subseplen + 2; - emalloc(str, char *, len, "concat_exp"); - memcpy(str, r->stptr, r->stlen+1); + size_t subseplen = 0; + int i; + extern NODE **args_array; + + if (nargs == 1) + return POP_STRING(); + + if (do_subsep) + subseplen = SUBSEPlen; + + len = 0; + for (i = 1; i <= nargs; i++) { + r = POP(); + if (r->type == Node_var_array) { + while (--i > 0) + DEREF(args_array[i]); /* avoid memory leak */ + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(r)); + } + args_array[i] = force_string(r); + len += r->stlen; + } + len += (nargs - 1) * subseplen; + + emalloc(str, char *, len + 2, "concat_exp"); + + r = args_array[nargs]; + memcpy(str, r->stptr, r->stlen); s = str + r->stlen; - free_temp(r); - for (tree = tree->rnode; tree != NULL; tree = tree->rnode) { + DEREF(r); + for (i = nargs - 1; i > 0; i--) { if (subseplen == 1) - *s++ = *subsep; - else { - memcpy(s, subsep, subseplen+1); + *s++ = *SUBSEP; + else if (subseplen > 0) { + memcpy(s, SUBSEP, subseplen); s += subseplen; } - r = force_string(tree_eval(tree->lnode)); - len += r->stlen + subseplen; - offset = s - str; - erealloc(str, char *, len, "concat_exp"); - s = str + offset; - memcpy(s, r->stptr, r->stlen+1); + r = args_array[i]; + memcpy(s, r->stptr, r->stlen); s += r->stlen; - free_temp(r); + DEREF(r); } - r = make_str_node(str, s - str, ALREADY_MALLOCED); - r->flags |= TEMP; - return r; + + return make_str_node(str, len, ALREADY_MALLOCED); } -/* assoc_clear --- flush all the values in symbol[] before doing a split() */ + +/* assoc_clear --- flush all the values in symbol[] */ void assoc_clear(NODE *symbol) @@ -312,15 +339,23 @@ if (symbol->var_array == NULL) return; + for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) { next = bucket->ahnext; - unref(bucket->ahvalue); + if (bucket->ahvalue->type == Node_var_array) { + NODE *r = bucket->ahvalue; + assoc_clear(r); /* recursively clear all sub-arrays */ + efree(r->vname); + freenode(r); + } else + unref(bucket->ahvalue); + unref(bucket); /* unref() will free the ahname_str */ } symbol->var_array[i] = NULL; } - free(symbol->var_array); + efree(symbol->var_array); symbol->var_array = NULL; symbol->array_size = symbol->table_size = 0; symbol->flags &= ~ARRAYMAXED; @@ -329,68 +364,42 @@ /* awk_hash --- calculate the hash function of the string in subs */ static unsigned long -awk_hash(register const char *s, register size_t len, unsigned long hsize, size_t *code) +awk_hash(const char *s, size_t len, unsigned long hsize, size_t *code) { - register unsigned long h = 0; + unsigned long h = 0; + unsigned long htmp; /* + * Ozan Yigit's original sdbm hash, copied from Margo Seltzers + * db package. + * * This is INCREDIBLY ugly, but fast. We break the string up into * 8 byte units. On the first time through the loop we get the * "leftover bytes" (strlen % 8). On every other iteration, we * perform 8 HASHC's so we handle all 8 bytes. Essentially, this * saves us 7 cmp & branch instructions. If this routine is * heavily used enough, it's worth the ugly coding. - * - * OZ's original sdbm hash, copied from Margo Seltzers db package. */ /* * Even more speed: * #define HASHC h = *s++ + 65599 * h * Because 65599 = pow(2, 6) + pow(2, 16) - 1 we multiply by shifts + * + * 4/2011: Force the results to 32 bits, to get the same + * result on both 32- and 64-bit systems. This may be a + * bad idea. */ #define HASHC htmp = (h << 6); \ - h = *s++ + htmp + (htmp << 10) - h - - unsigned long htmp; + h = *s++ + htmp + (htmp << 10) - h ; \ + htmp &= 0xFFFFFFFF; \ + h &= 0xFFFFFFFF h = 0; -#if defined(VAXC) - /* - * This was an implementation of "Duff's Device", but it has been - * redone, separating the switch for extra iterations from the - * loop. This is necessary because the DEC VAX-C compiler is - * STOOPID. - */ - switch (len & (8 - 1)) { - case 7: HASHC; - case 6: HASHC; - case 5: HASHC; - case 4: HASHC; - case 3: HASHC; - case 2: HASHC; - case 1: HASHC; - default: break; - } - - if (len > (8 - 1)) { - register size_t loop = len >> 3; - do { - HASHC; - HASHC; - HASHC; - HASHC; - HASHC; - HASHC; - HASHC; - HASHC; - } while (--loop); - } -#else /* ! VAXC */ - /* "Duff's Device" for those who can handle it */ + /* "Duff's Device" */ if (len > 0) { - register size_t loop = (len + 8 - 1) >> 3; + size_t loop = (len + 8 - 1) >> 3; switch (len & (8 - 1)) { case 0: @@ -406,7 +415,7 @@ } while (--loop); } } -#endif /* ! VAXC */ + if (code != NULL) *code = h; @@ -418,18 +427,18 @@ /* assoc_find --- locate symbol[subs] */ static NODE * /* NULL if not found */ -assoc_find(NODE *symbol, register NODE *subs, unsigned long hash1) +assoc_find(NODE *symbol, NODE *subs, unsigned long hash1, NODE **last) { - register NODE *bucket; + NODE *bucket, *prev; const char *s1_str; size_t s1_len; NODE *s2; - for (bucket = symbol->var_array[hash1]; bucket != NULL; - bucket = bucket->ahnext) { + for (prev = NULL, bucket = symbol->var_array[hash1]; bucket != NULL; + prev = bucket, bucket = bucket->ahnext) { /* * This used to use cmp_nodes() here. That's wrong. - * Array indexes are strings; compare as such, always! + * Array indices are strings; compare as such, always! */ s1_str = bucket->ahname_str; s1_len = bucket->ahname_len; @@ -438,10 +447,12 @@ if (s1_len == s2->stlen) { if (s1_len == 0 /* "" is a valid index */ || memcmp(s1_str, s2->stptr, s1_len) == 0) - return bucket; + break; } } - return NULL; + if (last != NULL) + *last = prev; + return bucket; } /* in_array --- test whether the array element symbol[subs] exists or not, @@ -451,26 +462,17 @@ NODE * in_array(NODE *symbol, NODE *subs) { - register unsigned long hash1; + unsigned long hash1; NODE *ret; - symbol = get_array(symbol); + assert(symbol->type == Node_var_array); - /* - * Evaluate subscript first, it could have side effects. - */ - subs = concat_exp(subs); /* concat_exp returns a string node */ - if (symbol->var_array == NULL) { - free_temp(subs); + if (symbol->var_array == NULL) return NULL; - } + hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, NULL); - ret = assoc_find(symbol, subs, hash1); - free_temp(subs); - if (ret) - return ret->ahvalue; - else - return NULL; + ret = assoc_find(symbol, subs, hash1, NULL); + return (ret ? ret->ahvalue : NULL); } /* @@ -485,8 +487,8 @@ NODE ** assoc_lookup(NODE *symbol, NODE *subs, int reference) { - register unsigned long hash1; - register NODE *bucket; + unsigned long hash1; + NODE *bucket; size_t code; assert(symbol->type == Node_var_array); @@ -502,11 +504,9 @@ } else { hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, & code); - bucket = assoc_find(symbol, subs, hash1); - if (bucket != NULL) { - free_temp(subs); + bucket = assoc_find(symbol, subs, hash1, NULL); + if (bucket != NULL) return &(bucket->ahvalue); - } } if (do_lint && reference) { @@ -542,109 +542,235 @@ bucket->flags |= MALLOC; bucket->ahname_ref = 1; - /* For TEMP node, reuse the storage directly */ - if ((subs->flags & TEMP) != 0) { - bucket->ahname_str = subs->stptr; - bucket->ahname_len = subs->stlen; - bucket->ahname_str[bucket->ahname_len] = '\0'; - subs->flags &= ~TEMP; /* for good measure */ - freenode(subs); - } else { - emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup"); - bucket->ahname_len = subs->stlen; - memcpy(bucket->ahname_str, subs->stptr, subs->stlen); - bucket->ahname_str[bucket->ahname_len] = '\0'; - } - + emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup"); + bucket->ahname_len = subs->stlen; + memcpy(bucket->ahname_str, subs->stptr, subs->stlen); + bucket->ahname_str[bucket->ahname_len] = '\0'; bucket->ahvalue = Nnull_string; + bucket->ahnext = symbol->var_array[hash1]; bucket->ahcode = code; + + /* + * Set the numeric value for the index if it's available. Useful + * for numeric sorting by index. Do this only if the numeric + * value is available, instead of all the time, since doing it + * all the time is a big performance hit for something that may + * never be used. + */ + if ((subs->flags & NUMCUR) != 0) { + bucket->ahname_num = subs->numbr; + bucket->flags |= NUMIND; + } + + /* hook it into the symbol table */ symbol->var_array[hash1] = bucket; return &(bucket->ahvalue); } + +/* adjust_fcall_stack: remove subarray(s) of symbol[] from + * function call stack. + */ + +static void +adjust_fcall_stack(NODE *symbol, int nsubs) +{ + NODE *func, *r, *n; + NODE **sp; + int pcount; + + /* + * Solve the nasty problem of disappearing subarray arguments: + * + * function f(c, d) { delete c; .. use non-existent array d .. } + * BEGIN { a[0][0] = 1; f(a, a[0]); .. } + * + * The fix is to convert 'd' to a local empty array; This has + * to be done before clearing the parent array to avoid referring to + * already free-ed memory. + * + * Similar situations exist for builtins accepting more than + * one array argument: split, patsplit, asort and asorti. For example: + * + * BEGIN { a[0][0] = 1; split("abc", a, "", a[0]) } + * + * These cases do not involve the function call stack, and are + * handled individually in their respective routines. + */ + + func = frame_ptr->func_node; + if (func == NULL) /* in main */ + return; + pcount = func->lnode->param_cnt; + sp = frame_ptr->stack; + + for (; pcount > 0; pcount--) { + r = *sp++; + if (r->type != Node_array_ref + || r->orig_array->type != Node_var_array) + continue; + n = r->orig_array; + + /* Case 1 */ + if (n == symbol + && symbol->parent_array != NULL + && nsubs > 0 + ) { + /* 'symbol' is a subarray, and 'r' is the same subarray: + * + * function f(c, d) { delete c[0]; .. } + * BEGIN { a[0][0] = 1; f(a, a[0]); .. } + * + * But excludes cases like (nsubs = 0): + * + * function f(c, d) { delete c; ..} + * BEGIN { a[0][0] = 1; f(a[0], a[0]); ...} + */ + char *save; +local_array: + save = r->vname; + memset(r, '\0', sizeof(NODE)); + r->vname = save; + r->type = Node_var_array; + continue; + } + + /* Case 2 */ + for (n = n->parent_array; n != NULL; n = n->parent_array) { + assert(n->type == Node_var_array); + if (n == symbol) { + /* 'r' is a subarray of 'symbol': + * + * function f(c, d) { delete c; .. use d as array .. } + * BEGIN { a[0][0] = 1; f(a, a[0]); .. } + * OR + * BEGIN { a[0][0][0][0] = 1; f(a[0], a[0][0][0]); .. } + * + */ + + goto local_array; + } + } + } +} + + /* do_delete --- perform `delete array[s]' */ /* * `symbol' is array - * `tree' is subscript + * `nsubs' is number of subscripts */ void -do_delete(NODE *sym, NODE *tree) +do_delete(NODE *symbol, int nsubs) { - register unsigned long hash1; - register NODE *bucket, *last; - NODE *subs; - register NODE *symbol = get_array(sym); + unsigned long hash1 = 0; + NODE *subs, *bucket, *last, *r; + int i; + + assert(symbol->type == Node_var_array); + subs = bucket = last = r = NULL; /* silence the compiler */ + + /* + * The force_string() call is needed to make sure that + * the string subscript is reasonable. For example, with it: + * + * $ ./gawk --posix 'BEGIN { CONVFMT="%ld"; delete a[1.233]}' + * gawk: cmd. line:1: fatal: `%l' is not permitted in POSIX awk formats + * + * Without it, the code does not fail. + */ + +#define free_subs(n) \ +do { \ + NODE *s = PEEK(n - 1); \ + if (s->type == Node_val) { \ + (void) force_string(s); /* may have side effects ? */ \ + DEREF(s); \ + } \ +} while (--n > 0) - if (tree == NULL) { /* delete array */ + if (nsubs == 0) { /* delete array */ + adjust_fcall_stack(symbol, 0); /* fix function call stack; See above. */ assoc_clear(symbol); return; } - last = NULL; /* shut up gcc -Wall */ - hash1 = 0; /* ditto */ + /* NB: subscripts are in reverse order on stack */ - /* - * Always evaluate subscript, it could have side effects. - */ - subs = concat_exp(tree); /* concat_exp returns string node */ + for (i = nsubs; i > 0; i--) { + subs = PEEK(i - 1); + if (subs->type != Node_val) { + free_subs(i); + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(subs)); + } + (void) force_string(subs); - if (symbol->var_array != NULL) { - hash1 = hash(subs->stptr, subs->stlen, - (unsigned long) symbol->array_size, NULL); - last = NULL; - for (bucket = symbol->var_array[hash1]; bucket != NULL; - last = bucket, bucket = bucket->ahnext) { - /* - * This used to use cmp_nodes() here. That's wrong. - * Array indexes are strings; compare as such, always! - */ - const char *s1_str; - size_t s1_len; - NODE *s2; - - s1_str = bucket->ahname_str; - s1_len = bucket->ahname_len; - s2 = subs; - - if (s1_len == s2->stlen) { - if (s1_len == 0 /* "" is a valid index */ - || memcmp(s1_str, s2->stptr, s1_len) == 0) - break; - } + last = NULL; /* shut up gcc -Wall */ + hash1 = 0; /* ditto */ + bucket = NULL; /* array may be empty */ + + if (symbol->var_array != NULL) { + hash1 = hash(subs->stptr, subs->stlen, + (unsigned long) symbol->array_size, NULL); + bucket = assoc_find(symbol, subs, hash1, &last); } - } else - bucket = NULL; /* The array is empty. */ - if (bucket == NULL) { - if (do_lint) - lintwarn(_("delete: index `%s' not in array `%s'"), - subs->stptr, array_vname(sym)); - free_temp(subs); - return; + if (bucket == NULL) { + if (do_lint) + lintwarn(_("delete: index `%s' not in array `%s'"), + subs->stptr, array_vname(symbol)); + /* avoid memory leak, free all subs */ + free_subs(i); + return; + } + + if (i > 1) { + if (bucket->ahvalue->type != Node_var_array) { + /* e.g.: a[1] = 1; delete a[1][1] */ + free_subs(i); + fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"), + array_vname(symbol), + (int) bucket->ahname_len, + bucket->ahname_str); + } + symbol = bucket->ahvalue; + } + DEREF(subs); } - free_temp(subs); + r = bucket->ahvalue; + if (r->type == Node_var_array) { + adjust_fcall_stack(r, nsubs); /* fix function call stack; See above. */ + assoc_clear(r); + /* cleared a sub-array, free Node_var_array */ + efree(r->vname); + freenode(r); + } else + unref(r); if (last != NULL) last->ahnext = bucket->ahnext; else symbol->var_array[hash1] = bucket->ahnext; - unref(bucket->ahvalue); + unref(bucket); /* unref() will free the ahname_str */ symbol->table_size--; if (symbol->table_size <= 0) { - memset(symbol->var_array, '\0', - sizeof(NODE *) * symbol->array_size); symbol->table_size = symbol->array_size = 0; symbol->flags &= ~ARRAYMAXED; - free((char *) symbol->var_array); - symbol->var_array = NULL; + if (symbol->var_array != NULL) { + efree(symbol->var_array); + symbol->var_array = NULL; + } } + +#undef free_subs } + /* do_delete_loop --- simulate ``for (iggy in foo) delete foo[iggy]'' */ /* @@ -654,13 +780,11 @@ */ void -do_delete_loop(NODE *symbol, NODE *tree) +do_delete_loop(NODE *symbol, NODE **lhs) { long i; - NODE **lhs; - Func_ptr after_assign = NULL; - symbol = get_array(symbol); + assert(symbol->type == Node_var_array); if (symbol->var_array == NULL) return; @@ -668,17 +792,15 @@ /* get first index value */ for (i = 0; i < symbol->array_size; i++) { if (symbol->var_array[i] != NULL) { - lhs = get_lhs(tree->lnode, & after_assign, FALSE); unref(*lhs); *lhs = make_string(symbol->var_array[i]->ahname_str, symbol->var_array[i]->ahname_len); - if (after_assign) - (*after_assign)(); break; } } /* blast the array in one shot */ + adjust_fcall_stack(symbol, 0); assoc_clear(symbol); } @@ -695,18 +817,13 @@ * This is an array of primes. We grow the table by an order of * magnitude each time (not just doubling) so that growing is a * rare operation. We expect, on average, that it won't happen - * more than twice. The final size is also chosen to be small - * enough so that MS-DOG mallocs can handle it. When things are - * very large (> 8K), we just double more or less, instead of - * just jumping from 8K to 64K. + * more than twice. When things are very large (> 8K), we just + * double more or less, instead of just jumping from 8K to 64K. */ - 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, - 67108879, 134217757, 268435459, 536870923, - 1073741827 -#endif + static const long sizes[] = { + 13, 127, 1021, 8191, 16381, 32749, 65497, 131101, 262147, + 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, + 67108879, 134217757, 268435459, 536870923, 1073741827 }; /* find next biggest hash size */ @@ -748,7 +865,7 @@ new[hash1] = chain; } } - free(old); + efree(old); done: /* @@ -759,43 +876,44 @@ symbol->array_size = newsize; } -/* set_SUBSEP --- make sure SUBSEP always has a string value */ +/* pr_node --- print simple node info */ -void -set_SUBSEP(void) +static void +pr_node(NODE *n) { - - (void) force_string(SUBSEP_node->var_value); - return; + if ((n->flags & NUMBER) != 0) + printf("%s %g p: %p", flags2str(n->flags), n->numbr, n); + else + printf("%s %.*s p: %p", flags2str(n->flags), + (int) n->stlen, n->stptr, n); } -/* pr_node --- print simple node info */ static void -pr_node(NODE *n) +indent(int indent_level) { - if ((n->flags & (NUMCUR|NUMBER)) != 0) - printf("%g", n->numbr); - else - printf("%.*s", (int) n->stlen, n->stptr); + int k; + for (k = 0; k < indent_level; k++) + putchar('\t'); } /* assoc_dump --- dump the contents of an array */ NODE * -assoc_dump(NODE *symbol) +assoc_dump(NODE *symbol, int indent_level) { long i; NODE *bucket; + indent(indent_level); if (symbol->var_array == NULL) { printf(_("%s: empty (null)\n"), symbol->vname); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } if (symbol->table_size == 0) { printf(_("%s: empty (zero)\n"), symbol->vname); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } printf(_("%s: table_size = %d, array_size = %d\n"), symbol->vname, @@ -804,41 +922,46 @@ for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = bucket->ahnext) { - printf("%s: I: [len %d <%.*s>] V: [", + indent(indent_level); + printf("%s: I: [len %d <%.*s> p: %p] V: [", symbol->vname, (int) bucket->ahname_len, (int) bucket->ahname_len, + bucket->ahname_str, bucket->ahname_str); - pr_node(bucket->ahvalue); + if (bucket->ahvalue->type == Node_var_array) { + printf("\n"); + assoc_dump(bucket->ahvalue, indent_level + 1); + indent(indent_level); + } else + pr_node(bucket->ahvalue); printf("]\n"); } } - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } /* do_adump --- dump an array: interface to assoc_dump */ NODE * -do_adump(NODE *tree) +do_adump(int nargs) { NODE *r, *a; - a = tree->lnode; - + a = POP(); if (a->type == Node_param_list) { printf(_("%s: is parameter\n"), a->vname); - a = stack_ptr[a->param_cnt]; + a = GET_PARAM(a->param_cnt); } - if (a->type == Node_array_ref) { printf(_("%s: array_ref to %s\n"), a->vname, a->orig_array->vname); a = a->orig_array; } - - r = assoc_dump(a); - + if (a->type != Node_var_array) + fatal(_("adump: argument not an array")); + r = assoc_dump(a, 0); return r; } @@ -848,9 +971,9 @@ * ajb@woti.com. */ -/* dup_table --- duplicate input symbol table "symbol" */ +/* dup_table --- recursively duplicate input array "symbol" */ -static void +static NODE * dup_table(NODE *symbol, NODE *newsymb) { NODE **old, **new, *chain, *bucket; @@ -883,6 +1006,11 @@ bucket->type = Node_ahash; bucket->flags |= MALLOC; bucket->ahname_ref = 1; + bucket->ahcode = chain->ahcode; + if ((chain->flags & NUMIND) != 0) { + bucket->ahname_num = chain->ahname_num; + bucket->flags |= NUMIND; + } /* * copy the corresponding name and @@ -894,7 +1022,15 @@ memcpy(bucket->ahname_str, chain->ahname_str, chain->ahname_len); bucket->ahname_str[bucket->ahname_len] = '\0'; - bucket->ahvalue = dupnode(chain->ahvalue); + if (chain->ahvalue->type == Node_var_array) { + NODE *r; + getnode(r); + r->type = Node_var_array; + r->vname = estrdup(chain->ahname_str, chain->ahname_len); + r->parent_array = newsymb; + bucket->ahvalue = dup_table(chain->ahvalue, r); + } else + bucket->ahvalue = dupnode(chain->ahvalue); /* * put the node on the corresponding @@ -910,249 +1046,668 @@ newsymb->var_array = new; newsymb->array_size = cursize; + newsymb->flags = symbol->flags; /* ARRAYMAXED */ + return newsymb; } -/* merge --- do a merge of two sorted lists */ + +/* asort_actual --- do the actual work to sort the input array */ static NODE * -merge(NODE *left, NODE *right) +asort_actual(int nargs, SORT_CTXT ctxt) { - NODE *ans, *cur; + NODE *array, *dest = NULL, *result; + NODE *r, *subs, *s; + NODE **list, **ptr; +#define TSIZE 100 /* an arbitrary amount */ + static char buf[TSIZE+2]; + unsigned long num_elems, i; + const char *sort_str; + + if (nargs == 3) /* 3rd optional arg */ + s = POP_STRING(); + else + s = Nnull_string; /* "" => default sorting */ + + s = force_string(s); + sort_str = s->stptr; + if (s->stlen == 0) { /* default sorting */ + if (ctxt == ASORT) + sort_str = "@val_type_asc"; + else + sort_str = "@ind_str_asc"; + } + + + if (nargs >= 2) { /* 2nd optional arg */ + dest = POP_PARAM(); + if (dest->type != Node_var_array) { + fatal(ctxt == ASORT ? + _("asort: second argument not an array") : + _("asorti: second argument not an array")); + } + } + + array = POP_PARAM(); + if (array->type != Node_var_array) { + fatal(ctxt == ASORT ? + _("asort: first argument not an array") : + _("asorti: first argument not an array")); + } + + if (dest != NULL) { + for (r = dest->parent_array; r != NULL; r = r->parent_array) { + if (r == array) + fatal(ctxt == ASORT ? + _("asort: cannot use a subarray of first arg for second arg") : + _("asorti: cannot use a subarray of first arg for second arg")); + } + for (r = array->parent_array; r != NULL; r = r->parent_array) { + if (r == dest) + fatal(ctxt == ASORT ? + _("asort: cannot use a subarray of second arg for first arg") : + _("asorti: cannot use a subarray of second arg for first arg")); + } + } + + num_elems = array->table_size; + if (num_elems == 0 || array->var_array == NULL) { /* source array is empty */ + if (dest != NULL && dest != array) + assoc_clear(dest); + return make_number((AWKNUM) 0); + } + + /* sorting happens inside assoc_list */ + list = assoc_list(array, sort_str, ctxt); + DEREF(s); /* - * 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. + * Must not assoc_clear() the source array before constructing + * the output array. assoc_list() does not duplicate array values + * which are needed for asort(). */ - if (cmp_nodes(left->ahvalue, right->ahvalue) <= 0) { - ans = cur = left; - left = left->ahnext; + + if (dest != NULL && dest != array) { + assoc_clear(dest); + result = dest; } else { - ans = cur = right; - right = right->ahnext; + /* use 'result' as a temporary destination array */ + getnode(result); + memset(result, '\0', sizeof(NODE)); + result->type = Node_var_array; + result->vname = array->vname; + result->parent_array = array->parent_array; } - while (left != NULL && right != NULL) { - if (cmp_nodes(left->ahvalue, right->ahvalue) <= 0) { - cur->ahnext = left; - cur = left; - left = left->ahnext; + subs = make_str_node(buf, TSIZE, ALREADY_MALLOCED); /* fake it */ + subs->flags &= ~MALLOC; /* safety */ + for (i = 1, ptr = list; i <= num_elems; i++) { + sprintf(buf, "%lu", i); + subs->stlen = strlen(buf); + /* make number valid in case this array gets sorted later */ + subs->numbr = i; + subs->flags |= NUMCUR; + r = *ptr++; + if (ctxt == ASORTI) { + /* + * We want the indices of the source array as values + * of the 'result' array. + */ + *assoc_lookup(result, subs, FALSE) = + make_string(r->ahname_str, r->ahname_len); } else { - cur->ahnext = right; - cur = right; - right = right->ahnext; + NODE *val; + + /* We want the values of the source array. */ + + val = r->ahvalue; + if (result != dest) { + /* optimization for dest = NULL or dest = array */ + + if (val->type == Node_var_array) { + /* update subarray index in parent array */ + efree(val->vname); + val->vname = estrdup(subs->stptr, subs->stlen); + } + *assoc_lookup(result, subs, FALSE) = val; + r->ahvalue = Nnull_string; + } else { + if (val->type == Node_val) + *assoc_lookup(result, subs, FALSE) = dupnode(val); + else { + NODE *arr; + + /* + * There isn't any reference counting for + * subarrays, so recursively copy subarrays + * using dup_table(). + */ + getnode(arr); + arr->type = Node_var_array; + arr->var_array = NULL; + arr->vname = estrdup(subs->stptr, subs->stlen); + arr->parent_array = array; /* actual parent, not the temporary one. */ + *assoc_lookup(result, subs, FALSE) = dup_table(val, arr); + } + } } + + unref(r); + } + + freenode(subs); /* stptr(buf) not malloc-ed */ + efree(list); + + if (result != dest) { + /* dest == NULL or dest == array */ + assoc_clear(array); + *array = *result; /* copy result into array */ + freenode(result); + } /* else + result == dest + dest != NULL and dest != array */ + + return make_number((AWKNUM) num_elems); +} +#undef TSIZE + +/* do_asort --- sort array by value */ + +NODE * +do_asort(int nargs) +{ + return asort_actual(nargs, ASORT); +} + +/* do_asorti --- sort array by index */ + +NODE * +do_asorti(int nargs) +{ + return asort_actual(nargs, ASORTI); +} + +/* + * cmp_string --- compare two strings; logic similar to cmp_nodes() in eval.c + * except the extra case-sensitive comparison when the case-insensitive + * result is a match. + */ + +static int +cmp_string(const NODE *n1, const NODE *n2) +{ + char *s1, *s2; + size_t len1, len2; + int ret; + size_t lmin; + + assert(n1->type == n2->type); + if (n1->type == Node_ahash) { + s1 = n1->ahname_str; + len1 = n1->ahname_len; + s2 = n2->ahname_str; + len2 = n2->ahname_len; + } else { + s1 = n1->stptr; + len1 = n1->stlen; + s2 = n2->stptr; + len2 = n2->stlen; + } + + if (len1 == 0) + return len2 == 0 ? 0 : -1; + if (len2 == 0) + return 1; + + /* len1 > 0 && len2 > 0 */ + lmin = len1 < len2 ? len1 : len2; + + if (IGNORECASE) { + const unsigned char *cp1 = (const unsigned char *) s1; + const unsigned char *cp2 = (const unsigned char *) s2; + +#if MBS_SUPPORT + if (gawk_mb_cur_max > 1) { + ret = strncasecmpmbs((const unsigned char *) cp1, + (const unsigned char *) cp2, lmin); + } else +#endif + for (ret = 0; lmin-- > 0 && ret == 0; cp1++, cp2++) + ret = casetable[*cp1] - casetable[*cp2]; + if (ret != 0) + return ret; + /* + * If case insensitive result is "they're the same", + * use case sensitive comparison to force distinct order. + */ } - cur->ahnext = (left != NULL ? left : right); + ret = memcmp(s1, s2, lmin); + if (ret != 0 || len1 == len2) + return ret; + return (len1 < len2) ? -1 : 1; +} + + +/* sort_up_index_string --- qsort comparison function; ascending index strings. */ - return ans; +static int +sort_up_index_string(const void *p1, const void *p2) +{ + const NODE *t1, *t2; + + /* Array indices are strings */ + t1 = *((const NODE *const *) p1); + t2 = *((const NODE *const *) p2); + return cmp_string(t1, t2); } -/* merge_sort --- recursively sort the left and right sides of a list */ -static NODE * -merge_sort(NODE *left, unsigned long size) +/* sort_down_index_string --- descending index strings */ + +static int +sort_down_index_string(const void *p1, const void *p2) { - NODE *right, *tmp; - int i, half; + /* + * Negation versus transposed arguments: when all keys are + * distinct, as with array indices here, either method will + * transform an ascending sort into a descending one. But if + * there are equal keys--such as when IGNORECASE is honored-- + * that get disambiguated into a determisitc order, negation + * will reverse those but transposed arguments would retain + * their relative order within the rest of the reversed sort. + */ + return -sort_up_index_string(p1, p2); +} + - if (size <= 1) - return left; +/* sort_up_index_number --- qsort comparison function; ascending index numbers. */ - /* walk down the list, till just one before the midpoint */ - tmp = left; - half = size / 2; - for (i = 0; i < half-1; i++) - tmp = tmp->ahnext; - - /* split the list into two parts */ - right = tmp->ahnext; - tmp->ahnext = NULL; - - /* sort the left and right parts of the list */ - left = merge_sort(left, half); - right = merge_sort(right, size-half); +static int +sort_up_index_number(const void *p1, const void *p2) +{ + const NODE *n1, *n2; + int ret; - /* merge the two sorted parts of the list */ - return merge(left, right); + n1 = *((const NODE *const *) p1); + n2 = *((const NODE *const *) p2); + + if (n1->ahname_num < n2->ahname_num) + ret = -1; + else + ret = (n1->ahname_num > n2->ahname_num); + + /* break a tie with the index string itself */ + if (ret == 0) + return cmp_string(n1, n2); + return ret; } -/* - * assoc_from_list -- Populate an array with the contents of a list of NODEs, - * using increasing integers as the key. - */ +/* sort_down_index_number --- qsort comparison function; descending index numbers */ -static void -assoc_from_list(NODE *symbol, NODE *list) +static int +sort_down_index_number(const void *p1, const void *p2) { - NODE *next; - unsigned long i = 0; - register unsigned long hash1; - char buf[100]; + return -sort_up_index_number(p1, p2); +} - for (; list != NULL; list = next) { - size_t code; - next = list->ahnext; +/* sort_up_value_string --- qsort comparison function; ascending value string */ - /* make an int out of i++ */ - i++; - 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_str, list->ahname_len, - symbol->array_size, & code); - list->ahcode = code; - - /* link the node into the chain at that bucket */ - list->ahnext = symbol->var_array[hash1]; - symbol->var_array[hash1] = list; +static int +sort_up_value_string(const void *p1, const void *p2) +{ + const NODE *t1, *t2; + NODE *n1, *n2; + + /* we're passed a pair of index (array subscript) nodes */ + t1 = *(const NODE *const *) p1; + t2 = *(const NODE *const *) p2; + + /* and we want to compare the element values they refer to */ + n1 = t1->ahvalue; + n2 = t2->ahvalue; + + if (n1->type == Node_var_array) { + /* return 0 if n2 is a sub-array too, else return 1 */ + return (n2->type != Node_var_array); } + if (n2->type == Node_var_array) + return -1; /* n1 (scalar) < n2 (sub-array) */ + + /* n1 and n2 both have string values; See sort_force_value_string(). */ + return cmp_string(n1, n2); } -/* - * assoc_sort_inplace --- sort all the values in symbol[], replacing - * the sorted values back into symbol[], indexed by integers starting with 1. - */ -typedef enum asort_how { VALUE, INDEX } ASORT_TYPE; +/* sort_down_value_string --- descending value string */ -static NODE * -assoc_sort_inplace(NODE *symbol, ASORT_TYPE how) +static int +sort_down_value_string(const void *p1, const void *p2) { - unsigned long i, num; - NODE *bucket, *next, *list; + return -sort_up_value_string(p1, p2); +} - if (symbol->var_array == NULL - || symbol->array_size <= 0 - || symbol->table_size <= 0) - return tmp_number((AWKNUM) 0); - - /* build a linked list out of all the entries in the table */ - 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; +/* sort_up_value_number --- qsort comparison function; ascending value number */ - /* toss old value */ - unref(bucket->ahvalue); +static int +sort_up_value_number(const void *p1, const void *p2) +{ + const NODE *t1, *t2; + NODE *n1, *n2; + int ret; - /* 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; - } + /* we're passed a pair of index (array subscript) nodes */ + t1 = *(const NODE *const *) p1; + t2 = *(const NODE *const *) p2; - bucket->ahnext = list; - list = bucket; - num++; - } - symbol->var_array[i] = NULL; - } + /* and we want to compare the element values they refer to */ + n1 = t1->ahvalue; + n2 = t2->ahvalue; + + if (n1->type == Node_var_array) { + /* return 0 if n2 is a sub-array too, else return 1 */ + return (n2->type != Node_var_array); } + if (n2->type == Node_var_array) + return -1; /* n1 (scalar) < n2 (sub-array) */ - /* - * Sort the linked list of NODEs. - * (The especially nice thing about using a merge sort here is that - * we require absolutely no additional storage. This is handy if the - * array has grown to be very large.) - */ - list = merge_sort(list, num); + /* n1 and n2 both Node_val, and force_number'ed */ + if (n1->numbr < n2->numbr) + ret = -1; + else + ret = (n1->numbr > n2->numbr); - /* - * now repopulate the original array, using increasing - * integers as the key - */ - assoc_from_list(symbol, list); + if (ret == 0) { + /* + * Use string value to guarantee same sort order on all + * versions of qsort(). + */ + n1 = force_string(n1); + n2 = force_string(n2); + ret = cmp_string(n1, n2); + } - return tmp_number((AWKNUM) num); + return ret; } -/* asort_actual --- do the actual work to sort the input array */ +/* sort_down_value_number --- descending value number */ -static NODE * -asort_actual(NODE *tree, ASORT_TYPE how) +static int +sort_down_value_number(const void *p1, const void *p2) { - NODE *array = get_array(tree->lnode); + return -sort_up_value_number(p1, p2); +} - if (tree->rnode != NULL) { /* 2nd optional arg */ - NODE *dest = get_array(tree->rnode->lnode); +/* sort_up_value_type --- qsort comparison function; ascending value type */ - assoc_clear(dest); - dup_table(array, dest); - array = dest; +static int +sort_up_value_type(const void *p1, const void *p2) +{ + const NODE *t1, *t2; + NODE *n1, *n2; + + /* we're passed a pair of index (array subscript) nodes */ + t1 = *(const NODE *const *) p1; + t2 = *(const NODE *const *) p2; + + /* and we want to compare the element values they refer to */ + n1 = t1->ahvalue; + n2 = t2->ahvalue; + + /* 1. Arrays vs. scalar, scalar is less than array */ + if (n1->type == Node_var_array) { + /* return 0 if n2 is a sub-array too, else return 1 */ + return (n2->type != Node_var_array); + } + if (n2->type == Node_var_array) { + return -1; /* n1 (scalar) < n2 (sub-array) */ + } + + /* two scalars */ + /* 2. Resolve MAYBE_NUM, so that have only NUMBER or STRING */ + if ((n1->flags & MAYBE_NUM) != 0) + (void) force_number(n1); + if ((n2->flags & MAYBE_NUM) != 0) + (void) force_number(n2); + + if ((n1->flags & NUMBER) != 0 && (n2->flags & NUMBER) != 0) { + if (n1->numbr < n2->numbr) + return -1; + else if (n1->numbr > n2->numbr) + return 1; + else + return 0; + } + + /* 3. All numbers are less than all strings. This is aribitrary. */ + if ((n1->flags & NUMBER) != 0 && (n2->flags & STRING) != 0) { + return -1; + } else if ((n1->flags & STRING) != 0 && (n2->flags & NUMBER) != 0) { + return 1; } - return assoc_sort_inplace(array, how); + /* 4. Two strings */ + return cmp_string(n1, n2); } -/* do_asort --- sort array by value */ +/* sort_down_value_type --- descending value type */ -NODE * -do_asort(NODE *tree) +static int +sort_down_value_type(const void *p1, const void *p2) { - return asort_actual(tree, VALUE); + return -sort_up_value_type(p1, p2); } -/* do_asorti --- sort array by index */ +/* sort_user_func --- user defined qsort comparison function */ -NODE * -do_asorti(NODE *tree) +static int +sort_user_func(const void *p1, const void *p2) +{ + const NODE *t1, *t2; + NODE *idx1, *idx2, *val1, *val2; + AWKNUM ret; + INSTRUCTION *code; + + t1 = *((const NODE *const *) p1); + t2 = *((const NODE *const *) p2); + + idx1 = make_string(t1->ahname_str, t1->ahname_len); + idx2 = make_string(t2->ahname_str, t2->ahname_len); + val1 = t1->ahvalue; + val2 = t2->ahvalue; + + code = TOP()->code_ptr; /* comparison function call instructions */ + + /* setup 4 arguments to comp_func() */ + PUSH(idx1); + if (val1->type == Node_val) + UPREF(val1); + PUSH(val1); + PUSH(idx2); + if (val2->type == Node_val) + UPREF(val2); + PUSH(val2); + + /* execute the comparison function */ + (void) interpret(code); + + /* return value of the comparison function */ + POP_NUMBER(ret); + + return (ret < 0.0) ? -1 : (ret > 0.0); +} + +/* sort_force_index_number -- pre-process list items for sorting indices as numbers */ + +static void +sort_force_index_number(NODE **list, size_t num_elems) { - return asort_actual(tree, INDEX); + size_t i; + NODE *r; + static NODE temp_node; + + for (i = 0; i < num_elems; i++) { + r = list[i]; + + if ((r->flags & NUMIND) != 0) /* once in a lifetime is plenty */ + continue; + temp_node.type = Node_val; + temp_node.stptr = r->ahname_str; + temp_node.stlen = r->ahname_len; + temp_node.flags = 0; /* only interested in the return value of r_force_number */ + r->ahname_num = r_force_number(& temp_node); + r->flags |= NUMIND; + } +} + +/* sort_force_value_number -- pre-process list items for sorting values as numbers */ + +static void +sort_force_value_number(NODE **list, size_t num_elems) +{ + size_t i; + NODE *r, *val; + + for (i = 0; i < num_elems; i++) { + r = list[i]; + val = r->ahvalue; + if (val->type == Node_val) + (void) force_number(val); + } +} + +/* sort_force_value_string -- pre-process list items for sorting values as strings */ + +static void +sort_force_value_string(NODE **list, size_t num_elems) +{ + size_t i; + NODE *r, *val; + + for (i = 0; i < num_elems; i++) { + r = list[i]; + val = r->ahvalue; + if (val->type == Node_val) + r->ahvalue = force_string(val); + } } +/* assoc_list -- construct, and optionally sort, a list of array elements */ + +NODE ** +assoc_list(NODE *array, const char *sort_str, SORT_CTXT sort_ctxt) +{ + typedef void (*qsort_prefunc)(NODE **, size_t); + typedef int (*qsort_compfunc)(const void *, const void *); + + static const struct qsort_funcs { + const char *name; + qsort_compfunc comp_func; + qsort_prefunc pre_func; /* pre-processing of list items */ + } sort_funcs[] = { + { "@ind_str_asc", sort_up_index_string, 0 }, + { "@ind_num_asc", sort_up_index_number, sort_force_index_number }, + { "@val_str_asc", sort_up_value_string, sort_force_value_string }, + { "@val_num_asc", sort_up_value_number, sort_force_value_number }, + { "@ind_str_desc", sort_down_index_string, 0 }, + { "@ind_num_desc", sort_down_index_number, sort_force_index_number }, + { "@val_str_desc", sort_down_value_string, sort_force_value_string }, + { "@val_num_desc", sort_down_value_number, sort_force_value_number }, + { "@val_type_asc", sort_up_value_type, 0 }, + { "@val_type_desc", sort_down_value_type, 0 }, + { "@unsorted", 0, 0 }, + }; + NODE **list; + NODE *r; + size_t num_elems, i, j; + qsort_compfunc cmp_func = 0; + qsort_prefunc pre_func = 0; + INSTRUCTION *code = NULL; + int qi; + extern int currule; + + num_elems = array->table_size; + assert(num_elems > 0); + + for (qi = 0, j = sizeof(sort_funcs)/sizeof(sort_funcs[0]); qi < j; qi++) { + if (strcmp(sort_funcs[qi].name, sort_str) == 0) + break; + } + + if (qi >= 0 && qi < j) { + cmp_func = sort_funcs[qi].comp_func; + pre_func = sort_funcs[qi].pre_func; + + } else { /* unrecognized */ + NODE *f; + const char *sp; + + assert(sort_str != NULL); + + for (sp = sort_str; *sp != '\0' + && ! isspace((unsigned char) *sp); sp++) + continue; + + /* empty string or string with space(s) not valid as function name */ + if (sp == sort_str || *sp != '\0') + fatal(_("`%s' is invalid as a function name"), sort_str); + + f = lookup(sort_str); + if (f == NULL || f->type != Node_func) + fatal(_("sort comparison function `%s' is not defined"), sort_str); + + cmp_func = sort_user_func; + /* pre_func is still NULL */ + + /* make function call instructions */ + code = bcalloc(Op_func_call, 2, 0); + code->func_body = f; + code->func_name = NULL; /* not needed, func_body already assigned */ + (code + 1)->expr_count = 4; /* function takes 4 arguments */ + code->nexti = bcalloc(Op_stop, 1, 0); + + /* make non-redirected getline, exit, `next' and `nextfile' fatal in + * callback function by setting currule in interpret() + * to undefined (0). + */ + + (code + 1)->inrule = currule; /* save current rule */ + currule = 0; + + PUSH_CODE(code); + } + + /* allocate space for array; the extra space is used in for(i in a) opcode (eval.c) */ + emalloc(list, NODE **, (num_elems + 1) * sizeof(NODE *), "assoc_list"); + + /* populate it */ + for (i = j = 0; i < array->array_size; i++) + for (r = array->var_array[i]; r != NULL; r = r->ahnext) + list[j++] = dupnode(r); + list[num_elems] = NULL; + + if (! cmp_func) /* unsorted */ + return list; + + /* special pre-processing of list items */ + if (pre_func) + pre_func(list, num_elems); + + qsort(list, num_elems, sizeof(NODE *), cmp_func); /* shazzam! */ + + if (cmp_func == sort_user_func) { + code = POP_CODE(); + currule = (code + 1)->inrule; /* restore current rule */ + bcfree(code->nexti); /* Op_stop */ + bcfree(code); /* Op_func_call */ + } + + return list; +} + + /* From bonzini@gnu.org Mon Oct 28 16:05:26 2002 Date: Mon, 28 Oct 2002 13:33:03 +0100 diff -Nru gawk-3.1.8+dfsg/awk.h gawk-4.0.1+dfsg/awk.h --- gawk-3.1.8+dfsg/awk.h 2010-04-21 20:32:19.000000000 +0000 +++ gawk-4.0.1+dfsg/awk.h 2012-03-28 19:47:53.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -29,9 +29,6 @@ * config.h absolutely, positively, *M*U*S*T* be included before * any system headers. Otherwise, extreme death, destruction * and loss of life results. - * - * Well, OK, gawk just won't work on systems using egcs and LFS. But - * that's almost as bad. */ #ifdef HAVE_CONFIG_H #include @@ -63,24 +60,29 @@ #endif /* LOCALEDIR */ #endif -#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ -#define CAN_USE_STDARG_H 1 +#if !defined(__STDC__) || __STDC__ < 1 +#error "gawk no longer supports non-C89 environments (no __STDC__ or __STDC__ < 1)" +#endif + +#if defined(HAVE_STDARG_H) #include #else -#include +#error "gawk no longer supports . Please update your compiler and runtime" #endif #include #include #include -#if ! defined(errno) && ! defined(MSDOS) && ! defined(OS2) +#if ! defined(errno) extern int errno; #endif -#ifndef NO_MBSUPPORT +#ifdef STDC_HEADERS +#include +#endif /* not STDC_HEADERS */ + #include "mbsupport.h" /* defines MBS_SUPPORT */ -#endif -#if defined(MBS_SUPPORT) +#if MBS_SUPPORT /* We can handle multibyte strings. */ #include #include @@ -101,43 +103,39 @@ # include #endif #endif /* !ZOS_USS */ - -#if defined(_MSC_VER) -/* for read()/close() in use replace.c */ -#include -#endif /* ----------------- System dependencies (with more includes) -----------*/ /* This section is the messiest one in the file, not a lot that can be done */ -#ifdef __STDC__ -#define P(s) s #define MALLOC_ARG_T size_t -#else /* not __STDC__ */ -#define P(s) () -#define MALLOC_ARG_T unsigned -#define volatile -#endif /* not __STDC__ */ #ifndef VMS +#ifdef HAVE_FCNTL_H +#include +#endif #include #include #else /* VMS */ #include #include #include /* avoid in io.c */ +/* debug.c needs this; when _DECC_V4_SOURCE is defined (as it is + in our config.h [vms/vms-conf.h]), off_t won't get declared */ +# if !defined(__OFF_T) && !defined(_OFF_T) +# if defined(____OFF_T) || defined(___OFF_T) +typedef __off_t off_t; /* __off_t is either int or __int64 */ +# else +typedef int off_t; +# endif +# endif #endif /* VMS */ #if ! defined(S_ISREG) && defined(S_IFREG) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif -#ifdef STDC_HEADERS -#include -#else /* not STDC_HEADERS */ #include "protos.h" -#endif /* not STDC_HEADERS */ #ifdef HAVE_STRING_H #include @@ -150,69 +148,53 @@ #endif /* HAVE_STRINGS_H */ #endif /* not HAVE_STRING_H */ -#ifdef NeXT -#if __GNUC__ < 2 || __GNUC_MINOR__ < 7 -#include -#endif -#undef atof -#define getopt GNU_getopt -#define GFMT_WORKAROUND -#endif /* NeXT */ - -#if defined(atarist) || defined(VMS) -#include -#endif /* atarist || VMS */ - -#if ! defined(MSDOS) && ! defined(OS2) && ! defined(WIN32) && ! defined(__EMX__) && ! defined(__CYGWIN__) && ! defined(O_BINARY) /*duh*/ -#define O_BINARY 0 -#endif - -#if defined(TANDEM) -#define variable variabl -#define open(name, how, mode) open(name, how) /* !!! ANSI C !!! */ -#endif - #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #ifdef VMS +#include #include "vms/redirect.h" #endif /*VMS*/ -#ifdef atarist -#include "unsupported/atari/redirect.h" +#ifndef O_BINARY +#define O_BINARY 0 #endif #ifndef HAVE_VPRINTF -/* if you don't have vprintf, try this and cross your fingers. */ -#ifdef HAVE_DOPRNT -#define vfprintf(fp,fmt,arg) _doprnt((fmt), (arg), (fp)) -#else /* not HAVE_DOPRNT */ -you -lose -#endif /* not HAVE_DOPRNT */ +#error "you lose: you need a system with vfprintf" #endif /* HAVE_VPRINTF */ -#ifndef HAVE_SNPRINTF -#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ -/* will use replacement version */ -extern int snprintf P((char *restrict buf, size_t len, const char *restrict fmt, ...)); -#else -extern int snprintf (); -#endif -#endif - #ifndef HAVE_SETLOCALE #define setlocale(locale, val) /* nothing */ #endif /* HAVE_SETLOCALE */ +#ifndef HAVE_SETSID +#define setsid() /* nothing */ +#endif /* HAVE_SETSID */ + +#if HAVE_MEMCPY_ULONG +extern char *memcpy_ulong(char *dest, const char *src, unsigned long l); +#define memcpy memcpy_ulong +#endif +#if HAVE_MEMSET_ULONG +extern void *memset_ulong(void *dest, int val, unsigned long l); +#define memset memset_ulong +#endif + +#ifdef HAVE_LIBSIGSEGV +#include +#else +typedef void *stackoverflow_context_t; +#define sigsegv_install_handler(catchsegv) signal(SIGSEGV, catchsig) +/* define as 0 rather than empty so that (void) cast on it works */ +#define stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE) 0 +#endif + /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ #define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc)) -#define GNU_REGEX -#ifdef GNU_REGEX #include "regex.h" #include "dfa.h" typedef struct Regexp { @@ -221,13 +203,14 @@ struct dfa *dfareg; short dfa; short has_anchor; /* speed up of avoid_dfa kludge, temporary */ + short non_empty; /* for use in fpat_parse_field */ } 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 */ + /* regexp matching flags: */ #define RE_NEED_START 1 /* need to know start/end of match */ #define RE_NO_BOL 2 /* not allowed to match ^ in regexp */ @@ -253,6 +236,7 @@ #ifndef ATTRIBUTE_PRINTF #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) +#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) #endif /* ATTRIBUTE_PRINTF */ /* We use __extension__ in some places to suppress -pedantic warnings @@ -262,27 +246,8 @@ #define __extension__ #endif -/* this is defined by Windows32 extension libraries. It must be added to - * every variable which is exported (including function pointers) */ -#if defined(WIN32_EXTENSION) && !defined(ATTRIBUTE_EXPORTED) -# define ATTRIBUTE_EXPORTED __declspec(dllimport) -#else -# define ATTRIBUTE_EXPORTED -#endif - - /* ------------------ Constants, Structures, Typedefs ------------------ */ -#if 0 -/* This isn't right. Figure it out the right way for the next release */ -#ifndef AWKNUM -#ifdef LDBL_MANT_DIG -#define AWKNUM long double -#else -#endif -#endif -#endif - #define AWKNUM double #ifndef TRUE @@ -294,162 +259,41 @@ #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? */ -#else -# if 'z' - 'a' == 25 /* ascii */ -# if 'a' != 97 /* machine is dumb enough to use mark parity */ -# define BELL '\207' -# else -# define BELL '\07' -# endif -# else -# define BELL '\057' -# endif -#endif +enum defrule {BEGIN = 1, Rule, END, BEGINFILE, ENDFILE, + MAXRULE /* sentinel, not legal */ }; +extern const char *const ruletab[]; + typedef enum nodevals { /* illegal entry == 0 */ Node_illegal, - /* binary operators lnode and rnode are the expressions to work on */ - Node_times, - Node_quotient, - Node_mod, - Node_plus, - Node_minus, - Node_cond_pair, /* conditional pair (see Node_line_range) */ - Node_subscript, - Node_concat, - Node_exp, - - /* unary operators subnode is the expression to work on */ - Node_preincrement, - Node_predecrement, - Node_postincrement, - Node_postdecrement, - Node_unary_minus, - Node_field_spec, - - /* assignments lnode is the var to assign to, rnode is the exp */ - Node_assign, - Node_assign_times, - Node_assign_quotient, - Node_assign_mod, - Node_assign_plus, - Node_assign_minus, - Node_assign_exp, - Node_assign_concat, - - /* boolean binaries lnode and rnode are expressions */ - Node_and, - Node_or, - - /* binary relationals compares lnode and rnode */ - Node_equal, - Node_notequal, - Node_less, - Node_greater, - Node_leq, - Node_geq, - Node_match, - Node_nomatch, - - /* unary relationals works on subnode */ - Node_not, - - /* program structures */ - Node_rule_list, /* lnode is a rule, rnode is rest of list */ - Node_rule_node, /* lnode is pattern, rnode is statement */ - Node_statement_list, /* lnode is statement, rnode is more list */ - Node_switch_body, /* lnode is the case list, rnode is default list */ - Node_case_list, /* lnode is the case, rnode is a statement list */ - Node_if_branches, /* lnode is to run on true, rnode on false */ - Node_expression_list, /* lnode is an exp, rnode is more list */ - Node_param_list, /* lnode is a variable, rnode is more list */ - - /* keywords */ - Node_K_if, /* lnode is conditonal, rnode is if_branches */ - Node_K_switch, /* lnode is switch value, rnode is body of case statements */ - Node_K_case, /* lnode is case value, rnode is stuff to run */ - Node_K_default, /* lnode is empty, rnode is stuff to run */ - Node_K_while, /* lnode is condtional, rnode is stuff to run */ - Node_K_for, /* lnode is for_struct, rnode is stuff to run */ - Node_K_arrayfor, /* lnode is for_struct, rnode is stuff to run */ - 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 */ - Node_K_do, /* lnode is conditional, rnode stuff to run */ - Node_K_return, /* lnode is return value */ - Node_K_delete, /* lnode is array, rnode is subscript */ - Node_K_delete_loop, /* lnode is array, rnode is subscript */ - Node_K_getline, /* lnode is opt var, rnode is redirection */ - Node_K_function, /* lnode is statement list, rnode is params */ - Node_K_nextfile, /* no subs */ - - /* I/O redirection for print statements */ - Node_redirect_output, /* subnode is where to redirect */ - Node_redirect_append, /* subnode is where to redirect */ - Node_redirect_pipe, /* subnode is where to redirect */ - Node_redirect_pipein, /* subnode is where to redirect */ - Node_redirect_input, /* subnode is where to redirect */ - Node_redirect_twoway, /* subnode is where to redirect */ + Node_val, /* node is a value - type in flags */ + Node_regex, /* a regexp, text, compiled, flags, etc */ + Node_dynregex, /* a dynamic regexp */ - /* Variables */ - Node_var_new, /* newly created variable, may become an array */ + /* symbol table values */ Node_var, /* scalar variable, lnode is value */ Node_var_array, /* array is ptr to elements, table_size num of eles */ - Node_val, /* node is a value - type in flags */ - - /* Builtins subnode is explist to work on, builtin is func to call */ - Node_builtin, - - /* - * pattern: conditional ',' conditional ; lnode of Node_line_range - * is the two conditionals (Node_cond_pair), other word (rnode place) - * is a flag indicating whether or not this range has been entered. - */ - Node_line_range, - - /* - * boolean test of membership in array - * lnode is string-valued, expression rnode is array name - */ - Node_in_array, - + Node_var_new, /* newly created variable, may become an array */ + Node_param_list, /* lnode is a variable, rnode is more list */ Node_func, /* lnode is param. list, rnode is body */ - Node_func_call, /* lnode is name, rnode is argument list */ - Node_cond_exp, /* lnode is conditonal, rnode is if_branches */ - Node_regex, /* a regexp, text, compiled, flags, etc */ - Node_dynregex, /* a dynamic regexp */ 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, - Node_FNR, - Node_FS, - Node_IGNORECASE, - Node_LINT, - Node_NF, - Node_NR, - Node_OFMT, - Node_OFS, - Node_ORS, - Node_RS, - Node_TEXTDOMAIN, - Node_SUBSEP, + /* program execution -- stack item types */ + Node_arrayfor, + Node_frame, + Node_instruction, + Node_final /* sentry value, not legal */ } NODETYPE; + +struct exp_instruction; + /* * NOTE - this struct is a rather kludgey -- it is packed to minimize * space usage, at the expense of cleanliness. Alter at own risk. @@ -459,24 +303,24 @@ struct { union { struct exp_node *lptr; - char *param_name; + struct exp_instruction *li; long ll; } l; union { struct exp_node *rptr; - struct exp_node *(*pptr) P((struct exp_node *)); Regexp *preg; - struct for_loop_header *hd; struct exp_node **av; - int r_ent; /* range entered */ + void (*uptr)(void); + struct exp_instruction *ri; } r; union { struct exp_node *extra; + void (*aptr)(void); long xl; char **param_list; } x; char *name; - short number; + struct exp_node *rn; unsigned long reflags; # define CASE 1 # define CONSTANT 2 @@ -490,12 +334,13 @@ size_t slen; long sref; int idx; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT wchar_t *wsp; size_t wslen; #endif } val; struct { + AWKNUM num; struct exp_node *next; char *name; size_t length; @@ -511,6 +356,7 @@ #define ahnext sub.hash.next #define ahname_str sub.hash.name #define ahname_len sub.hash.length +#define ahname_num sub.hash.num #define ahvalue sub.hash.value #define ahname_ref sub.hash.ref #define ahcode sub.hash.code @@ -518,52 +364,44 @@ NODETYPE type; unsigned short flags; # define MALLOC 1 /* can be free'd */ -# define TEMP 2 /* should be free'd */ -# define PERM 4 /* can't be free'd */ -# define STRING 8 /* assigned as string */ -# 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 +# define PERM 2 /* can't be free'd */ +# define STRING 4 /* assigned as string */ +# define STRCUR 8 /* string value is current */ +# define NUMCUR 16 /* numeric value is current */ +# define NUMBER 32 /* assigned as number */ +# define MAYBE_NUM 64 /* user input: if NUMERIC then * a NUMBER */ -# define ARRAYMAXED 256 /* array is at max size */ -# define FUNC 512 /* this parameter is really a +# define ARRAYMAXED 128 /* array is at max size */ +# define FUNC 256 /* this parameter is really a * function name; see awkgram.y */ -# define FIELD 1024 /* this is a field */ -# define INTLSTR 2048 /* use localized version */ -#ifdef MBS_SUPPORT +# define FIELD 512 /* this is a field */ +# define INTLSTR 1024 /* use localized version */ +# define NUMIND 2048 /* numeric val of index is current */ # define WSTRCUR 4096 /* wide str value is current */ -#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 -#define source_file sub.nodep.name -#define source_line sub.nodep.number -#define param_cnt sub.nodep.number -#define param sub.nodep.l.param_name -#define parmlist sub.nodep.x.param_list - -#define subnode lnode -#define builtin sub.nodep.r.pptr -#define callresult sub.nodep.x.extra -#define funcbody sub.nodep.x.extra + +#define param_cnt sub.nodep.l.ll +#define param vname + +#define parmlist sub.nodep.x.param_list +#define code_ptr sub.nodep.r.ri #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 forloop rnode->sub.nodep.r.hd +#define re_cnt flags #define stptr sub.val.sp #define stlen sub.val.slen -#define stref sub.val.sref +#define valref sub.val.sref #define stfmt sub.val.idx #define wstptr sub.val.wsp @@ -571,29 +409,360 @@ #define numbr sub.val.fltnum +/* Node_frame: */ +#define stack sub.nodep.r.av +#define func_node sub.nodep.x.extra +#define prev_frame_size sub.nodep.reflags +#define reti sub.nodep.l.li + /* Node_var: */ #define var_value lnode +#define var_update sub.nodep.r.uptr +#define var_assign sub.nodep.x.aptr /* Node_var_array: */ -#define var_array sub.nodep.r.av -#define array_size sub.nodep.l.ll -#define table_size sub.nodep.x.xl +#define var_array sub.nodep.r.av +#define array_size sub.nodep.l.ll +#define table_size sub.nodep.x.xl +#define parent_array sub.nodep.rn /* Node_array_ref: */ -#define orig_array sub.nodep.x.extra +#define orig_array lnode #define prev_array rnode -#define printf_count sub.nodep.x.xl +/* --------------------------------lint warning types----------------------------*/ +typedef enum lintvals { + LINT_illegal, + LINT_assign_in_cond, + LINT_no_effect +} LINTTYPE; + +/* --------------------------------Instruction ---------------------------------- */ + +typedef enum opcodeval { + /* illegal entry == 0 */ + Op_illegal, + + /* binary operators */ + Op_times, + Op_times_i, + Op_quotient, + Op_quotient_i, + Op_mod, + Op_mod_i, + Op_plus, + Op_plus_i, + Op_minus, + Op_minus_i, + Op_exp, + Op_exp_i, + Op_concat, + + /* line range instruction pair */ + Op_line_range, /* flags for Op_cond_pair */ + Op_cond_pair, /* conditional pair */ + + Op_subscript, + Op_sub_array, + + /* unary operators */ + Op_preincrement, + Op_predecrement, + Op_postincrement, + Op_postdecrement, + Op_unary_minus, + Op_field_spec, + + /* unary relationals */ + Op_not, + + /* assignments */ + Op_assign, + Op_store_var, /* simple variable assignment optimization */ + Op_store_sub, /* array[subscript] assignment optimization */ + Op_store_field, /* $n assignment optimization */ + Op_assign_times, + Op_assign_quotient, + Op_assign_mod, + Op_assign_plus, + Op_assign_minus, + Op_assign_exp, + Op_assign_concat, + + /* boolean binaries */ + Op_and, /* a left subexpression in && */ + Op_and_final, /* right subexpression of && */ + Op_or, + Op_or_final, + + /* binary relationals */ + Op_equal, + Op_notequal, + Op_less, + Op_greater, + Op_leq, + Op_geq, + Op_match, + Op_match_rec, /* match $0 */ + Op_nomatch, + + Op_rule, + + /* keywords */ + Op_K_case, + Op_K_default, + Op_K_break, + Op_K_continue, + Op_K_print, + Op_K_print_rec, + Op_K_printf, + Op_K_next, + Op_K_exit, + Op_K_return, + Op_K_delete, + Op_K_delete_loop, + Op_K_getline_redir, + Op_K_getline, + Op_K_nextfile, + + Op_builtin, + Op_sub_builtin, /* sub, gsub and gensub */ + Op_in_array, /* boolean test of membership in array */ + + /* function call instruction */ + Op_func_call, + Op_indirect_func_call, + + Op_push, /* scalar variable */ + Op_push_arg, /* variable type (scalar or array) argument to built-in */ + Op_push_i, /* number, string */ + Op_push_re, /* regex */ + Op_push_array, + Op_push_param, + Op_push_lhs, + Op_subscript_lhs, + Op_field_spec_lhs, + Op_no_op, /* jump target */ + Op_pop, /* pop an item from the runtime stack */ + Op_jmp, + Op_jmp_true, + Op_jmp_false, + Op_get_record, + Op_newfile, + Op_arrayfor_init, + Op_arrayfor_incr, + Op_arrayfor_final, + + Op_var_update, /* update value of NR, NF or FNR */ + Op_var_assign, + Op_field_assign, + Op_after_beginfile, + Op_after_endfile, + + Op_ext_func, + Op_func, + + Op_exec_count, + Op_breakpoint, + Op_lint, + Op_atexit, + Op_stop, + + /* parsing (yylex and yyparse), should never appear in valid compiled code */ + Op_token, + Op_symbol, + Op_list, + + /* program structures -- for use in the profiler/pretty printer */ + Op_K_do, + Op_K_for, + Op_K_arrayfor, + Op_K_while, + Op_K_switch, + Op_K_if, + Op_K_else, + Op_K_function, + Op_cond_exp, + Op_final /* sentry value, not legal */ +} OPCODE; + +enum redirval { + /* I/O redirections */ + redirect_output = 1, + redirect_append, + redirect_pipe, + redirect_pipein, + redirect_input, + redirect_twoway +}; + +struct break_point; + +typedef struct exp_instruction { + struct exp_instruction *nexti; + union { + NODE *dn; + struct exp_instruction *di; + NODE *(*fptr)(int); + long dl; + char *name; + } d; + + union { + long xl; + NODE *xn; + void (*aptr)(void); + struct exp_instruction *xi; + struct break_point *bpt; + } x; + + short source_line; + OPCODE opcode; +} INSTRUCTION; + +#define func_name d.name + +#define memory d.dn +#define builtin d.fptr +#define builtin_idx d.dl + +#define expr_count x.xl + +#define target_continue d.di +#define target_jmp d.di +#define target_break x.xi + +/* Op_sub_builtin */ +#define sub_flags d.dl +#define GSUB 0x01 /* builtin is gsub */ +#define GENSUB 0x02 /* builtin is gensub */ +#define LITERAL 0x04 /* target is a literal string */ + + +/* Op_K_exit */ +#define target_end d.di +#define target_atexit x.xi + +/* Op_newfile, Op_K_getline, Op_nextfile */ +#define target_endfile x.xi + +/* Op_newfile */ +#define target_get_record x.xi + +/* Op_get_record, Op_K_nextfile */ +#define target_newfile d.di + +/* Op_K_getline */ +#define target_beginfile d.di + +/* Op_get_record */ +#define has_endfile x.xl + +/* Op_token */ +#define lextok d.name + +/* Op_rule */ +#define in_rule x.xl +#define source_file d.name + + /* Op_K_case, Op_K_default */ +#define case_stmt x.xi +#define case_exp d.di +#define stmt_start case_exp +#define stmt_end case_stmt +#define match_exp x.xl -#define condpair lnode -#define triggered sub.nodep.r.r_ent +#define target_stmt x.xi -/* a regular for loop */ -typedef struct for_loop_header { - NODE *init; - NODE *cond; - NODE *incr; -} FOR_LOOP_HEADER; +/* Op_K_switch */ +#define switch_end x.xi +#define switch_start d.di + +/* Op_K_getline, Op_K_getline_redir */ +#define into_var x.xl + +/* Op_K_getline_redir, Op_K_print, Op_K_print_rec, Op_K_printf */ +#define redir_type d.dl + +/* Op_arrayfor_incr */ +#define array_var x.xn + +/* Op_line_range */ +#define triggered x.xl + +/* Op_cond_pair */ +#define line_range x.xi + +/* Op_func_call, Op_func */ +#define func_body x.xn + +/* Op_func_call */ +#define inrule d.dl + +/* Op_subscript */ +#define sub_count d.dl + +/* Op_push_lhs, Op_subscript_lhs, Op_field_spec_lhs */ +#define do_reference x.xl + +/* Op_list, Op_rule, Op_func */ +#define lasti d.di +#define firsti x.xi + +/* Op_rule, Op_func */ +#define last_line x.xl +#define first_line source_line + +/* Op_lint */ +#define lint_type d.dl + +/* Op_field_spec_lhs */ +#define target_assign d.di + +/* Op_var_assign */ +#define assign_var x.aptr + +/* Op_var_update */ +#define update_var x.aptr + +/* Op_field_assign */ +#define field_assign x.aptr + +/* Op_field_assign, Op_var_assign */ +#define assign_ctxt d.dl + +/* Op_concat */ +#define concat_flag d.dl +#define CSUBSEP 1 +#define CSVAR 2 + +/* Op_breakpoint */ +#define break_pt x.bpt + +/*------------------ pretty printing/profiling --------*/ +/* Op_exec_count */ +#define exec_count d.dl + +/* Op_K_while */ +#define while_body d.di + +/* Op_K_do */ +#define doloop_cond d.di + +/* Op_K_for */ +#define forloop_cond d.di +#define forloop_body x.xi + +/* Op_K_if */ +#define branch_if d.di +#define branch_else x.xi + +/* Op_K_else */ +#define branch_end x.xi + +/* Op_line_range */ +#define condpair_left d.di +#define condpair_right x.xi typedef struct iobuf { const char *name; /* filename */ @@ -611,20 +780,20 @@ to regrow/refill */ void *opaque; /* private data for open hooks */ - int (*get_record) P((char **out, struct iobuf *, int *errcode)); - void (*close_func) P((struct iobuf *)); /* open and close hooks */ + int (*get_record)(char **out, struct iobuf *, int *errcode); + void (*close_func)(struct iobuf *); /* open and close hooks */ + + int errcode; 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 -# define IOP_AT_START 64 +# define IOP_NOFREE_OBJ 2 +# define IOP_AT_EOF 4 +# define IOP_CLOSED 8 +# define IOP_AT_START 16 } IOBUF; -typedef void (*Func_ptr) P((void)); +typedef void (*Func_ptr)(void); /* structure used to dynamically maintain a linked-list of open files/pipes */ struct redirect { @@ -654,13 +823,42 @@ /* * 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, - PRE_ASSIGN, PRE_ASSIGN_FS } stype; - char *val; -}; + +typedef struct srcfile { + struct srcfile *next; + struct srcfile *prev; + + enum srctype { SRC_CMDLINE = 1, SRC_STDIN, SRC_FILE, SRC_INC } stype; + char *src; /* name on command line or inclde statement */ + char *fullpath; /* full path after AWKPATH search */ + time_t mtime; + struct stat sbuf; + int srclines; /* no of lines in source */ + size_t bufsize; + char *buf; + int *line_offset; /* offset to the beginning of each line */ + int fd; + int maxlen; /* size of the longest line */ + + char *lexptr; + char *lexend; + char *lexeme; + char *lexptr_begin; + int lasttok; +} SRCFILE; + +/* structure for execution context */ +typedef struct context { + INSTRUCTION pools; + NODE symbols; + INSTRUCTION rule_list; + SRCFILE srcfiles; + int sourceline; + char *source; + void (*install_func)(char *); + struct context *prev; +} AWK_CONTEXT; /* for debugging purposes */ struct flagtab { @@ -668,14 +866,6 @@ const char *name; }; -/* longjmp return codes, must be nonzero */ -/* Continue means either for loop/while continue, or next input record */ -#define TAG_CONTINUE 1 -/* Break means either for/while break, or stop reading input */ -#define TAG_BREAK 2 -/* Return means return from a function call; leave value in ret_node */ -#define TAG_RETURN 3 - #ifndef LONG_MAX #define LONG_MAX ((long)(~(1L << (sizeof (long) * 8 - 1)))) #endif @@ -701,30 +891,24 @@ extern int ORSlen; extern char *OFMT; extern char *CONVFMT; -ATTRIBUTE_EXPORTED extern int CONVFMTidx; +extern int CONVFMTidx; extern int OFMTidx; extern char *TEXTDOMAIN; extern NODE *BINMODE_node, *CONVFMT_node, *FIELDWIDTHS_node, *FILENAME_node; extern NODE *FNR_node, *FS_node, *IGNORECASE_node, *NF_node; extern NODE *NR_node, *OFMT_node, *OFS_node, *ORS_node, *RLENGTH_node; extern NODE *RSTART_node, *RS_node, *RT_node, *SUBSEP_node, *PROCINFO_node; -extern NODE *LINT_node, *ERRNO_node, *TEXTDOMAIN_node; -ATTRIBUTE_EXPORTED extern NODE **stack_ptr; +extern NODE *LINT_node, *ERRNO_node, *TEXTDOMAIN_node, *FPAT_node; extern NODE *Nnull_string; extern NODE *Null_field; extern NODE **fields_arr; extern int sourceline; extern char *source; -extern NODE *expression_value; #if __GNUC__ < 2 -# if defined(WIN32_EXTENSION) -static -# else -extern -#endif -NODE *_t; /* used as temporary in tree_eval */ +extern NODE *_t; /* used as temporary in tree_eval */ #endif +extern NODE *_r; /* used as temporary in stack macros */ extern NODE *nextfree; extern int field0_valid; @@ -733,24 +917,25 @@ extern int do_intervals; extern int do_intl; extern int do_non_decimal_data; +extern int do_profiling; extern int do_dump_vars; extern int do_tidy_mem; +extern int do_sandbox; extern int do_optimize; extern int use_lc_numeric; -extern int in_begin_rule; -extern int in_end_rule; -extern int whiny_users; +extern int exit_val; + #ifdef NO_LINT #define do_lint 0 #define do_lint_old 0 #else -ATTRIBUTE_EXPORTED extern int do_lint; +extern int do_lint; extern int do_lint_old; #endif -#ifdef MBS_SUPPORT +#if MBS_SUPPORT extern int gawk_mb_cur_max; #else -extern const int gawk_mb_cur_max; +#define gawk_mb_cur_max (1) #endif #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 @@ -763,6 +948,7 @@ #endif /* HAVE_LOCALE_H */ extern const char *myname; +extern const char def_strftime_format[]; extern char quote; extern char *defpath; @@ -770,421 +956,430 @@ extern char casetable[]; /* for case-independent regexp matching */ +/* + * Provide a way for code to know which program is executing: + * gawk vs dgawk vs pgawk. + */ +enum exe_mode { exe_normal = 1, exe_debugging, exe_profiling }; +extern enum exe_mode which_gawk; /* (defined in eval.c) */ + +/* ------------------------- Runtime stack -------------------------------- */ + +typedef union stack_item { + NODE *rptr; /* variable etc. */ + NODE **lptr; /* address of a variable etc. */ +} STACK_ITEM; + +extern STACK_ITEM *stack_ptr; +extern NODE *frame_ptr; +extern STACK_ITEM *stack_bottom; +extern STACK_ITEM *stack_top; + +#define decr_sp() (stack_ptr--) +#define incr_sp() ((stack_ptr < stack_top) ? ++stack_ptr : grow_stack()) +#define stack_adj(n) (stack_ptr += (n)) +#define stack_empty() (stack_ptr < stack_bottom) + +#define POP() decr_sp()->rptr +#define POP_ADDRESS() decr_sp()->lptr +#define PEEK(n) (stack_ptr - (n))->rptr +#define TOP() stack_ptr->rptr /* same as PEEK(0) */ +#define TOP_ADDRESS() stack_ptr->lptr +#define PUSH(r) (void) (incr_sp()->rptr = (r)) +#define PUSH_ADDRESS(l) (void) (incr_sp()->lptr = (l)) +#define REPLACE(r) (void) (stack_ptr->rptr = (r)) +#define REPLACE_ADDRESS(l) (void) (stack_ptr->lptr = (l)) + + +/* function param */ +#define GET_PARAM(n) frame_ptr->stack[n] + +/* + * UPREF and DEREF --- simplified versions of dupnode and unref + * UPREF does not handle FIELD node. Most appropriate use is + * for elements on the runtime stack. When in doubt, use dupnode. + */ + +#define DEREF(r) ( _r = (r), (!(_r->flags & PERM) && (--_r->valref == 0)) ? unref(_r) : (void)0 ) + +#if __GNUC__ >= 2 +#define UPREF(r) ({ NODE *_t = (r); !(_t->flags & PERM) && _t->valref++;}) + +#define POP_ARRAY() ({ NODE *_t = POP(); \ + _t->type == Node_var_array ? \ + _t : get_array(_t, TRUE); }) + +#define POP_PARAM() ({ NODE *_t = POP(); \ + _t->type == Node_var_array ? \ + _t : get_array(_t, FALSE); }) + +#define POP_NUMBER(x) ({ NODE *_t = POP_SCALAR(); \ + x = force_number(_t); DEREF(_t); }) +#define TOP_NUMBER(x) ({ NODE *_t = TOP_SCALAR(); \ + x = force_number(_t); DEREF(_t); }) + +#define POP_SCALAR() ({ NODE *_t = POP(); _t->type != Node_var_array ? _t \ + : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t);}) +#define TOP_SCALAR() ({ NODE *_t = TOP(); _t->type != Node_var_array ? _t \ + : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t);}) + +#else /* not __GNUC__ */ + +#define UPREF(r) (_t = (r), !(_t->flags & PERM) && _t->valref++) + +#define POP_ARRAY() (_t = POP(), \ + _t->type == Node_var_array ? \ + _t : get_array(_t, TRUE)) + +#define POP_PARAM() (_t = POP(), \ + _t->type == Node_var_array ? \ + _t : get_array(_t, FALSE)) + +#define POP_NUMBER(x) (_t = POP_SCALAR(), \ + x = force_number(_t), DEREF(_t)) +#define TOP_NUMBER(x) (_t = TOP_SCALAR(), \ + x = force_number(_t), DEREF(_t)) + +#define POP_SCALAR() (_t = POP(), _t->type != Node_var_array ? _t \ + : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t)) +#define TOP_SCALAR() (_t = TOP(), _t->type != Node_var_array ? _t \ + : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t)) + +#endif /* __GNUC__ */ + + +#define POP_STRING() force_string(POP_SCALAR()) +#define TOP_STRING() force_string(TOP_SCALAR()) + /* ------------------------- Pseudo-functions ------------------------- */ #define is_identchar(c) (isalnum(c) || (c) == '_') #define var_uninitialized(n) ((n)->var_value == Nnull_string) +#define get_lhs(n, r) (n)->type == Node_var && ! var_uninitialized(n) ? \ + &((n)->var_value) : r_get_lhs((n), (r)) + #ifdef MPROF -#define getnode(n) (emalloc((n), NODE *, sizeof(NODE), "getnode"), (n)->flags = 0, (n)->exec_count = 0) -#define freenode(n) free(n) +#define getnode(n) emalloc((n), NODE *, sizeof(NODE), "getnode"), \ + (n)->flags = 0 +#define freenode(n) efree(n) #else /* not MPROF */ -#define getnode(n) if (nextfree) n = nextfree, nextfree = nextfree->nextp;\ - else n = more_nodes() -#ifndef NO_PROFILING -#define freenode(n) ((n)->flags = 0,\ - (n)->exec_count = 0, (n)->nextp = nextfree, nextfree = (n)) -#else /* not PROFILING */ -#define freenode(n) ((n)->flags = 0,\ - (n)->nextp = nextfree, nextfree = (n)) -#endif /* not PROFILING */ +#define getnode(n) (void) (nextfree ? \ + (n = nextfree, nextfree = nextfree->nextp) \ + : (n = more_nodes())) +#define freenode(n) ((n)->flags = 0, (n)->nextp = nextfree, nextfree = (n)) #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 */ - -#define get_array(t) get_actual(t, TRUE) /* allowed to die fatally */ -#define get_param(t) get_actual(t, FALSE) /* not allowed */ - -#ifdef MEMDEBUG -#undef freenode -#define get_lhs(p, a, r) r_get_lhs((p), (a), (r)) -#define m_tree_eval(t, iscond) r_tree_eval(t, iscond) -#else -#define get_lhs(p, a, r) ((p)->type == Node_var && \ - ! var_uninitialized(p) ? \ - (&(p)->var_value) : \ - r_get_lhs((p), (a), (r))) -#define TREE_EVAL_MACRO 1 -#if __GNUC__ >= 2 -#define m_tree_eval(t, iscond) __extension__ \ - ({NODE * _t = (t); \ - if (_t == (NODE*)NULL) \ - cant_happen(); \ - switch(_t->type) { \ - case Node_val: \ - if (_t->flags&INTLSTR) \ - _t = r_force_string(_t); \ - break; \ - case Node_var: \ - if (! var_uninitialized(_t)) { \ - _t = _t->var_value; \ - break; \ - } \ - /*FALLTHROUGH*/ \ - default: \ - _t = r_tree_eval(_t, iscond);\ - break; \ - } \ - _t;}) -#else -#define m_tree_eval(t, iscond) (_t = (t), _t == (NODE*)NULL ? (cant_happen(), (NODE*)NULL) : \ - (_t->type == Node_param_list ? \ - r_tree_eval(_t, iscond) : \ - ((_t->type == Node_val && (_t->flags&INTLSTR)) ? \ - r_force_string(_t) : \ - (_t->type == Node_val ? _t : \ - (_t->type == Node_var && \ - ! var_uninitialized(_t) ? _t->var_value : \ - r_tree_eval(_t, iscond)))))) -#endif /* __GNUC__ */ -#endif /* not MEMDEBUG */ -#define tree_eval(t) m_tree_eval(t, FALSE) - -#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 make_number(x) mk_number((x), (unsigned int)(MALLOC|NUMCUR|NUMBER)) -#define free_temp(n) do { NODE *_n = (n); if (_n->flags&TEMP) unref(_n);} \ - while (FALSE) +#define make_string(s, l) r_make_str_node((s), (size_t) (l), 0) +#define make_str_node(s, l, f) r_make_str_node((s), (size_t) (l), (f)) -#define make_string(s, l) make_str_node((s), (size_t) (l), 0) #define SCAN 1 #define ALREADY_MALLOCED 2 #define cant_happen() r_fatal("internal error line %d, file: %s", \ __LINE__, __FILE__) -/* - * For SunOS 4.1.x which is pre-Standard C, `realloc' doesn't - * accept NULL. Sigh. The check must be done for both cases, - * since could be using GCC but with stock C library. Sigh, again. - */ -#ifdef HAVE_STRINGIZE #define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\ (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 = ((var == NULL) \ - ? (ty)malloc((MALLOC_ARG_T)(x)) \ - : (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) ) \ +#define erealloc(var,ty,x,str) (void)((var = (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) \ ||\ (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 %ld bytes of memory (%s)"),\ - (str), "var", (long) (x), strerror(errno)),0)) -#define erealloc(var,ty,x,str) (void)((var = ((var == NULL) \ - ? (ty)malloc((MALLOC_ARG_T)(x)) \ - : (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) ) \ - ||\ - (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ - (str), "var", (long) (x), strerror(errno)),0)) -#endif /* HAVE_STRINGIZE */ + +#define efree(p) free(p) #ifdef GAWKDEBUG #define force_number r_force_number #define force_string r_force_string #else /* not GAWKDEBUG */ -#ifdef lint -extern AWKNUM force_number(); -#endif #if __GNUC__ >= 2 #define force_number(n) __extension__ ({NODE *_tn = (n);\ - (_tn->flags & NUMCUR) ?_tn->numbr : r_force_number(_tn);}) + (_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 & STRCUR) && \ + ((_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 & NUMCUR) ? _t->numbr : r_force_number(_t))) -#else /* not MSDOS */ -#define force_number(n) (_t = (n),\ - (_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 & STRCUR) && \ - (_t->stfmt == -1 || \ - _t->stfmt == CONVFMTidx))? \ - _t : r_force_string(_t)) - -#endif /* not __GNUC__ */ -#endif /* not GAWKDEBUG */ - -#define STREQ(a,b) (*(a) == *(b) && strcmp((a), (b)) == 0) -#define STREQN(a,b,n) ((n) && *(a)== *(b) && \ - strncmp((a), (b), (size_t) (n)) == 0) + _ts : format_val(CONVFMT, CONVFMTidx, _ts);}) +#else /* not __GNUC__ */ +#define force_number r_force_number +#define force_string r_force_string +#endif /* __GNUC__ */ +#endif /* GAWKDEBUG */ #define fatal set_loc(__FILE__, __LINE__), r_fatal +extern jmp_buf fatal_tag; +extern int fatal_tag_valid; + +#define PUSH_BINDING(stack, tag, val) \ +if (val++) \ + memcpy((char *) (stack), (const char *) tag, sizeof(jmp_buf)) +#define POP_BINDING(stack, tag, val) \ +if (--val) \ + memcpy((char *) tag, (const char *) (stack), sizeof(jmp_buf)) + /* ------------- Function prototypes or defs (as appropriate) ------------- */ +typedef int (*Func_print)(FILE *, const char *, ...); /* array.c */ -extern NODE *get_actual P((NODE *symbol, int canfatal)); -extern char *array_vname P((const NODE *symbol)); -extern void array_init P((void)); -extern NODE *concat_exp P((NODE *tree)); -extern void assoc_clear P((NODE *symbol)); -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 void set_SUBSEP P((void)); -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, size_t *code)); +typedef enum sort_context { SORTED_IN = 1, ASORT, ASORTI } SORT_CTXT; +extern NODE **assoc_list(NODE *array, const char *sort_str, SORT_CTXT sort_ctxt); +extern NODE *get_array(NODE *symbol, int canfatal); +extern char *array_vname(const NODE *symbol); +extern void array_init(void); +extern void set_SUBSEP(void); +extern NODE *concat_exp(int nargs, int do_subsep); +extern void ahash_unref(NODE *tmp); +extern void assoc_clear(NODE *symbol); +extern NODE *in_array(NODE *symbol, NODE *subs); +extern NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference); +extern void do_delete(NODE *symbol, int nsubs); +extern void do_delete_loop(NODE *symbol, NODE **lhs); +extern NODE *assoc_dump(NODE *symbol, int indent_level); +extern NODE *do_adump(int nargs); +extern NODE *do_asort(int nargs); +extern NODE *do_asorti(int nargs); +extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code); /* awkgram.c */ -extern char *tokexpand P((void)); -extern NODE *node P((NODE *left, NODETYPE op, NODE *right)); -extern NODE *install P((char *name, NODE *value)); -extern NODE *lookup P((const char *name)); -extern NODE *variable P((char *name, int can_free, NODETYPE type)); -extern int yyparse P((void)); -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 *(*)(NODE *))); -extern NODE *stopme P((NODE *tree)); -extern void shadow_funcs P((void)); -extern int check_special P((const char *name)); -extern void register_deferred_variable P((const char *name, - NODE *(*load_func)(void))); +extern NODE *mk_symbol(NODETYPE type, NODE *value); +extern NODE *install_symbol(char *name, NODE *value); +extern NODE *remove_symbol(char *name); +extern NODE *lookup(const char *name); +extern NODE *variable(char *name, NODETYPE type); +extern int parse_program(INSTRUCTION **pcode); +extern void dump_funcs(void); +extern void dump_vars(const char *fname); +extern void release_all_vars(void); +extern const char *getfname(NODE *(*)(int)); +extern NODE *stopme(int nargs); +extern void shadow_funcs(void); +extern int check_special(const char *name); +extern int foreach_func(int (*)(INSTRUCTION *, void *), int, void *); +extern INSTRUCTION *bcalloc(OPCODE op, int size, int srcline); +extern void bcfree(INSTRUCTION *); +extern SRCFILE *add_srcfile(int stype, char *src, SRCFILE *curr, int *already_included, int *errcode); +extern void register_deferred_variable(const char *name, NODE *(*load_func)(void)); +extern int files_are_same(char *path, SRCFILE *src); +extern void valinfo(NODE *n, Func_print print_func, FILE *fp); +extern void print_vars(Func_print print_func, FILE *fp); +extern AWK_CONTEXT *new_context(void); +extern void push_context(AWK_CONTEXT *ctxt); +extern void pop_context(); +extern int in_main_context(); +extern void free_context(AWK_CONTEXT *ctxt, int ); +extern void append_symbol(char *name); + /* builtin.c */ -extern double double_to_int P((double d)); -extern NODE *do_exp P((NODE *tree)); -extern NODE *do_fflush P((NODE *tree)); -extern NODE *do_index P((NODE *tree)); -extern NODE *do_int P((NODE *tree)); -extern NODE *do_length P((NODE *tree)); -extern NODE *do_log P((NODE *tree)); -extern NODE *do_mktime P((NODE *tree)); -extern NODE *do_sprintf P((NODE *tree)); -extern void do_printf P((NODE *tree)); -extern void print_simple P((NODE *tree, FILE *fp)); -extern NODE *do_sqrt P((NODE *tree)); -extern NODE *do_substr P((NODE *tree)); -extern NODE *do_strftime P((NODE *tree)); -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)); -extern NODE *do_sin P((NODE *tree)); -extern NODE *do_cos P((NODE *tree)); -extern NODE *do_rand P((NODE *tree)); -extern NODE *do_srand P((NODE *tree)); -extern NODE *do_match P((NODE *tree)); -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 *, 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)); -extern NODE *do_or P((NODE *tree)); -extern NODE *do_xor P((NODE *tree)); -extern NODE *do_compl P((NODE *tree)); -extern NODE *do_strtonum P((NODE *tree)); -extern AWKNUM nondec2awknum P((char *str, size_t len)); -extern NODE *do_dcgettext P((NODE *tree)); -extern NODE *do_dcngettext P((NODE *tree)); -extern NODE *do_bindtextdomain P((NODE *tree)); -#ifdef MBS_SUPPORT -extern int strncasecmpmbs P((const char *, mbstate_t, const char *, - mbstate_t, size_t)); +extern double double_to_int(double d); +extern NODE *do_exp(int nargs); +extern NODE *do_fflush(int nargs); +extern NODE *do_index(int nargs); +extern NODE *do_int(int nargs); +extern NODE *do_isarray(int nargs); +extern NODE *do_length(int nargs); +extern NODE *do_log(int nargs); +extern NODE *do_mktime(int nargs); +extern NODE *do_sprintf(int nargs); +extern void do_printf(int nargs, int redirtype); +extern void print_simple(NODE *tree, FILE *fp); +extern NODE *do_sqrt(int nargs); +extern NODE *do_substr(int nargs); +extern NODE *do_strftime(int nargs); +extern NODE *do_systime(int nargs); +extern NODE *do_system(int nargs); +extern void do_print(int nargs, int redirtype); +extern void do_print_rec(int args, int redirtype); +extern NODE *do_tolower(int nargs); +extern NODE *do_toupper(int nargs); +extern NODE *do_atan2(int nargs); +extern NODE *do_sin(int nargs); +extern NODE *do_cos(int nargs); +extern NODE *do_rand(int nargs); +extern NODE *do_srand(int nargs); +extern NODE *do_match(int nargs); +extern NODE *do_sub(int nargs, unsigned int flags); +extern NODE *format_tree(const char *, size_t, NODE **, long); +extern NODE *do_lshift(int nargs); +extern NODE *do_rshift(int nargs); +extern NODE *do_and(int nargs); +extern NODE *do_or(int nargs); +extern NODE *do_xor(int nargs); +extern NODE *do_compl(int nargs); +extern NODE *do_strtonum(int nargs); +extern AWKNUM nondec2awknum(char *str, size_t len); +extern NODE *do_dcgettext(int nargs); +extern NODE *do_dcngettext(int nargs); +extern NODE *do_bindtextdomain(int nargs); +#if MBS_SUPPORT +extern int strncasecmpmbs(const unsigned char *, + const unsigned char *, size_t); #endif /* eval.c */ -extern int interpret P((NODE *volatile tree)); -extern NODE *r_tree_eval P((NODE *tree, int iscond)); -extern int cmp_nodes P((NODE *t1, NODE *t2)); -extern NODE **r_get_lhs P((NODE *ptr, Func_ptr *assign, int reference)); -extern void set_IGNORECASE P((void)); -extern void set_OFS P((void)); -extern void set_ORS P((void)); -extern void set_OFMT P((void)); -extern void set_CONVFMT P((void)); -extern void set_BINMODE P((void)); -extern void set_LINT P((void)); -extern void set_TEXTDOMAIN P((void)); -extern void update_ERRNO P((void)); -extern void update_ERRNO_saved P((int)); -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)); -extern void load_casetable P((void)); -extern size_t get_curfunc_arg_count P((void)); -extern AWKNUM calc_exp P((AWKNUM x1, AWKNUM x2)); +extern void PUSH_CODE(INSTRUCTION *cp); +extern INSTRUCTION *POP_CODE(void); +extern int interpret(INSTRUCTION *); +extern int cmp_nodes(NODE *, NODE *); +extern void set_IGNORECASE(void); +extern void set_OFS(void); +extern void set_ORS(void); +extern void set_OFMT(void); +extern void set_CONVFMT(void); +extern void set_BINMODE(void); +extern void set_LINT(void); +extern void set_TEXTDOMAIN(void); +extern void update_ERRNO(void); +extern void update_ERRNO_saved(int); +extern void update_NR(void); +extern void update_NF(void); +extern void update_FNR(void); +extern const char *redflags2str(int); +extern const char *flags2str(int); +extern const char *genflags2str(int flagval, const struct flagtab *tab); +extern const char *nodetype2str(NODETYPE type); +extern void load_casetable(void); + +extern AWKNUM calc_exp(AWKNUM x1, AWKNUM x2); +extern const char *opcode2str(OPCODE type); +extern const char *op2str(OPCODE type); +extern NODE **r_get_lhs(NODE *n, int reference); +extern STACK_ITEM *grow_stack(void); #ifdef PROFILING -extern void dump_fcall_stack P((FILE *fp)); +extern void dump_fcall_stack(FILE *fp); #endif /* ext.c */ -NODE *do_ext P((NODE *)); +NODE *do_ext(int nargs); #ifdef DYNAMIC -void make_builtin P((char *, NODE *(*)(NODE *), int)); -NODE *get_argument P((NODE *, int)); -NODE *get_actual_argument P((NODE *, unsigned int, int, int)); -#define get_scalar_argument(t, i, opt) get_actual_argument((t), (i), (opt), FALSE) -#define get_array_argument(t, i, opt) get_actual_argument((t), (i), (opt), TRUE) -void set_value P((NODE *)); +void make_builtin(const char *, NODE *(*)(int), int); +size_t get_curfunc_arg_count(void); +NODE *get_argument(int); +NODE *get_actual_argument(int, int, int); +#define get_scalar_argument(i, opt) get_actual_argument((i), (opt), FALSE) +#define get_array_argument(i, opt) get_actual_argument((i), (opt), TRUE) #endif /* field.c */ -extern void init_fields P((void)); -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_RS P((void)); -extern void set_FIELDWIDTHS P((void)); -extern int using_fieldwidths P((void)); -/* gawkmisc.c */ -extern char *gawk_name P((const char *filespec)); -extern void os_arg_fixup P((int *argcp, char ***argvp)); -extern int os_devopen P((const char *name, int flag)); -extern void os_close_on_exec P((int fd, const char *name, const char *what, - const char *dir)); -extern int os_isdir P((int fd)); -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 size_t optimal_bufsize P((int fd, struct stat *sbuf)); -extern int ispath P((const char *file)); -extern int isdirpunct P((int c)); +extern void init_fields(void); +extern void set_record(const char *buf, int cnt); +extern void reset_record(void); +extern void set_NF(void); +extern NODE **get_field(long num, Func_ptr *assign); +extern NODE *do_split(int nargs); +extern NODE *do_patsplit(int nargs); +extern void set_FS(void); +extern void set_RS(void); +extern void set_FIELDWIDTHS(void); +extern void set_FPAT(void); +extern void update_PROCINFO_str(const char *subscript, const char *str); +extern void update_PROCINFO_num(const char *subscript, AWKNUM val); + +typedef enum { + Using_FS, + Using_FIELDWIDTHS, + Using_FPAT +} field_sep_type; +extern field_sep_type current_field_sep(void); -#if HAVE_MEMCPY_ULONG -extern char *memcpy_ulong P((char *dest, const char *src, unsigned long l)); -#define memcpy memcpy_ulong -#endif -#if HAVE_MEMSET_ULONG -extern void *memset_ulong P((void *dest, int val, unsigned long l)); -#define memset memset_ulong -#endif +/* gawkmisc.c */ +extern char *gawk_name(const char *filespec); +extern void os_arg_fixup(int *argcp, char ***argvp); +extern int os_devopen(const char *name, int flag); +extern void os_close_on_exec(int fd, const char *name, const char *what, const char *dir); +extern int os_isatty(int fd); +extern int os_isdir(int fd); +extern int os_is_setuid(void); +extern int os_setbinmode(int fd, int mode); +extern void os_restore_mode(int fd); +extern size_t optimal_bufsize(int fd, struct stat *sbuf); +extern int ispath(const char *file); +extern int isdirpunct(int c); /* io.c */ -extern void register_open_hook P((void *(*open_func)(IOBUF *))); -extern void set_FNR P((void)); -extern void set_NR P((void)); -extern void do_input P((void)); -extern struct redirect *redirect P((NODE *tree, int *errflg)); -extern NODE *do_close P((NODE *tree)); -extern int flush_io P((void)); -extern int close_io P((int *stdio_problem)); -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)) ATTRIBUTE_NORETURN; -extern struct redirect *getredirect P((const char *str, int len)); +extern void register_open_hook(void *(*open_func)(IOBUF *)); +extern void set_FNR(void); +extern void set_NR(void); + +extern struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg); +extern NODE *do_close(int nargs); +extern int flush_io(void); +extern int close_io(int *stdio_problem); +extern int devopen(const char *name, const char *mode); +extern int srcopen(SRCFILE *s); +extern char *find_source(const char *src, struct stat *stb, int *errcode); +extern NODE *do_getline_redir(int intovar, int redirtype); +extern NODE *do_getline(int intovar, IOBUF *iop); +extern struct redirect *getredirect(const char *str, int len); +extern int inrec(IOBUF *iop, int *errcode); +extern int nextfile(IOBUF **curfile, int skipping); /* main.c */ -extern int main P((int argc, char **argv)); -extern int arg_assign P((char *arg, int initing)); -extern int is_std_var P((const char *var)); +extern int arg_assign(char *arg, int initing); +extern int is_std_var(const char *var); +extern char *estrdup(const char *str, size_t len); +extern void update_global_values(); /* msg.c */ -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((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 gawk_exit(int status); +extern void err(const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(2, 0); 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; -ATTRIBUTE_EXPORTED +extern void r_fatal (const char *mesg, ...) ATTRIBUTE_PRINTF_1; #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 (); -extern void warning (); -extern void set_loc (); -extern void r_fatal (); -extern void (*lintfunc) (); -#endif -#endif /* profile.c */ -extern void init_profiling P((int *flag, const char *def_file)); -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((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)); +extern void init_profiling(int *flag, const char *def_file); +extern void init_profiling_signals(void); +extern void set_prof_file(const char *filename); +extern void dump_prog(INSTRUCTION *code); +extern char *pp_number(AWKNUM d); +extern char *pp_string(const char *in_str, size_t len, int delim); +extern char *pp_node(NODE *n); +extern int pp_func(INSTRUCTION *pc, void *); +extern void pp_string_fp(Func_print print_func, 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((const char *format, int index, NODE *s)); -extern NODE *r_force_string P((NODE *s)); -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, 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((const char **string_ptr)); -#ifdef MBS_SUPPORT -extern NODE *str2wstr P((NODE *n, size_t **ptr)); +extern AWKNUM r_force_number(NODE *n); +extern NODE *format_val(const char *format, int index, NODE *s); +extern NODE *r_force_string(NODE *s); +extern NODE *dupnode(NODE *n); +extern NODE *mk_number(AWKNUM x, unsigned int flags); +extern NODE *r_make_str_node(const char *s, unsigned long len, int scan); +extern NODE *more_nodes(void); +extern void unref(NODE *tmp); +extern int parse_escape(const char **string_ptr); +#if MBS_SUPPORT +extern NODE *str2wstr(NODE *n, size_t **ptr); +extern NODE *wstr2str(NODE *n); #define force_wstring(n) str2wstr(n, NULL) -extern const wchar_t *wstrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len)); -extern const wchar_t *wcasestrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len)); -extern void free_wstr P((NODE *n)); +extern const wchar_t *wstrstr(const wchar_t *haystack, size_t hs_len, + const wchar_t *needle, size_t needle_len); +extern const wchar_t *wcasestrstr(const wchar_t *haystack, size_t hs_len, + const wchar_t *needle, size_t needle_len); +extern void free_wstr(NODE *n); +extern wint_t btowc_cache[]; +#define btowc_cache(x) btowc_cache[(x)&0xFF] +extern void init_btowc_cache(); +#define is_valid_character(b) (btowc_cache[(b)&0xFF] != WEOF) #else #define free_wstr(NODE) /* empty */ #endif /* re.c */ -extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase, int dfa)); -extern int research P((Regexp *rp, char *str, int start, - size_t len, int flags)); -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((const char *text, size_t len, Regexp *re, const char *buf)); -extern int remaybelong P((const char *text, size_t len)); -extern int isnondecimal P((const char *str, int use_locale)); +extern Regexp *make_regexp(const char *s, size_t len, int ignorecase, int dfa, int canfatal); +extern int research(Regexp *rp, char *str, int start, size_t len, int flags); +extern void refree(Regexp *rp); +extern void reg_error(const char *s); +extern Regexp *re_update(NODE *t); +extern void resyntax(int syntax); +extern void resetup(void); +extern int avoid_dfa(NODE *re, char *str, size_t len); +extern int reisstring(const char *text, size_t len, Regexp *re, const char *buf); +extern int remaybelong(const char *text, size_t len); +extern int isnondecimal(const char *str, int use_locale); /* floatcomp.c */ #ifdef VMS /* VMS linker weirdness? */ @@ -1192,49 +1387,27 @@ #define Floor gawk_floor #endif -extern AWKNUM Floor P((AWKNUM n)); -extern AWKNUM Ceil P((AWKNUM n)); +extern AWKNUM Floor(AWKNUM n); +extern AWKNUM Ceil(AWKNUM n); #ifdef HAVE_UINTMAX_T -extern uintmax_t adjust_uint P((uintmax_t n)); +extern uintmax_t adjust_uint(uintmax_t n); #else #define adjust_uint(n) (n) #endif -/* strncasecmp.c */ -#ifndef BROKEN_STRNCASECMP -extern int strcasecmp P((const char *s1, const char *s2)); -extern int strncasecmp P((const char *s1, const char *s2, register size_t n)); -#endif - -#if defined(atarist) -#if defined(PIPES_SIMULATED) -/* unsupported/atari/tmpnam.c */ -extern char *tmpnam P((char *buf)); -extern char *tempnam P((const char *path, const char *base)); -#else -#include -#endif -#include -#define INVALID_HANDLE (__SMALLEST_VALID_HANDLE - 1) -#else #define INVALID_HANDLE (-1) -#endif /* atarist */ #ifdef HAVE_SYS_WAIT_H #include #endif #ifndef WEXITSTATUS -#if defined(_MSC_VER) || defined(VMS) +#if defined(VMS) #define WEXITSTATUS(stat_val) (stat_val) -#else /* ! (defined(_MSC_VER) || defined(VMS)) */ +#else /* ! defined(VMS) */ #define WEXITSTATUS(stat_val) ((((unsigned) (stat_val)) >> 8) & 0xFF) -#endif /* ! (defined(_MSC_VER) || defined(VMS)) */ +#endif /* ! defined(VMS)) */ #endif /* WEXITSTATUS */ -#ifndef STATIC -#define STATIC static -#endif - /* EXIT_SUCCESS and EXIT_FAILURE normally come from */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 diff -Nru gawk-3.1.8+dfsg/awkgram.c gawk-4.0.1+dfsg/awkgram.c --- gawk-3.1.8+dfsg/awkgram.c 2010-04-13 19:24:46.000000000 +0000 +++ gawk-4.0.1+dfsg/awkgram.c 2012-03-28 20:03:33.000000000 +0000 @@ -1,9 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ +/* A Bison parser, made by GNU Bison 2.5. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 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 @@ -45,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.2" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -66,7 +65,7 @@ /* Copy the first part of user declarations. */ -/* Line 189 of yacc.c */ +/* Line 268 of yacc.c */ #line 26 "awkgram.y" #ifdef GAWKDEBUG @@ -79,62 +78,106 @@ #define signed /**/ #endif -#define CAN_FREE TRUE -#define DONT_FREE FALSE - -#ifdef CAN_USE_STDARG_H static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1; -#else -static void yyerror(); /* va_alist */ -#endif -static char *get_src_buf P((void)); -static int yylex P((void)); -static NODE *node_common P((NODETYPE op)); -static NODE *snode P((NODE *subn, NODETYPE op, int sindex)); -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)); -static NODE *make_param P((char *name)); -static NODE *mk_rexp P((NODE *exp)); -static int dup_parms P((NODE *func)); -static void param_sanity P((NODE *arglist)); -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((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)); -static int isarray P((NODE *n)); +static void error_ln(int line, const char *m, ...) ATTRIBUTE_PRINTF_2; +static void lintwarn_ln(int line, const char *m, ...) ATTRIBUTE_PRINTF_2; +static void warning_ln(int line, const char *m, ...) ATTRIBUTE_PRINTF_2; +static char *get_src_buf(void); +static int yylex(void); +int yyparse(void); +static INSTRUCTION *snode(INSTRUCTION *subn, INSTRUCTION *op); +static int func_install(INSTRUCTION *fp, INSTRUCTION *def); +static void pop_params(NODE *params); +static NODE *make_param(char *pname); +static NODE *mk_rexp(INSTRUCTION *exp); +static void append_param(char *pname); +static int dup_parms(INSTRUCTION *fp, NODE *func); +static void param_sanity(INSTRUCTION *arglist); +static int parms_shadow(INSTRUCTION *pc, int *shadow); +static int isnoeffect(OPCODE type); +static INSTRUCTION *make_assignable(INSTRUCTION *ip); +static void dumpintlstr(const char *str, size_t len); +static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2); +static int isarray(NODE *n); +static int include_source(INSTRUCTION *file); +static void next_sourcefile(void); +static char *tokexpand(void); + +#define instruction(t) bcalloc(t, 1, 0) + +static INSTRUCTION *mk_program(void); +static INSTRUCTION *append_rule(INSTRUCTION *pattern, INSTRUCTION *action); +static INSTRUCTION *mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch, + INSTRUCTION *elsep, INSTRUCTION *false_branch); +static INSTRUCTION *mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1); +static INSTRUCTION *mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond, + INSTRUCTION *incr, INSTRUCTION *body); +static void fix_break_continue(INSTRUCTION *list, INSTRUCTION *b_target, INSTRUCTION *c_target); +static INSTRUCTION *mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op); +static INSTRUCTION *mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op); +static INSTRUCTION *mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op); +static INSTRUCTION *mk_getline(INSTRUCTION *op, INSTRUCTION *opt_var, INSTRUCTION *redir, int redirtype); +static NODE *make_regnode(int type, NODE *exp); +static int count_expressions(INSTRUCTION **list, int isarg); +static INSTRUCTION *optimize_assignment(INSTRUCTION *exp); +static void add_lint(INSTRUCTION *list, LINTTYPE linttype); enum defref { FUNC_DEFINE, FUNC_USE }; -static void func_use P((const char *name, enum defref how)); -static void check_funcs P((void)); +static void func_use(const char *name, enum defref how); +static void check_funcs(void); +static void free_bcpool(INSTRUCTION *pl); -static ssize_t read_one_line P((int fd, void *buffer, size_t count)); -static int one_line_close P((int fd)); +static ssize_t read_one_line(int fd, void *buffer, size_t count); +static int one_line_close(int fd); -static NODE *constant_fold P((NODE *left, NODETYPE op, NODE *right)); -static NODE *optimize_concat P((NODE *left, NODETYPE op, NODE *right)); +static void (*install_func)(char *) = NULL; +static int want_source = FALSE; static int want_regexp; /* 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 rule = 0; + +const char *const ruletab[] = { + "?", + "BEGIN", + "Rule", + "END", + "BEGINFILE", + "ENDFILE", +}; + 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 int sub_counter = 0; /* array dimension counter for use in delete */ +static char *lexptr = NULL; /* pointer to next char during parsing */ static char *lexend; static char *lexptr_begin; /* keep track of where we were for error msgs */ static char *lexeme; /* beginning of lexeme for debugging */ +static int lexeof; /* seen EOF for current source? */ static char *thisline = NULL; +static int in_braces = 0; /* count braces for firstline, lastline in an 'action' */ +static int lastline = 0; +static int firstline = 0; +static SRCFILE *sourcefile = NULL; /* current program source */ +static int lasttok = 0; +static int eof_warned = FALSE; /* GLOBAL: want warning for each file */ +static int break_allowed; /* kludge for break */ +static int continue_allowed; /* kludge for continue */ + + +#define END_FILE -1000 +#define END_SRC -2000 + #define YYDEBUG_LEXER_TEXT (lexeme) static int param_counter; +static NODE *func_params; /* list of parameters for the current function */ static char *tokstart = NULL; static char *tok = NULL; static char *tokend; +static int errcount = 0; + +static NODE *symbol_list; +extern void destroy_symbol(char *name); static long func_count; /* total number of functions */ @@ -144,12 +187,25 @@ extern char *source; extern int sourceline; -extern struct src *srcfiles; -extern long numfiles; -extern int errcount; -extern NODE *begin_block; -extern NODE *end_block; +extern SRCFILE *srcfiles; +extern INSTRUCTION *rule_list; +extern int max_args; + +static INSTRUCTION *rule_block[sizeof(ruletab)]; + +static INSTRUCTION *ip_rec; +static INSTRUCTION *ip_newfile; +static INSTRUCTION *ip_atexit = NULL; +static INSTRUCTION *ip_end; +static INSTRUCTION *ip_endfile; +static INSTRUCTION *ip_beginfile; + +static inline INSTRUCTION *list_create(INSTRUCTION *x); +static inline INSTRUCTION *list_append(INSTRUCTION *l, INSTRUCTION *x); +static inline INSTRUCTION *list_prepend(INSTRUCTION *l, INSTRUCTION *x); +static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2); +extern double fmod(double x, double y); /* * This string cannot occur as a real awk identifier. * Use it as a special token to make function parsing @@ -161,9 +217,11 @@ */ static char builtin_func[] = "@builtin"; +#define YYSTYPE INSTRUCTION * -/* Line 189 of yacc.c */ -#line 167 "awkgram.c" + +/* Line 268 of yacc.c */ +#line 225 "awkgram.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -193,7 +251,7 @@ FUNC_CALL = 258, NAME = 259, REGEXP = 260, - ERROR = 261, + FILENAME = 261, YNUMBER = 262, YSTRING = 263, RELOP = 264, @@ -203,44 +261,50 @@ ASSIGN = 268, MATCHOP = 269, CONCAT_OP = 270, - LEX_BEGIN = 271, - LEX_END = 272, - LEX_IF = 273, - LEX_ELSE = 274, - LEX_RETURN = 275, - LEX_DELETE = 276, - LEX_SWITCH = 277, - LEX_CASE = 278, - LEX_DEFAULT = 279, - LEX_WHILE = 280, - LEX_DO = 281, - LEX_FOR = 282, - LEX_BREAK = 283, - LEX_CONTINUE = 284, - LEX_PRINT = 285, - LEX_PRINTF = 286, - LEX_NEXT = 287, - LEX_EXIT = 288, - LEX_FUNCTION = 289, - LEX_GETLINE = 290, - LEX_NEXTFILE = 291, - LEX_IN = 292, - LEX_AND = 293, - LEX_OR = 294, - INCREMENT = 295, - DECREMENT = 296, - LEX_BUILTIN = 297, - LEX_LENGTH = 298, - NEWLINE = 299, - SLASH_BEFORE_EQUAL = 300, - UNARY = 301 + SUBSCRIPT = 271, + LEX_BEGIN = 272, + LEX_END = 273, + LEX_IF = 274, + LEX_ELSE = 275, + LEX_RETURN = 276, + LEX_DELETE = 277, + LEX_SWITCH = 278, + LEX_CASE = 279, + LEX_DEFAULT = 280, + LEX_WHILE = 281, + LEX_DO = 282, + LEX_FOR = 283, + LEX_BREAK = 284, + LEX_CONTINUE = 285, + LEX_PRINT = 286, + LEX_PRINTF = 287, + LEX_NEXT = 288, + LEX_EXIT = 289, + LEX_FUNCTION = 290, + LEX_BEGINFILE = 291, + LEX_ENDFILE = 292, + LEX_GETLINE = 293, + LEX_NEXTFILE = 294, + LEX_IN = 295, + LEX_AND = 296, + LEX_OR = 297, + INCREMENT = 298, + DECREMENT = 299, + LEX_BUILTIN = 300, + LEX_LENGTH = 301, + LEX_EOF = 302, + LEX_INCLUDE = 303, + LEX_EVAL = 304, + NEWLINE = 305, + SLASH_BEFORE_EQUAL = 306, + UNARY = 307 }; #endif /* Tokens. */ #define FUNC_CALL 258 #define NAME 259 #define REGEXP 260 -#define ERROR 261 +#define FILENAME 261 #define YNUMBER 262 #define YSTRING 263 #define RELOP 264 @@ -250,60 +314,49 @@ #define ASSIGN 268 #define MATCHOP 269 #define CONCAT_OP 270 -#define LEX_BEGIN 271 -#define LEX_END 272 -#define LEX_IF 273 -#define LEX_ELSE 274 -#define LEX_RETURN 275 -#define LEX_DELETE 276 -#define LEX_SWITCH 277 -#define LEX_CASE 278 -#define LEX_DEFAULT 279 -#define LEX_WHILE 280 -#define LEX_DO 281 -#define LEX_FOR 282 -#define LEX_BREAK 283 -#define LEX_CONTINUE 284 -#define LEX_PRINT 285 -#define LEX_PRINTF 286 -#define LEX_NEXT 287 -#define LEX_EXIT 288 -#define LEX_FUNCTION 289 -#define LEX_GETLINE 290 -#define LEX_NEXTFILE 291 -#define LEX_IN 292 -#define LEX_AND 293 -#define LEX_OR 294 -#define INCREMENT 295 -#define DECREMENT 296 -#define LEX_BUILTIN 297 -#define LEX_LENGTH 298 -#define NEWLINE 299 -#define SLASH_BEFORE_EQUAL 300 -#define UNARY 301 +#define SUBSCRIPT 271 +#define LEX_BEGIN 272 +#define LEX_END 273 +#define LEX_IF 274 +#define LEX_ELSE 275 +#define LEX_RETURN 276 +#define LEX_DELETE 277 +#define LEX_SWITCH 278 +#define LEX_CASE 279 +#define LEX_DEFAULT 280 +#define LEX_WHILE 281 +#define LEX_DO 282 +#define LEX_FOR 283 +#define LEX_BREAK 284 +#define LEX_CONTINUE 285 +#define LEX_PRINT 286 +#define LEX_PRINTF 287 +#define LEX_NEXT 288 +#define LEX_EXIT 289 +#define LEX_FUNCTION 290 +#define LEX_BEGINFILE 291 +#define LEX_ENDFILE 292 +#define LEX_GETLINE 293 +#define LEX_NEXTFILE 294 +#define LEX_IN 295 +#define LEX_AND 296 +#define LEX_OR 297 +#define INCREMENT 298 +#define DECREMENT 299 +#define LEX_BUILTIN 300 +#define LEX_LENGTH 301 +#define LEX_EOF 302 +#define LEX_INCLUDE 303 +#define LEX_EVAL 304 +#define NEWLINE 305 +#define SLASH_BEFORE_EQUAL 306 +#define UNARY 307 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ -#line 120 "awkgram.y" - - long lval; - AWKNUM fval; - NODE *nodeval; - NODETYPE nodetypeval; - char *sval; - NODE *(*ptrval) P((void)); - - - -/* Line 214 of yacc.c */ -#line 306 "awkgram.c" -} YYSTYPE; +typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -313,8 +366,8 @@ /* Copy the second part of user declarations. */ -/* Line 264 of yacc.c */ -#line 318 "awkgram.c" +/* Line 343 of yacc.c */ +#line 371 "awkgram.c" #ifdef short # undef short @@ -386,8 +439,7 @@ #ifndef lint # define YYID(n) (n) #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else @@ -417,11 +469,11 @@ # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -444,24 +496,24 @@ # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -470,9 +522,7 @@ #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow && (! defined __cplusplus || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -490,23 +540,7 @@ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -526,23 +560,43 @@ #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 5 +#define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1088 +#define YYLAST 1157 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 67 +#define YYNTOKENS 74 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 56 +#define YYNNTS 65 /* YYNRULES -- Number of rules. */ -#define YYNRULES 165 +#define YYNRULES 185 /* YYNRULES -- Number of states. */ -#define YYNSTATES 308 +#define YYNSTATES 330 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 301 +#define YYMAXUTOK 307 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -553,16 +607,16 @@ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 56, 2, 2, 59, 55, 2, 2, - 60, 61, 53, 51, 48, 52, 2, 54, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 47, 66, - 49, 2, 50, 46, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 62, 2, 2, 65, 61, 2, 2, + 66, 67, 59, 57, 54, 58, 2, 60, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 53, 73, + 55, 2, 56, 52, 68, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 62, 2, 63, 58, 2, 2, 2, 2, 2, + 2, 69, 2, 70, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 64, 2, 65, 2, 2, 2, 2, + 2, 2, 2, 71, 2, 72, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -580,7 +634,7 @@ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 57 + 45, 46, 47, 48, 49, 50, 51, 63 }; #if YYDEBUG @@ -588,103 +642,112 @@ YYRHS. */ static const yytype_uint16 yyprhs[] = { - 0, 0, 3, 7, 8, 11, 14, 17, 20, 23, - 24, 26, 30, 32, 34, 40, 42, 44, 46, 48, - 50, 51, 59, 60, 64, 66, 68, 69, 72, 75, - 77, 80, 83, 87, 89, 99, 106, 115, 124, 137, - 149, 152, 155, 158, 161, 165, 166, 171, 174, 175, - 180, 186, 189, 194, 196, 197, 199, 201, 202, 205, - 208, 214, 219, 221, 224, 227, 229, 231, 233, 235, - 237, 243, 244, 245, 249, 256, 266, 268, 271, 272, - 274, 275, 278, 279, 281, 283, 287, 289, 292, 296, - 297, 299, 300, 302, 304, 308, 310, 313, 317, 321, - 325, 329, 333, 337, 341, 345, 351, 353, 355, 357, - 360, 362, 364, 366, 368, 370, 372, 375, 377, 381, - 385, 389, 393, 397, 401, 405, 408, 411, 417, 422, - 426, 430, 434, 438, 442, 446, 448, 451, 455, 460, - 465, 467, 472, 474, 477, 480, 482, 484, 487, 490, - 491, 493, 495, 500, 502, 506, 508, 510, 511, 514, - 517, 519, 520, 522, 524, 526 + 0, 0, 3, 4, 7, 10, 13, 16, 19, 22, + 25, 30, 32, 35, 37, 38, 40, 45, 47, 49, + 51, 53, 59, 61, 63, 65, 68, 70, 72, 73, + 81, 82, 86, 88, 90, 91, 94, 97, 99, 102, + 105, 109, 111, 121, 128, 137, 146, 159, 171, 173, + 176, 179, 182, 185, 189, 190, 195, 198, 199, 204, + 205, 210, 215, 217, 218, 220, 221, 224, 227, 233, + 238, 240, 243, 246, 248, 250, 252, 254, 256, 260, + 261, 262, 266, 273, 283, 285, 288, 289, 291, 292, + 295, 296, 298, 300, 304, 306, 309, 313, 314, 316, + 317, 319, 321, 325, 327, 330, 334, 338, 342, 346, + 350, 354, 358, 362, 368, 370, 372, 374, 377, 379, + 381, 383, 385, 387, 389, 392, 394, 398, 402, 406, + 410, 414, 418, 422, 425, 428, 434, 439, 443, 447, + 451, 455, 459, 463, 465, 468, 472, 477, 482, 484, + 486, 488, 491, 494, 496, 498, 501, 504, 506, 509, + 514, 515, 517, 518, 521, 523, 526, 528, 532, 534, + 537, 540, 542, 545, 547, 551, 553, 555, 556, 559, + 562, 564, 565, 567, 569, 571 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = +static const yytype_int16 yyrhs[] = { - 68, 0, -1, 97, 69, 97, -1, -1, 69, 70, - -1, 69, 1, -1, 71, 72, -1, 71, 81, -1, - 75, 72, -1, -1, 104, -1, 104, 48, 104, -1, - 16, -1, 17, -1, 116, 80, 117, 119, 97, -1, - 4, -1, 3, -1, 74, -1, 42, -1, 43, -1, - -1, 34, 76, 73, 60, 99, 118, 97, -1, -1, - 79, 78, 5, -1, 54, -1, 45, -1, -1, 80, - 82, -1, 80, 1, -1, 96, -1, 120, 97, -1, - 120, 97, -1, 116, 80, 117, -1, 95, -1, 22, - 60, 104, 118, 97, 116, 87, 97, 117, -1, 25, - 60, 104, 118, 97, 82, -1, 26, 97, 82, 25, - 60, 104, 118, 97, -1, 27, 60, 4, 37, 4, - 118, 97, 82, -1, 27, 60, 86, 120, 97, 104, - 120, 97, 86, 118, 97, 82, -1, 27, 60, 86, - 120, 97, 120, 97, 86, 118, 97, 82, -1, 28, - 81, -1, 29, 81, -1, 32, 81, -1, 36, 81, - -1, 33, 101, 81, -1, -1, 20, 83, 101, 81, - -1, 84, 81, -1, -1, 91, 85, 92, 93, -1, - 21, 4, 62, 103, 63, -1, 21, 4, -1, 21, - 60, 4, 61, -1, 104, -1, -1, 84, -1, 88, - -1, -1, 88, 89, -1, 88, 1, -1, 23, 90, - 121, 97, 80, -1, 24, 121, 97, 80, -1, 7, - -1, 52, 7, -1, 51, 7, -1, 8, -1, 77, - -1, 30, -1, 31, -1, 102, -1, 60, 104, 122, - 103, 118, -1, -1, -1, 10, 94, 108, -1, 18, - 60, 104, 118, 97, 82, -1, 18, 60, 104, 118, - 97, 82, 19, 97, 82, -1, 44, -1, 96, 44, - -1, -1, 96, -1, -1, 49, 109, -1, -1, 100, - -1, 4, -1, 100, 122, 4, -1, 1, -1, 100, - 1, -1, 100, 122, 1, -1, -1, 104, -1, -1, - 103, -1, 104, -1, 103, 122, 104, -1, 1, -1, - 103, 1, -1, 103, 1, 104, -1, 103, 122, 1, - -1, 113, 105, 104, -1, 104, 38, 104, -1, 104, - 39, 104, -1, 104, 14, 104, -1, 104, 37, 4, - -1, 104, 107, 104, -1, 104, 46, 104, 47, 104, - -1, 108, -1, 13, -1, 12, -1, 45, 13, -1, - 9, -1, 49, -1, 106, -1, 50, -1, 109, -1, - 110, -1, 108, 109, -1, 111, -1, 109, 58, 109, - -1, 109, 53, 109, -1, 109, 54, 109, -1, 109, - 55, 109, -1, 109, 51, 109, -1, 109, 52, 109, - -1, 35, 112, 98, -1, 113, 40, -1, 113, 41, - -1, 60, 103, 118, 37, 4, -1, 108, 11, 35, - 112, -1, 110, 58, 109, -1, 110, 53, 109, -1, - 110, 54, 109, -1, 110, 55, 109, -1, 110, 51, - 109, -1, 110, 52, 109, -1, 77, -1, 56, 109, - -1, 60, 104, 118, -1, 42, 60, 102, 118, -1, - 43, 60, 102, 118, -1, 43, -1, 3, 60, 102, - 118, -1, 113, -1, 40, 113, -1, 41, 113, -1, - 7, -1, 8, -1, 52, 109, -1, 51, 109, -1, - -1, 113, -1, 4, -1, 4, 62, 103, 63, -1, - 114, -1, 59, 111, 115, -1, 40, -1, 41, -1, - -1, 64, 97, -1, 65, 97, -1, 61, -1, -1, - 120, -1, 66, -1, 47, -1, 48, 97, -1 + 75, 0, -1, -1, 75, 76, -1, 75, 104, -1, + 75, 47, -1, 75, 1, -1, 78, 79, -1, 78, + 88, -1, 82, 79, -1, 68, 48, 77, 88, -1, + 6, -1, 6, 1, -1, 1, -1, -1, 112, -1, + 112, 54, 105, 112, -1, 17, -1, 18, -1, 36, + -1, 37, -1, 132, 87, 133, 135, 105, -1, 4, + -1, 3, -1, 81, -1, 68, 49, -1, 45, -1, + 46, -1, -1, 35, 83, 80, 66, 107, 134, 105, + -1, -1, 86, 85, 5, -1, 60, -1, 51, -1, + -1, 87, 89, -1, 87, 1, -1, 104, -1, 136, + 105, -1, 136, 105, -1, 132, 87, 133, -1, 103, + -1, 23, 66, 112, 134, 105, 132, 96, 105, 133, + -1, 26, 66, 112, 134, 105, 89, -1, 27, 105, + 89, 26, 66, 112, 134, 105, -1, 28, 66, 4, + 40, 129, 134, 105, 89, -1, 28, 66, 95, 136, + 105, 112, 136, 105, 95, 134, 105, 89, -1, 28, + 66, 95, 136, 105, 136, 105, 95, 134, 105, 89, + -1, 90, -1, 29, 88, -1, 30, 88, -1, 33, + 88, -1, 39, 88, -1, 34, 109, 88, -1, -1, + 21, 91, 109, 88, -1, 92, 88, -1, -1, 99, + 93, 100, 101, -1, -1, 22, 4, 94, 123, -1, + 22, 66, 4, 67, -1, 112, -1, -1, 92, -1, + -1, 96, 97, -1, 96, 1, -1, 24, 98, 137, + 105, 87, -1, 25, 137, 105, 87, -1, 7, -1, + 58, 7, -1, 57, 7, -1, 8, -1, 84, -1, + 31, -1, 32, -1, 110, -1, 66, 111, 134, -1, + -1, -1, 10, 102, 116, -1, 19, 66, 112, 134, + 105, 89, -1, 19, 66, 112, 134, 105, 89, 20, + 105, 89, -1, 50, -1, 104, 50, -1, -1, 104, + -1, -1, 55, 117, -1, -1, 108, -1, 4, -1, + 108, 138, 4, -1, 1, -1, 108, 1, -1, 108, + 138, 1, -1, -1, 112, -1, -1, 111, -1, 112, + -1, 111, 138, 112, -1, 1, -1, 111, 1, -1, + 111, 1, 112, -1, 111, 138, 1, -1, 130, 113, + 112, -1, 112, 41, 112, -1, 112, 42, 112, -1, + 112, 14, 112, -1, 112, 40, 129, -1, 112, 115, + 112, -1, 112, 52, 112, 53, 112, -1, 116, -1, + 13, -1, 12, -1, 51, 13, -1, 9, -1, 55, + -1, 114, -1, 56, -1, 117, -1, 118, -1, 116, + 117, -1, 119, -1, 117, 64, 117, -1, 117, 59, + 117, -1, 117, 60, 117, -1, 117, 61, 117, -1, + 117, 57, 117, -1, 117, 58, 117, -1, 38, 122, + 106, -1, 130, 43, -1, 130, 44, -1, 66, 111, + 134, 40, 129, -1, 116, 11, 38, 122, -1, 118, + 64, 117, -1, 118, 59, 117, -1, 118, 60, 117, + -1, 118, 61, 117, -1, 118, 57, 117, -1, 118, + 58, 117, -1, 84, -1, 62, 117, -1, 66, 112, + 134, -1, 45, 66, 110, 134, -1, 46, 66, 110, + 134, -1, 46, -1, 120, -1, 130, -1, 43, 130, + -1, 44, 130, -1, 7, -1, 8, -1, 58, 117, + -1, 57, 117, -1, 121, -1, 68, 121, -1, 3, + 66, 110, 134, -1, -1, 130, -1, -1, 124, 16, + -1, 125, -1, 124, 125, -1, 126, -1, 69, 111, + 70, -1, 126, -1, 127, 126, -1, 127, 16, -1, + 4, -1, 4, 128, -1, 129, -1, 65, 119, 131, + -1, 43, -1, 44, -1, -1, 71, 105, -1, 72, + 105, -1, 67, -1, -1, 136, -1, 73, -1, 53, + -1, 54, 105, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 181, 181, 187, 189, 194, 206, 210, 225, 236, - 239, 243, 253, 262, 274, 279, 281, 283, 294, 295, - 300, 299, 323, 322, 348, 349, 354, 355, 373, 378, - 379, 383, 385, 387, 389, 391, 393, 395, 439, 443, - 448, 451, 454, 463, 487, 490, 489, 499, 511, 511, - 542, 544, 562, 584, 590, 591, 596, 649, 650, 667, - 672, 674, 679, 681, 686, 688, 690, 695, 696, 704, - 705, 711, 716, 716, 728, 733, 740, 741, 744, 746, - 751, 752, 758, 759, 764, 766, 768, 770, 772, 779, - 780, 786, 787, 792, 794, 800, 802, 804, 806, 811, - 817, 819, 821, 827, 833, 839, 841, 846, 848, 850, - 855, 857, 861, 862, 867, 869, 871, 876, 878, 880, - 882, 884, 886, 888, 890, 896, 898, 900, 913, 918, - 920, 922, 924, 926, 928, 933, 935, 937, 939, 942, - 944, 958, 966, 967, 969, 971, 973, 976, 984, 996, - 997, 1002, 1004, 1019, 1029, 1044, 1045, 1046, 1050, 1054, - 1058, 1061, 1063, 1067, 1071, 1074 + 0, 218, 218, 220, 225, 226, 230, 242, 246, 257, + 265, 273, 281, 283, 289, 290, 292, 318, 329, 340, + 346, 355, 365, 367, 369, 380, 385, 386, 391, 390, + 420, 419, 452, 454, 459, 460, 473, 478, 479, 483, + 485, 487, 494, 584, 626, 668, 781, 788, 795, 805, + 814, 823, 832, 847, 863, 862, 874, 886, 886, 982, + 982, 1007, 1030, 1036, 1037, 1043, 1044, 1051, 1056, 1068, + 1082, 1084, 1090, 1095, 1097, 1105, 1107, 1116, 1117, 1125, + 1130, 1130, 1141, 1145, 1153, 1154, 1157, 1159, 1164, 1165, + 1172, 1174, 1178, 1184, 1191, 1193, 1195, 1202, 1203, 1209, + 1210, 1215, 1217, 1222, 1224, 1226, 1228, 1234, 1241, 1243, + 1245, 1261, 1271, 1278, 1280, 1285, 1287, 1289, 1297, 1299, + 1304, 1306, 1311, 1313, 1315, 1368, 1370, 1372, 1374, 1376, + 1378, 1380, 1382, 1405, 1410, 1415, 1440, 1446, 1448, 1450, + 1452, 1454, 1456, 1461, 1465, 1496, 1498, 1504, 1510, 1523, + 1524, 1525, 1530, 1535, 1539, 1543, 1555, 1568, 1573, 1609, + 1627, 1628, 1634, 1635, 1640, 1642, 1649, 1666, 1683, 1685, + 1692, 1697, 1705, 1719, 1731, 1740, 1744, 1748, 1752, 1756, + 1760, 1763, 1765, 1769, 1773, 1777 }; #endif @@ -693,28 +756,31 @@ First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "FUNC_CALL", "NAME", "REGEXP", "ERROR", - "YNUMBER", "YSTRING", "RELOP", "IO_OUT", "IO_IN", "ASSIGNOP", "ASSIGN", - "MATCHOP", "CONCAT_OP", "LEX_BEGIN", "LEX_END", "LEX_IF", "LEX_ELSE", - "LEX_RETURN", "LEX_DELETE", "LEX_SWITCH", "LEX_CASE", "LEX_DEFAULT", - "LEX_WHILE", "LEX_DO", "LEX_FOR", "LEX_BREAK", "LEX_CONTINUE", - "LEX_PRINT", "LEX_PRINTF", "LEX_NEXT", "LEX_EXIT", "LEX_FUNCTION", - "LEX_GETLINE", "LEX_NEXTFILE", "LEX_IN", "LEX_AND", "LEX_OR", - "INCREMENT", "DECREMENT", "LEX_BUILTIN", "LEX_LENGTH", "NEWLINE", - "SLASH_BEFORE_EQUAL", "'?'", "':'", "','", "'<'", "'>'", "'+'", "'-'", - "'*'", "'/'", "'%'", "'!'", "UNARY", "'^'", "'$'", "'('", "')'", "'['", - "']'", "'{'", "'}'", "';'", "$accept", "start", "program", "rule", - "pattern", "action", "func_name", "lex_builtin", "function_prologue", - "$@1", "regexp", "$@2", "a_slash", "statements", "statement_term", - "statement", "$@3", "simple_stmt", "$@4", "opt_simple_stmt", - "switch_body", "case_statements", "case_statement", "case_value", - "print", "print_expression_list", "output_redir", "$@5", "if_statement", - "nls", "opt_nls", "input_redir", "opt_param_list", "param_list", - "opt_exp", "opt_expression_list", "expression_list", "exp", + "$end", "error", "$undefined", "FUNC_CALL", "NAME", "REGEXP", + "FILENAME", "YNUMBER", "YSTRING", "RELOP", "IO_OUT", "IO_IN", "ASSIGNOP", + "ASSIGN", "MATCHOP", "CONCAT_OP", "SUBSCRIPT", "LEX_BEGIN", "LEX_END", + "LEX_IF", "LEX_ELSE", "LEX_RETURN", "LEX_DELETE", "LEX_SWITCH", + "LEX_CASE", "LEX_DEFAULT", "LEX_WHILE", "LEX_DO", "LEX_FOR", "LEX_BREAK", + "LEX_CONTINUE", "LEX_PRINT", "LEX_PRINTF", "LEX_NEXT", "LEX_EXIT", + "LEX_FUNCTION", "LEX_BEGINFILE", "LEX_ENDFILE", "LEX_GETLINE", + "LEX_NEXTFILE", "LEX_IN", "LEX_AND", "LEX_OR", "INCREMENT", "DECREMENT", + "LEX_BUILTIN", "LEX_LENGTH", "LEX_EOF", "LEX_INCLUDE", "LEX_EVAL", + "NEWLINE", "SLASH_BEFORE_EQUAL", "'?'", "':'", "','", "'<'", "'>'", + "'+'", "'-'", "'*'", "'/'", "'%'", "'!'", "UNARY", "'^'", "'$'", "'('", + "')'", "'@'", "'['", "']'", "'{'", "'}'", "';'", "$accept", "program", + "rule", "source", "pattern", "action", "func_name", "lex_builtin", + "function_prologue", "$@1", "regexp", "$@2", "a_slash", "statements", + "statement_term", "statement", "non_compound_stmt", "$@3", "simple_stmt", + "$@4", "$@5", "opt_simple_stmt", "case_statements", "case_statement", + "case_value", "print", "print_expression_list", "output_redir", "$@6", + "if_statement", "nls", "opt_nls", "input_redir", "opt_param_list", + "param_list", "opt_exp", "opt_expression_list", "expression_list", "exp", "assign_operator", "relop_or_less", "a_relop", "common_exp", "simp_exp", - "simp_exp_nc", "non_post_simp_exp", "opt_variable", "variable", - "field_spec", "opt_incdec", "l_brace", "r_brace", "r_paren", "opt_semi", - "semi", "colon", "comma", 0 + "simp_exp_nc", "non_post_simp_exp", "func_call", "direct_func_call", + "opt_variable", "delete_subscript_list", "delete_subscript", + "delete_exp_list", "bracketed_exp_list", "subscript", "subscript_list", + "simple_variable", "variable", "opt_incdec", "l_brace", "r_brace", + "r_paren", "opt_semi", "semi", "colon", "comma", 0 }; #endif @@ -727,420 +793,452 @@ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 63, 58, 44, 60, - 62, 43, 45, 42, 47, 37, 33, 301, 94, 36, - 40, 41, 91, 93, 123, 125, 59 + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 63, 58, 44, 60, 62, 43, 45, 42, + 47, 37, 33, 307, 94, 36, 40, 41, 64, 91, + 93, 123, 125, 59 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 67, 68, 69, 69, 69, 70, 70, 70, 71, - 71, 71, 71, 71, 72, 73, 73, 73, 74, 74, - 76, 75, 78, 77, 79, 79, 80, 80, 80, 81, - 81, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 83, 82, 82, 85, 84, - 84, 84, 84, 84, 86, 86, 87, 88, 88, 88, - 89, 89, 90, 90, 90, 90, 90, 91, 91, 92, - 92, 93, 94, 93, 95, 95, 96, 96, 97, 97, - 98, 98, 99, 99, 100, 100, 100, 100, 100, 101, - 101, 102, 102, 103, 103, 103, 103, 103, 103, 104, - 104, 104, 104, 104, 104, 104, 104, 105, 105, 105, - 106, 106, 107, 107, 108, 108, 108, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 110, 110, - 110, 110, 110, 110, 110, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 112, - 112, 113, 113, 113, 114, 115, 115, 115, 116, 117, - 118, 119, 119, 120, 121, 122 + 0, 74, 75, 75, 75, 75, 75, 76, 76, 76, + 76, 77, 77, 77, 78, 78, 78, 78, 78, 78, + 78, 79, 80, 80, 80, 80, 81, 81, 83, 82, + 85, 84, 86, 86, 87, 87, 87, 88, 88, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, + 90, 90, 90, 90, 91, 90, 90, 93, 92, 94, + 92, 92, 92, 95, 95, 96, 96, 96, 97, 97, + 98, 98, 98, 98, 98, 99, 99, 100, 100, 101, + 102, 101, 103, 103, 104, 104, 105, 105, 106, 106, + 107, 107, 108, 108, 108, 108, 108, 109, 109, 110, + 110, 111, 111, 111, 111, 111, 111, 112, 112, 112, + 112, 112, 112, 112, 112, 113, 113, 113, 114, 114, + 115, 115, 116, 116, 116, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 118, 118, 118, 118, + 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 120, 120, 121, + 122, 122, 123, 123, 124, 124, 125, 126, 127, 127, + 128, 129, 129, 130, 130, 131, 131, 131, 132, 133, + 134, 135, 135, 136, 137, 138 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { - 0, 2, 3, 0, 2, 2, 2, 2, 2, 0, - 1, 3, 1, 1, 5, 1, 1, 1, 1, 1, - 0, 7, 0, 3, 1, 1, 0, 2, 2, 1, - 2, 2, 3, 1, 9, 6, 8, 8, 12, 11, - 2, 2, 2, 2, 3, 0, 4, 2, 0, 4, - 5, 2, 4, 1, 0, 1, 1, 0, 2, 2, - 5, 4, 1, 2, 2, 1, 1, 1, 1, 1, - 5, 0, 0, 3, 6, 9, 1, 2, 0, 1, - 0, 2, 0, 1, 1, 3, 1, 2, 3, 0, - 1, 0, 1, 1, 3, 1, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 5, 1, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, - 3, 3, 3, 3, 3, 2, 2, 5, 4, 3, - 3, 3, 3, 3, 3, 1, 2, 3, 4, 4, - 1, 4, 1, 2, 2, 1, 1, 2, 2, 0, - 1, 1, 4, 1, 3, 1, 1, 0, 2, 2, + 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, + 4, 1, 2, 1, 0, 1, 4, 1, 1, 1, + 1, 5, 1, 1, 1, 2, 1, 1, 0, 7, + 0, 3, 1, 1, 0, 2, 2, 1, 2, 2, + 3, 1, 9, 6, 8, 8, 12, 11, 1, 2, + 2, 2, 2, 3, 0, 4, 2, 0, 4, 0, + 4, 4, 1, 0, 1, 0, 2, 2, 5, 4, + 1, 2, 2, 1, 1, 1, 1, 1, 3, 0, + 0, 3, 6, 9, 1, 2, 0, 1, 0, 2, + 0, 1, 1, 3, 1, 2, 3, 0, 1, 0, + 1, 1, 3, 1, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 5, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 3, 3, 3, + 3, 3, 3, 2, 2, 5, 4, 3, 3, 3, + 3, 3, 3, 1, 2, 3, 4, 4, 1, 1, + 1, 2, 2, 1, 1, 2, 2, 1, 2, 4, + 0, 1, 0, 2, 1, 2, 1, 3, 1, 2, + 2, 1, 2, 1, 3, 1, 1, 0, 2, 2, 1, 0, 1, 1, 1, 2 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { - 78, 76, 0, 79, 3, 1, 77, 0, 5, 0, - 151, 145, 146, 12, 13, 20, 149, 0, 0, 0, - 140, 25, 0, 0, 24, 0, 0, 0, 4, 0, - 0, 135, 22, 2, 10, 106, 114, 115, 117, 142, - 153, 0, 0, 0, 80, 150, 143, 144, 0, 0, - 148, 142, 147, 136, 0, 157, 142, 95, 0, 93, - 78, 163, 6, 7, 29, 26, 78, 8, 0, 110, - 0, 0, 0, 0, 0, 0, 111, 113, 112, 0, - 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 108, 107, 125, 126, 0, 0, - 0, 0, 93, 0, 16, 15, 18, 19, 0, 17, - 0, 124, 0, 0, 0, 155, 156, 154, 96, 78, - 160, 0, 0, 137, 158, 0, 30, 23, 102, 103, - 100, 101, 0, 11, 104, 149, 122, 123, 119, 120, - 121, 118, 133, 134, 130, 131, 132, 129, 109, 99, - 141, 152, 0, 81, 138, 139, 97, 165, 0, 98, - 94, 28, 0, 45, 0, 0, 0, 78, 0, 0, - 0, 67, 68, 0, 89, 0, 78, 27, 0, 48, - 33, 53, 26, 161, 78, 0, 128, 86, 84, 0, - 0, 127, 0, 89, 51, 0, 0, 0, 0, 54, - 40, 41, 42, 0, 90, 43, 159, 47, 0, 0, - 78, 162, 31, 105, 78, 87, 0, 0, 0, 0, - 0, 0, 0, 0, 151, 55, 0, 44, 0, 71, - 69, 32, 14, 21, 88, 85, 78, 46, 0, 52, - 78, 78, 0, 0, 78, 93, 72, 49, 0, 50, - 0, 0, 0, 0, 0, 0, 0, 74, 57, 35, - 0, 78, 0, 78, 0, 73, 78, 78, 0, 78, - 0, 78, 54, 70, 0, 0, 59, 0, 0, 58, - 36, 37, 54, 0, 75, 34, 62, 65, 0, 0, - 66, 0, 164, 78, 0, 78, 64, 63, 78, 26, - 78, 0, 26, 0, 0, 39, 0, 38 + 2, 0, 1, 6, 0, 171, 153, 154, 17, 18, + 28, 19, 20, 160, 0, 0, 0, 148, 5, 84, + 33, 0, 0, 32, 0, 0, 0, 0, 3, 0, + 0, 143, 30, 4, 15, 114, 122, 123, 125, 149, + 157, 173, 150, 0, 0, 168, 0, 172, 0, 88, + 161, 151, 152, 0, 0, 0, 156, 150, 155, 144, + 0, 177, 150, 103, 0, 101, 0, 158, 86, 183, + 7, 8, 37, 34, 86, 9, 0, 85, 118, 0, + 0, 0, 0, 0, 86, 119, 121, 120, 0, 0, + 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 116, 115, 133, 134, 0, 0, 0, + 0, 101, 0, 170, 169, 23, 22, 26, 27, 0, + 0, 24, 0, 132, 0, 0, 0, 175, 176, 174, + 104, 86, 180, 0, 0, 145, 13, 0, 0, 87, + 178, 0, 38, 31, 110, 111, 108, 109, 0, 0, + 112, 160, 130, 131, 127, 128, 129, 126, 141, 142, + 138, 139, 140, 137, 117, 107, 159, 167, 25, 0, + 89, 146, 147, 105, 185, 0, 106, 102, 12, 10, + 36, 0, 54, 0, 0, 0, 86, 0, 0, 0, + 75, 76, 0, 97, 0, 86, 35, 48, 0, 57, + 41, 62, 34, 181, 86, 0, 16, 136, 94, 92, + 0, 0, 135, 0, 97, 59, 0, 0, 0, 0, + 63, 49, 50, 51, 0, 98, 52, 179, 56, 0, + 0, 86, 182, 39, 113, 86, 95, 0, 0, 0, + 162, 0, 0, 0, 0, 171, 64, 0, 53, 0, + 79, 77, 40, 21, 29, 96, 93, 86, 55, 60, + 0, 164, 166, 61, 86, 86, 0, 0, 86, 0, + 80, 58, 0, 163, 165, 0, 0, 0, 0, 0, + 78, 0, 82, 65, 43, 0, 86, 0, 86, 81, + 86, 0, 86, 0, 86, 63, 0, 67, 0, 0, + 66, 0, 44, 45, 63, 0, 83, 70, 73, 0, + 0, 74, 0, 184, 86, 42, 0, 86, 72, 71, + 86, 34, 86, 0, 34, 0, 0, 47, 0, 46 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 7, 28, 29, 62, 108, 109, 30, 43, - 31, 68, 32, 125, 63, 177, 193, 178, 208, 226, - 267, 268, 279, 291, 179, 229, 247, 256, 180, 3, - 4, 111, 189, 190, 203, 100, 101, 181, 99, 78, - 79, 35, 36, 37, 38, 44, 39, 40, 117, 182, - 183, 123, 210, 184, 293, 122 + -1, 1, 28, 138, 29, 70, 120, 121, 30, 48, + 31, 76, 32, 141, 71, 196, 197, 214, 198, 229, + 240, 247, 291, 300, 312, 199, 250, 271, 281, 200, + 139, 140, 123, 210, 211, 224, 109, 110, 201, 108, + 87, 88, 35, 36, 37, 38, 39, 40, 49, 259, + 260, 261, 45, 46, 47, 41, 42, 129, 202, 203, + 135, 231, 204, 314, 134 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -221 +#define YYPACT_NINF -269 static const yytype_int16 yypact[] = { - -32, -221, 35, -3, -221, -221, -221, 343, -221, -13, - -4, -221, -221, -221, -221, -221, 32, 32, 32, -6, - -5, -221, 974, 974, -221, 974, 1028, 768, -221, -26, - 2, -221, -221, -221, 820, 952, 392, 446, -221, 125, - -221, 707, 768, 185, 11, -221, -221, -221, 707, 707, - 3, -8, 3, 3, 974, 76, -221, -221, 42, 148, - -32, -221, -221, -221, -3, -221, -32, -221, 87, -221, - 974, 93, 974, 974, 974, 974, -221, -221, -221, 974, - 69, 392, 974, 974, 974, 974, 974, 974, 974, 974, - 974, 974, 974, 974, -221, -221, -221, -221, 97, 974, - 50, 41, 746, 36, -221, -221, -221, -221, 46, -221, - 974, -221, 50, 50, 148, -221, -221, -221, 974, -32, - -221, 81, 790, -221, -221, 505, -221, -221, 14, -221, - 540, 317, 874, 746, 7, 32, 70, 70, 3, 3, - 3, 3, 70, 70, 3, 3, 3, 3, -221, 746, - -221, -221, 20, 392, -221, -221, 746, -221, 115, -221, - 746, -221, 80, -221, 27, 82, 84, -32, 89, -18, - -18, -221, -221, -18, 974, -18, -32, -221, -18, -221, - -221, 746, -221, 67, -32, 974, -221, -221, -221, 50, - 48, -221, 974, 974, 79, 150, 974, 974, 631, 844, - -221, -221, -221, -18, 746, -221, -221, -221, 571, 505, - -32, -221, -221, 746, -32, -221, 26, 148, -18, 768, - 98, 148, 148, 133, -12, -221, 67, -221, 768, 151, - -221, -221, -221, -221, -221, -221, -32, -221, 45, -221, - -32, -32, 111, 172, -32, 546, -221, -221, 631, -221, - 2, 631, 974, 50, 685, 768, 974, 162, -221, -221, - 148, -32, 325, -32, 42, 952, -32, -32, 21, -32, - 631, -32, 898, -221, 631, 117, -221, 194, 137, -221, - -221, -221, 898, 50, -221, -221, -221, -221, 183, 186, - -221, 137, -221, -32, 50, -32, -221, -221, -32, -221, - -32, 631, -221, 397, 631, -221, 451, -221 + -269, 335, -269, -269, -31, -24, -269, -269, -269, -269, + -269, -269, -269, 12, 12, 12, -19, -12, -269, -269, + -269, 978, 978, -269, 978, 1023, 804, 21, -269, 115, + -21, -269, -269, 8, 1062, 952, -20, 330, -269, -269, + -269, -269, 246, 736, 804, -269, 2, -269, 205, 15, + -269, -269, -269, 736, 736, 70, 52, 80, 52, 52, + 978, 147, -269, -269, 50, 308, 174, -269, 64, -269, + -269, -269, 8, -269, 64, -269, 129, -269, -269, 978, + 143, 978, 978, 978, 64, -269, -269, -269, 978, 112, + -20, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, -269, -269, -269, -269, 141, 978, 90, + 152, 1101, 48, -269, -269, -269, -269, -269, -269, 111, + 105, -269, 978, -269, 90, 90, 308, -269, -269, -269, + 978, 64, -269, 134, 830, -269, -269, 13, -16, 8, + -269, 552, -269, -269, 53, -269, 142, 300, 1081, 978, + 103, 12, 185, 185, 52, 52, 52, 52, 185, 185, + 52, 52, 52, 52, -269, 1101, -269, -269, -269, 63, + -20, -269, -269, 1101, -269, 143, -269, 1101, -269, -269, + -269, 121, -269, 6, 130, 137, 64, 139, -16, -16, + -269, -269, -16, 978, -16, 64, -269, -269, -16, -269, + -269, 1101, -269, 127, 64, 978, 1101, -269, -269, -269, + 90, 118, -269, 978, 978, -269, 180, 978, 978, 665, + 875, -269, -269, -269, -16, 1101, -269, -269, -269, 598, + 552, 64, -269, -269, 1101, 64, -269, 28, 308, -16, + -24, 140, 308, 308, 189, -14, -269, 127, -269, 804, + 201, -269, -269, -269, -269, -269, -269, 64, -269, -269, + 14, -269, -269, -269, 64, 64, 158, 143, 64, 50, + -269, -269, 665, -269, -269, -21, 665, 978, 90, 710, + 134, 978, 198, -269, -269, 308, 64, 1056, 64, 952, + 64, 60, 64, 665, 64, 907, 665, -269, 119, 177, + -269, 155, -269, -269, 907, 90, -269, -269, -269, 224, + 228, -269, 177, -269, 64, -269, 90, 64, -269, -269, + 64, -269, 64, 665, -269, 406, 665, -269, 479, -269 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -221, -221, -221, -221, -221, 169, -221, -221, -221, -221, - -85, -221, -221, -173, -39, -169, -221, -184, -221, -220, - -221, -221, -221, -221, -221, -221, -221, -221, -221, 5, - -7, -221, -221, -221, 13, -35, -23, 73, -221, -221, - -221, -56, 128, -221, 178, 90, -15, -221, -221, -24, - -192, 55, -221, 127, -69, -151 + -269, -269, -269, -269, -269, 208, -269, -269, -269, -269, + -58, -269, -269, -193, 72, -171, -269, -269, -189, -269, + -269, -268, -269, -269, -269, -269, -269, -269, -269, -269, + 45, 37, -269, -269, -269, 38, -48, -23, -1, -269, + -269, -269, -26, 44, -269, 217, -269, 1, 102, -269, + -269, -3, -39, -269, -269, -72, -2, -269, -28, -213, + -49, -269, -25, -47, 66 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -93 + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -101 static const yytype_int16 yytable[] = { - 33, 45, 46, 47, 58, 65, 65, 51, 51, 209, - 51, 56, 1, 112, 113, 225, -93, 231, 1, 103, - 51, 187, 276, 69, 188, 243, 1, 234, -93, 223, - 235, 194, 96, 97, 64, 5, 10, 118, 60, 216, - 61, 6, 118, 118, 277, 278, 118, 41, 61, 215, - 42, -92, 283, 124, 48, 49, -93, -93, 42, 126, - 110, 87, 294, 76, 77, -56, 60, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 257, - 34, -82, 259, 285, 119, -92, -56, 195, 225, 119, - 119, 26, 127, 119, 255, 51, 119, 129, 225, 151, - 59, 281, -92, 120, 135, 284, 152, -92, 249, -83, - 148, 120, 157, 121, 102, 102, 115, 116, 158, 191, - 45, 102, 102, 84, 85, 86, 303, 114, 87, 306, - 200, 201, 305, 61, 202, 307, 205, 94, 95, 207, - 192, 219, 196, 128, 197, 130, 131, 132, 133, 199, - 50, 52, 134, 53, 220, 150, 66, 69, 242, 239, - 198, 246, 70, 81, 227, 96, 97, 154, 155, 206, - 98, 252, 149, 230, 64, 64, 253, 212, 64, 237, - 64, 266, 176, 64, 292, 71, 72, 73, 104, 105, - 296, 156, 290, 297, 74, 160, 238, 76, 77, 67, - 265, 286, 287, 232, 55, 58, 218, 233, 64, 120, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 298, 64, 0, 186, 258, 106, 107, 248, - 0, 0, 264, 250, 251, 0, 0, 254, 153, 21, - 0, 51, 0, 0, 214, 288, 289, 204, 24, 0, - 51, 0, 0, 0, 270, 0, 272, 0, 213, 274, - 275, 0, 280, 0, 282, 217, 204, 0, 0, 221, - 222, 0, 236, 0, 0, 0, 240, 241, 0, 0, - 0, 102, 0, 0, 0, 0, 299, 0, 301, 0, - 0, 302, 102, 304, 0, 0, 66, 66, 0, 0, - 66, 245, 66, 0, 0, 66, 0, 0, 261, 0, - 211, 0, 0, 0, 0, 269, 0, 0, 0, 273, - 0, 0, 0, 0, 0, 260, 69, 262, 102, 0, - 66, 70, 0, 0, 69, 0, 0, 0, 295, 70, - 0, 0, 0, -78, 8, 66, 9, 10, 0, 300, - 11, 12, 0, 244, 71, 72, 0, 0, 0, 13, - 14, 0, 71, 72, 73, 0, 76, 77, 0, 0, - 0, 74, 0, 0, 76, 77, 0, 15, 16, 0, - 0, 263, 0, 17, 18, 19, 20, 1, 21, 271, - 0, 61, 0, 81, 22, 23, 0, 24, 161, 25, - 9, 10, 26, 27, 11, 12, 0, -9, 0, -9, - 0, 0, 0, 0, 0, 162, 0, 163, 164, 165, - -61, -61, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 0, 16, 175, 0, 0, 0, 17, 18, 19, - 20, -61, 21, 82, 83, 84, 85, 86, 22, 23, - 87, 24, 161, 25, 9, 10, 26, 27, 11, 12, - 0, 60, -61, 61, 0, 0, 0, 0, 0, 162, - 0, 163, 164, 165, -60, -60, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 0, 16, 175, 0, 0, - 0, 17, 18, 19, 20, -60, 21, 88, 89, 90, - 91, 92, 22, 23, 93, 24, 161, 25, 9, 10, - 26, 27, 11, 12, 0, 60, -60, 61, 0, 0, - 0, 0, 0, 162, 0, 163, 164, 165, 0, 0, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 0, - 16, 175, 0, 0, 0, 17, 18, 19, 20, 69, - 21, 0, 0, 0, 70, 69, 22, 23, 0, 24, - 70, 25, 0, 0, 26, 27, 0, 0, 0, 60, - 176, 61, 57, 0, 9, 10, 0, 71, 11, 12, - 0, -91, 0, 71, 72, 73, 0, 0, 0, 76, - 77, 0, 74, 0, 119, 76, 77, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 16, 120, 0, 0, - 0, 17, 18, 19, 20, -91, 21, 0, 0, 0, - 0, 0, 22, 23, 0, 24, 0, 25, 0, 0, - 26, 228, -91, 0, 9, 10, 0, -91, 11, 12, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, - 0, 163, 164, 165, 0, 0, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 0, 16, 175, 0, 0, - 0, 17, 18, 19, 20, 0, 21, 0, 0, 0, - 0, 0, 22, 23, 0, 24, 0, 25, 9, 10, - 26, 27, 11, 12, 0, 60, 0, 61, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, - 9, 10, 0, 0, 11, 12, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 17, 18, 19, 20, 0, - 21, 0, 0, 0, 0, 0, 22, 23, 0, 24, - 0, 25, 16, 0, 26, 27, 0, 17, 18, 19, - 20, 61, 21, 0, 0, 69, 0, 0, 22, 23, - 70, 24, 0, 25, 0, 0, 26, 27, -91, 57, - 0, 9, 10, 0, 0, 11, 12, 0, 0, 0, - 0, 0, 0, 71, 72, 73, 0, 0, 0, 0, - 0, 159, 74, 9, 10, 76, 77, 11, 12, 0, - 0, 0, 0, 16, 0, 0, 0, 0, 17, 18, - 19, 20, 0, 21, 0, 0, 0, 0, 0, 22, - 23, 0, 24, 0, 25, 16, 0, 26, 27, 69, - 17, 18, 19, 20, 70, 21, 0, 0, 0, 0, - 0, 22, 23, 0, 24, 0, 25, 9, 224, 26, - 27, 11, 12, 0, 0, 0, 0, 71, 72, 73, - 0, 0, 0, 0, 0, 164, 74, 0, 75, 76, - 77, 0, 0, 0, 171, 172, 0, 0, 0, 16, - 0, 0, 0, 69, 17, 18, 19, 20, 70, 21, - 0, 0, 0, 0, 0, 22, 23, 0, 24, 0, - 25, 9, 10, 26, 27, 11, 12, 0, 0, 0, - 0, 71, 72, 73, 0, 0, 0, 0, 0, 164, - 74, 185, 0, 76, 77, 0, 0, 0, 171, 172, - 0, 0, 0, 16, 0, 0, 0, 0, 17, 18, - 19, 20, 0, 21, 0, 0, 0, 0, 0, 22, - 23, 0, 24, 0, 25, 9, 10, 26, 27, 11, - 12, 0, 0, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, - 0, 11, 12, 0, 0, 0, 0, 16, 0, 0, - 0, 0, 17, 18, 19, 20, 0, 21, 0, 0, - 0, 0, 0, 22, 23, 0, 24, 0, 25, 16, - 0, 26, 27, 0, 17, 18, 19, 20, 0, 21, - 0, 0, 0, 0, 0, 22, 23, 0, 24, 0, - 25, 9, 10, 26, 27, 11, 12, 0, 0, 0, + 34, 73, 73, 64, 74, 124, 125, 114, 145, 230, + 215, 50, 51, 52, 178, 133, 5, 252, 113, 57, + 57, 112, 57, 62, 4, 65, 267, 305, 67, 255, + 273, 246, 256, 57, 19, 43, 316, 91, 92, 93, + 94, 95, 111, 111, 96, 44, 33, 53, 244, 130, + 68, 130, 111, 111, 54, 44, 67, 69, 77, 126, + 166, 297, 78, -11, 208, 56, 58, 209, 59, 66, + 122, 44, 216, 4, 72, 171, 172, 25, 144, 90, + 146, 147, 148, 44, 298, 299, -11, 150, 315, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 282, 131, 212, 131, 284, 246, 165, 85, 86, + 19, 142, -101, 74, 19, 246, 96, 132, 167, 236, + 57, 149, 303, 105, 106, 306, 307, 308, 325, 173, + -90, 328, -86, 177, 143, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 5, 206, 50, + 151, 78, 327, 130, 164, 329, 79, 132, -101, -101, + 168, 235, -100, 74, 74, 19, 170, 74, 174, 74, + 20, 169, 131, 74, 175, 136, 309, 310, 232, 23, + 137, 251, 80, 72, 241, -91, 68, 213, 69, 257, + 127, 128, 225, 264, 265, 278, 217, 85, 86, 74, + 69, 262, -100, 218, 234, 220, 131, 263, 115, 116, + 179, 270, 238, 225, 74, 266, 242, 243, 290, -100, + 280, 262, 268, 219, 277, -100, 269, 195, 111, 286, + 313, 318, 227, 72, 72, 319, 292, 72, 75, 72, + 311, 233, 61, 72, 93, 94, 95, 283, 65, 96, + 117, 118, 239, 207, 288, 289, 317, 274, 103, 104, + 221, 222, 294, 0, 223, 320, 226, 322, 253, 72, + 228, 0, 254, 119, 0, 0, 285, 237, 287, 57, + 0, 0, 0, 0, 72, 0, 0, 57, 0, 105, + 106, 0, 0, 0, 272, 0, 248, 107, 0, 0, + 0, 275, 276, 0, 0, 279, 0, 0, 0, 78, + 0, 258, 0, 0, 79, 0, 0, 78, 0, 0, + 0, 0, 79, 293, 0, 295, 0, 296, 301, 302, + 0, 304, 0, 90, 0, 2, 3, 0, 4, 5, + 80, 81, 6, 7, 0, 0, 0, 0, 80, 81, + 82, 321, 8, 9, 323, 85, 86, 324, 0, 326, + 83, 0, 0, 85, 86, 0, 0, 0, 0, 0, + 10, 11, 12, 13, 0, 132, 0, 0, 14, 15, + 16, 17, 18, 0, 0, 19, 20, 97, 98, 99, + 100, 101, 21, 22, 102, 23, 0, 24, 0, 0, + 25, 26, 0, 27, 0, 0, -14, 180, -14, 4, + 5, 0, 0, 6, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 181, 0, 182, 183, 184, + -69, -69, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 0, 0, 0, 13, 194, 0, 0, 0, 14, + 15, 16, 17, 0, 0, 0, -69, 20, 0, 0, + 0, 0, 0, 21, 22, 0, 23, 0, 24, 0, + 0, 25, 26, 0, 55, 0, 0, 68, -69, 69, + 180, 0, 4, 5, 0, 0, 6, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 181, 0, + 182, 183, 184, -68, -68, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 0, 0, 0, 13, 194, 0, + 0, 0, 14, 15, 16, 17, 0, 0, 0, -68, + 20, 0, 0, 0, 0, 0, 21, 22, 0, 23, + 0, 24, 0, 0, 25, 26, 0, 55, 0, 0, + 68, -68, 69, 180, 0, 4, 5, 0, 0, 6, + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 181, 0, 182, 183, 184, 0, 0, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 0, 0, 0, + 13, 194, 0, 0, 0, 14, 15, 16, 17, 63, + 0, 4, 5, 20, 0, 6, 7, 0, -99, 21, + 22, 0, 23, 0, 24, 0, 0, 25, 26, 0, + 55, 0, 0, 68, 195, 69, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 0, 14, 15, 16, 17, 0, 0, 0, -99, 20, + 0, 0, 0, 0, 0, 21, 22, 0, 23, 0, + 24, 0, 0, 25, 249, -99, 55, 0, 4, 5, + 0, -99, 6, 7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 181, 0, 182, 183, 184, 0, + 0, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 0, 0, 0, 13, 194, 0, 0, 0, 14, 15, + 16, 17, 0, 4, 5, 0, 20, 6, 7, 0, + 0, 0, 21, 22, 0, 23, 0, 24, 0, 0, + 25, 26, 0, 55, 0, 0, 68, 63, 69, 4, + 5, 0, 0, 6, 7, 0, 0, 0, 13, 0, + 0, 0, 0, 14, 15, 16, 17, 0, 0, 0, + 0, 20, 0, 0, 0, 0, 0, 21, 22, 0, + 23, 0, 24, 0, 13, 25, 26, 0, 55, 14, + 15, 16, 17, 69, 0, 0, 0, 20, 0, 0, + 0, 0, 0, 21, 22, 0, 23, 0, 24, 0, + 0, 25, 26, -99, 55, 63, 0, 4, 5, 0, + 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 176, 0, 4, 5, 0, 0, 6, 7, 0, + 0, 0, 13, 0, 0, 0, 0, 14, 15, 16, + 17, 0, 0, 0, 0, 20, 0, 0, 0, 0, + 0, 21, 22, 0, 23, 0, 24, 0, 13, 25, + 26, 0, 55, 14, 15, 16, 17, 0, 4, 245, + 0, 20, 6, 7, 0, 0, 0, 21, 22, 0, + 23, 0, 24, 0, 0, 25, 26, 183, 55, 0, + 0, 0, 0, 0, 0, 0, 190, 191, 0, 0, + 4, 5, 0, 13, 6, 7, 0, 0, 14, 15, + 16, 17, 0, 0, 0, 0, 20, 0, 0, 183, + 0, 0, 21, 22, 0, 23, 0, 24, 190, 191, + 25, 26, 0, 55, 0, 13, 0, 0, 0, 0, + 14, 15, 16, 17, 0, 4, 5, 0, 20, 6, + 7, 0, 0, 89, 21, 22, 0, 23, 0, 24, + 0, 0, 25, 26, 0, 55, 0, 0, 0, 0, + 0, 4, 5, 0, 0, 6, 7, 0, 0, 0, + 13, 0, 0, 0, 0, 14, 15, 16, 17, 0, + 0, 0, 0, 20, 0, 0, 0, 0, 0, 21, + 22, 0, 23, 0, 24, 0, 13, 25, 26, 0, + 55, 14, 15, 16, 17, 0, 4, 5, 0, 20, + 6, 7, 0, 0, 0, 21, 22, 0, 23, 0, + 24, 0, 0, 25, 26, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, - 19, 20, 0, 21, 0, 0, 0, 0, 0, 22, - 23, 0, 24, 0, 25, 0, 0, 26, 54 + 0, 0, 0, 0, 0, 78, 14, 15, 16, 17, + 79, 78, 0, 0, 20, 0, 79, 0, 0, 0, + 21, 22, 0, 23, 0, 24, 0, 0, 25, 60, + 78, 55, 0, 0, 0, 79, 80, 81, 82, 0, + 0, 0, 80, 81, 82, 0, 0, 0, 83, 0, + 78, 85, 86, 0, 83, 79, 84, 85, 86, 0, + 0, 80, 81, 82, 0, 0, 0, 0, 0, 69, + 0, 0, 0, 83, 205, 0, 85, 86, 0, 0, + 0, 80, 81, 82, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 83, 0, 0, 85, 86 }; +#define yypact_value_is_default(yystate) \ + ((yystate) == (-269)) + +#define yytable_value_is_error(yytable_value) \ + ((yytable_value) == (-101)) + static const yytype_int16 yycheck[] = { - 7, 16, 17, 18, 27, 29, 30, 22, 23, 182, - 25, 26, 44, 48, 49, 199, 9, 209, 44, 42, - 35, 1, 1, 9, 4, 37, 44, 1, 14, 198, - 4, 4, 40, 41, 29, 0, 4, 1, 64, 190, - 66, 44, 1, 1, 23, 24, 1, 60, 66, 1, - 62, 10, 272, 60, 60, 60, 49, 50, 62, 66, - 49, 58, 282, 49, 50, 44, 64, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 248, - 7, 61, 251, 275, 48, 44, 65, 60, 272, 48, - 48, 59, 5, 48, 245, 110, 48, 4, 282, 63, - 27, 270, 61, 61, 35, 274, 60, 66, 63, 61, - 13, 61, 119, 58, 41, 42, 40, 41, 37, 4, - 135, 48, 49, 53, 54, 55, 299, 54, 58, 302, - 169, 170, 301, 66, 173, 304, 175, 12, 13, 178, - 60, 62, 60, 70, 60, 72, 73, 74, 75, 60, - 22, 23, 79, 25, 4, 100, 29, 9, 25, 61, - 167, 10, 14, 35, 203, 40, 41, 112, 113, 176, - 45, 60, 99, 208, 169, 170, 4, 184, 173, 218, - 175, 19, 65, 178, 47, 37, 38, 39, 3, 4, - 7, 118, 277, 7, 46, 122, 219, 49, 50, 30, - 256, 7, 8, 210, 26, 228, 193, 214, 203, 61, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 291, 218, -1, 135, 250, 42, 43, 236, - -1, -1, 255, 240, 241, -1, -1, 244, 110, 45, - -1, 256, -1, -1, 189, 51, 52, 174, 54, -1, - 265, -1, -1, -1, 261, -1, 263, -1, 185, 266, - 267, -1, 269, -1, 271, 192, 193, -1, -1, 196, - 197, -1, 217, -1, -1, -1, 221, 222, -1, -1, - -1, 208, -1, -1, -1, -1, 293, -1, 295, -1, - -1, 298, 219, 300, -1, -1, 169, 170, -1, -1, - 173, 228, 175, -1, -1, 178, -1, -1, 253, -1, - 183, -1, -1, -1, -1, 260, -1, -1, -1, 264, - -1, -1, -1, -1, -1, 252, 9, 254, 255, -1, - 203, 14, -1, -1, 9, -1, -1, -1, 283, 14, - -1, -1, -1, 0, 1, 218, 3, 4, -1, 294, - 7, 8, -1, 226, 37, 38, -1, -1, -1, 16, - 17, -1, 37, 38, 39, -1, 49, 50, -1, -1, - -1, 46, -1, -1, 49, 50, -1, 34, 35, -1, - -1, 254, -1, 40, 41, 42, 43, 44, 45, 262, - -1, 66, -1, 265, 51, 52, -1, 54, 1, 56, - 3, 4, 59, 60, 7, 8, -1, 64, -1, 66, - -1, -1, -1, -1, -1, 18, -1, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, 36, -1, -1, -1, 40, 41, 42, - 43, 44, 45, 51, 52, 53, 54, 55, 51, 52, - 58, 54, 1, 56, 3, 4, 59, 60, 7, 8, - -1, 64, 65, 66, -1, -1, -1, -1, -1, 18, - -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, -1, 35, 36, -1, -1, - -1, 40, 41, 42, 43, 44, 45, 51, 52, 53, - 54, 55, 51, 52, 58, 54, 1, 56, 3, 4, - 59, 60, 7, 8, -1, 64, 65, 66, -1, -1, - -1, -1, -1, 18, -1, 20, 21, 22, -1, -1, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, 36, -1, -1, -1, 40, 41, 42, 43, 9, - 45, -1, -1, -1, 14, 9, 51, 52, -1, 54, - 14, 56, -1, -1, 59, 60, -1, -1, -1, 64, - 65, 66, 1, -1, 3, 4, -1, 37, 7, 8, - -1, 10, -1, 37, 38, 39, -1, -1, -1, 49, - 50, -1, 46, -1, 48, 49, 50, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 35, 61, -1, -1, - -1, 40, 41, 42, 43, 44, 45, -1, -1, -1, - -1, -1, 51, 52, -1, 54, -1, 56, -1, -1, - 59, 60, 61, -1, 3, 4, -1, 66, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 18, - -1, 20, 21, 22, -1, -1, 25, 26, 27, 28, - 29, 30, 31, 32, 33, -1, 35, 36, -1, -1, - -1, 40, 41, 42, 43, -1, 45, -1, -1, -1, - -1, -1, 51, 52, -1, 54, -1, 56, 3, 4, - 59, 60, 7, 8, -1, 64, -1, 66, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, - 3, 4, -1, -1, 7, 8, -1, -1, -1, -1, - 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, - 45, -1, -1, -1, -1, -1, 51, 52, -1, 54, - -1, 56, 35, -1, 59, 60, -1, 40, 41, 42, - 43, 66, 45, -1, -1, 9, -1, -1, 51, 52, - 14, 54, -1, 56, -1, -1, 59, 60, 61, 1, - -1, 3, 4, -1, -1, 7, 8, -1, -1, -1, - -1, -1, -1, 37, 38, 39, -1, -1, -1, -1, - -1, 1, 46, 3, 4, 49, 50, 7, 8, -1, - -1, -1, -1, 35, -1, -1, -1, -1, 40, 41, - 42, 43, -1, 45, -1, -1, -1, -1, -1, 51, - 52, -1, 54, -1, 56, 35, -1, 59, 60, 9, - 40, 41, 42, 43, 14, 45, -1, -1, -1, -1, - -1, 51, 52, -1, 54, -1, 56, 3, 4, 59, - 60, 7, 8, -1, -1, -1, -1, 37, 38, 39, - -1, -1, -1, -1, -1, 21, 46, -1, 48, 49, - 50, -1, -1, -1, 30, 31, -1, -1, -1, 35, - -1, -1, -1, 9, 40, 41, 42, 43, 14, 45, - -1, -1, -1, -1, -1, 51, 52, -1, 54, -1, - 56, 3, 4, 59, 60, 7, 8, -1, -1, -1, - -1, 37, 38, 39, -1, -1, -1, -1, -1, 21, - 46, 47, -1, 49, 50, -1, -1, -1, 30, 31, - -1, -1, -1, 35, -1, -1, -1, -1, 40, 41, - 42, 43, -1, 45, -1, -1, -1, -1, -1, 51, - 52, -1, 54, -1, 56, 3, 4, 59, 60, 7, - 8, -1, -1, 11, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 3, 4, -1, - -1, 7, 8, -1, -1, -1, -1, 35, -1, -1, - -1, -1, 40, 41, 42, 43, -1, 45, -1, -1, - -1, -1, -1, 51, 52, -1, 54, -1, 56, 35, - -1, 59, 60, -1, 40, 41, 42, 43, -1, 45, - -1, -1, -1, -1, -1, 51, 52, -1, 54, -1, - 56, 3, 4, 59, 60, 7, 8, -1, -1, -1, + 1, 29, 30, 26, 29, 53, 54, 46, 80, 202, + 4, 13, 14, 15, 1, 64, 4, 230, 16, 21, + 22, 44, 24, 25, 3, 26, 40, 295, 27, 1, + 16, 220, 4, 35, 50, 66, 304, 57, 58, 59, + 60, 61, 43, 44, 64, 69, 1, 66, 219, 1, + 71, 1, 53, 54, 66, 69, 55, 73, 50, 60, + 109, 1, 9, 50, 1, 21, 22, 4, 24, 48, + 55, 69, 66, 3, 29, 124, 125, 65, 79, 35, + 81, 82, 83, 69, 24, 25, 73, 88, 301, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 272, 54, 175, 54, 276, 295, 108, 55, 56, + 50, 74, 9, 138, 50, 304, 64, 67, 70, 1, + 122, 84, 293, 43, 44, 296, 7, 8, 321, 130, + 67, 324, 72, 134, 5, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 4, 149, 151, + 38, 9, 323, 1, 13, 326, 14, 67, 55, 56, + 49, 210, 10, 188, 189, 50, 122, 192, 131, 194, + 51, 66, 54, 198, 40, 1, 57, 58, 203, 60, + 6, 229, 40, 138, 4, 67, 71, 66, 73, 238, + 43, 44, 193, 242, 243, 267, 66, 55, 56, 224, + 73, 240, 50, 66, 205, 66, 54, 67, 3, 4, + 138, 10, 213, 214, 239, 26, 217, 218, 20, 67, + 269, 260, 247, 186, 66, 73, 249, 72, 229, 278, + 53, 7, 195, 188, 189, 7, 285, 192, 30, 194, + 298, 204, 25, 198, 59, 60, 61, 275, 249, 64, + 45, 46, 214, 151, 279, 281, 305, 260, 12, 13, + 188, 189, 287, -1, 192, 312, 194, 316, 231, 224, + 198, -1, 235, 68, -1, -1, 277, 211, 279, 281, + -1, -1, -1, -1, 239, -1, -1, 289, -1, 43, + 44, -1, -1, -1, 257, -1, 224, 51, -1, -1, + -1, 264, 265, -1, -1, 268, -1, -1, -1, 9, + -1, 239, -1, -1, 14, -1, -1, 9, -1, -1, + -1, -1, 14, 286, -1, 288, -1, 290, 291, 292, + -1, 294, -1, 289, -1, 0, 1, -1, 3, 4, + 40, 41, 7, 8, -1, -1, -1, -1, 40, 41, + 42, 314, 17, 18, 317, 55, 56, 320, -1, 322, + 52, -1, -1, 55, 56, -1, -1, -1, -1, -1, + 35, 36, 37, 38, -1, 67, -1, -1, 43, 44, + 45, 46, 47, -1, -1, 50, 51, 57, 58, 59, + 60, 61, 57, 58, 64, 60, -1, 62, -1, -1, + 65, 66, -1, 68, -1, -1, 71, 1, 73, 3, + 4, -1, -1, 7, 8, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 19, -1, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, -1, -1, -1, 38, 39, -1, -1, -1, 43, + 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, + -1, -1, -1, 57, 58, -1, 60, -1, 62, -1, + -1, 65, 66, -1, 68, -1, -1, 71, 72, 73, + 1, -1, 3, 4, -1, -1, 7, 8, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, -1, -1, -1, 38, 39, -1, + -1, -1, 43, 44, 45, 46, -1, -1, -1, 50, + 51, -1, -1, -1, -1, -1, 57, 58, -1, 60, + -1, 62, -1, -1, 65, 66, -1, 68, -1, -1, + 71, 72, 73, 1, -1, 3, 4, -1, -1, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 19, -1, 21, 22, 23, -1, -1, 26, 27, + 28, 29, 30, 31, 32, 33, 34, -1, -1, -1, + 38, 39, -1, -1, -1, 43, 44, 45, 46, 1, + -1, 3, 4, 51, -1, 7, 8, -1, 10, 57, + 58, -1, 60, -1, 62, -1, -1, 65, 66, -1, + 68, -1, -1, 71, 72, 73, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, + -1, 43, 44, 45, 46, -1, -1, -1, 50, 51, + -1, -1, -1, -1, -1, 57, 58, -1, 60, -1, + 62, -1, -1, 65, 66, 67, 68, -1, 3, 4, + -1, 73, 7, 8, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 19, -1, 21, 22, 23, -1, + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, + -1, -1, -1, 38, 39, -1, -1, -1, 43, 44, + 45, 46, -1, 3, 4, -1, 51, 7, 8, -1, + -1, -1, 57, 58, -1, 60, -1, 62, -1, -1, + 65, 66, -1, 68, -1, -1, 71, 1, 73, 3, + 4, -1, -1, 7, 8, -1, -1, -1, 38, -1, + -1, -1, -1, 43, 44, 45, 46, -1, -1, -1, + -1, 51, -1, -1, -1, -1, -1, 57, 58, -1, + 60, -1, 62, -1, 38, 65, 66, -1, 68, 43, + 44, 45, 46, 73, -1, -1, -1, 51, -1, -1, + -1, -1, -1, 57, 58, -1, 60, -1, 62, -1, + -1, 65, 66, 67, 68, 1, -1, 3, 4, -1, + -1, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1, -1, 3, 4, -1, -1, 7, 8, -1, + -1, -1, 38, -1, -1, -1, -1, 43, 44, 45, + 46, -1, -1, -1, -1, 51, -1, -1, -1, -1, + -1, 57, 58, -1, 60, -1, 62, -1, 38, 65, + 66, -1, 68, 43, 44, 45, 46, -1, 3, 4, + -1, 51, 7, 8, -1, -1, -1, 57, 58, -1, + 60, -1, 62, -1, -1, 65, 66, 22, 68, -1, + -1, -1, -1, -1, -1, -1, 31, 32, -1, -1, + 3, 4, -1, 38, 7, 8, -1, -1, 43, 44, + 45, 46, -1, -1, -1, -1, 51, -1, -1, 22, + -1, -1, 57, 58, -1, 60, -1, 62, 31, 32, + 65, 66, -1, 68, -1, 38, -1, -1, -1, -1, + 43, 44, 45, 46, -1, 3, 4, -1, 51, 7, + 8, -1, -1, 11, 57, 58, -1, 60, -1, 62, + -1, -1, 65, 66, -1, 68, -1, -1, -1, -1, + -1, 3, 4, -1, -1, 7, 8, -1, -1, -1, + 38, -1, -1, -1, -1, 43, 44, 45, 46, -1, + -1, -1, -1, 51, -1, -1, -1, -1, -1, 57, + 58, -1, 60, -1, 62, -1, 38, 65, 66, -1, + 68, 43, 44, 45, 46, -1, 3, 4, -1, 51, + 7, 8, -1, -1, -1, 57, 58, -1, 60, -1, + 62, -1, -1, 65, 66, -1, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 40, 41, - 42, 43, -1, 45, -1, -1, -1, -1, -1, 51, - 52, -1, 54, -1, 56, -1, -1, 59, 60 + -1, -1, -1, -1, -1, 9, 43, 44, 45, 46, + 14, 9, -1, -1, 51, -1, 14, -1, -1, -1, + 57, 58, -1, 60, -1, 62, -1, -1, 65, 66, + 9, 68, -1, -1, -1, 14, 40, 41, 42, -1, + -1, -1, 40, 41, 42, -1, -1, -1, 52, -1, + 9, 55, 56, -1, 52, 14, 54, 55, 56, -1, + -1, 40, 41, 42, -1, -1, -1, -1, -1, 73, + -1, -1, -1, 52, 53, -1, 55, 56, -1, -1, + -1, 40, 41, 42, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, -1, 55, 56 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 44, 68, 96, 97, 0, 44, 69, 1, 3, - 4, 7, 8, 16, 17, 34, 35, 40, 41, 42, - 43, 45, 51, 52, 54, 56, 59, 60, 70, 71, - 75, 77, 79, 97, 104, 108, 109, 110, 111, 113, - 114, 60, 62, 76, 112, 113, 113, 113, 60, 60, - 109, 113, 109, 109, 60, 111, 113, 1, 103, 104, - 64, 66, 72, 81, 96, 116, 120, 72, 78, 9, - 14, 37, 38, 39, 46, 48, 49, 50, 106, 107, - 11, 109, 51, 52, 53, 54, 55, 58, 51, 52, - 53, 54, 55, 58, 12, 13, 40, 41, 45, 105, - 102, 103, 104, 103, 3, 4, 42, 43, 73, 74, - 49, 98, 102, 102, 104, 40, 41, 115, 1, 48, - 61, 118, 122, 118, 97, 80, 97, 5, 104, 4, - 104, 104, 104, 104, 104, 35, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 13, 104, - 118, 63, 60, 109, 118, 118, 104, 97, 37, 1, - 104, 1, 18, 20, 21, 22, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 36, 65, 82, 84, 91, - 95, 104, 116, 117, 120, 47, 112, 1, 4, 99, - 100, 4, 60, 83, 4, 60, 60, 60, 97, 60, - 81, 81, 81, 101, 104, 81, 97, 81, 85, 80, - 119, 120, 97, 104, 118, 1, 122, 104, 101, 62, - 4, 104, 104, 82, 4, 84, 86, 81, 60, 92, - 102, 117, 97, 97, 1, 4, 118, 81, 103, 61, - 118, 118, 25, 37, 120, 104, 10, 93, 97, 63, - 97, 97, 60, 4, 97, 122, 94, 82, 116, 82, - 104, 118, 104, 120, 103, 108, 19, 87, 88, 118, - 97, 120, 97, 118, 97, 97, 1, 23, 24, 89, - 97, 82, 97, 86, 82, 117, 7, 8, 51, 52, - 77, 90, 47, 121, 86, 118, 7, 7, 121, 97, - 118, 97, 97, 80, 97, 82, 80, 82 + 0, 75, 0, 1, 3, 4, 7, 8, 17, 18, + 35, 36, 37, 38, 43, 44, 45, 46, 47, 50, + 51, 57, 58, 60, 62, 65, 66, 68, 76, 78, + 82, 84, 86, 104, 112, 116, 117, 118, 119, 120, + 121, 129, 130, 66, 69, 126, 127, 128, 83, 122, + 130, 130, 130, 66, 66, 68, 117, 130, 117, 117, + 66, 119, 130, 1, 111, 112, 48, 121, 71, 73, + 79, 88, 104, 132, 136, 79, 85, 50, 9, 14, + 40, 41, 42, 52, 54, 55, 56, 114, 115, 11, + 117, 57, 58, 59, 60, 61, 64, 57, 58, 59, + 60, 61, 64, 12, 13, 43, 44, 51, 113, 110, + 111, 112, 111, 16, 126, 3, 4, 45, 46, 68, + 80, 81, 55, 106, 110, 110, 112, 43, 44, 131, + 1, 54, 67, 134, 138, 134, 1, 6, 77, 104, + 105, 87, 105, 5, 112, 129, 112, 112, 112, 105, + 112, 38, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 13, 112, 134, 70, 49, 66, + 117, 134, 134, 112, 105, 40, 1, 112, 1, 88, + 1, 19, 21, 22, 23, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 39, 72, 89, 90, 92, 99, + 103, 112, 132, 133, 136, 53, 112, 122, 1, 4, + 107, 108, 129, 66, 91, 4, 66, 66, 66, 105, + 66, 88, 88, 88, 109, 112, 88, 105, 88, 93, + 87, 135, 136, 105, 112, 134, 1, 138, 112, 109, + 94, 4, 112, 112, 89, 4, 92, 95, 88, 66, + 100, 110, 133, 105, 105, 1, 4, 134, 88, 123, + 124, 125, 126, 67, 134, 134, 26, 40, 136, 111, + 10, 101, 105, 16, 125, 105, 105, 66, 129, 105, + 134, 102, 89, 132, 89, 112, 134, 112, 136, 116, + 20, 96, 134, 105, 136, 105, 105, 1, 24, 25, + 97, 105, 105, 89, 105, 95, 89, 7, 8, 57, + 58, 84, 98, 53, 137, 133, 95, 134, 7, 7, + 137, 105, 134, 105, 105, 87, 105, 89, 87, 89 }; #define yyerrok (yyerrstatus = 0) @@ -1176,7 +1274,6 @@ { \ yychar = (Token); \ yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -1218,19 +1315,10 @@ #endif -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ +/* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif @@ -1273,8 +1361,7 @@ `--------------------------------*/ /*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else @@ -1305,8 +1392,7 @@ | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else @@ -1331,8 +1417,7 @@ | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else @@ -1362,8 +1447,7 @@ | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else @@ -1422,7 +1506,6 @@ # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1431,8 +1514,7 @@ # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else @@ -1455,8 +1537,7 @@ # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else @@ -1525,123 +1606,149 @@ } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) { - int yyn = yypact[yystate]; + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + switch (yycount) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else @@ -1666,6 +1773,7 @@ } } + /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1692,14 +1800,12 @@ int yynerrs; - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else @@ -1708,8 +1814,7 @@ void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -1719,8 +1824,6 @@ #endif #endif { - - int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -1875,7 +1978,7 @@ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1906,8 +2009,8 @@ yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1960,320 +2063,605 @@ YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: + case 3: -/* Line 1464 of yacc.c */ -#line 182 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 221 "awkgram.y" { - check_funcs(); - } + rule = 0; + yyerrok; + } break; - case 4: + case 5: -/* Line 1464 of yacc.c */ -#line 190 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 227 "awkgram.y" { - begin_or_end_rule = parsing_end_rule = FALSE; - yyerrok; + next_sourcefile(); } break; - case 5: + case 6: -/* Line 1464 of yacc.c */ -#line 195 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 231 "awkgram.y" { - begin_or_end_rule = parsing_end_rule = FALSE; + rule = 0; /* * If errors, give up, don't produce an infinite * stream of syntax error messages. */ /* yyerrok; */ - } + } break; - case 6: + case 7: -/* Line 1464 of yacc.c */ -#line 207 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 243 "awkgram.y" { - (yyvsp[(1) - (2)].nodeval)->rnode = (yyvsp[(2) - (2)].nodeval); + (void) append_rule((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } break; - case 7: + case 8: -/* Line 1464 of yacc.c */ -#line 211 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 247 "awkgram.y" { - if ((yyvsp[(1) - (2)].nodeval)->lnode != NULL) { - /* pattern rule with non-empty pattern */ - (yyvsp[(1) - (2)].nodeval)->rnode = node(NULL, Node_K_print_rec, NULL); - } else { - /* an error */ - if (begin_or_end_rule) - msg(_("%s blocks must have an action part"), - (parsing_end_rule ? "END" : "BEGIN")); - else - msg(_("each rule must have a pattern or an action part")); + if (rule != Rule) { + msg(_("%s blocks must have an action part"), ruletab[rule]); errcount++; - } + } else if ((yyvsp[(1) - (2)]) == NULL) { + msg(_("each rule must have a pattern or an action part")); + errcount++; + } else /* pattern rule with non-empty pattern */ + (void) append_rule((yyvsp[(1) - (2)]), NULL); } break; - case 8: + case 9: -/* Line 1464 of yacc.c */ -#line 226 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 258 "awkgram.y" { can_return = FALSE; - if ((yyvsp[(1) - (2)].nodeval)) - func_install((yyvsp[(1) - (2)].nodeval), (yyvsp[(2) - (2)].nodeval)); + if ((yyvsp[(1) - (2)]) && func_install((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])) < 0) + YYABORT; + func_params = NULL; yyerrok; } break; - case 9: + case 10: -/* Line 1464 of yacc.c */ -#line 236 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 266 "awkgram.y" { - (yyval.nodeval) = append_pattern(&expression_value, (NODE *) NULL); + want_source = FALSE; + yyerrok; } break; - case 10: + case 11: -/* Line 1464 of yacc.c */ -#line 240 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 274 "awkgram.y" { - (yyval.nodeval) = append_pattern(&expression_value, (yyvsp[(1) - (1)].nodeval)); + if (include_source((yyvsp[(1) - (1)])) < 0) + YYABORT; + efree((yyvsp[(1) - (1)])->lextok); + bcfree((yyvsp[(1) - (1)])); + (yyval) = NULL; } break; - case 11: + case 12: + +/* Line 1806 of yacc.c */ +#line 282 "awkgram.y" + { (yyval) = NULL; } + break; + + case 13: + +/* Line 1806 of yacc.c */ +#line 284 "awkgram.y" + { (yyval) = NULL; } + break; + + case 14: + +/* Line 1806 of yacc.c */ +#line 289 "awkgram.y" + { (yyval) = NULL; rule = Rule; } + break; + + case 15: + +/* Line 1806 of yacc.c */ +#line 291 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); rule = Rule; } + break; + + case 16: -/* Line 1464 of yacc.c */ -#line 244 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 293 "awkgram.y" { - NODE *r; + INSTRUCTION *tp; + + add_lint((yyvsp[(1) - (4)]), LINT_assign_in_cond); + add_lint((yyvsp[(4) - (4)]), LINT_assign_in_cond); - getnode(r); - r->type = Node_line_range; - r->condpair = node((yyvsp[(1) - (3)].nodeval), Node_cond_pair, (yyvsp[(3) - (3)].nodeval)); - r->triggered = FALSE; - (yyval.nodeval) = append_pattern(&expression_value, r); + tp = instruction(Op_no_op); + list_prepend((yyvsp[(1) - (4)]), bcalloc(Op_line_range, !!do_profiling + 1, 0)); + (yyvsp[(1) - (4)])->nexti->triggered = FALSE; + (yyvsp[(1) - (4)])->nexti->target_jmp = (yyvsp[(4) - (4)])->nexti; + + list_append((yyvsp[(1) - (4)]), instruction(Op_cond_pair)); + (yyvsp[(1) - (4)])->lasti->line_range = (yyvsp[(1) - (4)])->nexti; + (yyvsp[(1) - (4)])->lasti->target_jmp = tp; + + list_append((yyvsp[(4) - (4)]), instruction(Op_cond_pair)); + (yyvsp[(4) - (4)])->lasti->line_range = (yyvsp[(1) - (4)])->nexti; + (yyvsp[(4) - (4)])->lasti->target_jmp = tp; + if (do_profiling) { + ((yyvsp[(1) - (4)])->nexti + 1)->condpair_left = (yyvsp[(1) - (4)])->lasti; + ((yyvsp[(1) - (4)])->nexti + 1)->condpair_right = (yyvsp[(4) - (4)])->lasti; + } + (yyval) = list_append(list_merge((yyvsp[(1) - (4)]), (yyvsp[(4) - (4)])), tp); + rule = Rule; } break; - case 12: + case 17: -/* Line 1464 of yacc.c */ -#line 254 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 319 "awkgram.y" { static int begin_seen = 0; if (do_lint_old && ++begin_seen == 2) - warning(_("old awk does not support multiple `BEGIN' or `END' rules")); + warning_ln((yyvsp[(1) - (1)])->source_line, + _("old awk does not support multiple `BEGIN' or `END' rules")); - begin_or_end_rule = TRUE; - (yyval.nodeval) = append_pattern(&begin_block, (NODE *) NULL); + (yyvsp[(1) - (1)])->in_rule = rule = BEGIN; + (yyvsp[(1) - (1)])->source_file = source; + (yyval) = (yyvsp[(1) - (1)]); } break; - case 13: + case 18: -/* Line 1464 of yacc.c */ -#line 263 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 330 "awkgram.y" { static int end_seen = 0; if (do_lint_old && ++end_seen == 2) - warning(_("old awk does not support multiple `BEGIN' or `END' rules")); + warning_ln((yyvsp[(1) - (1)])->source_line, + _("old awk does not support multiple `BEGIN' or `END' rules")); - begin_or_end_rule = parsing_end_rule = TRUE; - (yyval.nodeval) = append_pattern(&end_block, (NODE *) NULL); + (yyvsp[(1) - (1)])->in_rule = rule = END; + (yyvsp[(1) - (1)])->source_file = source; + (yyval) = (yyvsp[(1) - (1)]); } break; - case 14: + case 19: -/* Line 1464 of yacc.c */ -#line 275 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(2) - (5)].nodeval); } +/* Line 1806 of yacc.c */ +#line 341 "awkgram.y" + { + (yyvsp[(1) - (1)])->in_rule = rule = BEGINFILE; + (yyvsp[(1) - (1)])->source_file = source; + (yyval) = (yyvsp[(1) - (1)]); + } break; - case 15: + case 20: + +/* Line 1806 of yacc.c */ +#line 347 "awkgram.y" + { + (yyvsp[(1) - (1)])->in_rule = rule = ENDFILE; + (yyvsp[(1) - (1)])->source_file = source; + (yyval) = (yyvsp[(1) - (1)]); + } + break; + + case 21: -/* Line 1464 of yacc.c */ -#line 280 "awkgram.y" - { (yyval.sval) = (yyvsp[(1) - (1)].sval); } +/* Line 1806 of yacc.c */ +#line 356 "awkgram.y" + { + if ((yyvsp[(2) - (5)]) == NULL) + (yyval) = list_create(instruction(Op_no_op)); + else + (yyval) = (yyvsp[(2) - (5)]); + } break; - case 16: + case 22: -/* Line 1464 of yacc.c */ -#line 282 "awkgram.y" - { (yyval.sval) = (yyvsp[(1) - (1)].sval); } +/* Line 1806 of yacc.c */ +#line 366 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; - case 17: + case 23: -/* Line 1464 of yacc.c */ -#line 284 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 368 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 370 "awkgram.y" { yyerror(_("`%s' is a built-in function, it cannot be redefined"), tokstart); - errcount++; - (yyval.sval) = builtin_func; + (yyvsp[(1) - (1)])->opcode = Op_symbol; /* Op_symbol instead of Op_token so that + * free_bc_internal does not try to free it + */ + (yyvsp[(1) - (1)])->lextok = builtin_func; + (yyval) = (yyvsp[(1) - (1)]); /* yyerrok; */ } break; - case 20: + case 25: + +/* Line 1806 of yacc.c */ +#line 381 "awkgram.y" + { (yyval) = (yyvsp[(2) - (2)]); } + break; + + case 28: -/* Line 1464 of yacc.c */ -#line 300 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 391 "awkgram.y" { - param_counter = 0; - } + param_counter = 0; + func_params = NULL; + } break; - case 21: + case 29: -/* Line 1464 of yacc.c */ -#line 304 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 396 "awkgram.y" { NODE *t; - t = make_param((yyvsp[(3) - (7)].sval)); + (yyvsp[(1) - (7)])->source_file = source; + t = make_param((yyvsp[(3) - (7)])->lextok); + (yyvsp[(3) - (7)])->lextok = NULL; + bcfree((yyvsp[(3) - (7)])); t->flags |= FUNC; - (yyval.nodeval) = append_right(t, (yyvsp[(5) - (7)].nodeval)); + t->rnode = func_params; + func_params = t; + (yyval) = (yyvsp[(1) - (7)]); can_return = TRUE; /* check for duplicate parameter names */ - if (dup_parms((yyval.nodeval))) + if (dup_parms((yyvsp[(1) - (7)]), t)) errcount++; } break; - case 22: + case 30: -/* Line 1464 of yacc.c */ -#line 323 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 420 "awkgram.y" { ++want_regexp; } break; - case 23: + case 31: -/* Line 1464 of yacc.c */ -#line 325 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 422 "awkgram.y" { - NODE *n; - size_t len = strlen((yyvsp[(3) - (3)].sval)); + NODE *n, *exp; + char *re; + size_t len; + re = (yyvsp[(3) - (3)])->lextok; + len = strlen(re); if (do_lint) { if (len == 0) - lintwarn(_("regexp constant `//' looks like a C++ comment, but is not")); - else if (((yyvsp[(3) - (3)].sval))[0] == '*' && ((yyvsp[(3) - (3)].sval))[len-1] == '*') + lintwarn_ln((yyvsp[(3) - (3)])->source_line, + _("regexp constant `//' looks like a C++ comment, but is not")); + else if ((re)[0] == '*' && (re)[len-1] == '*') /* possible C comment */ - lintwarn(_("regexp constant `/%s/' looks like a C comment, but is not"), tokstart); + lintwarn_ln((yyvsp[(3) - (3)])->source_line, + _("regexp constant `/%s/' looks like a C comment, but is not"), re); + } + + exp = make_str_node(re, len, ALREADY_MALLOCED); + n = make_regnode(Node_regex, exp); + if (n == NULL) { + unref(exp); + YYABORT; } - getnode(n); - n->type = Node_regex; - n->re_exp = make_string((yyvsp[(3) - (3)].sval), len); - n->re_reg = make_regexp((yyvsp[(3) - (3)].sval), len, FALSE, TRUE); - n->re_text = NULL; - n->re_flags = CONSTANT; - n->re_cnt = 1; - (yyval.nodeval) = n; + (yyval) = (yyvsp[(3) - (3)]); + (yyval)->opcode = Op_match_rec; + (yyval)->memory = n; } break; - case 26: + case 32: -/* Line 1464 of yacc.c */ -#line 354 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 453 "awkgram.y" + { bcfree((yyvsp[(1) - (1)])); } break; - case 27: + case 34: + +/* Line 1806 of yacc.c */ +#line 459 "awkgram.y" + { (yyval) = NULL; } + break; -/* Line 1464 of yacc.c */ -#line 356 "awkgram.y" + case 35: + +/* Line 1806 of yacc.c */ +#line 461 "awkgram.y" { - if ((yyvsp[(2) - (2)].nodeval) == NULL) - (yyval.nodeval) = (yyvsp[(1) - (2)].nodeval); + if ((yyvsp[(2) - (2)]) == NULL) + (yyval) = (yyvsp[(1) - (2)]); else { - if (do_lint && isnoeffect((yyvsp[(2) - (2)].nodeval)->type)) - lintwarn(_("statement may have no effect")); - if ((yyvsp[(1) - (2)].nodeval) == NULL) - (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval); + add_lint((yyvsp[(2) - (2)]), LINT_no_effect); + if ((yyvsp[(1) - (2)]) == NULL) + (yyval) = (yyvsp[(2) - (2)]); else - (yyval.nodeval) = append_right( - ((yyvsp[(1) - (2)].nodeval)->type == Node_statement_list ? (yyvsp[(1) - (2)].nodeval) - : node((yyvsp[(1) - (2)].nodeval), Node_statement_list, (NODE *) NULL)), - ((yyvsp[(2) - (2)].nodeval)->type == Node_statement_list ? (yyvsp[(2) - (2)].nodeval) - : node((yyvsp[(2) - (2)].nodeval), Node_statement_list, (NODE *) NULL))); + (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } - yyerrok; + yyerrok; } break; - case 28: + case 36: -/* Line 1464 of yacc.c */ -#line 374 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 474 "awkgram.y" + { (yyval) = NULL; } break; - case 31: + case 39: -/* Line 1464 of yacc.c */ -#line 384 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 484 "awkgram.y" + { (yyval) = NULL; } break; - case 32: + case 40: -/* Line 1464 of yacc.c */ -#line 386 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(2) - (3)].nodeval); } +/* Line 1806 of yacc.c */ +#line 486 "awkgram.y" + { (yyval) = (yyvsp[(2) - (3)]); } break; - case 33: + case 41: -/* Line 1464 of yacc.c */ -#line 388 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 488 "awkgram.y" + { + if (do_profiling) + (yyval) = list_prepend((yyvsp[(1) - (1)]), instruction(Op_exec_count)); + else + (yyval) = (yyvsp[(1) - (1)]); + } break; - case 34: + case 42: -/* Line 1464 of yacc.c */ -#line 390 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(3) - (9)].nodeval), Node_K_switch, (yyvsp[(7) - (9)].nodeval)); } - break; +/* Line 1806 of yacc.c */ +#line 495 "awkgram.y" + { + INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt; + INSTRUCTION *ip, *nextc, *tbreak; + const char **case_values = NULL; + int maxcount = 128; + int case_count = 0; + int i; + + tbreak = instruction(Op_no_op); + cstmt = list_create(tbreak); + cexp = list_create(instruction(Op_pop)); + dflt = instruction(Op_jmp); + dflt->target_jmp = tbreak; /* if no case match and no explicit default */ + + if ((yyvsp[(7) - (9)]) != NULL) { + curr = (yyvsp[(7) - (9)])->nexti; + bcfree((yyvsp[(7) - (9)])); /* Op_list */ + } /* else + curr = NULL; */ + + for(; curr != NULL; curr = nextc) { + INSTRUCTION *caseexp = curr->case_exp; + INSTRUCTION *casestmt = curr->case_stmt; + + nextc = curr->nexti; + if (curr->opcode == Op_K_case) { + if (caseexp->opcode == Op_push_i) { + /* a constant scalar */ + char *caseval; + caseval = force_string(caseexp->memory)->stptr; + for (i = 0; i < case_count; i++) { + if (strcmp(caseval, case_values[i]) == 0) + error_ln(curr->source_line, + _("duplicate case values in switch body: %s"), caseval); + } + + if (case_values == NULL) + emalloc(case_values, const char **, sizeof(char *) * maxcount, "statement"); + else if (case_count >= maxcount) { + maxcount += 128; + erealloc(case_values, const char **, sizeof(char*) * maxcount, "statement"); + } + case_values[case_count++] = caseval; + } else { + /* match a constant regex against switch expression. */ + (curr + 1)->match_exp = TRUE; + } + curr->stmt_start = casestmt->nexti; + curr->stmt_end = casestmt->lasti; + (void) list_prepend(cexp, curr); + (void) list_prepend(cexp, caseexp); + } else { + if (dflt->target_jmp != tbreak) + error_ln(curr->source_line, + _("duplicate `default' detected in switch body")); + else + dflt->target_jmp = casestmt->nexti; - case 35: + if (do_profiling) { + curr->stmt_start = casestmt->nexti; + curr->stmt_end = casestmt->lasti; + (void) list_prepend(cexp, curr); + } else + bcfree(curr); + } + + cstmt = list_merge(casestmt, cstmt); + } + + if (case_values != NULL) + efree(case_values); + + ip = (yyvsp[(3) - (9)]); + if (do_profiling) { + (void) list_prepend(ip, (yyvsp[(1) - (9)])); + (void) list_prepend(ip, instruction(Op_exec_count)); + (yyvsp[(1) - (9)])->target_break = tbreak; + ((yyvsp[(1) - (9)]) + 1)->switch_start = cexp->nexti; + ((yyvsp[(1) - (9)]) + 1)->switch_end = cexp->lasti; + }/* else + $1 is NULL */ + + (void) list_append(cexp, dflt); + (void) list_merge(ip, cexp); + (yyval) = list_merge(ip, cstmt); -/* Line 1464 of yacc.c */ -#line 392 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(3) - (6)].nodeval), Node_K_while, (yyvsp[(6) - (6)].nodeval)); } + break_allowed--; + fix_break_continue(ip, tbreak, NULL); + } break; - case 36: + case 43: + +/* Line 1806 of yacc.c */ +#line 585 "awkgram.y" + { + /* + * ----------------- + * tc: + * cond + * ----------------- + * [Op_jmp_false tb ] + * ----------------- + * body + * ----------------- + * [Op_jmp tc ] + * tb:[Op_no_op ] + */ + + INSTRUCTION *ip, *tbreak, *tcont; -/* Line 1464 of yacc.c */ -#line 394 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(6) - (8)].nodeval), Node_K_do, (yyvsp[(3) - (8)].nodeval)); } + tbreak = instruction(Op_no_op); + add_lint((yyvsp[(3) - (6)]), LINT_assign_in_cond); + tcont = (yyvsp[(3) - (6)])->nexti; + ip = list_append((yyvsp[(3) - (6)]), instruction(Op_jmp_false)); + ip->lasti->target_jmp = tbreak; + + if (do_profiling) { + (void) list_append(ip, instruction(Op_exec_count)); + (yyvsp[(1) - (6)])->target_break = tbreak; + (yyvsp[(1) - (6)])->target_continue = tcont; + ((yyvsp[(1) - (6)]) + 1)->while_body = ip->lasti; + (void) list_prepend(ip, (yyvsp[(1) - (6)])); + }/* else + $1 is NULL */ + + if ((yyvsp[(6) - (6)]) != NULL) + (void) list_merge(ip, (yyvsp[(6) - (6)])); + (void) list_append(ip, instruction(Op_jmp)); + ip->lasti->target_jmp = tcont; + (yyval) = list_append(ip, tbreak); + + break_allowed--; + continue_allowed--; + fix_break_continue(ip, tbreak, tcont); + } break; - case 37: + case 44: -/* Line 1464 of yacc.c */ -#line 396 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 627 "awkgram.y" { /* - * Efficiency hack. Recognize the special case of + * ----------------- + * z: + * body + * ----------------- + * tc: + * cond + * ----------------- + * [Op_jmp_true | z ] + * tb:[Op_no_op ] + */ + + INSTRUCTION *ip, *tbreak, *tcont; + + tbreak = instruction(Op_no_op); + tcont = (yyvsp[(6) - (8)])->nexti; + add_lint((yyvsp[(6) - (8)]), LINT_assign_in_cond); + if ((yyvsp[(3) - (8)]) != NULL) + ip = list_merge((yyvsp[(3) - (8)]), (yyvsp[(6) - (8)])); + else + ip = list_prepend((yyvsp[(6) - (8)]), instruction(Op_no_op)); + if (do_profiling) + (void) list_prepend(ip, instruction(Op_exec_count)); + (void) list_append(ip, instruction(Op_jmp_true)); + ip->lasti->target_jmp = ip->nexti; + (yyval) = list_append(ip, tbreak); + + break_allowed--; + continue_allowed--; + fix_break_continue(ip, tbreak, tcont); + + if (do_profiling) { + (yyvsp[(1) - (8)])->target_break = tbreak; + (yyvsp[(1) - (8)])->target_continue = tcont; + ((yyvsp[(1) - (8)]) + 1)->doloop_cond = tcont; + (yyval) = list_prepend(ip, (yyvsp[(1) - (8)])); + bcfree((yyvsp[(4) - (8)])); + } /* else + $1 and $4 are NULLs */ + } + break; + + case 45: + +/* Line 1806 of yacc.c */ +#line 669 "awkgram.y" + { + INSTRUCTION *ip; + char *var_name = (yyvsp[(3) - (8)])->lextok; + + if ((yyvsp[(8) - (8)]) != NULL + && (yyvsp[(8) - (8)])->lasti->opcode == Op_K_delete + && (yyvsp[(8) - (8)])->lasti->expr_count == 1 + && (yyvsp[(8) - (8)])->nexti->opcode == Op_push + && ((yyvsp[(8) - (8)])->nexti->memory->type != Node_var || !((yyvsp[(8) - (8)])->nexti->memory->var_update)) + && strcmp((yyvsp[(8) - (8)])->nexti->memory->vname, var_name) == 0 + ) { + + /* Efficiency hack. Recognize the special case of * * for (iggy in foo) * delete foo[iggy] @@ -2284,1113 +2672,1582 @@ * * Check that the body is a `delete a[i]' statement, * and that both the loop var and array names match. - */ - if ((yyvsp[(8) - (8)].nodeval) != NULL && (yyvsp[(8) - (8)].nodeval)->type == Node_K_delete && (yyvsp[(8) - (8)].nodeval)->rnode != NULL) { - NODE *arr, *sub; + */ + NODE *arr = NULL; - assert((yyvsp[(8) - (8)].nodeval)->rnode->type == Node_expression_list); - arr = (yyvsp[(8) - (8)].nodeval)->lnode; /* array var */ - sub = (yyvsp[(8) - (8)].nodeval)->rnode->lnode; /* index var */ - - if ( (arr->type == Node_var_new - || arr->type == Node_var_array - || arr->type == Node_param_list) - && (sub->type == Node_var_new - || sub->type == Node_var - || sub->type == Node_param_list) - && strcmp((yyvsp[(3) - (8)].sval), sub->vname) == 0 - && strcmp((yyvsp[(5) - (8)].sval), arr->vname) == 0) { - (yyvsp[(8) - (8)].nodeval)->type = Node_K_delete_loop; - (yyval.nodeval) = (yyvsp[(8) - (8)].nodeval); - free((yyvsp[(3) - (8)].sval)); /* thanks to valgrind for pointing these out */ - free((yyvsp[(5) - (8)].sval)); - } - else + ip = (yyvsp[(8) - (8)])->nexti->nexti; + if ((yyvsp[(5) - (8)])->nexti->opcode == Op_push && (yyvsp[(5) - (8)])->lasti == (yyvsp[(5) - (8)])->nexti) + arr = (yyvsp[(5) - (8)])->nexti->memory; + if (arr != NULL + && ip->opcode == Op_no_op + && ip->nexti->opcode == Op_push_array + && strcmp(ip->nexti->memory->vname, arr->vname) == 0 + && ip->nexti->nexti == (yyvsp[(8) - (8)])->lasti + ) { + (void) make_assignable((yyvsp[(8) - (8)])->nexti); + (yyvsp[(8) - (8)])->lasti->opcode = Op_K_delete_loop; + (yyvsp[(8) - (8)])->lasti->expr_count = 0; + if ((yyvsp[(1) - (8)]) != NULL) + bcfree((yyvsp[(1) - (8)])); + efree(var_name); + bcfree((yyvsp[(3) - (8)])); + bcfree((yyvsp[(4) - (8)])); + bcfree((yyvsp[(5) - (8)])); + (yyval) = (yyvsp[(8) - (8)]); + } else goto regular_loop; } else { - regular_loop: - (yyval.nodeval) = node((yyvsp[(8) - (8)].nodeval), Node_K_arrayfor, - make_for_loop(variable((yyvsp[(3) - (8)].sval), CAN_FREE, Node_var), - (NODE *) NULL, variable((yyvsp[(5) - (8)].sval), CAN_FREE, Node_var_array))); - } - } - break; + INSTRUCTION *tbreak, *tcont; - case 38: + /* [ Op_push_array a ] + * [ Op_arrayfor_init | ib ] + * ic:[ Op_arrayfor_incr | ib ] + * [ Op_var_assign if any ] + * + * body + * + * [Op_jmp | ic ] + * ib:[Op_arrayfor_final ] + */ +regular_loop: + ip = (yyvsp[(5) - (8)]); + ip->nexti->opcode = Op_push_array; + + tbreak = instruction(Op_arrayfor_final); + (yyvsp[(4) - (8)])->opcode = Op_arrayfor_incr; + (yyvsp[(4) - (8)])->array_var = variable(var_name, Node_var); + (yyvsp[(4) - (8)])->target_jmp = tbreak; + tcont = (yyvsp[(4) - (8)]); + (yyvsp[(3) - (8)])->opcode = Op_arrayfor_init; + (yyvsp[(3) - (8)])->target_jmp = tbreak; + (void) list_append(ip, (yyvsp[(3) - (8)])); + + if (do_profiling) { + (yyvsp[(1) - (8)])->opcode = Op_K_arrayfor; + (yyvsp[(1) - (8)])->target_continue = tcont; + (yyvsp[(1) - (8)])->target_break = tbreak; + (void) list_append(ip, (yyvsp[(1) - (8)])); + } /* else + $1 is NULL */ -/* Line 1464 of yacc.c */ -#line 440 "awkgram.y" - { - (yyval.nodeval) = node((yyvsp[(12) - (12)].nodeval), Node_K_for, (NODE *) make_for_loop((yyvsp[(3) - (12)].nodeval), (yyvsp[(6) - (12)].nodeval), (yyvsp[(9) - (12)].nodeval))); + /* add update_FOO instruction if necessary */ + if ((yyvsp[(4) - (8)])->array_var->type == Node_var && (yyvsp[(4) - (8)])->array_var->var_update) { + (void) list_append(ip, instruction(Op_var_update)); + ip->lasti->update_var = (yyvsp[(4) - (8)])->array_var->var_update; + } + (void) list_append(ip, (yyvsp[(4) - (8)])); + + /* add set_FOO instruction if necessary */ + if ((yyvsp[(4) - (8)])->array_var->type == Node_var && (yyvsp[(4) - (8)])->array_var->var_assign) { + (void) list_append(ip, instruction(Op_var_assign)); + ip->lasti->assign_var = (yyvsp[(4) - (8)])->array_var->var_assign; + } + + if (do_profiling) { + (void) list_append(ip, instruction(Op_exec_count)); + ((yyvsp[(1) - (8)]) + 1)->forloop_cond = (yyvsp[(4) - (8)]); + ((yyvsp[(1) - (8)]) + 1)->forloop_body = ip->lasti; + } + + if ((yyvsp[(8) - (8)]) != NULL) + (void) list_merge(ip, (yyvsp[(8) - (8)])); + + (void) list_append(ip, instruction(Op_jmp)); + ip->lasti->target_jmp = (yyvsp[(4) - (8)]); + (yyval) = list_append(ip, tbreak); + fix_break_continue(ip, tbreak, tcont); + } + + break_allowed--; + continue_allowed--; } break; - case 39: + case 46: -/* Line 1464 of yacc.c */ -#line 444 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 782 "awkgram.y" { - (yyval.nodeval) = node((yyvsp[(11) - (11)].nodeval), Node_K_for, - (NODE *) make_for_loop((yyvsp[(3) - (11)].nodeval), (NODE *) NULL, (yyvsp[(8) - (11)].nodeval))); + (yyval) = mk_for_loop((yyvsp[(1) - (12)]), (yyvsp[(3) - (12)]), (yyvsp[(6) - (12)]), (yyvsp[(9) - (12)]), (yyvsp[(12) - (12)])); + + break_allowed--; + continue_allowed--; } break; - case 40: + case 47: -/* Line 1464 of yacc.c */ -#line 450 "awkgram.y" - { (yyval.nodeval) = node((NODE *) NULL, Node_K_break, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 789 "awkgram.y" + { + (yyval) = mk_for_loop((yyvsp[(1) - (11)]), (yyvsp[(3) - (11)]), (INSTRUCTION *) NULL, (yyvsp[(8) - (11)]), (yyvsp[(11) - (11)])); + + break_allowed--; + continue_allowed--; + } break; - case 41: + case 48: -/* Line 1464 of yacc.c */ -#line 453 "awkgram.y" - { (yyval.nodeval) = node((NODE *) NULL, Node_K_continue, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 796 "awkgram.y" + { + if (do_profiling) + (yyval) = list_prepend((yyvsp[(1) - (1)]), instruction(Op_exec_count)); + else + (yyval) = (yyvsp[(1) - (1)]); + } break; - case 42: + case 49: -/* Line 1464 of yacc.c */ -#line 455 "awkgram.y" - { NODETYPE type; - - if (begin_or_end_rule) - yyerror(_("`%s' used in %s action"), "next", - (parsing_end_rule ? "END" : "BEGIN")); - type = Node_K_next; - (yyval.nodeval) = node((NODE *) NULL, type, (NODE *) NULL); - } +/* Line 1806 of yacc.c */ +#line 806 "awkgram.y" + { + if (! break_allowed) + error_ln((yyvsp[(1) - (2)])->source_line, + _("`break' is not allowed outside a loop or switch")); + (yyvsp[(1) - (2)])->target_jmp = NULL; + (yyval) = list_create((yyvsp[(1) - (2)])); + + } break; - case 43: + case 50: -/* Line 1464 of yacc.c */ -#line 464 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 815 "awkgram.y" { - static short warned = FALSE; + if (! continue_allowed) + error_ln((yyvsp[(1) - (2)])->source_line, + _("`continue' is not allowed outside a loop")); + (yyvsp[(1) - (2)])->target_jmp = NULL; + (yyval) = list_create((yyvsp[(1) - (2)])); - if (do_traditional) { - /* - * can't use yyerror, since may have overshot - * the source line - */ - errcount++; - error(_("`nextfile' is a gawk extension")); - } - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("`nextfile' is a gawk extension")); - } - if (begin_or_end_rule) { - /* same thing */ - errcount++; - error(_("`%s' used in %s action"), "nextfile", - (parsing_end_rule ? "END" : "BEGIN")); - } - (yyval.nodeval) = node((NODE *) NULL, Node_K_nextfile, (NODE *) NULL); - } + } break; - case 44: + case 51: -/* Line 1464 of yacc.c */ -#line 488 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(2) - (3)].nodeval), Node_K_exit, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 824 "awkgram.y" + { + /* if inside function (rule = 0), resolve context at run-time */ + if (rule && rule != Rule) + error_ln((yyvsp[(1) - (2)])->source_line, + _("`next' used in %s action"), ruletab[rule]); + (yyvsp[(1) - (2)])->target_jmp = ip_rec; + (yyval) = list_create((yyvsp[(1) - (2)])); + } break; - case 45: + case 52: -/* Line 1464 of yacc.c */ -#line 490 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 833 "awkgram.y" { - if (! can_return) - yyerror(_("`return' used outside function context")); - } + if (do_traditional) + error_ln((yyvsp[(1) - (2)])->source_line, + _("`nextfile' is a gawk extension")); + + /* if inside function (rule = 0), resolve context at run-time */ + if (rule == BEGIN || rule == END || rule == ENDFILE) + error_ln((yyvsp[(1) - (2)])->source_line, + _("`nextfile' used in %s action"), ruletab[rule]); + + (yyvsp[(1) - (2)])->target_newfile = ip_newfile; + (yyvsp[(1) - (2)])->target_endfile = ip_endfile; + (yyval) = list_create((yyvsp[(1) - (2)])); + } break; - case 46: + case 53: -/* Line 1464 of yacc.c */ -#line 495 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 848 "awkgram.y" { - (yyval.nodeval) = node((yyvsp[(3) - (4)].nodeval) == NULL ? Nnull_string : (yyvsp[(3) - (4)].nodeval), - Node_K_return, (NODE *) NULL); - } - break; - - case 48: + /* Initialize the two possible jump targets, the actual target + * is resolved at run-time. + */ + (yyvsp[(1) - (3)])->target_end = ip_end; /* first instruction in end_block */ + (yyvsp[(1) - (3)])->target_atexit = ip_atexit; /* cleanup and go home */ -/* Line 1464 of yacc.c */ -#line 511 "awkgram.y" - { in_print = TRUE; in_parens = 0; } + if ((yyvsp[(2) - (3)]) == NULL) { + (yyval) = list_create((yyvsp[(1) - (3)])); + (void) list_prepend((yyval), instruction(Op_push_i)); + (yyval)->nexti->memory = Nnull_string; + } else + (yyval) = list_append((yyvsp[(2) - (3)]), (yyvsp[(1) - (3)])); + } break; - case 49: + case 54: -/* Line 1464 of yacc.c */ -#line 512 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 863 "awkgram.y" { - /* - * 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 ((yyvsp[(1) - (4)].nodetypeval) == Node_K_print && - ((yyvsp[(3) - (4)].nodeval) == NULL - || ((yyvsp[(3) - (4)].nodeval)->type == Node_expression_list - && (yyvsp[(3) - (4)].nodeval)->rnode == NULL - && (yyvsp[(3) - (4)].nodeval)->lnode->type == Node_field_spec - && (yyvsp[(3) - (4)].nodeval)->lnode->lnode->type == Node_val - && (yyvsp[(3) - (4)].nodeval)->lnode->lnode->numbr == 0.0)) - ) { - static short warned = FALSE; + if (! can_return) + yyerror(_("`return' used outside function context")); + } + break; - (yyval.nodeval) = node(NULL, Node_K_print_rec, (yyvsp[(4) - (4)].nodeval)); + case 55: - if (do_lint && (yyvsp[(3) - (4)].nodeval) == NULL && begin_or_end_rule && ! warned) { - warned = TRUE; - lintwarn( - _("plain `print' in BEGIN or END rule should probably be `print \"\"'")); - } - } else { - (yyval.nodeval) = node((yyvsp[(3) - (4)].nodeval), (yyvsp[(1) - (4)].nodetypeval), (yyvsp[(4) - (4)].nodeval)); - if ((yyval.nodeval)->type == Node_K_printf) - count_args((yyval.nodeval)); - } +/* Line 1806 of yacc.c */ +#line 866 "awkgram.y" + { + if ((yyvsp[(3) - (4)]) == NULL) { + (yyval) = list_create((yyvsp[(1) - (4)])); + (void) list_prepend((yyval), instruction(Op_push_i)); + (yyval)->nexti->memory = Nnull_string; + } else + (yyval) = list_append((yyvsp[(3) - (4)]), (yyvsp[(1) - (4)])); } break; - case 50: + case 57: -/* Line 1464 of yacc.c */ -#line 543 "awkgram.y" - { (yyval.nodeval) = node(variable((yyvsp[(2) - (5)].sval), CAN_FREE, Node_var_array), Node_K_delete, (yyvsp[(4) - (5)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 886 "awkgram.y" + { in_print = TRUE; in_parens = 0; } break; - case 51: + case 58: -/* Line 1464 of yacc.c */ -#line 545 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 887 "awkgram.y" { - static short warned = FALSE; + /* + * Optimization: plain `print' has no expression list, so $3 is null. + * If $3 is NULL or is a bytecode list for $0 use Op_K_print_rec, + * which is faster for these two cases. + */ - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("`delete array' is a gawk extension")); - } - if (do_traditional) { - /* - * can't use yyerror, since may have overshot - * the source line + if ((yyvsp[(1) - (4)])->opcode == Op_K_print && + ((yyvsp[(3) - (4)]) == NULL + || ((yyvsp[(3) - (4)])->lasti->opcode == Op_field_spec + && (yyvsp[(3) - (4)])->nexti->nexti->nexti == (yyvsp[(3) - (4)])->lasti + && (yyvsp[(3) - (4)])->nexti->nexti->opcode == Op_push_i + && (yyvsp[(3) - (4)])->nexti->nexti->memory->type == Node_val + && (yyvsp[(3) - (4)])->nexti->nexti->memory->numbr == 0.0) + ) + ) { + static short warned = FALSE; + /* ----------------- + * output_redir + * [ redirect exp ] + * ----------------- + * expression_list + * ------------------ + * [Op_K_print_rec | NULL | redir_type | expr_count] */ - errcount++; - error(_("`delete array' is a gawk extension")); - } - (yyval.nodeval) = node(variable((yyvsp[(2) - (2)].sval), CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL); - } - break; - - case 52: -/* Line 1464 of yacc.c */ -#line 563 "awkgram.y" - { - /* - * this is for tawk compatibility. maybe the warnings - * should always be done. - */ - static short warned = FALSE; + if ((yyvsp[(3) - (4)]) != NULL) { + bcfree((yyvsp[(3) - (4)])->lasti); /* Op_field_spec */ + (yyvsp[(3) - (4)])->nexti->nexti->memory->flags &= ~PERM; + (yyvsp[(3) - (4)])->nexti->nexti->memory->flags |= MALLOC; + unref((yyvsp[(3) - (4)])->nexti->nexti->memory); /* Node_val */ + bcfree((yyvsp[(3) - (4)])->nexti->nexti); /* Op_push_i */ + bcfree((yyvsp[(3) - (4)])->nexti); /* Op_list */ + bcfree((yyvsp[(3) - (4)])); /* Op_list */ + } else { + if (do_lint && (rule == BEGIN || rule == END) && ! warned) { + warned = TRUE; + lintwarn_ln((yyvsp[(1) - (4)])->source_line, + _("plain `print' in BEGIN or END rule should probably be `print \"\"'")); + } + } - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("`delete(array)' is a non-portable tawk extension")); - } - if (do_traditional) { - /* - * can't use yyerror, since may have overshot - * the source line + (yyvsp[(1) - (4)])->expr_count = 0; + (yyvsp[(1) - (4)])->opcode = Op_K_print_rec; + if ((yyvsp[(4) - (4)]) == NULL) { /* no redircetion */ + (yyvsp[(1) - (4)])->redir_type = 0; + (yyval) = list_create((yyvsp[(1) - (4)])); + } else { + INSTRUCTION *ip; + ip = (yyvsp[(4) - (4)])->nexti; + (yyvsp[(1) - (4)])->redir_type = ip->redir_type; + (yyvsp[(4) - (4)])->nexti = ip->nexti; + bcfree(ip); + (yyval) = list_append((yyvsp[(4) - (4)]), (yyvsp[(1) - (4)])); + } + } else { + /* ----------------- + * [ output_redir ] + * [ redirect exp ] + * ----------------- + * [ expression_list ] + * ------------------ + * [$1 | NULL | redir_type | expr_count] + * */ - errcount++; - error(_("`delete(array)' is a non-portable tawk extension")); - } - (yyval.nodeval) = node(variable((yyvsp[(3) - (4)].sval), CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL); + + if ((yyvsp[(4) - (4)]) == NULL) { /* no redirection */ + if ((yyvsp[(3) - (4)]) == NULL) { /* printf without arg */ + (yyvsp[(1) - (4)])->expr_count = 0; + (yyvsp[(1) - (4)])->redir_type = 0; + (yyval) = list_create((yyvsp[(1) - (4)])); + } else { + INSTRUCTION *t = (yyvsp[(3) - (4)]); + (yyvsp[(1) - (4)])->expr_count = count_expressions(&t, FALSE); + (yyvsp[(1) - (4)])->redir_type = 0; + (yyval) = list_append(t, (yyvsp[(1) - (4)])); + } + } else { + INSTRUCTION *ip; + ip = (yyvsp[(4) - (4)])->nexti; + (yyvsp[(1) - (4)])->redir_type = ip->redir_type; + (yyvsp[(4) - (4)])->nexti = ip->nexti; + bcfree(ip); + if ((yyvsp[(3) - (4)]) == NULL) { + (yyvsp[(1) - (4)])->expr_count = 0; + (yyval) = list_append((yyvsp[(4) - (4)]), (yyvsp[(1) - (4)])); + } else { + INSTRUCTION *t = (yyvsp[(3) - (4)]); + (yyvsp[(1) - (4)])->expr_count = count_expressions(&t, FALSE); + (yyval) = list_append(list_merge((yyvsp[(4) - (4)]), t), (yyvsp[(1) - (4)])); + } + } } + } break; - case 53: + case 59: -/* Line 1464 of yacc.c */ -#line 585 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 982 "awkgram.y" + { sub_counter = 0; } break; - case 54: - -/* Line 1464 of yacc.c */ -#line 590 "awkgram.y" - { (yyval.nodeval) = NULL; } - break; + case 60: - case 55: +/* Line 1806 of yacc.c */ +#line 983 "awkgram.y" + { + char *arr = (yyvsp[(2) - (4)])->lextok; -/* Line 1464 of yacc.c */ -#line 592 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } - break; + (yyvsp[(2) - (4)])->opcode = Op_push_array; + (yyvsp[(2) - (4)])->memory = variable(arr, Node_var_new); - case 56: + if ((yyvsp[(4) - (4)]) == NULL) { + static short warned = FALSE; -/* Line 1464 of yacc.c */ -#line 597 "awkgram.y" - { - if ((yyvsp[(1) - (1)].nodeval) == NULL) { - (yyval.nodeval) = NULL; - } else { - NODE *dflt = NULL; - NODE *head = (yyvsp[(1) - (1)].nodeval); - NODE *curr; - - const char **case_values = NULL; - - int maxcount = 128; - int case_count = 0; - int i; - - emalloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body"); - for (curr = (yyvsp[(1) - (1)].nodeval); curr != NULL; curr = curr->rnode) { - /* Assure that case statement values are unique. */ - if (curr->lnode->type == Node_K_case) { - char *caseval; - - if (curr->lnode->lnode->type == Node_regex) - caseval = curr->lnode->lnode->re_exp->stptr; - else - caseval = force_string(tree_eval(curr->lnode->lnode))->stptr; - - for (i = 0; i < case_count; i++) - if (strcmp(caseval, case_values[i]) == 0) - yyerror(_("duplicate case values in switch body: %s"), caseval); - - if (case_count >= maxcount) { - maxcount += 128; - erealloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body"); - } - case_values[case_count++] = caseval; - } else { - /* Otherwise save a pointer to the default node. */ - if (dflt != NULL) - yyerror(_("Duplicate `default' detected in switch body")); - dflt = curr; - } + if (do_lint && ! warned) { + warned = TRUE; + lintwarn_ln((yyvsp[(1) - (4)])->source_line, + _("`delete array' is a gawk extension")); } - - free(case_values); - - /* Create the switch body. */ - (yyval.nodeval) = node(head, Node_switch_body, dflt); + if (do_traditional) + error_ln((yyvsp[(1) - (4)])->source_line, + _("`delete array' is a gawk extension")); + (yyvsp[(1) - (4)])->expr_count = 0; + (yyval) = list_append(list_create((yyvsp[(2) - (4)])), (yyvsp[(1) - (4)])); + } else { + (yyvsp[(1) - (4)])->expr_count = sub_counter; + (yyval) = list_append(list_append((yyvsp[(4) - (4)]), (yyvsp[(2) - (4)])), (yyvsp[(1) - (4)])); } - } - break; - - case 57: - -/* Line 1464 of yacc.c */ -#line 649 "awkgram.y" - { (yyval.nodeval) = NULL; } + } break; - case 58: + case 61: -/* Line 1464 of yacc.c */ -#line 651 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1012 "awkgram.y" { - if ((yyvsp[(2) - (2)].nodeval) == NULL) - (yyval.nodeval) = (yyvsp[(1) - (2)].nodeval); - else { - if (do_lint && isnoeffect((yyvsp[(2) - (2)].nodeval)->type)) - lintwarn(_("statement may have no effect")); - if ((yyvsp[(1) - (2)].nodeval) == NULL) - (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_case_list, (NODE *) NULL); - else - (yyval.nodeval) = append_right( - ((yyvsp[(1) - (2)].nodeval)->type == Node_case_list ? (yyvsp[(1) - (2)].nodeval) : node((yyvsp[(1) - (2)].nodeval), Node_case_list, (NODE *) NULL)), - ((yyvsp[(2) - (2)].nodeval)->type == Node_case_list ? (yyvsp[(2) - (2)].nodeval) : node((yyvsp[(2) - (2)].nodeval), Node_case_list, (NODE *) NULL)) - ); + static short warned = FALSE; + char *arr = (yyvsp[(3) - (4)])->lextok; + + if (do_lint && ! warned) { + warned = TRUE; + lintwarn_ln((yyvsp[(1) - (4)])->source_line, + _("`delete(array)' is a non-portable tawk extension")); } - yyerrok; + if (do_traditional) { + error_ln((yyvsp[(1) - (4)])->source_line, + _("`delete array' is a gawk extension")); + } + (yyvsp[(3) - (4)])->memory = variable(arr, Node_var_new); + (yyvsp[(3) - (4)])->opcode = Op_push_array; + (yyvsp[(1) - (4)])->expr_count = 0; + (yyval) = list_append(list_create((yyvsp[(3) - (4)])), (yyvsp[(1) - (4)])); } break; - case 59: + case 62: -/* Line 1464 of yacc.c */ -#line 668 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1031 "awkgram.y" + { (yyval) = optimize_assignment((yyvsp[(1) - (1)])); } break; - case 60: + case 63: -/* Line 1464 of yacc.c */ -#line 673 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(2) - (5)].nodeval), Node_K_case, (yyvsp[(5) - (5)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1036 "awkgram.y" + { (yyval) = NULL; } break; - case 61: + case 64: -/* Line 1464 of yacc.c */ -#line 675 "awkgram.y" - { (yyval.nodeval) = node((NODE *) NULL, Node_K_default, (yyvsp[(4) - (4)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1038 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; - case 62: + case 65: -/* Line 1464 of yacc.c */ -#line 680 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1043 "awkgram.y" + { (yyval) = NULL; } break; - case 63: + case 66: -/* Line 1464 of yacc.c */ -#line 682 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1045 "awkgram.y" { - (yyvsp[(2) - (2)].nodeval)->numbr = -(force_number((yyvsp[(2) - (2)].nodeval))); - (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval); + if ((yyvsp[(1) - (2)]) == NULL) + (yyval) = list_create((yyvsp[(2) - (2)])); + else + (yyval) = list_prepend((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } break; - case 64: - -/* Line 1464 of yacc.c */ -#line 687 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval); } - break; - - case 65: + case 67: -/* Line 1464 of yacc.c */ -#line 689 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1052 "awkgram.y" + { (yyval) = NULL; } + break; + + case 68: + +/* Line 1806 of yacc.c */ +#line 1057 "awkgram.y" + { + INSTRUCTION *casestmt = (yyvsp[(5) - (5)]); + if ((yyvsp[(5) - (5)]) == NULL) + casestmt = list_create(instruction(Op_no_op)); + if (do_profiling) + (void) list_prepend(casestmt, instruction(Op_exec_count)); + (yyvsp[(1) - (5)])->case_exp = (yyvsp[(2) - (5)]); + (yyvsp[(1) - (5)])->case_stmt = casestmt; + bcfree((yyvsp[(3) - (5)])); + (yyval) = (yyvsp[(1) - (5)]); + } break; - case 66: + case 69: -/* Line 1464 of yacc.c */ -#line 691 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1069 "awkgram.y" + { + INSTRUCTION *casestmt = (yyvsp[(4) - (4)]); + if ((yyvsp[(4) - (4)]) == NULL) + casestmt = list_create(instruction(Op_no_op)); + if (do_profiling) + (void) list_prepend(casestmt, instruction(Op_exec_count)); + bcfree((yyvsp[(2) - (4)])); + (yyvsp[(1) - (4)])->case_stmt = casestmt; + (yyval) = (yyvsp[(1) - (4)]); + } break; case 70: -/* Line 1464 of yacc.c */ -#line 706 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(2) - (5)].nodeval), Node_expression_list, (yyvsp[(4) - (5)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1083 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 71: -/* Line 1464 of yacc.c */ -#line 711 "awkgram.y" - { - in_print = FALSE; - in_parens = 0; - (yyval.nodeval) = NULL; +/* Line 1806 of yacc.c */ +#line 1085 "awkgram.y" + { + (yyvsp[(2) - (2)])->memory->numbr = -(force_number((yyvsp[(2) - (2)])->memory)); + bcfree((yyvsp[(1) - (2)])); + (yyval) = (yyvsp[(2) - (2)]); } break; case 72: -/* Line 1464 of yacc.c */ -#line 716 "awkgram.y" - { in_print = FALSE; in_parens = 0; } +/* Line 1806 of yacc.c */ +#line 1091 "awkgram.y" + { + bcfree((yyvsp[(1) - (2)])); + (yyval) = (yyvsp[(2) - (2)]); + } break; case 73: -/* Line 1464 of yacc.c */ -#line 717 "awkgram.y" - { - (yyval.nodeval) = node((yyvsp[(3) - (3)].nodeval), (yyvsp[(1) - (3)].nodetypeval), (NODE *) NULL); - if ((yyvsp[(1) - (3)].nodetypeval) == Node_redirect_twoway - && (yyvsp[(3) - (3)].nodeval)->type == Node_K_getline - && (yyvsp[(3) - (3)].nodeval)->rnode != NULL - && (yyvsp[(3) - (3)].nodeval)->rnode->type == Node_redirect_twoway) - yyerror(_("multistage two-way pipelines don't work")); - } +/* Line 1806 of yacc.c */ +#line 1096 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 74: -/* Line 1464 of yacc.c */ -#line 729 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1098 "awkgram.y" { - (yyval.nodeval) = node((yyvsp[(3) - (6)].nodeval), Node_K_if, - node((yyvsp[(6) - (6)].nodeval), Node_if_branches, (NODE *) NULL)); + (yyvsp[(1) - (1)])->opcode = Op_push_re; + (yyval) = (yyvsp[(1) - (1)]); } break; case 75: -/* Line 1464 of yacc.c */ -#line 735 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(3) - (9)].nodeval), Node_K_if, - node((yyvsp[(6) - (9)].nodeval), Node_if_branches, (yyvsp[(9) - (9)].nodeval))); } +/* Line 1806 of yacc.c */ +#line 1106 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; - case 80: - -/* Line 1464 of yacc.c */ -#line 751 "awkgram.y" - { (yyval.nodeval) = NULL; } - break; - - case 81: + case 76: -/* Line 1464 of yacc.c */ -#line 753 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_redirect_input, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 1108 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; - case 82: + case 78: -/* Line 1464 of yacc.c */ -#line 758 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1118 "awkgram.y" + { + (yyval) = (yyvsp[(2) - (3)]); + } break; - case 83: + case 79: -/* Line 1464 of yacc.c */ -#line 760 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1125 "awkgram.y" + { + in_print = FALSE; + in_parens = 0; + (yyval) = NULL; + } break; - case 84: + case 80: -/* Line 1464 of yacc.c */ -#line 765 "awkgram.y" - { (yyval.nodeval) = make_param((yyvsp[(1) - (1)].sval)); } +/* Line 1806 of yacc.c */ +#line 1130 "awkgram.y" + { in_print = FALSE; in_parens = 0; } break; - case 85: + case 81: -/* Line 1464 of yacc.c */ -#line 767 "awkgram.y" - { (yyval.nodeval) = append_right((yyvsp[(1) - (3)].nodeval), make_param((yyvsp[(3) - (3)].sval))); yyerrok; } +/* Line 1806 of yacc.c */ +#line 1131 "awkgram.y" + { + if ((yyvsp[(1) - (3)])->redir_type == redirect_twoway + && (yyvsp[(3) - (3)])->lasti->opcode == Op_K_getline_redir + && (yyvsp[(3) - (3)])->lasti->redir_type == redirect_twoway) + yyerror(_("multistage two-way pipelines don't work")); + (yyval) = list_prepend((yyvsp[(3) - (3)]), (yyvsp[(1) - (3)])); + } break; - case 86: + case 82: -/* Line 1464 of yacc.c */ -#line 769 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1142 "awkgram.y" + { + (yyval) = mk_condition((yyvsp[(3) - (6)]), (yyvsp[(1) - (6)]), (yyvsp[(6) - (6)]), NULL, NULL); + } break; - case 87: + case 83: -/* Line 1464 of yacc.c */ -#line 771 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1147 "awkgram.y" + { + (yyval) = mk_condition((yyvsp[(3) - (9)]), (yyvsp[(1) - (9)]), (yyvsp[(6) - (9)]), (yyvsp[(7) - (9)]), (yyvsp[(9) - (9)])); + } break; case 88: -/* Line 1464 of yacc.c */ -#line 773 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1164 "awkgram.y" + { (yyval) = NULL; } break; case 89: -/* Line 1464 of yacc.c */ -#line 779 "awkgram.y" - { (yyval.nodeval) = NULL; } - break; - - case 90: - -/* Line 1464 of yacc.c */ -#line 781 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } - break; - - case 91: - -/* Line 1464 of yacc.c */ -#line 786 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1166 "awkgram.y" + { + bcfree((yyvsp[(1) - (2)])); + (yyval) = (yyvsp[(2) - (2)]); + } break; case 92: -/* Line 1464 of yacc.c */ -#line 788 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1179 "awkgram.y" + { + append_param((yyvsp[(1) - (1)])->lextok); + (yyvsp[(1) - (1)])->lextok = NULL; + bcfree((yyvsp[(1) - (1)])); + } break; case 93: -/* Line 1464 of yacc.c */ -#line 793 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (1)].nodeval), Node_expression_list, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 1185 "awkgram.y" + { + append_param((yyvsp[(3) - (3)])->lextok); + (yyvsp[(3) - (3)])->lextok = NULL; + bcfree((yyvsp[(3) - (3)])); + yyerrok; + } break; case 94: -/* Line 1464 of yacc.c */ -#line 795 "awkgram.y" - { - (yyval.nodeval) = append_right((yyvsp[(1) - (3)].nodeval), - node((yyvsp[(3) - (3)].nodeval), Node_expression_list, (NODE *) NULL)); - yyerrok; - } +/* Line 1806 of yacc.c */ +#line 1192 "awkgram.y" + { /* func_params = NULL; */ } break; case 95: -/* Line 1464 of yacc.c */ -#line 801 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1194 "awkgram.y" + { /* func_params = NULL; */ } break; case 96: -/* Line 1464 of yacc.c */ -#line 803 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1196 "awkgram.y" + { /* func_params = NULL; */ } break; case 97: -/* Line 1464 of yacc.c */ -#line 805 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1202 "awkgram.y" + { (yyval) = NULL; } break; case 98: -/* Line 1464 of yacc.c */ -#line 807 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1204 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 99: -/* Line 1464 of yacc.c */ -#line 812 "awkgram.y" - { - if (do_lint && (yyvsp[(3) - (3)].nodeval)->type == Node_regex) - lintwarn(_("regular expression on right of assignment")); - (yyval.nodeval) = optimize_concat((yyvsp[(1) - (3)].nodeval), (yyvsp[(2) - (3)].nodetypeval), (yyvsp[(3) - (3)].nodeval)); - } +/* Line 1806 of yacc.c */ +#line 1209 "awkgram.y" + { (yyval) = NULL; } break; case 100: -/* Line 1464 of yacc.c */ -#line 818 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_and, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1211 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 101: -/* Line 1464 of yacc.c */ -#line 820 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_or, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1216 "awkgram.y" + { (yyval) = mk_expression_list(NULL, (yyvsp[(1) - (1)])); } break; case 102: -/* Line 1464 of yacc.c */ -#line 822 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1218 "awkgram.y" { - if ((yyvsp[(1) - (3)].nodeval)->type == Node_regex) - warning(_("regular expression on left of `~' or `!~' operator")); - (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), (yyvsp[(2) - (3)].nodetypeval), mk_rexp((yyvsp[(3) - (3)].nodeval))); - } + (yyval) = mk_expression_list((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); + yyerrok; + } break; case 103: -/* Line 1464 of yacc.c */ -#line 828 "awkgram.y" - { - if (do_lint_old) - warning(_("old awk does not support the keyword `in' except after `for'")); - (yyval.nodeval) = node(variable((yyvsp[(3) - (3)].sval), CAN_FREE, Node_var_array), Node_in_array, (yyvsp[(1) - (3)].nodeval)); - } +/* Line 1806 of yacc.c */ +#line 1223 "awkgram.y" + { (yyval) = NULL; } break; case 104: -/* Line 1464 of yacc.c */ -#line 834 "awkgram.y" - { - if (do_lint && (yyvsp[(3) - (3)].nodeval)->type == Node_regex) - lintwarn(_("regular expression on right of comparison")); - (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), (yyvsp[(2) - (3)].nodetypeval), (yyvsp[(3) - (3)].nodeval)); - } +/* Line 1806 of yacc.c */ +#line 1225 "awkgram.y" + { (yyval) = NULL; } break; case 105: -/* Line 1464 of yacc.c */ -#line 840 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (5)].nodeval), Node_cond_exp, node((yyvsp[(3) - (5)].nodeval), Node_if_branches, (yyvsp[(5) - (5)].nodeval)));} +/* Line 1806 of yacc.c */ +#line 1227 "awkgram.y" + { (yyval) = NULL; } break; case 106: -/* Line 1464 of yacc.c */ -#line 842 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1229 "awkgram.y" + { (yyval) = NULL; } break; case 107: -/* Line 1464 of yacc.c */ -#line 847 "awkgram.y" - { (yyval.nodetypeval) = (yyvsp[(1) - (1)].nodetypeval); } +/* Line 1806 of yacc.c */ +#line 1235 "awkgram.y" + { + if (do_lint && (yyvsp[(3) - (3)])->lasti->opcode == Op_match_rec) + lintwarn_ln((yyvsp[(2) - (3)])->source_line, + _("regular expression on right of assignment")); + (yyval) = mk_assignment((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); + } break; case 108: -/* Line 1464 of yacc.c */ -#line 849 "awkgram.y" - { (yyval.nodetypeval) = (yyvsp[(1) - (1)].nodetypeval); } +/* Line 1806 of yacc.c */ +#line 1242 "awkgram.y" + { (yyval) = mk_boolean((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 109: -/* Line 1464 of yacc.c */ -#line 851 "awkgram.y" - { (yyval.nodetypeval) = Node_assign_quotient; } +/* Line 1806 of yacc.c */ +#line 1244 "awkgram.y" + { (yyval) = mk_boolean((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 110: -/* Line 1464 of yacc.c */ -#line 856 "awkgram.y" - { (yyval.nodetypeval) = (yyvsp[(1) - (1)].nodetypeval); } +/* Line 1806 of yacc.c */ +#line 1246 "awkgram.y" + { + if ((yyvsp[(1) - (3)])->lasti->opcode == Op_match_rec) + warning_ln((yyvsp[(2) - (3)])->source_line, + _("regular expression on left of `~' or `!~' operator")); + + if ((yyvsp[(3) - (3)])->lasti == (yyvsp[(3) - (3)])->nexti && (yyvsp[(3) - (3)])->nexti->opcode == Op_match_rec) { + (yyvsp[(2) - (3)])->memory = (yyvsp[(3) - (3)])->nexti->memory; + bcfree((yyvsp[(3) - (3)])->nexti); /* Op_match_rec */ + bcfree((yyvsp[(3) - (3)])); /* Op_list */ + (yyval) = list_append((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)])); + } else { + (yyvsp[(2) - (3)])->memory = make_regnode(Node_dynregex, NULL); + (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), (yyvsp[(2) - (3)])); + } + } break; case 111: -/* Line 1464 of yacc.c */ -#line 858 "awkgram.y" - { (yyval.nodetypeval) = Node_less; } +/* Line 1806 of yacc.c */ +#line 1262 "awkgram.y" + { + if (do_lint_old) + warning_ln((yyvsp[(2) - (3)])->source_line, + _("old awk does not support the keyword `in' except after `for'")); + (yyvsp[(3) - (3)])->nexti->opcode = Op_push_array; + (yyvsp[(2) - (3)])->opcode = Op_in_array; + (yyvsp[(2) - (3)])->expr_count = 1; + (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), (yyvsp[(2) - (3)])); + } + break; + + case 112: + +/* Line 1806 of yacc.c */ +#line 1272 "awkgram.y" + { + if (do_lint && (yyvsp[(3) - (3)])->lasti->opcode == Op_match_rec) + lintwarn_ln((yyvsp[(2) - (3)])->source_line, + _("regular expression on right of comparison")); + (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), (yyvsp[(2) - (3)])); + } break; case 113: -/* Line 1464 of yacc.c */ -#line 863 "awkgram.y" - { (yyval.nodetypeval) = Node_greater; } +/* Line 1806 of yacc.c */ +#line 1279 "awkgram.y" + { (yyval) = mk_condition((yyvsp[(1) - (5)]), (yyvsp[(2) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(4) - (5)]), (yyvsp[(5) - (5)])); } break; case 114: -/* Line 1464 of yacc.c */ -#line 868 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1281 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 115: -/* Line 1464 of yacc.c */ -#line 870 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1286 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 116: -/* Line 1464 of yacc.c */ -#line 872 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (2)].nodeval), Node_concat, (yyvsp[(2) - (2)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1288 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 117: + +/* Line 1806 of yacc.c */ +#line 1290 "awkgram.y" + { + (yyvsp[(2) - (2)])->opcode = Op_assign_quotient; + (yyval) = (yyvsp[(2) - (2)]); + } break; case 118: -/* Line 1464 of yacc.c */ -#line 879 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_exp, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1298 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 119: -/* Line 1464 of yacc.c */ -#line 881 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_times, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1300 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 120: -/* Line 1464 of yacc.c */ -#line 883 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_quotient, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1305 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 121: -/* Line 1464 of yacc.c */ -#line 885 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_mod, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1307 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 122: -/* Line 1464 of yacc.c */ -#line 887 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_plus, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1312 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 123: -/* Line 1464 of yacc.c */ -#line 889 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_minus, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1314 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; case 124: -/* Line 1464 of yacc.c */ -#line 891 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1316 "awkgram.y" { - if (do_lint && parsing_end_rule && (yyvsp[(3) - (3)].nodeval) == NULL) - lintwarn(_("non-redirected `getline' undefined inside END action")); - (yyval.nodeval) = node((yyvsp[(2) - (3)].nodeval), Node_K_getline, (yyvsp[(3) - (3)].nodeval)); - } - break; + int count = 2; + int is_simple_var = FALSE; - case 125: + if ((yyvsp[(1) - (2)])->lasti->opcode == Op_concat) { + /* multiple (> 2) adjacent strings optimization */ + is_simple_var = ((yyvsp[(1) - (2)])->lasti->concat_flag & CSVAR); + count = (yyvsp[(1) - (2)])->lasti->expr_count + 1; + (yyvsp[(1) - (2)])->lasti->opcode = Op_no_op; + } else { + is_simple_var = ((yyvsp[(1) - (2)])->nexti->opcode == Op_push + && (yyvsp[(1) - (2)])->lasti == (yyvsp[(1) - (2)])->nexti); /* first exp. is a simple + * variable?; kludge for use + * in Op_assign_concat. + */ + } -/* Line 1464 of yacc.c */ -#line 897 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (2)].nodeval), Node_postincrement, (NODE *) NULL); } - break; + if (do_optimize > 1 + && (yyvsp[(1) - (2)])->nexti == (yyvsp[(1) - (2)])->lasti && (yyvsp[(1) - (2)])->nexti->opcode == Op_push_i + && (yyvsp[(2) - (2)])->nexti == (yyvsp[(2) - (2)])->lasti && (yyvsp[(2) - (2)])->nexti->opcode == Op_push_i + ) { + NODE *n1 = (yyvsp[(1) - (2)])->nexti->memory; + NODE *n2 = (yyvsp[(2) - (2)])->nexti->memory; + size_t nlen; + + (void) force_string(n1); + (void) force_string(n2); + nlen = n1->stlen + n2->stlen; + erealloc(n1->stptr, char *, nlen + 2, "constant fold"); + memcpy(n1->stptr + n1->stlen, n2->stptr, n2->stlen); + n1->stlen = nlen; + n1->stptr[nlen] = '\0'; + n1->flags &= ~(NUMCUR|NUMBER); + n1->flags |= (STRING|STRCUR); + + n2->flags &= ~PERM; + n2->flags |= MALLOC; + unref(n2); + bcfree((yyvsp[(2) - (2)])->nexti); + bcfree((yyvsp[(2) - (2)])); + (yyval) = (yyvsp[(1) - (2)]); + } else { + (yyval) = list_append(list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])), instruction(Op_concat)); + (yyval)->lasti->concat_flag = (is_simple_var ? CSVAR : 0); + (yyval)->lasti->expr_count = count; + if (count > max_args) + max_args = count; + } + } + break; case 126: -/* Line 1464 of yacc.c */ -#line 899 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (2)].nodeval), Node_postdecrement, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 1371 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 127: -/* Line 1464 of yacc.c */ -#line 901 "awkgram.y" - { - if (do_lint_old) { - warning(_("old awk does not support the keyword `in' except after `for'")); - warning(_("old awk does not support multidimensional arrays")); - } - (yyval.nodeval) = node(variable((yyvsp[(5) - (5)].sval), CAN_FREE, Node_var_array), Node_in_array, (yyvsp[(2) - (5)].nodeval)); - } +/* Line 1806 of yacc.c */ +#line 1373 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 128: -/* Line 1464 of yacc.c */ -#line 914 "awkgram.y" - { - (yyval.nodeval) = node((yyvsp[(4) - (4)].nodeval), Node_K_getline, - node((yyvsp[(1) - (4)].nodeval), (yyvsp[(2) - (4)].nodetypeval), (NODE *) NULL)); - } +/* Line 1806 of yacc.c */ +#line 1375 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 129: -/* Line 1464 of yacc.c */ -#line 919 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_exp, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1377 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 130: -/* Line 1464 of yacc.c */ -#line 921 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_times, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1379 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 131: -/* Line 1464 of yacc.c */ -#line 923 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_quotient, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1381 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 132: -/* Line 1464 of yacc.c */ -#line 925 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_mod, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1383 "awkgram.y" + { + /* + * In BEGINFILE/ENDFILE, allow `getline var < file' + */ + + if (rule == BEGINFILE || rule == ENDFILE) { + if ((yyvsp[(2) - (3)]) != NULL && (yyvsp[(3) - (3)]) != NULL) + ; /* all ok */ + else { + if ((yyvsp[(2) - (3)]) != NULL) + error_ln((yyvsp[(1) - (3)])->source_line, + _("`getline var' invalid inside `%s' rule"), ruletab[rule]); + else + error_ln((yyvsp[(1) - (3)])->source_line, + _("`getline' invalid inside `%s' rule"), ruletab[rule]); + } + } + if (do_lint && rule == END && (yyvsp[(3) - (3)]) == NULL) + lintwarn_ln((yyvsp[(1) - (3)])->source_line, + _("non-redirected `getline' undefined inside END action")); + (yyval) = mk_getline((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), redirect_input); + } break; case 133: -/* Line 1464 of yacc.c */ -#line 927 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_plus, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1406 "awkgram.y" + { + (yyvsp[(2) - (2)])->opcode = Op_postincrement; + (yyval) = mk_assignment((yyvsp[(1) - (2)]), NULL, (yyvsp[(2) - (2)])); + } break; case 134: -/* Line 1464 of yacc.c */ -#line 929 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_minus, (yyvsp[(3) - (3)].nodeval)); } +/* Line 1806 of yacc.c */ +#line 1411 "awkgram.y" + { + (yyvsp[(2) - (2)])->opcode = Op_postdecrement; + (yyval) = mk_assignment((yyvsp[(1) - (2)]), NULL, (yyvsp[(2) - (2)])); + } break; case 135: -/* Line 1464 of yacc.c */ -#line 934 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1416 "awkgram.y" + { + if (do_lint_old) { + warning_ln((yyvsp[(4) - (5)])->source_line, + _("old awk does not support the keyword `in' except after `for'")); + warning_ln((yyvsp[(4) - (5)])->source_line, + _("old awk does not support multidimensional arrays")); + } + (yyvsp[(5) - (5)])->nexti->opcode = Op_push_array; + (yyvsp[(4) - (5)])->opcode = Op_in_array; + if ((yyvsp[(2) - (5)]) == NULL) { /* error */ + errcount++; + (yyvsp[(4) - (5)])->expr_count = 0; + (yyval) = list_merge((yyvsp[(5) - (5)]), (yyvsp[(4) - (5)])); + } else { + INSTRUCTION *t = (yyvsp[(2) - (5)]); + (yyvsp[(4) - (5)])->expr_count = count_expressions(&t, FALSE); + (yyval) = list_append(list_merge(t, (yyvsp[(5) - (5)])), (yyvsp[(4) - (5)])); + } + } break; case 136: -/* Line 1464 of yacc.c */ -#line 936 "awkgram.y" - { (yyval.nodeval) = constant_fold((yyvsp[(2) - (2)].nodeval), Node_not, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 1441 "awkgram.y" + { + (yyval) = mk_getline((yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), (yyvsp[(1) - (4)]), (yyvsp[(2) - (4)])->redir_type); + bcfree((yyvsp[(2) - (4)])); + } break; case 137: -/* Line 1464 of yacc.c */ -#line 938 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(2) - (3)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1447 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 138: -/* Line 1464 of yacc.c */ -#line 941 "awkgram.y" - { (yyval.nodeval) = snode((yyvsp[(3) - (4)].nodeval), Node_builtin, (int) (yyvsp[(1) - (4)].lval)); } +/* Line 1806 of yacc.c */ +#line 1449 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 139: -/* Line 1464 of yacc.c */ -#line 943 "awkgram.y" - { (yyval.nodeval) = snode((yyvsp[(3) - (4)].nodeval), Node_builtin, (int) (yyvsp[(1) - (4)].lval)); } +/* Line 1806 of yacc.c */ +#line 1451 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } break; case 140: -/* Line 1464 of yacc.c */ -#line 945 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1453 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } + break; + + case 141: + +/* Line 1806 of yacc.c */ +#line 1455 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } + break; + + case 142: + +/* Line 1806 of yacc.c */ +#line 1457 "awkgram.y" + { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); } + break; + + case 143: + +/* Line 1806 of yacc.c */ +#line 1462 "awkgram.y" + { + (yyval) = list_create((yyvsp[(1) - (1)])); + } + break; + + case 144: + +/* Line 1806 of yacc.c */ +#line 1466 "awkgram.y" + { + if ((yyvsp[(2) - (2)])->opcode == Op_match_rec) { + (yyvsp[(2) - (2)])->opcode = Op_nomatch; + (yyvsp[(1) - (2)])->opcode = Op_push_i; + (yyvsp[(1) - (2)])->memory = mk_number(0.0, (PERM|NUMCUR|NUMBER)); + (yyval) = list_append(list_append(list_create((yyvsp[(1) - (2)])), + instruction(Op_field_spec)), (yyvsp[(2) - (2)])); + } else { + if (do_optimize > 1 && (yyvsp[(2) - (2)])->nexti == (yyvsp[(2) - (2)])->lasti + && (yyvsp[(2) - (2)])->nexti->opcode == Op_push_i + ) { + NODE *n = (yyvsp[(2) - (2)])->nexti->memory; + if ((n->flags & (STRCUR|STRING)) != 0) { + n->numbr = (AWKNUM) (n->stlen == 0); + n->flags &= ~(STRCUR|STRING); + n->flags |= (NUMCUR|NUMBER); + efree(n->stptr); + n->stptr = NULL; + n->stlen = 0; + } else + n->numbr = (AWKNUM) (n->numbr == 0.0); + bcfree((yyvsp[(1) - (2)])); + (yyval) = (yyvsp[(2) - (2)]); + } else { + (yyvsp[(1) - (2)])->opcode = Op_not; + add_lint((yyvsp[(2) - (2)]), LINT_assign_in_cond); + (yyval) = list_append((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)])); + } + } + } + break; + + case 145: + +/* Line 1806 of yacc.c */ +#line 1497 "awkgram.y" + { (yyval) = (yyvsp[(2) - (3)]); } + break; + + case 146: + +/* Line 1806 of yacc.c */ +#line 1499 "awkgram.y" + { + (yyval) = snode((yyvsp[(3) - (4)]), (yyvsp[(1) - (4)])); + if ((yyval) == NULL) + YYABORT; + } + break; + + case 147: + +/* Line 1806 of yacc.c */ +#line 1505 "awkgram.y" + { + (yyval) = snode((yyvsp[(3) - (4)]), (yyvsp[(1) - (4)])); + if ((yyval) == NULL) + YYABORT; + } + break; + + case 148: + +/* Line 1806 of yacc.c */ +#line 1511 "awkgram.y" { - static short warned1 = FALSE, warned2 = FALSE; + static short warned1 = FALSE; if (do_lint && ! warned1) { warned1 = TRUE; - lintwarn(_("call of `length' without parentheses is not portable")); - } - (yyval.nodeval) = snode((NODE *) NULL, Node_builtin, (int) (yyvsp[(1) - (1)].lval)); - if (do_posix && ! warned2) { - warned2 = TRUE; - warning(_("call of `length' without parentheses is deprecated by POSIX")); + lintwarn_ln((yyvsp[(1) - (1)])->source_line, + _("call of `length' without parentheses is not portable")); } + (yyval) = snode(NULL, (yyvsp[(1) - (1)])); + if ((yyval) == NULL) + YYABORT; } break; - case 141: + case 151: -/* Line 1464 of yacc.c */ -#line 959 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1526 "awkgram.y" { - (yyval.nodeval) = node((yyvsp[(3) - (4)].nodeval), Node_func_call, make_string((yyvsp[(1) - (4)].sval), strlen((yyvsp[(1) - (4)].sval)))); - (yyval.nodeval)->funcbody = NULL; - func_use((yyvsp[(1) - (4)].sval), FUNC_USE); - param_sanity((yyvsp[(3) - (4)].nodeval)); - free((yyvsp[(1) - (4)].sval)); + (yyvsp[(1) - (2)])->opcode = Op_preincrement; + (yyval) = mk_assignment((yyvsp[(2) - (2)]), NULL, (yyvsp[(1) - (2)])); } break; - case 143: + case 152: -/* Line 1464 of yacc.c */ -#line 968 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_preincrement, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 1531 "awkgram.y" + { + (yyvsp[(1) - (2)])->opcode = Op_predecrement; + (yyval) = mk_assignment((yyvsp[(2) - (2)]), NULL, (yyvsp[(1) - (2)])); + } break; - case 144: + case 153: -/* Line 1464 of yacc.c */ -#line 970 "awkgram.y" - { (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_predecrement, (NODE *) NULL); } +/* Line 1806 of yacc.c */ +#line 1536 "awkgram.y" + { + (yyval) = list_create((yyvsp[(1) - (1)])); + } break; - case 145: + case 154: -/* Line 1464 of yacc.c */ -#line 972 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1540 "awkgram.y" + { + (yyval) = list_create((yyvsp[(1) - (1)])); + } break; - case 146: + case 155: -/* Line 1464 of yacc.c */ -#line 974 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1544 "awkgram.y" + { + if ((yyvsp[(2) - (2)])->lasti->opcode == Op_push_i + && ((yyvsp[(2) - (2)])->lasti->memory->flags & (STRCUR|STRING)) == 0) { + (yyvsp[(2) - (2)])->lasti->memory->numbr = -(force_number((yyvsp[(2) - (2)])->lasti->memory)); + (yyval) = (yyvsp[(2) - (2)]); + bcfree((yyvsp[(1) - (2)])); + } else { + (yyvsp[(1) - (2)])->opcode = Op_unary_minus; + (yyval) = list_append((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)])); + } + } break; - case 147: + case 156: + +/* Line 1806 of yacc.c */ +#line 1556 "awkgram.y" + { + /* + * was: $$ = $2 + * POSIX semantics: force a conversion to numeric type + */ + (yyvsp[(1) - (2)])->opcode = Op_plus_i; + (yyvsp[(1) - (2)])->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + (yyval) = list_append((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)])); + } + break; + + case 157: + +/* Line 1806 of yacc.c */ +#line 1569 "awkgram.y" + { + func_use((yyvsp[(1) - (1)])->lasti->func_name, FUNC_USE); + (yyval) = (yyvsp[(1) - (1)]); + } + break; -/* Line 1464 of yacc.c */ -#line 977 "awkgram.y" + case 158: + +/* Line 1806 of yacc.c */ +#line 1574 "awkgram.y" { - if ((yyvsp[(2) - (2)].nodeval)->type == Node_val && ((yyvsp[(2) - (2)].nodeval)->flags & (STRCUR|STRING)) == 0) { - (yyvsp[(2) - (2)].nodeval)->numbr = -(force_number((yyvsp[(2) - (2)].nodeval))); - (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval); - } else - (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_unary_minus, (NODE *) NULL); + /* indirect function call */ + INSTRUCTION *f, *t; + char *name; + NODE *indirect_var; + static short warned = FALSE; + const char *msg = _("indirect function calls are a gawk extension"); + + if (do_traditional || do_posix) + yyerror("%s", msg); + else if (do_lint && ! warned) { + warned = TRUE; + lintwarn("%s", msg); } + + f = (yyvsp[(2) - (2)])->lasti; + f->opcode = Op_indirect_func_call; + name = estrdup(f->func_name, strlen(f->func_name)); + if (is_std_var(name)) + yyerror(_("can not use special variable `%s' for indirect function call"), name); + indirect_var = variable(name, Node_var_new); + t = instruction(Op_push); + t->memory = indirect_var; + + /* prepend indirect var instead of appending to arguments (opt_expression_list), + * and pop it off in setup_frame (eval.c) (left to right evaluation order); Test case: + * f = "fun" + * @f(f="real_fun") + */ + + (yyval) = list_prepend((yyvsp[(2) - (2)]), t); + } break; - case 148: + case 159: -/* Line 1464 of yacc.c */ -#line 985 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1610 "awkgram.y" { - /* - * was: $$ = $2 - * POSIX semantics: force a conversion to numeric type - */ - (yyval.nodeval) = node (make_number(0.0), Node_plus, (yyvsp[(2) - (2)].nodeval)); + param_sanity((yyvsp[(3) - (4)])); + (yyvsp[(1) - (4)])->opcode = Op_func_call; + (yyvsp[(1) - (4)])->func_body = NULL; + if ((yyvsp[(3) - (4)]) == NULL) { /* no argument or error */ + ((yyvsp[(1) - (4)]) + 1)->expr_count = 0; + (yyval) = list_create((yyvsp[(1) - (4)])); + } else { + INSTRUCTION *t = (yyvsp[(3) - (4)]); + ((yyvsp[(1) - (4)]) + 1)->expr_count = count_expressions(&t, TRUE); + (yyval) = list_append(t, (yyvsp[(1) - (4)])); } + } break; - case 149: + case 160: -/* Line 1464 of yacc.c */ -#line 996 "awkgram.y" - { (yyval.nodeval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1627 "awkgram.y" + { (yyval) = NULL; } break; - case 150: + case 161: -/* Line 1464 of yacc.c */ -#line 998 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1629 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } break; - case 151: + case 162: -/* Line 1464 of yacc.c */ -#line 1003 "awkgram.y" - { (yyval.nodeval) = variable((yyvsp[(1) - (1)].sval), CAN_FREE, Node_var_new); } +/* Line 1806 of yacc.c */ +#line 1634 "awkgram.y" + { (yyval) = NULL; } break; - case 152: + case 163: + +/* Line 1806 of yacc.c */ +#line 1636 "awkgram.y" + { (yyval) = (yyvsp[(1) - (2)]); } + break; + + case 164: + +/* Line 1806 of yacc.c */ +#line 1641 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 165: + +/* Line 1806 of yacc.c */ +#line 1643 "awkgram.y" + { + (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); + } + break; + + case 166: + +/* Line 1806 of yacc.c */ +#line 1650 "awkgram.y" + { + INSTRUCTION *ip = (yyvsp[(1) - (1)])->lasti; + int count = ip->sub_count; /* # of SUBSEP-seperated expressions */ + if (count > 1) { + /* change Op_subscript or Op_sub_array to Op_concat */ + ip->opcode = Op_concat; + ip->concat_flag = CSUBSEP; + ip->expr_count = count; + } else + ip->opcode = Op_no_op; + sub_counter++; /* count # of dimensions */ + (yyval) = (yyvsp[(1) - (1)]); + } + break; + + case 167: + +/* Line 1806 of yacc.c */ +#line 1667 "awkgram.y" + { + INSTRUCTION *t = (yyvsp[(2) - (3)]); + if ((yyvsp[(2) - (3)]) == NULL) { + error_ln((yyvsp[(3) - (3)])->source_line, + _("invalid subscript expression")); + /* install Null string as subscript. */ + t = list_create(instruction(Op_push_i)); + t->nexti->memory = Nnull_string; + (yyvsp[(3) - (3)])->sub_count = 1; + } else + (yyvsp[(3) - (3)])->sub_count = count_expressions(&t, FALSE); + (yyval) = list_append(t, (yyvsp[(3) - (3)])); + } + break; + + case 168: + +/* Line 1806 of yacc.c */ +#line 1684 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 169: + +/* Line 1806 of yacc.c */ +#line 1686 "awkgram.y" + { + (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); + } + break; + + case 170: + +/* Line 1806 of yacc.c */ +#line 1693 "awkgram.y" + { (yyval) = (yyvsp[(1) - (2)]); } + break; + + case 171: + +/* Line 1806 of yacc.c */ +#line 1698 "awkgram.y" + { + char *var_name = (yyvsp[(1) - (1)])->lextok; + + (yyvsp[(1) - (1)])->opcode = Op_push; + (yyvsp[(1) - (1)])->memory = variable(var_name, Node_var_new); + (yyval) = list_create((yyvsp[(1) - (1)])); + } + break; -/* Line 1464 of yacc.c */ -#line 1005 "awkgram.y" + case 172: + +/* Line 1806 of yacc.c */ +#line 1706 "awkgram.y" { NODE *n; - if ((n = lookup((yyvsp[(1) - (4)].sval))) != NULL && ! isarray(n)) { + char *arr = (yyvsp[(1) - (2)])->lextok; + if ((n = lookup(arr)) != NULL && ! isarray(n)) yyerror(_("use of non-array as array")); - (yyval.nodeval) = node(variable((yyvsp[(1) - (4)].sval), CAN_FREE, Node_var_array), Node_subscript, (yyvsp[(3) - (4)].nodeval)); - } else if ((yyvsp[(3) - (4)].nodeval) == NULL) { - fatal(_("invalid subscript expression")); - } else if ((yyvsp[(3) - (4)].nodeval)->rnode == NULL) { - (yyval.nodeval) = node(variable((yyvsp[(1) - (4)].sval), CAN_FREE, Node_var_array), Node_subscript, (yyvsp[(3) - (4)].nodeval)->lnode); - freenode((yyvsp[(3) - (4)].nodeval)); - } else - (yyval.nodeval) = node(variable((yyvsp[(1) - (4)].sval), CAN_FREE, Node_var_array), Node_subscript, (yyvsp[(3) - (4)].nodeval)); + (yyvsp[(1) - (2)])->memory = variable(arr, Node_var_new); + (yyvsp[(1) - (2)])->opcode = Op_push_array; + (yyval) = list_prepend((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)])); } break; - case 153: + case 173: -/* Line 1464 of yacc.c */ -#line 1019 "awkgram.y" - { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); } +/* Line 1806 of yacc.c */ +#line 1720 "awkgram.y" + { + INSTRUCTION *ip = (yyvsp[(1) - (1)])->nexti; + if (ip->opcode == Op_push + && ip->memory->type == Node_var + && ip->memory->var_update + ) { + (yyval) = list_prepend((yyvsp[(1) - (1)]), instruction(Op_var_update)); + (yyval)->nexti->update_var = ip->memory->var_update; + } else + (yyval) = (yyvsp[(1) - (1)]); + } break; - case 154: + case 174: -/* Line 1464 of yacc.c */ -#line 1030 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1732 "awkgram.y" { - NODE *n = node((yyvsp[(2) - (3)].nodeval), Node_field_spec, (NODE *) NULL); - if ((yyvsp[(3) - (3)].sval) != NULL) { - if ((yyvsp[(3) - (3)].sval)[0] == '+') - (yyval.nodeval) = node(n, Node_postincrement, (NODE *) NULL); - else - (yyval.nodeval) = node(n, Node_postdecrement, (NODE *) NULL); - } else { - (yyval.nodeval) = n; - } + (yyval) = list_append((yyvsp[(2) - (3)]), (yyvsp[(1) - (3)])); + if ((yyvsp[(3) - (3)]) != NULL) + mk_assignment((yyvsp[(2) - (3)]), NULL, (yyvsp[(3) - (3)])); } break; - case 155: + case 175: -/* Line 1464 of yacc.c */ -#line 1044 "awkgram.y" - { (yyval.sval) = "+"; } +/* Line 1806 of yacc.c */ +#line 1741 "awkgram.y" + { + (yyvsp[(1) - (1)])->opcode = Op_postincrement; + } break; - case 156: + case 176: -/* Line 1464 of yacc.c */ -#line 1045 "awkgram.y" - { (yyval.sval) = "-"; } +/* Line 1806 of yacc.c */ +#line 1745 "awkgram.y" + { + (yyvsp[(1) - (1)])->opcode = Op_postdecrement; + } break; - case 157: + case 177: -/* Line 1464 of yacc.c */ -#line 1046 "awkgram.y" - { (yyval.sval) = NULL; } +/* Line 1806 of yacc.c */ +#line 1748 "awkgram.y" + { (yyval) = NULL; } break; - case 159: + case 179: -/* Line 1464 of yacc.c */ -#line 1054 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1756 "awkgram.y" { yyerrok; } break; - case 160: + case 180: -/* Line 1464 of yacc.c */ -#line 1058 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1760 "awkgram.y" { yyerrok; } break; - case 163: + case 183: -/* Line 1464 of yacc.c */ -#line 1067 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1769 "awkgram.y" { yyerrok; } break; - case 164: + case 184: -/* Line 1464 of yacc.c */ -#line 1071 "awkgram.y" - { yyerrok; } +/* Line 1806 of yacc.c */ +#line 1773 "awkgram.y" + { (yyval) = (yyvsp[(1) - (1)]); yyerrok; } break; - case 165: + case 185: -/* Line 1464 of yacc.c */ -#line 1074 "awkgram.y" +/* Line 1806 of yacc.c */ +#line 1777 "awkgram.y" { yyerrok; } break; -/* Line 1464 of yacc.c */ -#line 3392 "awkgram.c" +/* Line 1806 of yacc.c */ +#line 4250 "awkgram.c" default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -3418,6 +4275,10 @@ | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -3425,37 +4286,36 @@ #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -3514,7 +4374,7 @@ for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) + if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -3573,8 +4433,13 @@ yyreturn: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -3599,15 +4464,15 @@ -/* Line 1684 of yacc.c */ -#line 1077 "awkgram.y" +/* Line 2067 of yacc.c */ +#line 1779 "awkgram.y" struct token { - const char *operator; /* text to match */ - NODETYPE value; /* node type */ - int class; /* lexical class */ - unsigned flags; /* # of args. allowed and compatability */ + const char *operator; /* text to match */ + OPCODE value; /* type */ + int class; /* lexical class */ + unsigned flags; /* # of args. allowed and compatability */ # define ARGS 0xFF /* 0, 1, 2, 3 args allowed (any combination */ # define A(n) (1<<(n)) # define VERSION_MASK 0xFF00 /* old awk is zero */ @@ -3615,14 +4480,17 @@ # define NOT_POSIX 0x0200 /* feature not in POSIX */ # define GAWKX 0x0400 /* gawk extension */ # define RESX 0x0800 /* Bell Labs Research extension */ - NODE *(*ptr) P((NODE *)); /* function that implements this keyword */ +# define BREAK 0x1000 /* break allowed inside */ +# define CONTINUE 0x2000 /* continue allowed inside */ + + NODE *(*ptr)(int); /* function that implements this keyword */ }; #if 'a' == 0x81 /* it's EBCDIC */ /* tokcompare --- lexicographically compare token names for sorting */ static int -tokcompare(void *l, void *r) +tokcompare(const void *l, const void *r) { struct token *lhs, *rhs; @@ -3640,83 +4508,83 @@ */ static const struct token tokentab[] = { -{"BEGIN", Node_illegal, LEX_BEGIN, 0, 0}, -{"END", Node_illegal, LEX_END, 0, 0}, +{"BEGIN", Op_rule, LEX_BEGIN, 0, 0}, +{"BEGINFILE", Op_rule, LEX_BEGINFILE, GAWKX, 0}, +{"END", Op_rule, LEX_END, 0, 0}, +{"ENDFILE", Op_rule, LEX_ENDFILE, GAWKX, 0}, #ifdef ARRAYDEBUG -{"adump", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, +{"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, #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}, -#ifdef ALLOW_SWITCH -{"case", Node_K_case, LEX_CASE, GAWKX, 0}, -#endif -{"close", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close}, -{"compl", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl}, -{"continue", Node_K_continue, LEX_CONTINUE, 0, 0}, -{"cos", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos}, -{"dcgettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext}, -{"dcngettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext}, -#ifdef ALLOW_SWITCH -{"default", Node_K_default, LEX_DEFAULT, GAWKX, 0}, -#endif -{"delete", Node_K_delete, LEX_DELETE, NOT_OLD, 0}, -{"do", Node_K_do, LEX_DO, NOT_OLD, 0}, -{"else", Node_illegal, LEX_ELSE, 0, 0}, -{"exit", Node_K_exit, LEX_EXIT, 0, 0}, -{"exp", Node_builtin, LEX_BUILTIN, A(1), do_exp}, -{"extension", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext}, -{"fflush", Node_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush}, -{"for", Node_K_for, LEX_FOR, 0, 0}, -{"func", Node_K_function, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0}, -{"function", Node_K_function, LEX_FUNCTION, NOT_OLD, 0}, -{"gensub", Node_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), do_gensub}, -{"getline", Node_K_getline, LEX_GETLINE, NOT_OLD, 0}, -{"gsub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_gsub}, -{"if", Node_K_if, LEX_IF, 0, 0}, -{"in", Node_illegal, LEX_IN, 0, 0}, -{"index", Node_builtin, LEX_BUILTIN, A(2), do_index}, -{"int", Node_builtin, LEX_BUILTIN, A(1), do_int}, -{"length", Node_builtin, LEX_LENGTH, A(0)|A(1), do_length}, -{"log", Node_builtin, LEX_BUILTIN, A(1), do_log}, -{"lshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift}, -{"match", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match}, -{"mktime", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime}, -{"next", Node_K_next, LEX_NEXT, 0, 0}, -{"nextfile", Node_K_nextfile, LEX_NEXTFILE, GAWKX, 0}, -{"or", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_or}, -{"print", Node_K_print, LEX_PRINT, 0, 0}, -{"printf", Node_K_printf, LEX_PRINTF, 0, 0}, -{"rand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand}, -{"return", Node_K_return, LEX_RETURN, NOT_OLD, 0}, -{"rshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift}, -{"sin", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin}, -{"split", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_split}, -{"sprintf", Node_builtin, LEX_BUILTIN, 0, do_sprintf}, -{"sqrt", Node_builtin, LEX_BUILTIN, A(1), do_sqrt}, -{"srand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand}, +{"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and}, +{"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asort}, +{"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asorti}, +{"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2}, +{"bindtextdomain", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain}, +{"break", Op_K_break, LEX_BREAK, 0, 0}, +{"case", Op_K_case, LEX_CASE, GAWKX, 0}, +{"close", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close}, +{"compl", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl}, +{"continue", Op_K_continue, LEX_CONTINUE, 0, 0}, +{"cos", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos}, +{"dcgettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext}, +{"dcngettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext}, +{"default", Op_K_default, LEX_DEFAULT, GAWKX, 0}, +{"delete", Op_K_delete, LEX_DELETE, NOT_OLD, 0}, +{"do", Op_K_do, LEX_DO, NOT_OLD|BREAK|CONTINUE, 0}, +{"else", Op_K_else, LEX_ELSE, 0, 0}, +{"eval", Op_symbol, LEX_EVAL, 0, 0}, +{"exit", Op_K_exit, LEX_EXIT, 0, 0}, +{"exp", Op_builtin, LEX_BUILTIN, A(1), do_exp}, +{"extension", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext}, +{"fflush", Op_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush}, +{"for", Op_K_for, LEX_FOR, BREAK|CONTINUE, 0}, +{"func", Op_func, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0}, +{"function",Op_func, LEX_FUNCTION, NOT_OLD, 0}, +{"gensub", Op_sub_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), 0}, +{"getline", Op_K_getline_redir, LEX_GETLINE, NOT_OLD, 0}, +{"gsub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0}, +{"if", Op_K_if, LEX_IF, 0, 0}, +{"in", Op_symbol, LEX_IN, 0, 0}, +{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0}, +{"index", Op_builtin, LEX_BUILTIN, A(2), do_index}, +{"int", Op_builtin, LEX_BUILTIN, A(1), do_int}, +{"isarray", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_isarray}, +{"length", Op_builtin, LEX_LENGTH, A(0)|A(1), do_length}, +{"log", Op_builtin, LEX_BUILTIN, A(1), do_log}, +{"lshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift}, +{"match", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match}, +{"mktime", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime}, +{"next", Op_K_next, LEX_NEXT, 0, 0}, +{"nextfile", Op_K_nextfile, LEX_NEXTFILE, GAWKX, 0}, +{"or", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_or}, +{"patsplit", Op_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit}, +{"print", Op_K_print, LEX_PRINT, 0, 0}, +{"printf", Op_K_printf, LEX_PRINTF, 0, 0}, +{"rand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand}, +{"return", Op_K_return, LEX_RETURN, NOT_OLD, 0}, +{"rshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift}, +{"sin", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin}, +{"split", Op_builtin, LEX_BUILTIN, A(2)|A(3)|A(4), do_split}, +{"sprintf", Op_builtin, LEX_BUILTIN, 0, do_sprintf}, +{"sqrt", Op_builtin, LEX_BUILTIN, A(1), do_sqrt}, +{"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand}, #if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */ -{"stopme", Node_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, +{"stopme", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, #endif -{"strftime", Node_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime}, -{"strtonum", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum}, -{"sub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub}, -{"substr", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_substr}, -#ifdef ALLOW_SWITCH -{"switch", Node_K_switch, LEX_SWITCH, GAWKX, 0}, -#endif -{"system", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system}, -{"systime", Node_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime}, -{"tolower", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower}, -{"toupper", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper}, -{"while", Node_K_while, LEX_WHILE, 0, 0}, -{"xor", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor}, +{"strftime", Op_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime}, +{"strtonum", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum}, +{"sub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0}, +{"substr", Op_builtin, LEX_BUILTIN, A(2)|A(3), do_substr}, +{"switch", Op_K_switch, LEX_SWITCH, GAWKX|BREAK, 0}, +{"system", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system}, +{"systime", Op_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime}, +{"tolower", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower}, +{"toupper", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper}, +{"while", Op_K_while, LEX_WHILE, BREAK|CONTINUE, 0}, +{"xor", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor}, }; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT /* Variable containing the current shift state. */ static mbstate_t cur_mbstate; /* Ring buffer containing current characters. */ @@ -3736,9 +4604,9 @@ /* getfname --- return name of a builtin function (for pretty printing) */ const char * -getfname(register NODE *(*fptr)(NODE *)) +getfname(NODE *(*fptr)(int)) { - register int i, j; + int i, j; j = sizeof(tokentab) / sizeof(tokentab[0]); /* linear search, no other way to do it */ @@ -3749,31 +4617,112 @@ return NULL; } -/* yyerror --- print a syntax error message, show where */ +/* print_included_from --- print `Included from ..' file names and locations */ -/* - * Function identifier purposely indented to avoid mangling - * by ansi2knr. Sigh. - */ +static void +print_included_from() +{ + int saveline, line; + SRCFILE *s; + + /* suppress current file name, line # from `.. included from ..' msgs */ + saveline = sourceline; + sourceline = 0; + + for (s = sourcefile; s != NULL && s->stype == SRC_INC; ) { + s = s->next; + if (s == NULL || s->fd <= INVALID_HANDLE) + continue; + line = s->srclines; + + /* if last token is NEWLINE, line number is off by 1. */ + if (s->lasttok == NEWLINE) + line--; + msg("%s %s:%d%c", + s->prev == sourcefile ? "In file included from" + : " from", + (s->stype == SRC_INC || + s->stype == SRC_FILE) ? s->src : "cmd. line", + line, + s->stype == SRC_INC ? ',' : ':' + ); + } + sourceline = saveline; +} + +/* warning_ln --- print a warning message with location */ static void -#ifdef CAN_USE_STDARG_H - yyerror(const char *m, ...) -#else -/* VARARGS0 */ - yyerror(va_alist) - va_dcl -#endif +warning_ln(int line, const char *mesg, ...) +{ + va_list args; + int saveline; + + saveline = sourceline; + sourceline = line; + print_included_from(); + va_start(args, mesg); + err(_("warning: "), mesg, args); + va_end(args); + sourceline = saveline; +} + +/* lintwarn_ln --- print a lint warning and location */ + +static void +lintwarn_ln(int line, const char *mesg, ...) +{ + va_list args; + int saveline; + + saveline = sourceline; + sourceline = line; + print_included_from(); + va_start(args, mesg); + if (lintfunc == r_fatal) + err(_("fatal: "), mesg, args); + else + err(_("warning: "), mesg, args); + va_end(args); + sourceline = saveline; + if (lintfunc == r_fatal) + gawk_exit(EXIT_FATAL); +} + +/* error_ln --- print an error message and location */ + +static void +error_ln(int line, const char *m, ...) +{ + va_list args; + int saveline; + + saveline = sourceline; + sourceline = line; + print_included_from(); + errcount++; + va_start(args, m); + err("error: ", m, args); + va_end(args); + sourceline = saveline; +} + +/* yyerror --- print a syntax error message, show where */ + +static void +yyerror(const char *m, ...) { va_list args; const char *mesg = NULL; - register char *bp, *cp; + char *bp, *cp; char *scan; char *buf; int count; static char end_of_file_line[] = "(END OF FILE)"; char save; + print_included_from(); + errcount++; /* Find the current line in the input file */ if (lexptr && lexeme) { @@ -3811,16 +4760,10 @@ msg("%.*s", (int) (bp - thisline), thisline); *bp = save; - -#ifdef CAN_USE_STDARG_H va_start(args, m); if (mesg == NULL) mesg = m; -#else - va_start(args); - if (mesg == NULL) - mesg = va_arg(args, char *); -#endif + count = (bp - thisline) + strlen(mesg) + 2 + 1; emalloc(buf, char *, count, "yyerror"); @@ -3839,125 +4782,462 @@ strcpy(bp, mesg); err("", buf, args); va_end(args); - free(buf); + efree(buf); } -/* get_src_buf --- read the next buffer of source program */ +/* mk_program --- create a single list of instructions */ -static char * -get_src_buf() +static INSTRUCTION * +mk_program() { - static int samefile = FALSE; - static int nextfile = 0; - static char *buf = NULL; - static size_t buflen = 0; - static int fd; + INSTRUCTION *cp, *tmp; - /* - * No argument prototype on readfunc on purpose, - * avoids problems with some ancient systems where - * the types of arguments to read() aren't up to date. - */ - static ssize_t (*readfunc)() = 0; - static int (*closefunc)P((int fd)) = NULL; +#define begin_block rule_block[BEGIN] +#define end_block rule_block[END] +#define prog_block rule_block[Rule] +#define beginfile_block rule_block[BEGINFILE] +#define endfile_block rule_block[ENDFILE] - int n; - register char *scan; - int newfile; + if (end_block == NULL) + end_block = list_create(ip_end); + else + (void) list_prepend(end_block, ip_end); + + if (! in_main_context()) { + if (begin_block != NULL && prog_block != NULL) + cp = list_merge(begin_block, prog_block); + else + cp = (begin_block != NULL) ? begin_block : prog_block; + + if (cp != NULL) + (void) list_merge(cp, end_block); + else + cp = end_block; + + (void) list_append(cp, instruction(Op_stop)); + goto out; + } + + if (endfile_block == NULL) + endfile_block = list_create(ip_endfile); + else { + ip_rec->has_endfile = TRUE; + (void) list_prepend(endfile_block, ip_endfile); + } + + if (beginfile_block == NULL) + beginfile_block = list_create(ip_beginfile); + else + (void) list_prepend(beginfile_block, ip_beginfile); + + if (prog_block == NULL) { + if (end_block->nexti == end_block->lasti + && beginfile_block->nexti == beginfile_block->lasti + && endfile_block->nexti == endfile_block->lasti + ) { + /* no pattern-action and (real) end, beginfile or endfile blocks */ + bcfree(ip_rec); + bcfree(ip_newfile); + ip_rec = ip_newfile = NULL; + + list_append(beginfile_block, instruction(Op_after_beginfile)); + (void) list_append(endfile_block, instruction(Op_after_endfile)); + + if (begin_block == NULL) /* no program at all */ + cp = end_block; + else + cp = list_merge(begin_block, end_block); + (void) list_append(cp, ip_atexit); + (void) list_append(cp, instruction(Op_stop)); + + /* append beginfile_block and endfile_block for sole use + * in getline without redirection (Op_K_getline). + */ + + (void) list_merge(cp, beginfile_block); + (void) list_merge(cp, endfile_block); + + goto out; + + } else { + /* install a do-nothing prog block */ + prog_block = list_create(instruction(Op_no_op)); + } + } + + (void) list_append(endfile_block, instruction(Op_after_endfile)); + (void) list_prepend(prog_block, ip_rec); + (void) list_append(prog_block, instruction(Op_jmp)); + prog_block->lasti->target_jmp = ip_rec; + + list_append(beginfile_block, instruction(Op_after_beginfile)); + + cp = list_merge(beginfile_block, prog_block); + (void) list_prepend(cp, ip_newfile); + (void) list_merge(cp, endfile_block); + (void) list_merge(cp, end_block); + if (begin_block != NULL) + cp = list_merge(begin_block, cp); + + (void) list_append(cp, ip_atexit); + (void) list_append(cp, instruction(Op_stop)); + +out: + /* delete the Op_list, not needed */ + tmp = cp->nexti; + bcfree(cp); + return tmp; + +#undef begin_block +#undef end_block +#undef prog_block +#undef beginfile_block +#undef endfile_block +} + +/* parse_program --- read in the program and convert into a list of instructions */ + +int +parse_program(INSTRUCTION **pcode) +{ + int ret; + + /* pre-create non-local jump targets + * ip_end (Op_no_op) -- used as jump target for `exit' + * outside an END block. + */ + ip_end = instruction(Op_no_op); + + if (! in_main_context()) + ip_newfile = ip_rec = ip_atexit = ip_beginfile = ip_endfile = NULL; + else { + ip_endfile = instruction(Op_no_op); + ip_beginfile = instruction(Op_no_op); + ip_rec = instruction(Op_get_record); /* target for `next', also ip_newfile */ + ip_newfile = bcalloc(Op_newfile, 2, 0); /* target for `nextfile' */ + ip_newfile->target_jmp = ip_end; + ip_newfile->target_endfile = ip_endfile; + (ip_newfile + 1)->target_get_record = ip_rec; + ip_rec->target_newfile = ip_newfile; + ip_atexit = instruction(Op_atexit); /* target for `exit' in END block */ + } + + sourcefile = srcfiles->next; + lexeof = FALSE; + lexptr = NULL; + lasttok = 0; + memset(rule_block, 0, sizeof(ruletab) * sizeof(INSTRUCTION *)); + errcount = 0; + tok = tokstart != NULL ? tokstart : tokexpand(); + + ret = yyparse(); + *pcode = mk_program(); + + /* avoid false source indications */ + source = NULL; + sourceline = 0; + if (ret == 0) /* avoid spurious warning if parser aborted with YYABORT */ + check_funcs(); + + return (ret || errcount); +} + +/* do_add_srcfile --- add one item to srcfiles */ + +static SRCFILE * +do_add_srcfile(int stype, char *src, char *path, SRCFILE *thisfile) +{ + SRCFILE *s; + + emalloc(s, SRCFILE *, sizeof(SRCFILE), "do_add_srcfile"); + memset(s, 0, sizeof(SRCFILE)); + s->src = estrdup(src, strlen(src)); + s->fullpath = path; + s->stype = stype; + s->fd = INVALID_HANDLE; + s->next = thisfile; + s->prev = thisfile->prev; + thisfile->prev->next = s; + thisfile->prev = s; + return s; +} + +/* add_srcfile --- add one item to srcfiles after checking if + * a source file exists and not already in list. + */ + +SRCFILE * +add_srcfile(int stype, char *src, SRCFILE *thisfile, int *already_included, int *errcode) +{ + SRCFILE *s; struct stat sbuf; - int readcount = 0; - int l; - char *readloc; + char *path; + int errno_val = 0; - if (readfunc == NULL) { + if (already_included) + *already_included = FALSE; + if (errcode) + *errcode = 0; + if (stype == SRC_CMDLINE || stype == SRC_STDIN) + return do_add_srcfile(stype, src, NULL, thisfile); + + path = find_source(src, &sbuf, &errno_val); + if (path == NULL) { + if (errcode) { + *errcode = errno_val; + return NULL; + } + fatal(_("can't open source file `%s' for reading (%s)"), + src, errno_val ? strerror(errno_val) : _("reason unknown")); + } + + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC) + && files_are_same(path, s) + ) { + if (do_lint) { + int line = sourceline; + /* Kludge: the line number may be off for `@include file'. + * Since, this function is also used for '-f file' in main.c, + * sourceline > 1 check ensures that the call is at + * parse time. + */ + if (sourceline > 1 && lasttok == NEWLINE) + line--; + lintwarn_ln(line, _("already included source file `%s'"), src); + } + efree(path); + if (already_included) + *already_included = TRUE; + return NULL; + } + } + + s = do_add_srcfile(stype, src, path, thisfile); + s->sbuf = sbuf; + s->mtime = sbuf.st_mtime; + return s; +} + +/* include_source --- read program from source included using `@include' */ + +static int +include_source(INSTRUCTION *file) +{ + SRCFILE *s; + char *src = file->lextok; + int errcode; + int already_included; + + if (do_traditional || do_posix) { + error_ln(file->source_line, _("@include is a gawk extension")); + return -1; + } + + if (strlen(src) == 0) { + if (do_lint) + lintwarn_ln(file->source_line, _("empty filename after @include")); + return 0; + } + + s = add_srcfile(SRC_INC, src, sourcefile, &already_included, &errcode); + if (s == NULL) { + if (already_included) + return 0; + error_ln(file->source_line, + _("can't open source file `%s' for reading (%s)"), + src, errcode ? strerror(errcode) : _("reason unknown")); + return -1; + } + + /* save scanner state for the current sourcefile */ + sourcefile->srclines = sourceline; + sourcefile->lexptr = lexptr; + sourcefile->lexend = lexend; + sourcefile->lexptr_begin = lexptr_begin; + sourcefile->lexeme = lexeme; + sourcefile->lasttok = lasttok; + + /* included file becomes the current source */ + sourcefile = s; + lexptr = NULL; + sourceline = 0; + source = NULL; + lasttok = 0; + lexeof = FALSE; + eof_warned = FALSE; + return 0; +} + +/* next_sourcefile --- read program from the next source in srcfiles */ + +static void +next_sourcefile() +{ + static int (*closefunc)(int fd) = NULL; + + if (closefunc == NULL) { char *cp = getenv("AWKREADFUNC"); /* If necessary, one day, test value for different functions. */ - if (cp == NULL) { - readfunc = read; + if (cp == NULL) closefunc = close; - } else { - readfunc = read_one_line; + else closefunc = one_line_close; - } } -again: - newfile = FALSE; - if (nextfile > numfiles) - return NULL; + /* + * This won't be true if there's an invalid character in + * the source file or source string (e.g., user typo). + * Previous versions of gawk did not core dump in such a + * case. + * + * assert(lexeof == TRUE); + */ + lexeof = FALSE; + eof_warned = FALSE; + sourcefile->srclines = sourceline; /* total no of lines in current file */ + if (sourcefile->fd > INVALID_HANDLE) { + if (sourcefile->fd != fileno(stdin)) /* safety */ + (*closefunc)(sourcefile->fd); + sourcefile->fd = INVALID_HANDLE; + } + if (sourcefile->buf != NULL) { + efree(sourcefile->buf); + sourcefile->buf = NULL; + sourcefile->lexptr_begin = NULL; + } + + sourcefile = sourcefile->next; + if (sourcefile == srcfiles) + return; + + if (sourcefile->lexptr_begin != NULL) { + /* resume reading from already opened file (postponed to process '@include') */ + lexptr = sourcefile->lexptr; + lexend = sourcefile->lexend; + lasttok = sourcefile->lasttok; + lexptr_begin = sourcefile->lexptr_begin; + lexeme = sourcefile->lexeme; + sourceline = sourcefile->srclines; + source = sourcefile->src; + } else { + lexptr = NULL; + sourceline = 0; + source = NULL; + lasttok = 0; + } +} + +/* get_src_buf --- read the next buffer of source program */ + +static char * +get_src_buf() +{ + int n; + char *scan; + int newfile; + int savelen; + struct stat sbuf; + + /* + * No argument prototype on readfunc on purpose, + * avoids problems with some ancient systems where + * the types of arguments to read() aren't up to date. + */ + static ssize_t (*readfunc)() = 0; + + if (readfunc == NULL) { + char *cp = getenv("AWKREADFUNC"); - if (srcfiles[nextfile].stype == CMDLINE) { - if ((l = strlen(srcfiles[nextfile].val)) == 0) { + /* If necessary, one day, test value for different functions. */ + if (cp == NULL) /* - * Yet Another Special case: - * gawk '' /path/name - * Sigh. + * cast is to remove warnings on systems with + * different return types for read. */ - static short warned = FALSE; + readfunc = ( ssize_t(*)() ) read; + else + readfunc = read_one_line; + } - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("empty program text on command line")); - } - ++nextfile; - goto again; - } - if (srcfiles[nextfile].val[l-1] == '\n') { - /* has terminating newline, can use it directly */ - sourceline = 1; - source = NULL; - lexptr = lexptr_begin = srcfiles[nextfile].val; - /* fall through to pointer adjustment and return, below */ - } else { - /* copy it into static buffer */ + newfile = FALSE; + if (sourcefile == srcfiles) + return NULL; - /* make sure buffer exists and has room */ - if (buflen == 0) { - emalloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } else if (l+2 > buflen) { - erealloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } /* else - buffer has room, just use it */ + if (sourcefile->stype == SRC_CMDLINE) { + if (sourcefile->bufsize == 0) { + sourcefile->bufsize = strlen(sourcefile->src); + lexptr = lexptr_begin = lexeme = sourcefile->src; + lexend = lexptr + sourcefile->bufsize; + sourceline = 1; + if (sourcefile->bufsize == 0) { + /* + * Yet Another Special case: + * gawk '' /path/name + * Sigh. + */ + static short warned = FALSE; - /* copy in data */ - memcpy(buf, srcfiles[nextfile].val, l); - buf[l] = '\n'; - buf[++l] = '\0'; + if (do_lint && ! warned) { + warned = TRUE; + lintwarn(_("empty program text on command line")); + } + lexeof = TRUE; + } + } else if (sourcefile->buf == NULL && *(lexptr-1) != '\n') { + /* + * The following goop is to ensure that the source + * ends with a newline and that the entire current + * line is available for error messages. + */ + int offset; + char *buf; - /* set vars and return */ - sourceline = 0; - source = NULL; - lexptr = lexptr_begin = buf; - } - lexend = lexptr + l; - nextfile++; /* for next entry to this routine */ + offset = lexptr - lexeme; + for (scan = lexeme; scan > lexptr_begin; scan--) + if (*scan == '\n') { + scan++; + break; + } + savelen = lexptr - scan; + emalloc(buf, char *, savelen + 1, "get_src_buf"); + memcpy(buf, scan, savelen); + thisline = buf; + lexptr = buf + savelen; + *lexptr = '\n'; + lexeme = lexptr - offset; + lexptr_begin = buf; + lexend = lexptr + 1; + sourcefile->buf = buf; + } else + lexeof = TRUE; return lexptr; } - if (! samefile) { - source = srcfiles[nextfile].val; - if (source == NULL) { /* read all the source files, all done */ - if (buf != NULL) { - free(buf); - buf = NULL; - } - buflen = 0; - return lexeme = lexptr = lexptr_begin = NULL; - } - fd = pathopen(source); + if (sourcefile->fd <= INVALID_HANDLE) { + int fd; + int l; + + source = sourcefile->src; + if (source == NULL) + return NULL; + fd = srcopen(sourcefile); if (fd <= INVALID_HANDLE) { char *in; /* suppress file name and line no. in error mesg */ in = source; source = NULL; - fatal(_("can't open source file `%s' for reading (%s)"), + error(_("can't open source file `%s' for reading (%s)"), in, strerror(errno)); + errcount++; + lexeof = TRUE; + return sourcefile->src; } - l = optimal_bufsize(fd, & sbuf); + + sourcefile->fd = fd; + l = optimal_bufsize(fd, &sbuf); /* * Make sure that something silly like * AWKBUFSIZE=8 make check @@ -3967,110 +5247,72 @@ if (l < A_DECENT_BUFFER_SIZE) l = A_DECENT_BUFFER_SIZE; #undef A_DECENT_BUFFER_SIZE - + sourcefile->bufsize = l; newfile = TRUE; - - /* make sure buffer exists and has room */ - if (buflen == 0) { - emalloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } else if (l+2 > buflen) { - erealloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } /* else - buffer has room, just use it */ - - readcount = l; - readloc = lexeme = lexptr = lexptr_begin = buf; - samefile = TRUE; + emalloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf"); + lexptr = lexptr_begin = lexeme = sourcefile->buf; + savelen = 0; sourceline = 1; + thisline = NULL; } else { /* - * In same file, ran off edge of buffer. - * Shift current line down to front, adjust - * pointers and fill in the rest of the buffer. + * Here, we retain the current source line in the beginning of the buffer. */ - - int lexeme_offset = lexeme - lexptr_begin; - int lexptr_offset = lexptr - lexptr_begin; - int lexend_offset = lexend - lexptr_begin; - - /* find beginning of current line */ - for (scan = lexeme; scan >= lexptr_begin; scan--) { + int offset; + for (scan = lexeme; scan > lexptr_begin; scan--) if (*scan == '\n') { scan++; break; } - } - /* - * This condition can be read as follows: IF - * 1. The beginning of the line is at the beginning of the - * buffer (no newline was found: scan <= buf) - * AND: - * 2. The start of valid lexical data is into the buffer - * (lexptr_begin > buf) - * OR: - * 3. We have scanned past the end of the last data read - * (lexptr == lexend) - * AND: - * 4. There's no room left in the buffer - * (lexptr_offset >= buflen - 2) - * - * If all that's true, grow the buffer to add more to - * the current line. - */ + savelen = lexptr - scan; + offset = lexptr - lexeme; - if (scan <= buf - && (lexptr_begin > buf - || (lexptr == lexend - && lexptr_offset >= buflen - 2))) { - /* have to grow the buffer */ - buflen *= 2; - erealloc(buf, char *, buflen, "get_src_buf"); - } else if (scan > buf) { - /* Line starts in middle of the buffer, shift things down. */ - memmove(buf, scan, lexend - scan); + if (savelen > 0) { /* - * make offsets relative to start of line, - * not start of buffer. + * Need to make sure we have room left for reading new text; + * grow the buffer (by doubling, an arbitrary choice), if the retained line + * takes up more than a certain percentage (50%, again an arbitrary figure) + * of the available space. */ - lexend_offset = lexend - scan; - lexeme_offset = lexeme - scan; - lexptr_offset = lexptr - scan; - } - - /* adjust pointers */ - lexeme = buf + lexeme_offset; - lexptr = buf + lexptr_offset; - lexend = buf + lexend_offset; - lexptr_begin = buf; - readcount = buflen - (lexend - buf); - readloc = lexend; - } - - /* add more data to buffer */ - n = (*readfunc)(fd, readloc, readcount); - if (n == -1) - fatal(_("can't read sourcefile `%s' (%s)"), - source, strerror(errno)); - if (n == 0) { - if (newfile) { - static short warned = FALSE; - if (do_lint && ! warned) { + if (savelen > sourcefile->bufsize / 2) { /* long line or token */ + sourcefile->bufsize *= 2; + erealloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf"); + scan = sourcefile->buf + (scan - lexptr_begin); + lexptr_begin = sourcefile->buf; + } + + thisline = lexptr_begin; + memmove(thisline, scan, savelen); + lexptr = thisline + savelen; + lexeme = lexptr - offset; + } else { + savelen = 0; + lexptr = lexeme = lexptr_begin; + thisline = NULL; + } + } + + n = (*readfunc)(sourcefile->fd, lexptr, sourcefile->bufsize - savelen); + if (n == -1) { + error(_("can't read sourcefile `%s' (%s)"), + source, strerror(errno)); + errcount++; + lexeof = TRUE; + } else { + lexend = lexptr + n; + if (n == 0) { + static short warned = FALSE; + if (do_lint && newfile && ! warned){ warned = TRUE; + sourceline = 0; lintwarn(_("source file `%s' is empty"), source); } + lexeof = TRUE; } - if (fd != fileno(stdin)) /* safety */ - (*closefunc)(fd); - samefile = FALSE; - nextfile++; - goto again; } - lexend = lexptr + n; - return lexptr; + return sourcefile->buf; } /* tokadd --- add a character to the token buffer */ @@ -4079,34 +5321,41 @@ /* tokexpand --- grow the token buffer */ -char * +static char * tokexpand() { - static int toksize = 60; + static int toksize; int tokoffset; - - tokoffset = tok - tokstart; - toksize *= 2; - if (tokstart != NULL) + + if (tokstart != NULL) { + tokoffset = tok - tokstart; + toksize *= 2; erealloc(tokstart, char *, toksize, "tokexpand"); - else + tok = tokstart + tokoffset; + } else { + toksize = 60; emalloc(tokstart, char *, toksize, "tokexpand"); + tok = tokstart; + } tokend = tokstart + toksize; - tok = tokstart + tokoffset; return tok; } /* nextc --- get the next input character */ -#ifdef MBS_SUPPORT +#if MBS_SUPPORT static int nextc(void) { if (gawk_mb_cur_max > 1) { - if (!lexptr || lexptr >= lexend) { - if (! get_src_buf()) - return EOF; +again: + if (lexeof) + return END_FILE; + if (lexptr == NULL || lexptr >= lexend) { + if (get_src_buf()) + goto again; + return END_SRC; } /* Update the buffer index. */ @@ -4119,7 +5368,7 @@ int idx, work_ring_idx = cur_ring_idx; mbstate_t tmp_state; size_t mbclen; - + for (idx = 0 ; lexptr + idx < lexend ; idx++) { tmp_state = cur_mbstate; mbclen = mbrlen(lexptr, idx + 1, &tmp_state); @@ -4150,44 +5399,30 @@ } return (int) (unsigned char) *lexptr++; - } - else { - int c; - - if (lexptr && lexptr < lexend) - c = (int) (unsigned char) *lexptr++; - else if (get_src_buf()) - c = (int) (unsigned char) *lexptr++; - else - c = EOF; - - return c; + } else { + do { + if (lexeof) + return END_FILE; + if (lexptr && lexptr < lexend) + return ((int) (unsigned char) *lexptr++); + } while (get_src_buf()); + return END_SRC; } } #else /* MBS_SUPPORT */ -#if GAWKDEBUG int -nextc(void) +nextc() { - int c; - - if (lexptr && lexptr < lexend) - c = (int) (unsigned char) *lexptr++; - else if (get_src_buf()) - c = (int) (unsigned char) *lexptr++; - else - c = EOF; - - return c; + do { + if (lexeof) + return END_FILE; + if (lexptr && lexptr < lexend) + return ((int) (unsigned char) *lexptr++); + } while (get_src_buf()); + return END_SRC; } -#else -#define nextc() ((lexptr && lexptr < lexend) ? \ - ((int) (unsigned char) *lexptr++) : \ - (get_src_buf() ? ((int) (unsigned char) *lexptr++) : EOF) \ - ) -#endif #endif /* MBS_SUPPORT */ @@ -4196,12 +5431,12 @@ static inline void pushback(void) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) cur_ring_idx = (cur_ring_idx == 0)? RING_BUFFER_SIZE - 1 : cur_ring_idx - 1; #endif - (lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); + (! lexeof && lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); } @@ -4214,13 +5449,17 @@ for (;;) { c = nextc(); - if (c == EOF) + if (c == END_FILE) { + pushback(); break; + } if (c == '#') { - while ((c = nextc()) != '\n' && c != EOF) + while ((c = nextc()) != '\n' && c != END_FILE) continue; - if (c == EOF) + if (c == END_FILE) { + pushback(); break; + } } if (c == '\n') sourceline++; @@ -4231,36 +5470,68 @@ } } +/* newline_eof --- return newline or EOF as needed and adjust variables */ + +/* + * This routine used to be a macro, however GCC 4.6.2 warned about + * the result of a computation not being used. Converting to a function + * removes the warnings. + */ + +static int newline_eof() +{ + /* NB: a newline at end does not start a source line. */ + if (lasttok != NEWLINE) { + pushback(); + if (do_lint && ! eof_warned) { + lintwarn(_("source file does not end in newline")); + eof_warned = TRUE; + } + sourceline++; + return NEWLINE; + } + + sourceline--; + eof_warned = FALSE; + return LEX_EOF; +} + /* yylex --- Read the input and turn it into tokens. */ static int yylex(void) { - register int c; + int c; int seen_e = FALSE; /* These are for numbers */ int seen_point = FALSE; int esc_seen; /* for literal strings */ int mid; static int did_newline = FALSE; char *tokkey; - static int lasttok = 0; - static short eof_warned = FALSE; int inhex = FALSE; int intlstr = FALSE; - if (nextc() == EOF) { - if (lasttok != NEWLINE) { - lasttok = NEWLINE; - if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } - return NEWLINE; /* fake it */ - } - return 0; +#define GET_INSTRUCTION(op) bcalloc(op, 1, sourceline) + +#define NEWLINE_EOF newline_eof() + + yylval = (INSTRUCTION *) NULL; + if (lasttok == SUBSCRIPT) { + lasttok = 0; + return SUBSCRIPT; } + + if (lasttok == LEX_EOF) /* error earlier in current source, must give up !! */ + return 0; + + c = nextc(); + if (c == END_SRC) + return 0; + if (c == END_FILE) + return lasttok = NEWLINE_EOF; pushback(); -#if defined OS2 || defined __EMX__ + +#if defined __EMX__ /* * added for OS/2's extproc feature of cmd.exe * (like #! in BSD sh) @@ -4270,6 +5541,7 @@ lexptr++; } #endif + lexeme = lexptr; thisline = NULL; if (want_regexp) { @@ -4313,7 +5585,8 @@ in_brack--; break; case '\\': - if ((c = nextc()) == EOF) { + if ((c = nextc()) == END_FILE) { + pushback(); yyerror(_("unterminated regexp ends with `\\' at end of file")); goto end_regexp; /* kludge */ } else if (c == '\n') { @@ -4329,8 +5602,8 @@ if (in_brack > 0) break; end_regexp: - tokadd('\0'); - yylval.sval = tokstart; + yylval = GET_INSTRUCTION(Op_token); + yylval->lextok = estrdup(tokstart, tok - tokstart); if (do_lint) { int peek = nextc(); @@ -4351,7 +5624,8 @@ pushback(); yyerror(_("unterminated regexp")); goto end_regexp; /* kludge */ - case EOF: + case END_FILE: + pushback(); yyerror(_("unterminated regexp at end of file")); goto end_regexp; /* kludge */ } @@ -4367,42 +5641,32 @@ lexeme = lexptr ? lexptr - 1 : lexptr; thisline = NULL; tok = tokstart; - yylval.nodetypeval = Node_illegal; - if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) { - case EOF: - if (lasttok != NEWLINE) { - lasttok = NEWLINE; - if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } - return NEWLINE; /* fake it */ - } +#if MBS_SUPPORT + if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) +#endif + switch (c) { + case END_SRC: return 0; + case END_FILE: + return lasttok = NEWLINE_EOF; + case '\n': sourceline++; return lasttok = NEWLINE; case '#': /* it's a comment */ while ((c = nextc()) != '\n') { - if (c == EOF) { - if (lasttok != NEWLINE) { - lasttok = NEWLINE; - if (do_lint && ! eof_warned) { - lintwarn( - _("source file does not end in newline")); - eof_warned = TRUE; - } - return NEWLINE; /* fake it */ - } - return 0; - } + if (c == END_FILE) + return lasttok = NEWLINE_EOF; } sourceline++; return lasttok = NEWLINE; + case '@': + return lasttok = '@'; + case '\\': #ifdef RELAXED_CONTINUATION /* @@ -4424,23 +5688,27 @@ _("use of `\\ #...' line continuation is not portable")); } while ((c = nextc()) != '\n') - if (c == EOF) + if (c == END_FILE) break; } pushback(); } #endif /* RELAXED_CONTINUATION */ - if (nextc() == '\n') { + c = nextc(); + if (c == '\r') /* allow MS-DOS files. bleah */ + c = nextc(); + if (c == '\n') { sourceline++; goto retry; } else { yyerror(_("backslash not last character on line")); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } break; case ':': case '?': + yylval = GET_INSTRUCTION(Op_cond_exp); if (! do_posix) allow_newline(); return lasttok = c; @@ -4455,21 +5723,36 @@ case '(': in_parens++; - /* FALL THROUGH */ + return lasttok = c; case '$': - case ';': + yylval = GET_INSTRUCTION(Op_field_spec); + return lasttok = c; case '{': + if (++in_braces == 1) + firstline = sourceline; + case ';': case ',': case '[': + return lasttok = c; case ']': - return lasttok = c; + c = nextc(); + pushback(); + if (c == '[') { + yylval = GET_INSTRUCTION(Op_sub_array); + lasttok = ']'; + } else { + yylval = GET_INSTRUCTION(Op_subscript); + lasttok = SUBSCRIPT; /* end of subscripts */ + } + return ']'; case '*': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_assign_times; + yylval = GET_INSTRUCTION(Op_assign_times); return lasttok = ASSIGNOP; } else if (do_posix) { pushback(); + yylval = GET_INSTRUCTION(Op_times); return lasttok = '*'; } else if (c == '*') { /* make ** and **= aliases for ^ and ^= */ @@ -4483,7 +5766,7 @@ if (do_lint_old) warning(_("old awk does not support operator `**='")); } - yylval.nodetypeval = Node_assign_exp; + yylval = GET_INSTRUCTION(Op_assign_exp); return ASSIGNOP; } else { pushback(); @@ -4494,10 +5777,12 @@ if (do_lint_old) warning(_("old awk does not support operator `**'")); } + yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; } } pushback(); + yylval = GET_INSTRUCTION(Op_times); return lasttok = '*'; case '/': @@ -4506,14 +5791,16 @@ return lasttok = SLASH_BEFORE_EQUAL; } pushback(); + yylval = GET_INSTRUCTION(Op_quotient); return lasttok = '/'; case '%': if (nextc() == '=') { - yylval.nodetypeval = Node_assign_mod; + yylval = GET_INSTRUCTION(Op_assign_mod); return lasttok = ASSIGNOP; } pushback(); + yylval = GET_INSTRUCTION(Op_mod); return lasttok = '%'; case '^': @@ -4525,7 +5812,7 @@ did_warn_assgn = TRUE; warning(_("operator `^=' is not supported in old awk")); } - yylval.nodetypeval = Node_assign_exp; + yylval = GET_INSTRUCTION(Op_assign_exp); return lasttok = ASSIGNOP; } pushback(); @@ -4533,67 +5820,74 @@ did_warn_op = TRUE; warning(_("operator `^' is not supported in old awk")); } + yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; } case '+': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_assign_plus; + yylval = GET_INSTRUCTION(Op_assign_plus); return lasttok = ASSIGNOP; } - if (c == '+') + if (c == '+') { + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = INCREMENT; + } pushback(); + yylval = GET_INSTRUCTION(Op_plus); return lasttok = '+'; case '!': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_notequal; + yylval = GET_INSTRUCTION(Op_notequal); return lasttok = RELOP; } if (c == '~') { - yylval.nodetypeval = Node_nomatch; + yylval = GET_INSTRUCTION(Op_nomatch); return lasttok = MATCHOP; } pushback(); + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '!'; case '<': if (nextc() == '=') { - yylval.nodetypeval = Node_leq; + yylval = GET_INSTRUCTION(Op_leq); return lasttok = RELOP; } - yylval.nodetypeval = Node_less; + yylval = GET_INSTRUCTION(Op_less); pushback(); return lasttok = '<'; case '=': if (nextc() == '=') { - yylval.nodetypeval = Node_equal; + yylval = GET_INSTRUCTION(Op_equal); return lasttok = RELOP; } - yylval.nodetypeval = Node_assign; + yylval = GET_INSTRUCTION(Op_assign); pushback(); return lasttok = ASSIGN; case '>': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_geq; + yylval = GET_INSTRUCTION(Op_geq); return lasttok = RELOP; } else if (c == '>') { - yylval.nodetypeval = Node_redirect_append; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_append; return lasttok = IO_OUT; } pushback(); if (in_print && in_parens == 0) { - yylval.nodetypeval = Node_redirect_output; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_output; return lasttok = IO_OUT; } - yylval.nodetypeval = Node_greater; + yylval = GET_INSTRUCTION(Op_greater); return lasttok = '>'; case '~': - yylval.nodetypeval = Node_match; + yylval = GET_INSTRUCTION(Op_match); return lasttok = MATCHOP; case '}': @@ -4603,6 +5897,8 @@ */ if (did_newline) { did_newline = FALSE; + if (--in_braces == 0) + lastline = sourceline; return lasttok = c; } did_newline++; @@ -4616,7 +5912,7 @@ if (c == '\n') { pushback(); yyerror(_("unterminated string")); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) && c == '\\') { @@ -4626,35 +5922,46 @@ continue; } esc_seen = TRUE; - tokadd('\\'); + if (! want_source || c != '"') + tokadd('\\'); } - if (c == EOF) { + if (c == END_FILE) { pushback(); yyerror(_("unterminated string")); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } tokadd(c); } - yylval.nodeval = make_str_node(tokstart, - tok - tokstart, esc_seen ? SCAN : 0); - yylval.nodeval->flags |= PERM; + yylval = GET_INSTRUCTION(Op_token); + if (want_source) { + yylval->lextok = estrdup(tokstart, tok - tokstart); + return lasttok = FILENAME; + } + + yylval->opcode = Op_push_i; + yylval->memory = make_str_node(tokstart, + tok - tokstart, esc_seen ? SCAN : 0); + yylval->memory->flags &= ~MALLOC; + yylval->memory->flags |= PERM; if (intlstr) { - yylval.nodeval->flags |= INTLSTR; + yylval->memory->flags |= INTLSTR; intlstr = FALSE; if (do_intl) - dumpintlstr(yylval.nodeval->stptr, - yylval.nodeval->stlen); - } + dumpintlstr(yylval->memory->stptr, yylval->memory->stlen); + } return lasttok = YSTRING; case '-': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_assign_minus; + yylval = GET_INSTRUCTION(Op_assign_minus); return lasttok = ASSIGNOP; } - if (c == '-') + if (c == '-') { + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = DECREMENT; + } pushback(); + yylval = GET_INSTRUCTION(Op_minus); return lasttok = '-'; case '.': @@ -4764,59 +6071,60 @@ break; c = nextc(); } - if (c != EOF) - pushback(); - else if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } + pushback(); + tokadd('\0'); + yylval = GET_INSTRUCTION(Op_push_i); if (! do_traditional && isnondecimal(tokstart, FALSE)) { if (do_lint) { - if (isdigit(tokstart[1])) /* not an 'x' or 'X' */ + if (isdigit((unsigned char) tokstart[1])) /* not an 'x' or 'X' */ lintwarn("numeric constant `%.*s' treated as octal", (int) strlen(tokstart)-1, tokstart); else if (tokstart[1] == 'x' || tokstart[1] == 'X') lintwarn("numeric constant `%.*s' treated as hexadecimal", (int) strlen(tokstart)-1, tokstart); } - yylval.nodeval = make_number(nondec2awknum(tokstart, strlen(tokstart))); + yylval->memory = mk_number(nondec2awknum(tokstart, strlen(tokstart)), + PERM|NUMCUR|NUMBER); } else - yylval.nodeval = make_number(atof(tokstart)); - yylval.nodeval->flags |= PERM; + yylval->memory = mk_number(atof(tokstart), PERM|NUMCUR|NUMBER); return lasttok = YNUMBER; case '&': if ((c = nextc()) == '&') { - yylval.nodetypeval = Node_and; + yylval = GET_INSTRUCTION(Op_and); allow_newline(); return lasttok = LEX_AND; } pushback(); + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '&'; case '|': if ((c = nextc()) == '|') { - yylval.nodetypeval = Node_or; + yylval = GET_INSTRUCTION(Op_or); allow_newline(); return lasttok = LEX_OR; } else if (! do_traditional && c == '&') { - yylval.nodetypeval = Node_redirect_twoway; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_twoway; return lasttok = (in_print && in_parens == 0 ? IO_OUT : IO_IN); } pushback(); if (in_print && in_parens == 0) { - yylval.nodetypeval = Node_redirect_pipe; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_pipe; return lasttok = IO_OUT; } else { - yylval.nodetypeval = Node_redirect_pipein; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_pipein; return lasttok = IO_IN; } } if (c != '_' && ! isalpha(c)) { yyerror(_("invalid char '%c' in expression"), c); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } /* @@ -4844,57 +6152,105 @@ /* it's some type of name-type-thing. Find its length. */ tok = tokstart; - while (is_identchar(c)) { + while (c != END_FILE && is_identchar(c)) { tokadd(c); c = nextc(); } tokadd('\0'); - emalloc(tokkey, char *, tok - tokstart, "yylex"); - memcpy(tokkey, tokstart, tok - tokstart); - if (c != EOF) - pushback(); - else if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } + pushback(); /* See if it is a special token. */ - if ((mid = check_special(tokstart)) >= 0) { + static int warntab[sizeof(tokentab) / sizeof(tokentab[0])]; + int class = tokentab[mid].class; + + if ((class == LEX_INCLUDE || class == LEX_EVAL) + && lasttok != '@') + goto out; + if (do_lint) { - if (tokentab[mid].flags & GAWKX) + if ((tokentab[mid].flags & GAWKX) && ! (warntab[mid] & GAWKX)) { lintwarn(_("`%s' is a gawk extension"), tokentab[mid].operator); - if (tokentab[mid].flags & RESX) + warntab[mid] |= GAWKX; + } + if ((tokentab[mid].flags & RESX) && ! (warntab[mid] & RESX)) { lintwarn(_("`%s' is a Bell Labs extension"), tokentab[mid].operator); - if (tokentab[mid].flags & NOT_POSIX) + warntab[mid] |= RESX; + } + if ((tokentab[mid].flags & NOT_POSIX) && ! (warntab[mid] & NOT_POSIX)) { lintwarn(_("POSIX does not allow `%s'"), tokentab[mid].operator); + warntab[mid] |= NOT_POSIX; + } } - if (do_lint_old && (tokentab[mid].flags & NOT_OLD)) + if (do_lint_old && (tokentab[mid].flags & NOT_OLD) + && ! (warntab[mid] & NOT_OLD) + ) { warning(_("`%s' is not supported in old awk"), tokentab[mid].operator); - if ((do_traditional && (tokentab[mid].flags & GAWKX)) - || (do_posix && (tokentab[mid].flags & NOT_POSIX))) - ; - else { - if (tokentab[mid].class == LEX_BUILTIN - || tokentab[mid].class == LEX_LENGTH) - yylval.lval = mid; - else - yylval.nodetypeval = tokentab[mid].value; - free(tokkey); - return lasttok = tokentab[mid].class; + warntab[mid] |= NOT_OLD; } - } - yylval.sval = tokkey; - if (*lexptr == '(') + if (tokentab[mid].flags & BREAK) + break_allowed++; + if (tokentab[mid].flags & CONTINUE) + continue_allowed++; + + switch (class) { + case LEX_INCLUDE: + want_source = TRUE; + break; + case LEX_EVAL: + if (in_main_context()) + goto out; + emalloc(tokkey, char *, tok - tokstart + 1, "yylex"); + tokkey[0] = '@'; + memcpy(tokkey + 1, tokstart, tok - tokstart); + yylval = GET_INSTRUCTION(Op_token); + yylval->lextok = tokkey; + break; + + case LEX_FUNCTION: + case LEX_BEGIN: + case LEX_END: + case LEX_BEGINFILE: + case LEX_ENDFILE: + yylval = bcalloc(tokentab[mid].value, 3, sourceline); + break; + + case LEX_FOR: + case LEX_WHILE: + case LEX_DO: + case LEX_SWITCH: + if (! do_profiling) + return lasttok = class; + /* fall through */ + case LEX_CASE: + yylval = bcalloc(tokentab[mid].value, 2, sourceline); + break; + + default: + yylval = GET_INSTRUCTION(tokentab[mid].value); + if (class == LEX_BUILTIN || class == LEX_LENGTH) + yylval->builtin_idx = mid; + break; + } + return lasttok = class; + } +out: + tokkey = estrdup(tokstart, tok - tokstart); + if (*lexptr == '(') { + yylval = bcalloc(Op_token, 2, sourceline); + yylval->lextok = tokkey; return lasttok = FUNC_CALL; - else { + } else { static short goto_warned = FALSE; + yylval = GET_INSTRUCTION(Op_token); + yylval->lextok = tokkey; + #define SMART_ALECK 1 if (SMART_ALECK && do_lint && ! goto_warned && strcasecmp(tokkey, "goto") == 0) { @@ -4903,140 +6259,236 @@ } return lasttok = NAME; } -} -/* node_common --- common code for allocating a new node */ - -static NODE * -node_common(NODETYPE op) -{ - register NODE *r; - - getnode(r); - r->type = op; - r->flags = MALLOC; - /* if lookahead is a NL, lineno is 1 too high */ - if (lexeme && lexeme >= lexptr_begin && *lexeme == '\n') - r->source_line = sourceline - 1; - else - r->source_line = sourceline; - r->source_file = source; - return r; +#undef GET_INSTRUCTION +#undef NEWLINE_EOF } -/* node --- allocates a node with defined lnode and rnode. */ +/* mk_symbol --- allocates a symbol for the symbol table. */ NODE * -node(NODE *left, NODETYPE op, NODE *right) +mk_symbol(NODETYPE type, NODE *value) { - register NODE *r; + NODE *r; - r = node_common(op); - r->lnode = left; - r->rnode = right; + getnode(r); + r->type = type; + r->flags = MALLOC; + r->lnode = value; + r->rnode = NULL; + r->parent_array = NULL; + r->var_assign = (Func_ptr) 0; return r; } -/* snode --- allocate a node with defined subnode and builtin for builtin - functions. Checks for arg. count and supplies defaults where - possible. */ +/* snode --- instructions for builtin functions. Checks for arg. count + and supplies defaults where possible. */ -static NODE * -snode(NODE *subn, NODETYPE op, int idx) +static INSTRUCTION * +snode(INSTRUCTION *subn, INSTRUCTION *r) { - register NODE *r; - register NODE *n; + INSTRUCTION *arg; + INSTRUCTION *ip; + NODE *n; int nexp = 0; int args_allowed; + int idx = r->builtin_idx; - r = node_common(op); - - /* traverse expression list to see how many args. given */ - for (n = subn; n != NULL; n = n->rnode) { - nexp++; - if (nexp > 5) - break; - } + if (subn != NULL) { + INSTRUCTION *tp; + for (tp = subn->nexti; tp; tp = tp->nexti) { + tp = tp->lasti; + nexp++; + } + assert(nexp > 0); + } /* check against how many args. are allowed for this builtin */ args_allowed = tokentab[idx].flags & ARGS; - if (args_allowed && (args_allowed & A(nexp)) == 0) - fatal(_("%d is invalid as number of arguments for %s"), + if (args_allowed && (args_allowed & A(nexp)) == 0) { + yyerror(_("%d is invalid as number of arguments for %s"), nexp, tokentab[idx].operator); + return NULL; + } + + /* special processing for sub, gsub and gensub */ + + if (tokentab[idx].value == Op_sub_builtin) { + const char *operator = tokentab[idx].operator; + + r->sub_flags = 0; + + arg = subn->nexti; /* first arg list */ + (void) mk_rexp(arg); + + if (strcmp(operator, "gensub") != 0) { + /* sub and gsub */ + + if (strcmp(operator, "gsub") == 0) + r->sub_flags |= GSUB; + + arg = arg->lasti->nexti; /* 2nd arg list */ + if (nexp == 2) { + INSTRUCTION *expr; + + expr = list_create(instruction(Op_push_i)); + expr->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + (void) mk_expression_list(subn, + list_append(expr, instruction(Op_field_spec))); + } + + arg = arg->lasti->nexti; /* third arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push_i) { + if (do_lint) + lintwarn(_("%s: string literal as last arg of substitute has no effect"), + operator); + r->sub_flags |= LITERAL; + } else { + if (make_assignable(ip) == NULL) + yyerror(_("%s third parameter is not a changeable object"), + operator); + else + ip->do_reference = TRUE; + } + + r->expr_count = count_expressions(&subn, FALSE); + ip = subn->lasti; + + (void) list_append(subn, r); + + /* add after_assign code */ + if (ip->opcode == Op_push_lhs && ip->memory->type == Node_var && ip->memory->var_assign) { + (void) list_append(subn, instruction(Op_var_assign)); + subn->lasti->assign_ctxt = Op_sub_builtin; + subn->lasti->assign_var = ip->memory->var_assign; + } else if (ip->opcode == Op_field_spec_lhs) { + (void) list_append(subn, instruction(Op_field_assign)); + subn->lasti->assign_ctxt = Op_sub_builtin; + subn->lasti->field_assign = (Func_ptr) 0; + ip->target_assign = subn->lasti; + } + return subn; + + } else { + /* gensub */ + + r->sub_flags |= GENSUB; + if (nexp == 3) { + ip = instruction(Op_push_i); + ip->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + (void) mk_expression_list(subn, + list_append(list_create(ip), instruction(Op_field_spec))); + } + + r->expr_count = count_expressions(&subn, FALSE); + return list_append(subn, r); + } + } r->builtin = tokentab[idx].ptr; /* special case processing for a few builtins */ - if (nexp == 0 && r->builtin == do_length) { - subn = node(node(make_number(0.0), Node_field_spec, (NODE *) NULL), - Node_expression_list, - (NODE *) NULL); + + if (r->builtin == do_length) { + if (nexp == 0) { + /* no args. Use $0 */ + + INSTRUCTION *list; + r->expr_count = 1; + list = list_create(r); + (void) list_prepend(list, instruction(Op_field_spec)); + (void) list_prepend(list, instruction(Op_push_i)); + list->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + return list; + } else { + arg = subn->nexti; + if (arg->nexti == arg->lasti && arg->nexti->opcode == Op_push) + arg->nexti->opcode = Op_push_arg; /* argument may be array */ + } + } else if (r->builtin == do_isarray) { + arg = subn->nexti; + if (arg->nexti == arg->lasti && arg->nexti->opcode == Op_push) + arg->nexti->opcode = Op_push_arg; /* argument may be array */ } else if (r->builtin == do_match) { static short warned = FALSE; - if (subn->rnode->lnode->type != Node_regex) - subn->rnode->lnode = mk_rexp(subn->rnode->lnode); + arg = subn->nexti->lasti->nexti; /* 2nd arg list */ + (void) mk_rexp(arg); - if (subn->rnode->rnode != NULL) { /* 3rd argument there */ + if (nexp == 3) { /* 3rd argument there */ if (do_lint && ! warned) { warned = TRUE; lintwarn(_("match: third argument is a gawk extension")); } - if (do_traditional) - fatal(_("match: third argument is a gawk extension")); + if (do_traditional) { + yyerror(_("match: third argument is a gawk extension")); + return NULL; + } + + arg = arg->lasti->nexti; /* third arg list */ + ip = arg->lasti; + if (/*ip == arg->nexti && */ ip->opcode == Op_push) + ip->opcode = Op_push_array; } - } 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) - append_right(subn, node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_expression_list, - (NODE *) NULL)); - else if (subn->rnode->rnode->lnode->type == Node_val) { - 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)) { - yyerror(_("%s third parameter is not a changeable object"), - (r->builtin == do_sub) ? "sub" : "gsub"); - } - } else if (r->builtin == do_gensub) { - if (subn->lnode->type != Node_regex) - subn->lnode = mk_rexp(subn->lnode); - if (nexp == 3) - append_right(subn, node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_expression_list, - (NODE *) NULL)); } else if (r->builtin == do_split) { + arg = subn->nexti->lasti->nexti; /* 2nd arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + if (nexp == 2) { + INSTRUCTION *expr; + expr = list_create(instruction(Op_push)); + expr->nexti->memory = FS_node; + (void) mk_expression_list(subn, expr); + } + arg = arg->lasti->nexti; + n = mk_rexp(arg); if (nexp == 2) - append_right(subn, - node(FS_node, Node_expression_list, (NODE *) NULL)); - n = subn->rnode->rnode->lnode; - if (n->type != Node_regex) - subn->rnode->rnode->lnode = mk_rexp(n); - if (nexp == 2) - subn->rnode->rnode->lnode->re_flags |= FS_DFLT; + n->re_flags |= FS_DFLT; + if (nexp == 4) { + arg = arg->lasti->nexti; + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } + } else if (r->builtin == do_patsplit) { + arg = subn->nexti->lasti->nexti; /* 2nd arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + if (nexp == 2) { + INSTRUCTION *expr; + expr = list_create(instruction(Op_push)); + expr->nexti->memory = FPAT_node; + (void) mk_expression_list(subn, expr); + } + arg = arg->lasti->nexti; + n = mk_rexp(arg); + if (nexp == 4) { + arg = arg->lasti->nexti; + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } } else if (r->builtin == do_close) { static short warned = FALSE; - - if ( nexp == 2) { - if (do_lint && nexp == 2 && ! warned) { + if (nexp == 2) { + if (do_lint && ! warned) { warned = TRUE; lintwarn(_("close: second argument is a gawk extension")); } - if (do_traditional) - fatal(_("close: second argument is a gawk extension")); + if (do_traditional) { + yyerror(_("close: second argument is a gawk extension")); + return NULL; + } } } else if (do_intl /* --gen-po */ && r->builtin == do_dcgettext /* dcgettext(...) */ - && subn->lnode->type == Node_val /* 1st arg is constant */ - && (subn->lnode->flags & STRCUR) != 0) { /* it's a string constant */ + && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */ + && (subn->nexti->lasti->memory->flags & STRCUR) != 0) { /* it's a string constant */ /* ala xgettext, dcgettext("some string" ...) dumps the string */ - NODE *str = subn->lnode; + NODE *str = subn->nexti->lasti->memory; if ((str->flags & INTLSTR) != 0) warning(_("use of dcgettext(_\"...\") is incorrect: remove leading underscore")); @@ -5045,53 +6497,73 @@ dumpintlstr(str->stptr, str->stlen); } else if (do_intl /* --gen-po */ && r->builtin == do_dcngettext /* dcngettext(...) */ - && subn->lnode->type == Node_val /* 1st arg is 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 & STRCUR) != 0) { /* it's a string constant */ + && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */ + && (subn->nexti->lasti->memory->flags & STRCUR) != 0 /* it's a string constant */ + && subn->nexti->lasti->nexti->lasti->opcode == Op_push_i /* 2nd arg is constant too */ + && (subn->nexti->lasti->nexti->lasti->memory->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; + NODE *str1 = subn->nexti->lasti->memory; + NODE *str2 = subn->nexti->lasti->nexti->lasti->memory; if (((str1->flags | str2->flags) & INTLSTR) != 0) warning(_("use of dcngettext(_\"...\") is incorrect: remove leading underscore")); else dumpintlstr2(str1->stptr, str1->stlen, str2->stptr, str2->stlen); + } else if (r->builtin == do_asort || r->builtin == do_asorti) { + arg = subn->nexti; /* 1st arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + if (nexp >= 2) { + arg = ip->nexti; + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } + } +#ifdef ARRAYDEBUG + else if (r->builtin == do_adump) { + ip = subn->nexti->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; } +#endif - r->subnode = subn; - if (r->builtin == do_sprintf) { - count_args(r); - if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */ - r->lnode->printf_count = r->printf_count; /* hack */ + if (subn != NULL) { + r->expr_count = count_expressions(&subn, FALSE); + return list_append(subn, r); } - return r; + + r->expr_count = 0; + return list_create(r); } -/* make_for_loop --- build a for loop */ +/* append_param --- append PNAME to the list of parameters + * for the current function. + */ -static NODE * -make_for_loop(NODE *init, NODE *cond, NODE *incr) +static void +append_param(char *pname) { - register FOR_LOOP_HEADER *r; - NODE *n; + static NODE *savetail = NULL; + NODE *p; - emalloc(r, FOR_LOOP_HEADER *, sizeof(FOR_LOOP_HEADER), "make_for_loop"); - getnode(n); - n->type = Node_illegal; - r->init = init; - r->cond = cond; - r->incr = incr; - n->sub.nodep.r.hd = r; - return n; + p = make_param(pname); + if (func_params == NULL) { + func_params = p; + savetail = p; + } else if (savetail != NULL) { + savetail->rnode = p; + savetail = p; + } } /* dup_parms --- return TRUE if there are duplicate parameters */ static int -dup_parms(NODE *func) +dup_parms(INSTRUCTION *fp, NODE *func) { - register NODE *np; + NODE *np; const char *fname, **names; int count, i, j, dups; NODE *params; @@ -5114,7 +6586,7 @@ i = 0; for (np = params; np != NULL; np = np->rnode) { if (np->param == NULL) { /* error earlier, give up, go home */ - free(names); + efree(names); return TRUE; } names[i++] = np->param; @@ -5125,38 +6597,47 @@ for (j = 0; j < i; j++) { if (strcmp(names[i], names[j]) == 0) { dups++; - error( + error_ln(fp->source_line, _("function `%s': parameter #%d, `%s', duplicates parameter #%d"), - fname, i+1, names[j], j+1); + fname, i + 1, names[j], j+1); } } } - free(names); + efree(names); return (dups > 0 ? TRUE : FALSE); } /* parms_shadow --- check if parameters shadow globals */ static int -parms_shadow(const char *fname, NODE *func) +parms_shadow(INSTRUCTION *pc, int *shadow) { - int count, i; + int pcount, i; int ret = FALSE; + NODE *func; + char *fname; + func = pc->func_body; + fname = func->lnode->param; + +#if 0 /* can't happen, already exited if error ? */ if (fname == NULL || func == NULL) /* error earlier */ return FALSE; +#endif - count = func->lnode->param_cnt; + pcount = func->lnode->param_cnt; - if (count == 0) /* no args, no problem */ - return FALSE; + if (pcount == 0) /* no args, no problem */ + return 0; + source = pc->source_file; + sourceline = pc->source_line; /* * Use warning() and not lintwarn() so that can warn * about all shadowed parameters. */ - for (i = 0; i < count; i++) { + for (i = 0; i < pcount; i++) { if (lookup(func->parmlist[i]) != NULL) { warning( _("function `%s': parameter `%s' shadows global variable"), @@ -5165,21 +6646,27 @@ } } - return ret; + *shadow |= ret; + return 0; } + /* - * install: + * install_symbol: * Install a name in the symbol table, even if it is already there. * Caller must check against redefinition if that is desired. */ + NODE * -install(char *name, NODE *value) +install_symbol(char *name, NODE *value) { - register NODE *hp; - register size_t len; - register int bucket; + NODE *hp; + size_t len; + int bucket; + + if (install_func) + (*install_func)(name); var_count++; len = strlen(name); @@ -5195,27 +6682,26 @@ return hp->hvalue; } -/* lookup --- find the most recent hash node for name installed by install */ +/* lookup --- find the most recent hash node for name installed by install_symbol */ NODE * lookup(const char *name) { - register NODE *bucket; - register size_t len; + NODE *bucket; + size_t len; len = strlen(name); for (bucket = variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]; bucket != NULL; bucket = bucket->hnext) - if (bucket->hlength == len && STREQN(bucket->hname, name, len)) + if (bucket->hlength == len && strncmp(bucket->hname, name, len) == 0) return bucket->hvalue; - return NULL; } -/* var_comp --- compare two variable names */ +/* sym_comp --- compare two symbol (variable or function) names */ static int -var_comp(const void *v1, const void *v2) +sym_comp(const void *v1, const void *v2) { const NODE *const *npp1, *const *npp2; const NODE *n1, *n2; @@ -5236,77 +6722,90 @@ /* valinfo --- dump var info */ -static void -valinfo(NODE *n, FILE *fp) +void +valinfo(NODE *n, int (*print_func)(FILE *, const char *, ...), FILE *fp) { - if (n->flags & STRING) { - fprintf(fp, "string ("); - pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE); - fprintf(fp, ")\n"); + if (n == Nnull_string) + print_func(fp, "uninitialized scalar\n"); + else if (n->flags & STRING) { + pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE); + print_func(fp, "\n"); } else if (n->flags & NUMBER) - fprintf(fp, "number (%.17g)\n", n->numbr); + print_func(fp, "%.17g\n", n->numbr); else if (n->flags & STRCUR) { - fprintf(fp, "string value ("); - pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE); - fprintf(fp, ")\n"); + pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE); + print_func(fp, "\n"); } else if (n->flags & NUMCUR) - fprintf(fp, "number value (%.17g)\n", n->numbr); + print_func(fp, "%.17g\n", n->numbr); else - fprintf(fp, "?? flags %s\n", flags2str(n->flags)); + print_func(fp, "?? flags %s\n", flags2str(n->flags)); } +/* get_varlist --- list of global variables */ -/* dump_vars --- dump the symbol table */ - -void -dump_vars(const char *fname) +NODE ** +get_varlist() { int i, j; NODE **table; NODE *p; - FILE *fp; - - emalloc(table, NODE **, var_count * sizeof(NODE *), "dump_vars"); - - if (fname == NULL) - fp = stderr; - else if ((fp = fopen(fname, "w")) == NULL) { - warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno)); - warning(_("sending profile to standard error")); - fp = stderr; - } + emalloc(table, NODE **, (var_count + 1) * sizeof(NODE *), "get_varlist"); + update_global_values(); for (i = j = 0; i < HASHSIZE; i++) for (p = variables[i]; p != NULL; p = p->hnext) table[j++] = p; - assert(j == var_count); /* Shazzam! */ - qsort(table, j, sizeof(NODE *), var_comp); + qsort(table, j, sizeof(NODE *), sym_comp); + + table[j] = NULL; + return table; +} + +/* print_vars --- print names and values of global variables */ + +void +print_vars(int (*print_func)(FILE *, const char *, ...), FILE *fp) +{ + int i; + NODE **table; + NODE *p; - for (i = 0; i < j; i++) { - p = table[i]; + table = get_varlist(); + for (i = 0; (p = table[i]) != NULL; i++) { if (p->hvalue->type == Node_func) continue; - fprintf(fp, "%.*s: ", (int) p->hlength, p->hname); + print_func(fp, "%.*s: ", (int) p->hlength, p->hname); if (p->hvalue->type == Node_var_array) - fprintf(fp, "array, %ld elements\n", p->hvalue->table_size); + print_func(fp, "array, %ld elements\n", p->hvalue->table_size); else if (p->hvalue->type == Node_var_new) - fprintf(fp, "unused variable\n"); + print_func(fp, "untyped variable\n"); else if (p->hvalue->type == Node_var) - valinfo(p->hvalue->var_value, fp); - else { - NODE **lhs = get_lhs(p->hvalue, NULL, FALSE); + valinfo(p->hvalue->var_value, print_func, fp); + } + efree(table); +} - valinfo(*lhs, fp); - } +/* dump_vars --- dump the symbol table */ + +void +dump_vars(const char *fname) +{ + FILE *fp; + + if (fname == NULL) + fp = stderr; + else if ((fp = fopen(fname, "w")) == NULL) { + warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno)); + warning(_("sending variable list to standard error")); + fp = stderr; } + print_vars(fprintf, fp); if (fp != stderr && fclose(fp) != 0) warning(_("%s: close failed (%s)"), fname, strerror(errno)); - - free(table); } /* release_all_vars --- free all variable memory */ @@ -5316,8 +6815,8 @@ { int i; NODE *p, *next; - - for (i = 0; i < HASHSIZE; i++) + + for (i = 0; i < HASHSIZE; i++) { for (p = variables[i]; p != NULL; p = next) { next = p->hnext; @@ -5325,40 +6824,14 @@ continue; else if (p->hvalue->type == Node_var_array) assoc_clear(p->hvalue); - else if (p->hvalue->type != Node_var_new) { - NODE **lhs = get_lhs(p->hvalue, NULL, FALSE); - - unref(*lhs); - } - unref(p); - } -} - -/* finfo --- for use in comparison and sorting of function names */ - -struct finfo { - const char *name; - size_t nlen; - NODE *func; -}; - -/* fcompare --- comparison function for qsort */ - -static int -fcompare(const void *p1, const void *p2) -{ - const struct finfo *f1, *f2; - int minlen; - - f1 = (const struct finfo *) p1; - f2 = (const struct finfo *) p2; - - if (f1->nlen > f2->nlen) - minlen = f2->nlen; - else - minlen = f1->nlen; + else if (p->hvalue->type != Node_var_new) + unref(p->hvalue->var_value); - return strncmp(f1->name, f2->name, minlen); + efree(p->hname); + freenode(p->hvalue); + freenode(p); + } + } } /* dump_funcs --- print all functions */ @@ -5366,48 +6839,10 @@ void dump_funcs() { - int i, j; - NODE *p; - struct finfo *tab = NULL; - - /* - * 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 (j == 0) + if (func_count <= 0) return; - 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) { - tab[j].name = p->hname; - tab[j].nlen = p->hlength; - tab[j].func = p->hvalue; - j++; - } - } - } - - - /* Shazzam! */ - qsort(tab, j, sizeof(struct finfo), fcompare); - - for (i = 0; i < j; i++) - pp_func(tab[i].name, tab[i].nlen, tab[i].func); - - free(tab); + (void) foreach_func((int (*)(INSTRUCTION *, void *)) pp_func, TRUE, (void *) 0); } /* shadow_funcs --- check all functions for parameters that shadow globals */ @@ -5415,40 +6850,16 @@ void shadow_funcs() { - int i, j; - NODE *p; - struct finfo *tab; static int calls = 0; int shadow = FALSE; - if (func_count == 0) + if (func_count <= 0) return; if (calls++ != 0) fatal(_("shadow_funcs() called twice!")); - emalloc(tab, struct finfo *, func_count * sizeof(struct finfo), "shadow_funcs"); - - for (i = j = 0; i < HASHSIZE; i++) { - for (p = variables[i]; p != NULL; p = p->hnext) { - if (p->hvalue->type == Node_func) { - tab[j].name = p->hname; - tab[j].nlen = p->hlength; - tab[j].func = p->hvalue; - j++; - } - } - } - - assert(j == func_count); - - /* Shazzam! */ - qsort(tab, func_count, sizeof(struct finfo), fcompare); - - for (i = 0; i < j; i++) - shadow |= parms_shadow(tab[i].name, tab[i].func); - - free(tab); + (void) foreach_func((int (*)(INSTRUCTION *, void *)) parms_shadow, TRUE, &shadow); /* End with fatal if the user requested it. */ if (shadow && lintfunc != warning) @@ -5456,54 +6867,6 @@ } /* - * append_right: - * Add new to the rightmost branch of LIST. This uses n^2 time, so we make - * a simple attempt at optimizing it. - */ - -static NODE * -append_right(NODE *list, NODE *new) -{ - register NODE *oldlist; - static NODE *savefront = NULL, *savetail = NULL; - - if (list == NULL || new == NULL) - return list; - - oldlist = list; - if (savefront == oldlist) - list = savetail; /* Be careful: maybe list->rnode != NULL */ - else - savefront = oldlist; - - while (list->rnode != NULL) - list = list->rnode; - savetail = list->rnode = new; - return oldlist; -} - -/* - * 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 @@ -5514,92 +6877,116 @@ * of each function parameter during a function call. See eval.c. */ -static void -func_install(NODE *params, NODE *def) +static int +func_install(INSTRUCTION *func, INSTRUCTION *def) { - NODE *r, *n, *thisfunc; - char **pnames, *names, *sp; - size_t pcount = 0, space = 0; + NODE *params; + NODE *r, *n, *thisfunc, *hp; + char **pnames = NULL; + char *fname; + int pcount = 0; int i; + params = func_params; + /* check for function foo(foo) { ... }. bleah. */ for (n = params->rnode; n != NULL; n = n->rnode) { - if (strcmp(n->param, params->param) == 0) - fatal(_("function `%s': can't use function name as parameter name"), - params->param); - else if (is_std_var(n->param)) - fatal(_("function `%s': can't use special variable `%s' as a function parameter"), - params->param, n->param); + if (strcmp(n->param, params->param) == 0) { + error_ln(func->source_line, + _("function `%s': can't use function name as parameter name"), params->param); + return -1; + } else if (is_std_var(n->param)) { + error_ln(func->source_line, + _("function `%s': can't use special variable `%s' as a function parameter"), + params->param, n->param); + return -1; + } } - thisfunc = NULL; /* turn off warnings */ - - /* symbol table managment */ - pop_var(params, FALSE); - r = lookup(params->param); + thisfunc = NULL; /* turn off warnings */ + + fname = params->param; + /* symbol table management */ + hp = remove_symbol(params->param); /* remove function name out of symbol table */ + if (hp != NULL) + freenode(hp); + r = lookup(fname); if (r != NULL) { - fatal(_("function name `%s' previously defined"), params->param); - } else if (params->param == builtin_func) /* not a valid function name */ + error_ln(func->source_line, + _("function name `%s' previously defined"), fname); + return -1; + } else if (fname == builtin_func) /* not a valid function name */ goto remove_params; + /* add an implicit return at end; + * also used by 'return' command in debugger + */ + + (void) list_append(def, instruction(Op_push_i)); + def->lasti->memory = Nnull_string; + (void) list_append(def, instruction(Op_K_return)); + + if (do_profiling) + (void) list_prepend(def, instruction(Op_exec_count)); + + /* func->opcode is Op_func */ + (func + 1)->firsti = def->nexti; + (func + 1)->lasti = def->lasti; + (func + 2)->first_line = func->source_line; + (func + 2)->last_line = lastline; + + func->nexti = def->nexti; + bcfree(def); + + (void) list_append(rule_list, func + 1); /* debugging */ + /* install the function */ - thisfunc = node(params, Node_func, def); - (void) install(params->param, thisfunc); + thisfunc = mk_symbol(Node_func, params); + (void) install_symbol(fname, thisfunc); + thisfunc->code_ptr = func; + func->func_body = thisfunc; - /* figure out amount of space to allocate for variable names */ - for (n = params->rnode; n != NULL; n = n->rnode) { + for (n = params->rnode; n != NULL; n = n->rnode) pcount++; - space += strlen(n->param) + 1; - } - /* allocate it and fill it in */ if (pcount != 0) { - emalloc(names, char *, space, "func_install"); - emalloc(pnames, char **, pcount * sizeof(char *), "func_install"); - sp = names; - for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode) { - pnames[i] = sp; - strcpy(sp, n->param); - sp += strlen(n->param) + 1; - } - thisfunc->parmlist = pnames; - } else { - thisfunc->parmlist = NULL; + emalloc(pnames, char **, (pcount + 1) * sizeof(char *), "func_install"); + for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode) + pnames[i] = n->param; + pnames[pcount] = NULL; } + thisfunc->parmlist = pnames; /* update lint table info */ - func_use(params->param, FUNC_DEFINE); + func_use(fname, FUNC_DEFINE); - func_count++; /* used by profiling / pretty printer */ + func_count++; /* used in profiler / pretty printer */ remove_params: /* remove params from symbol table */ pop_params(params->rnode); + return 0; } -/* pop_var --- remove a variable from the symbol table */ +/* remove_symbol --- remove a variable from the symbol table */ -static void -pop_var(NODE *np, int freeit) +NODE * +remove_symbol(char *name) { - register NODE *bucket, **save; - register size_t len; - char *name; + NODE *bucket, **save; + size_t len; - name = np->param; len = strlen(name); save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]); for (bucket = *save; bucket != NULL; bucket = bucket->hnext) { - if (len == bucket->hlength && STREQN(bucket->hname, name, len)) { + if (len == bucket->hlength && strncmp(bucket->hname, name, len) == 0) { var_count--; *save = bucket->hnext; - freenode(bucket); - if (freeit) - free(np->param); - return; + return bucket; } save = &(bucket->hnext); } + return NULL; } /* pop_params --- remove list of function parameters from symbol table */ @@ -5611,10 +6998,13 @@ static void pop_params(NODE *params) { + NODE *hp; if (params == NULL) return; pop_params(params->rnode); - pop_var(params, TRUE); + hp = remove_symbol(params->param); + if (hp != NULL) + freenode(hp); } /* make_param --- make NAME into a function parameter */ @@ -5627,9 +7017,8 @@ getnode(r); r->type = Node_param_list; r->rnode = NULL; - r->param = name; r->param_cnt = param_counter++; - return (install(name, r)); + return (install_symbol(name, r)); } static struct fdesc { @@ -5683,6 +7072,9 @@ struct fdesc *fp, *next; int i; + if (! in_main_context()) + goto free_mem; + for (i = 0; i < HASHSIZE; i++) { for (fp = ftable[i]; fp != NULL; fp = fp->next) { #ifdef REALLYMEAN @@ -5698,57 +7090,127 @@ _("function `%s' called but never defined"), fp->name); #endif if (do_lint && fp->used == 0) { - lintwarn(_("function `%s' defined but never called"), + lintwarn(_("function `%s' defined but never called directly"), fp->name); } } } +free_mem: /* now let's free all the memory */ for (i = 0; i < HASHSIZE; i++) { for (fp = ftable[i]; fp != NULL; fp = next) { next = fp->next; - free(fp->name); - free(fp); + efree(fp->name); + efree(fp); } + ftable[i] = NULL; } } /* param_sanity --- look for parameters that are regexp constants */ static void -param_sanity(NODE *arglist) +param_sanity(INSTRUCTION *arglist) { - NODE *argp, *arg; - int i; + INSTRUCTION *argl, *arg; + int i = 1; - for (i = 1, argp = arglist; argp != NULL; argp = argp->rnode, i++) { - arg = argp->lnode; - if (arg->type == Node_regex) - warning(_("regexp constant for parameter #%d yields boolean value"), i); + if (arglist == NULL) + return; + for (argl = arglist->nexti; argl; ) { + arg = argl->lasti; + if (arg->opcode == Op_match_rec) + warning_ln(arg->source_line, + _("regexp constant for parameter #%d yields boolean value"), i); + argl = arg->nexti; + i++; } } -/* deferred variables --- those that are only defined if needed. */ - -/* - * Is there any reason to use a hash table for deferred variables? At the - * moment, there are only 1 to 3 such variables, so it may not be worth - * the overhead. If more modules start using this facility, it should - * probably be converted into a hash table. - */ +/* foreach_func --- execute given function for each awk function in symbol table. */ -static struct deferred_variable { - NODE *(*load_func)(void); - struct deferred_variable *next; - char name[1]; /* variable-length array */ -} *deferred_variables; +int +foreach_func(int (*pfunc)(INSTRUCTION *, void *), int sort, void *data) +{ + int i, j; + NODE *p; + int ret = 0; -/* register_deferred_variable --- add a var name and loading function to the list */ + if (sort) { + NODE **tab; -void -register_deferred_variable(const char *name, NODE *(*load_func)(void)) -{ + /* + * Walk through symbol table counting 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 (j == 0) + return 0; + + emalloc(tab, NODE **, j * sizeof(NODE *), "foreach_func"); + + /* 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) { + tab[j] = p; + j++; + } + } + } + + /* Shazzam! */ + qsort(tab, j, sizeof(NODE *), sym_comp); + + for (i = 0; i < j; i++) { + if ((ret = pfunc(tab[i]->hvalue->code_ptr, data)) != 0) + break; + } + + efree(tab); + return ret; + } + + /* unsorted */ + for (i = 0; i < HASHSIZE; i++) { + for (p = variables[i]; p != NULL; p = p->hnext) { + if (p->hvalue->type == Node_func + && (ret = pfunc(p->hvalue->code_ptr, data)) != 0) + return ret; + } + } + return 0; +} + +/* deferred variables --- those that are only defined if needed. */ + +/* + * Is there any reason to use a hash table for deferred variables? At the + * moment, there are only 1 to 3 such variables, so it may not be worth + * the overhead. If more modules start using this facility, it should + * probably be converted into a hash table. + */ + +static struct deferred_variable { + NODE *(*load_func)(void); + struct deferred_variable *next; + char name[1]; /* variable-length array */ +} *deferred_variables; + +/* register_deferred_variable --- add a var name and loading function to the list */ + +void +register_deferred_variable(const char *name, NODE *(*load_func)(void)) +{ struct deferred_variable *dv; size_t sl = strlen(name); @@ -5763,116 +7225,122 @@ /* variable --- make sure NAME is in the symbol table */ NODE * -variable(char *name, int can_free, NODETYPE type) +variable(char *name, NODETYPE type) { - register NODE *r; + NODE *r; if ((r = lookup(name)) != NULL) { - if (r->type == Node_func) - fatal(_("function `%s' called with space between name and `(',\nor used as a variable or an array"), + if (r->type == Node_func) { + error(_("function `%s' called with space between name and `(',\nor used as a variable or an array"), r->vname); - + errcount++; + r->type = Node_var_new; /* continue parsing instead of exiting */ + } } else { /* not found */ struct deferred_variable *dv; for (dv = deferred_variables; TRUE; dv = dv->next) { if (dv == NULL) { - /* - * This is the only case in which we may not - * free the string. - */ - NODE *n; - - if (type == Node_var_array) - n = node(NULL, type, NULL); + /* + * This is the only case in which we may not free the string. + */ + if (type == Node_var) + r = mk_symbol(type, Nnull_string); else - n = node(Nnull_string, type, NULL); - - return install(name, n); + r = mk_symbol(type, (NODE *) NULL); + return install_symbol(name, r); } - if (STREQ(name, dv->name)) { + if (strcmp(name, dv->name) == 0) { r = (*dv->load_func)(); break; } } } - if (can_free) - free(name); + efree(name); return r; } -/* mk_rexp --- make a regular expression constant */ +/* make_regnode --- make a regular expression node */ static NODE * -mk_rexp(NODE *exp) +make_regnode(int type, NODE *exp) { NODE *n; - if (exp->type == Node_regex) - return exp; - getnode(n); - n->type = Node_dynregex; - n->re_exp = exp; - n->re_text = NULL; - n->re_reg = NULL; - n->re_flags = 0; + memset(n, 0, sizeof(NODE)); + n->type = type; n->re_cnt = 1; + + if (type == Node_regex) { + n->re_reg = make_regexp(exp->stptr, exp->stlen, FALSE, TRUE, FALSE); + if (n->re_reg == NULL) { + freenode(n); + return NULL; + } + n->re_exp = exp; + n->re_flags = CONSTANT; + } return n; } -/* isnoeffect --- when used as a statement, has no side effects */ -/* - * To be completely general, we should recursively walk the parse - * tree, to make sure that all the subexpressions also have no effect. - * Instead, we just weaken the actual warning that's printed, up above - * in the grammar. - */ +/* mk_rexp --- make a regular expression constant */ + +static NODE * +mk_rexp(INSTRUCTION *list) +{ + INSTRUCTION *ip; + + ip = list->nexti; + if (ip == list->lasti && ip->opcode == Op_match_rec) + ip->opcode = Op_push_re; + else { + ip = instruction(Op_push_re); + ip->memory = make_regnode(Node_dynregex, NULL); + ip->nexti = list->lasti->nexti; + list->lasti->nexti = ip; + list->lasti = ip; + } + return ip->memory; +} + +/* isnoeffect --- when used as a statement, has no side effects */ static int -isnoeffect(NODETYPE type) +isnoeffect(OPCODE type) { switch (type) { - case Node_times: - case Node_quotient: - case Node_mod: - case Node_plus: - case Node_minus: - case Node_subscript: - case Node_concat: - case Node_exp: - case Node_unary_minus: - case Node_field_spec: - case Node_and: - case Node_or: - case Node_equal: - case Node_notequal: - case Node_less: - case Node_greater: - case Node_leq: - case Node_geq: - case Node_match: - case Node_nomatch: - case Node_not: - case Node_val: - case Node_in_array: - case Node_NF: - case Node_NR: - case Node_FNR: - case Node_FS: - case Node_RS: - case Node_FIELDWIDTHS: - case Node_IGNORECASE: - case Node_OFS: - case Node_ORS: - case Node_OFMT: - case Node_CONVFMT: - case Node_BINMODE: - case Node_LINT: - case Node_SUBSEP: - case Node_TEXTDOMAIN: + case Op_times: + case Op_times_i: + case Op_quotient: + case Op_quotient_i: + case Op_mod: + case Op_mod_i: + case Op_plus: + case Op_plus_i: + case Op_minus: + case Op_minus_i: + case Op_subscript: + case Op_concat: + case Op_exp: + case Op_exp_i: + case Op_unary_minus: + case Op_field_spec: + case Op_and_final: + case Op_or_final: + case Op_equal: + case Op_notequal: + case Op_less: + case Op_greater: + case Op_leq: + case Op_geq: + case Op_match: + case Op_nomatch: + case Op_match_rec: + case Op_not: + case Op_in_array: return TRUE; default: break; /* keeps gcc -Wall happy */ @@ -5881,44 +7349,34 @@ return FALSE; } -/* isassignable --- can this node be assigned to? */ +/* make_assignable --- make this operand an assignable one if posiible */ -static int -isassignable(register NODE *n) +static INSTRUCTION * +make_assignable(INSTRUCTION *ip) { - switch (n->type) { - case Node_var_new: - case Node_var: - case Node_FIELDWIDTHS: - case Node_RS: - case Node_FS: - case Node_FNR: - case Node_NR: - case Node_NF: - case Node_IGNORECASE: - case Node_OFMT: - case Node_CONVFMT: - case Node_ORS: - case Node_OFS: - case Node_LINT: - case Node_BINMODE: - case Node_SUBSEP: - case Node_TEXTDOMAIN: - case Node_field_spec: - case Node_subscript: - return TRUE; - case Node_param_list: - return ((n->flags & FUNC) == 0); /* ok if not func name */ + switch (ip->opcode) { + case Op_push: + if (ip->memory->type == Node_param_list + && (ip->memory->flags & FUNC) != 0) + return NULL; + ip->opcode = Op_push_lhs; + return ip; + case Op_field_spec: + ip->opcode = Op_field_spec_lhs; + return ip; + case Op_subscript: + ip->opcode = Op_subscript_lhs; + return ip; default: break; /* keeps gcc -Wall happy */ } - return FALSE; + return NULL; } /* stopme --- for debugging */ NODE * -stopme(NODE *tree ATTRIBUTE_UNUSED) +stopme(int nargs ATTRIBUTE_UNUSED) { return (NODE *) 0; } @@ -5940,7 +7398,7 @@ } printf("msgid "); - pp_string_fp(stdout, str, len, '"', TRUE); + pp_string_fp(fprintf, stdout, str, len, '"', TRUE); putchar('\n'); printf("msgstr \"\"\n\n"); fflush(stdout); @@ -5963,35 +7421,15 @@ } printf("msgid "); - pp_string_fp(stdout, str1, len1, '"', TRUE); + pp_string_fp(fprintf, stdout, str1, len1, '"', TRUE); putchar('\n'); printf("msgid_plural "); - pp_string_fp(stdout, str2, len2, '"', TRUE); + pp_string_fp(fprintf, stdout, str2, len2, '"', TRUE); putchar('\n'); printf("msgstr[0] \"\"\nmsgstr[1] \"\"\n\n"); fflush(stdout); } -/* count_args --- count the number of printf arguments */ - -static void -count_args(NODE *tree) -{ - size_t count = 0; - NODE *save_tree; - - assert(tree->type == Node_K_printf - || (tree->type == Node_builtin && tree->builtin == do_sprintf)); - save_tree = tree; - - tree = tree->lnode; /* printf format string */ - - for (count = 0; tree != NULL; tree = tree->rnode) - count++; - - save_tree->printf_count = count; -} - /* isarray --- can this type be subscripted? */ static int @@ -6013,6 +7451,1196 @@ return FALSE; } +/* mk_binary --- instructions for binary operators */ + +static INSTRUCTION * +mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op) +{ + INSTRUCTION *ip1,*ip2; + AWKNUM res; + + ip2 = s2->nexti; + if (s2->lasti == ip2 && ip2->opcode == Op_push_i) { + /* do any numeric constant folding */ + ip1 = s1->nexti; + if (do_optimize > 1 + && ip1 == s1->lasti && ip1->opcode == Op_push_i + && (ip1->memory->flags & (STRCUR|STRING)) == 0 + && (ip2->memory->flags & (STRCUR|STRING)) == 0 + ) { + NODE *n1 = ip1->memory, *n2 = ip2->memory; + res = force_number(n1); + (void) force_number(n2); + switch (op->opcode) { + case Op_times: + res *= n2->numbr; + break; + case Op_quotient: + if (n2->numbr == 0.0) { + /* don't fatalize, allow parsing rest of the input */ + error_ln(op->source_line, _("division by zero attempted")); + goto regular; + } + + res /= n2->numbr; + break; + case Op_mod: + if (n2->numbr == 0.0) { + /* don't fatalize, allow parsing rest of the input */ + error_ln(op->source_line, _("division by zero attempted in `%%'")); + goto regular; + } +#ifdef HAVE_FMOD + res = fmod(res, n2->numbr); +#else /* ! HAVE_FMOD */ + (void) modf(res / n2->numbr, &res); + res = n1->numbr - res * n2->numbr; +#endif /* ! HAVE_FMOD */ + break; + case Op_plus: + res += n2->numbr; + break; + case Op_minus: + res -= n2->numbr; + break; + case Op_exp: + res = calc_exp(res, n2->numbr); + break; + default: + goto regular; + } + + op->opcode = Op_push_i; + op->memory = mk_number(res, (PERM|NUMCUR|NUMBER)); + n1->flags &= ~PERM; + n1->flags |= MALLOC; + n2->flags &= ~PERM; + n2->flags |= MALLOC; + unref(n1); + unref(n2); + bcfree(ip1); + bcfree(ip2); + bcfree(s1); + bcfree(s2); + return list_create(op); + } else { + /* do basic arithmetic optimisation */ + /* convert (Op_push_i Node_val) + (Op_plus) to (Op_plus_i Node_val) */ + switch (op->opcode) { + case Op_times: + op->opcode = Op_times_i; + break; + case Op_quotient: + op->opcode = Op_quotient_i; + break; + case Op_mod: + op->opcode = Op_mod_i; + break; + case Op_plus: + op->opcode = Op_plus_i; + break; + case Op_minus: + op->opcode = Op_minus_i; + break; + case Op_exp: + op->opcode = Op_exp_i; + break; + default: + goto regular; + } + + op->memory = ip2->memory; + bcfree(ip2); + bcfree(s2); /* Op_list */ + return list_append(s1, op); + } + } + +regular: + /* append lists s1, s2 and add `op' bytecode */ + (void) list_merge(s1, s2); + return list_append(s1, op); +} + +/* mk_boolean --- instructions for boolean and, or */ + +static INSTRUCTION * +mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op) +{ + INSTRUCTION *tp; + OPCODE opc, final_opc; + + opc = op->opcode; /* Op_and or Op_or */ + final_opc = (opc == Op_or) ? Op_or_final : Op_and_final; + + add_lint(right, LINT_assign_in_cond); + + tp = left->lasti; + + if (tp->opcode != final_opc) { /* x || y */ + list_append(right, instruction(final_opc)); + add_lint(left, LINT_assign_in_cond); + (void) list_append(left, op); + left->lasti->target_jmp = right->lasti; + + /* NB: target_stmt points to previous Op_and(Op_or) in a chain; + * target_stmt only used in the parser (see below). + */ + + left->lasti->target_stmt = left->lasti; + right->lasti->target_stmt = left->lasti; + } else { /* optimization for x || y || z || ... */ + INSTRUCTION *ip; + + op->opcode = final_opc; + (void) list_append(right, op); + op->target_stmt = tp; + tp->opcode = opc; + tp->target_jmp = op; + + /* update jump targets */ + for (ip = tp->target_stmt; ; ip = ip->target_stmt) { + assert(ip->opcode == opc); + assert(ip->target_jmp == tp); + /* if (ip->opcode == opc && ip->target_jmp == tp) */ + ip->target_jmp = op; + if (ip->target_stmt == ip) + break; + } + } + + return list_merge(left, right); +} + +/* mk_condition --- if-else and conditional */ + +static INSTRUCTION * +mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch, + INSTRUCTION *elsep, INSTRUCTION *false_branch) +{ + /* + * ---------------- + * cond + * ---------------- + * t: [Op_jmp_false f ] + * ---------------- + * true_branch + * + * ---------------- + * [Op_jmp y] + * ---------------- + * f: + * false_branch + * ---------------- + * y: [Op_no_op] + * ---------------- + */ + + INSTRUCTION *ip; + + if (false_branch == NULL) { + false_branch = list_create(instruction(Op_no_op)); + if (elsep != NULL) { /* else { } */ + if (do_profiling) + (void) list_prepend(false_branch, elsep); + else + bcfree(elsep); + } + } else { + /* assert(elsep != NULL); */ + + /* avoid a series of no_op's: if .. else if .. else if .. */ + if (false_branch->lasti->opcode != Op_no_op) + (void) list_append(false_branch, instruction(Op_no_op)); + if (do_profiling) { + (void) list_prepend(false_branch, elsep); + false_branch->nexti->branch_end = false_branch->lasti; + (void) list_prepend(false_branch, instruction(Op_exec_count)); + } else + bcfree(elsep); + } + + (void) list_prepend(false_branch, instruction(Op_jmp)); + false_branch->nexti->target_jmp = false_branch->lasti; + + add_lint(cond, LINT_assign_in_cond); + ip = list_append(cond, instruction(Op_jmp_false)); + ip->lasti->target_jmp = false_branch->nexti->nexti; + + if (do_profiling) { + (void) list_prepend(ip, ifp); + (void) list_append(ip, instruction(Op_exec_count)); + ip->nexti->branch_if = ip->lasti; + ip->nexti->branch_else = false_branch->nexti; + } else + bcfree(ifp); + + if (true_branch != NULL) + list_merge(ip, true_branch); + return list_merge(ip, false_branch); +} + +enum defline { FIRST_LINE, LAST_LINE }; + +/* find_line -- find the first(last) line in a list of (pattern) instructions */ + +static int +find_line(INSTRUCTION *pattern, enum defline what) +{ + INSTRUCTION *ip; + int lineno = 0; + + for (ip = pattern->nexti; ip; ip = ip->nexti) { + if (what == LAST_LINE) { + if (ip->source_line > lineno) + lineno = ip->source_line; + } else { /* FIRST_LINE */ + if (ip->source_line > 0 + && (lineno == 0 || ip->source_line < lineno)) + lineno = ip->source_line; + } + if (ip == pattern->lasti) + break; + } + assert(lineno > 0); + return lineno; +} + +/* append_rule --- pattern-action instructions */ + +static INSTRUCTION * +append_rule(INSTRUCTION *pattern, INSTRUCTION *action) +{ + /* + * ---------------- + * pattern + * ---------------- + * [Op_jmp_false f ] + * ---------------- + * action + * ---------------- + * f: [Op_no_op ] + * ---------------- + */ + + INSTRUCTION *rp; + INSTRUCTION *tp; + INSTRUCTION *ip; + + if (rule != Rule) { + rp = pattern; + if (do_profiling) + (void) list_append(action, instruction(Op_no_op)); + (rp + 1)->firsti = action->nexti; + (rp + 1)->lasti = action->lasti; + (rp + 2)->first_line = pattern->source_line; + (rp + 2)->last_line = lastline; + ip = list_prepend(action, rp); + + } else { + rp = bcalloc(Op_rule, 3, 0); + rp->in_rule = Rule; + rp->source_file = source; + tp = instruction(Op_no_op); + + if (pattern == NULL) { + /* assert(action != NULL); */ + if (do_profiling) + (void) list_prepend(action, instruction(Op_exec_count)); + (rp + 1)->firsti = action->nexti; + (rp + 1)->lasti = tp; + (rp + 2)->first_line = firstline; + (rp + 2)->last_line = lastline; + rp->source_line = firstline; + ip = list_prepend(list_append(action, tp), rp); + } else { + (void) list_append(pattern, instruction(Op_jmp_false)); + pattern->lasti->target_jmp = tp; + (rp + 2)->first_line = find_line(pattern, FIRST_LINE); + rp->source_line = (rp + 2)->first_line; + if (action == NULL) { + (rp + 2)->last_line = find_line(pattern, LAST_LINE); + action = list_create(instruction(Op_K_print_rec)); + if (do_profiling) + (void) list_prepend(action, instruction(Op_exec_count)); + } else + (rp + 2)->last_line = lastline; + + if (do_profiling) { + (void) list_prepend(pattern, instruction(Op_exec_count)); + (void) list_prepend(action, instruction(Op_exec_count)); + } + (rp + 1)->firsti = action->nexti; + (rp + 1)->lasti = tp; + ip = list_append( + list_merge(list_prepend(pattern, rp), + action), + tp); + } + + } + + list_append(rule_list, rp + 1); + + if (rule_block[rule] == NULL) + rule_block[rule] = ip; + else + (void) list_merge(rule_block[rule], ip); + + return rule_block[rule]; +} + +/* mk_assignment --- assignment bytecodes */ + +static INSTRUCTION * +mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op) +{ + INSTRUCTION *tp; + INSTRUCTION *ip; + + tp = lhs->lasti; + switch (tp->opcode) { + case Op_field_spec: + tp->opcode = Op_field_spec_lhs; + break; + case Op_subscript: + tp->opcode = Op_subscript_lhs; + break; + case Op_push: + case Op_push_array: + tp->opcode = Op_push_lhs; + break; + default: + cant_happen(); + } + + tp->do_reference = (op->opcode != Op_assign); /* check for uninitialized reference */ + + if (rhs != NULL) + ip = list_merge(rhs, lhs); + else + ip = lhs; + + (void) list_append(ip, op); + + if (tp->opcode == Op_push_lhs + && tp->memory->type == Node_var + && tp->memory->var_assign + ) { + tp->do_reference = FALSE; /* no uninitialized reference checking + * for a special variable. + */ + (void) list_append(ip, instruction(Op_var_assign)); + ip->lasti->assign_var = tp->memory->var_assign; + } else if (tp->opcode == Op_field_spec_lhs) { + (void) list_append(ip, instruction(Op_field_assign)); + ip->lasti->field_assign = (Func_ptr) 0; + tp->target_assign = ip->lasti; + } + + return ip; +} + +/* optimize_assignment --- peephole optimization for assignment */ + +static INSTRUCTION * +optimize_assignment(INSTRUCTION *exp) +{ + INSTRUCTION *i1; + INSTRUCTION *i2; + INSTRUCTION *i3; + + /* + * Optimize assignment statements array[subs] = x; var = x; $n = x; + * string concatenation of the form s = s t. + * + * 1) Array element assignment array[subs] = x: + * Replaces Op_push_array + Op_subscript_lhs + Op_assign + Op_pop + * with single instruction Op_store_sub. + * Limitation: 1 dimension and sub is simple var/value. + * + * 2) Simple variable assignment var = x: + * Replaces Op_push_lhs + Op_assign + Op_pop with Op_store_var. + * + * 3) Field assignment $n = x: + * Replaces Op_field_spec_lhs + Op_assign + Op_field_assign + Op_pop + * with Op_store_field. + * + * 4) Optimization for string concatenation: + * For cases like x = x y, uses realloc to include y in x; + * also eliminates instructions Op_push_lhs and Op_pop. + */ + + /* + * N.B.: do not append Op_pop instruction to the returned + * instruction list if optimized. None of these + * optimized instructions pushes the r-value of assignment + * onto the runtime stack. + */ + + i2 = NULL; + i1 = exp->lasti; + + if ( ! do_optimize + || ( i1->opcode != Op_assign + && i1->opcode != Op_field_assign) + ) + return list_append(exp, instruction(Op_pop)); + + for (i2 = exp->nexti; i2 != i1; i2 = i2->nexti) { + switch (i2->opcode) { + case Op_concat: + if (i2->nexti->opcode == Op_push_lhs /* l.h.s is a simple variable */ + && (i2->concat_flag & CSVAR) /* 1st exp in r.h.s is a simple variable; + * see Op_concat in the grammer above. + */ + && i2->nexti->memory == exp->nexti->memory /* and the same as in l.h.s */ + && i2->nexti->nexti == i1 + && i1->opcode == Op_assign + ) { + /* s = s ... optimization */ + + /* avoid stuff like x = x (x = y) or x = x gsub(/./, "b", x); + * check for l-value reference to this variable in the r.h.s. + * Also, avoid function calls in general to guard against + * global variable assignment. + */ + + for (i3 = exp->nexti->nexti; i3 != i2; i3 = i3->nexti) { + if ((i3->opcode == Op_push_lhs && i3->memory == i2->nexti->memory) + || i3->opcode == Op_func_call) + return list_append(exp, instruction(Op_pop)); /* no optimization */ + } + + /* remove the variable from r.h.s */ + i3 = exp->nexti; + exp->nexti = i3->nexti; + bcfree(i3); + + if (--i2->expr_count == 1) /* one less expression in Op_concat */ + i2->opcode = Op_no_op; + + i3 = i2->nexti; + assert(i3->opcode == Op_push_lhs); + i3->opcode = Op_assign_concat; /* change Op_push_lhs to Op_assign_concat */ + i3->nexti = NULL; + bcfree(i1); /* Op_assign */ + exp->lasti = i3; /* update Op_list */ + return exp; + } + break; + + case Op_field_spec_lhs: + if (i2->nexti->opcode == Op_assign + && i2->nexti->nexti == i1 + && i1->opcode == Op_field_assign + ) { + /* $n = .. */ + i2->opcode = Op_store_field; + bcfree(i2->nexti); /* Op_assign */ + i2->nexti = NULL; + bcfree(i1); /* Op_field_assign */ + exp->lasti = i2; /* update Op_list */ + return exp; + } + break; + + case Op_push_array: + if (i2->nexti->nexti->opcode == Op_subscript_lhs) { + i3 = i2->nexti->nexti; + if (i3->sub_count == 1 + && i3->nexti == i1 + && i1->opcode == Op_assign + ) { + /* array[sub] = .. */ + i3->opcode = Op_store_sub; + i3->memory = i2->memory; + i3->expr_count = 1; /* sub_count shadows memory, + * so use expr_count instead. + */ + i3->nexti = NULL; + i2->opcode = Op_no_op; + bcfree(i1); /* Op_assign */ + exp->lasti = i3; /* update Op_list */ + return exp; + } + } + break; + + case Op_push_lhs: + if (i2->nexti == i1 + && i1->opcode == Op_assign + ) { + /* var = .. */ + i2->opcode = Op_store_var; + i2->nexti = NULL; + bcfree(i1); /* Op_assign */ + exp->lasti = i2; /* update Op_list */ + return exp; + } + break; + + default: + break; + } + } + + /* no optimization */ + return list_append(exp, instruction(Op_pop)); +} + + +/* mk_getline --- make instructions for getline */ + +static INSTRUCTION * +mk_getline(INSTRUCTION *op, INSTRUCTION *var, INSTRUCTION *redir, int redirtype) +{ + INSTRUCTION *ip; + INSTRUCTION *tp; + INSTRUCTION *asgn = NULL; + + /* + * getline [var] < [file] + * + * [ file (simp_exp)] + * [ [ var ] ] + * [ Op_K_getline_redir|NULL|redir_type|into_var] + * [ [var_assign] ] + * + */ + + if (redir == NULL) { + int sline = op->source_line; + bcfree(op); + op = bcalloc(Op_K_getline, 2, sline); + (op + 1)->target_endfile = ip_endfile; + (op + 1)->target_beginfile = ip_beginfile; + } + + if (var != NULL) { + tp = make_assignable(var->lasti); + assert(tp != NULL); + + /* check if we need after_assign bytecode */ + if (tp->opcode == Op_push_lhs + && tp->memory->type == Node_var + && tp->memory->var_assign + ) { + asgn = instruction(Op_var_assign); + asgn->assign_ctxt = op->opcode; + asgn->assign_var = tp->memory->var_assign; + } else if (tp->opcode == Op_field_spec_lhs) { + asgn = instruction(Op_field_assign); + asgn->assign_ctxt = op->opcode; + asgn->field_assign = (Func_ptr) 0; /* determined at run time */ + tp->target_assign = asgn; + } + if (redir != NULL) { + ip = list_merge(redir, var); + (void) list_append(ip, op); + } else + ip = list_append(var, op); + } else if (redir != NULL) + ip = list_append(redir, op); + else + ip = list_create(op); + op->into_var = (var != NULL); + op->redir_type = (redir != NULL) ? redirtype : 0; + + return (asgn == NULL ? ip : list_append(ip, asgn)); +} + + +/* mk_for_loop --- for loop bytecodes */ + +static INSTRUCTION * +mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond, + INSTRUCTION *incr, INSTRUCTION *body) +{ + /* + * ------------------------ + * init (may be NULL) + * ------------------------ + * x: + * cond (Op_no_op if NULL) + * ------------------------ + * [ Op_jmp_false tb ] + * ------------------------ + * body (may be NULL) + * ------------------------ + * tc: + * incr (may be NULL) + * [ Op_jmp x ] + * ------------------------ + * tb:[ Op_no_op ] + */ + + INSTRUCTION *ip, *tbreak, *tcont; + INSTRUCTION *jmp; + INSTRUCTION *pp_cond; + INSTRUCTION *ret; + + tbreak = instruction(Op_no_op); + + if (cond != NULL) { + add_lint(cond, LINT_assign_in_cond); + pp_cond = cond->nexti; + ip = cond; + (void) list_append(ip, instruction(Op_jmp_false)); + ip->lasti->target_jmp = tbreak; + } else { + pp_cond = instruction(Op_no_op); + ip = list_create(pp_cond); + } + + if (init != NULL) + ip = list_merge(init, ip); + + if (do_profiling) { + (void) list_append(ip, instruction(Op_exec_count)); + (forp + 1)->forloop_cond = pp_cond; + (forp + 1)->forloop_body = ip->lasti; + } + + if (body != NULL) + (void) list_merge(ip, body); + + jmp = instruction(Op_jmp); + jmp->target_jmp = pp_cond; + if (incr == NULL) + tcont = jmp; + else { + tcont = incr->nexti; + (void) list_merge(ip, incr); + } + + (void) list_append(ip, jmp); + ret = list_append(ip, tbreak); + fix_break_continue(ret, tbreak, tcont); + + if (do_profiling) { + forp->target_break = tbreak; + forp->target_continue = tcont; + ret = list_prepend(ret, forp); + } /* else + forp is NULL */ + + return ret; +} + +/* add_lint --- add lint warning bytecode if needed */ + +static void +add_lint(INSTRUCTION *list, LINTTYPE linttype) +{ +#ifndef NO_LINT + INSTRUCTION *ip; + + switch (linttype) { + case LINT_assign_in_cond: + ip = list->lasti; + if (ip->opcode == Op_var_assign || ip->opcode == Op_field_assign) { + assert(ip != list->nexti); + for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti) + ; + } + + if (ip->opcode == Op_assign || ip->opcode == Op_assign_concat) { + list_append(list, instruction(Op_lint)); + list->lasti->lint_type = linttype; + } + break; + + case LINT_no_effect: + if (list->lasti->opcode == Op_pop && list->nexti != list->lasti) { + for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti) + ; + + if (do_lint) { /* compile-time warning */ + if (isnoeffect(ip->opcode)) + lintwarn_ln(ip->source_line, ("statement may have no effect")); + } + + if (ip->opcode == Op_push) { /* run-time warning */ + list_append(list, instruction(Op_lint)); + list->lasti->lint_type = linttype; + } + } + break; + + default: + break; + } +#endif +} + +/* mk_expression_list --- list of bytecode lists */ + +static INSTRUCTION * +mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1) +{ + INSTRUCTION *r; + + /* we can't just combine all bytecodes, since we need to + * process individual expressions for a few builtins in snode() (-: + */ + + /* -- list of lists */ + /* [Op_list| ... ]------ + * | + * [Op_list| ... ] -- | + * ... | | + * ... <------- | + * [Op_list| ... ] -- | + * ... | | + * ... | | + * ... <------- -- + */ + + assert(s1 != NULL && s1->opcode == Op_list); + if (list == NULL) { + list = instruction(Op_list); + list->nexti = s1; + list->lasti = s1->lasti; + return list; + } + + /* append expression to the end of the list */ + + r = list->lasti; + r->nexti = s1; + list->lasti = s1->lasti; + return list; +} + +/* count_expressions --- fixup expression_list from mk_expression_list. + * returns no of expressions in list. isarg is true + * for function arguments. + */ + +static int +count_expressions(INSTRUCTION **list, int isarg) +{ + INSTRUCTION *expr; + INSTRUCTION *r = NULL; + int count = 0; + + if (*list == NULL) /* error earlier */ + return 0; + + for (expr = (*list)->nexti; expr; ) { + INSTRUCTION *t1, *t2; + t1 = expr->nexti; + t2 = expr->lasti; + if (isarg && t1 == t2 && t1->opcode == Op_push) + t1->opcode = Op_push_param; + if (++count == 1) + r = expr; + else + (void) list_merge(r, expr); + expr = t2->nexti; + } + + assert(count > 0); + if (! isarg && count > max_args) + max_args = count; + bcfree(*list); + *list = r; + return count; +} + +/* fix_break_continue --- fix up break & continue codes in loop bodies */ + +static void +fix_break_continue(INSTRUCTION *list, INSTRUCTION *b_target, INSTRUCTION *c_target) +{ + INSTRUCTION *ip; + + list->lasti->nexti = NULL; /* just to make sure */ + + for (ip = list->nexti; ip != NULL; ip = ip->nexti) { + switch (ip->opcode) { + case Op_K_break: + if (ip->target_jmp == NULL) + ip->target_jmp = b_target; + break; + + case Op_K_continue: + if (ip->target_jmp == NULL) + ip->target_jmp = c_target; + break; + + default: + /* this is to keep the compiler happy. sheesh. */ + break; + } + } +} + + +/* append_symbol --- append symbol to the list of symbols + * installed in the symbol table. + */ + +void +append_symbol(char *name) +{ + NODE *hp; + + /* N.B.: func_install removes func name and reinstalls it; + * and we get two entries for it here!. destroy_symbol() + * will find and destroy the Node_func which is what we want. + */ + + getnode(hp); + hp->hname = name; /* shallow copy */ + hp->hnext = symbol_list->hnext; + symbol_list->hnext = hp; +} + +/* release_symbol --- free symbol list and optionally remove symbol from symbol table */ + +void +release_symbols(NODE *symlist, int keep_globals) +{ + NODE *hp, *n; + + for (hp = symlist->hnext; hp != NULL; hp = n) { + if (! keep_globals) { + /* destroys globals, function, and params + * if still in symbol table and not removed by func_install + * due to syntax error. + */ + destroy_symbol(hp->hname); + } + n = hp->hnext; + freenode(hp); + } + symlist->hnext = NULL; +} + +/* destroy_symbol --- remove a symbol from symbol table +* and free all associated memory. +*/ + +void +destroy_symbol(char *name) +{ + NODE *symbol, *hp; + + symbol = lookup(name); + if (symbol == NULL) + return; + + if (symbol->type == Node_func) { + char **varnames; + NODE *func, *n; + + func = symbol; + varnames = func->parmlist; + if (varnames != NULL) + efree(varnames); + + /* function parameters of type Node_param_list */ + for (n = func->lnode->rnode; n != NULL; ) { + NODE *np; + np = n->rnode; + efree(n->param); + freenode(n); + n = np; + } + freenode(func->lnode); + func_count--; + + } else if (symbol->type == Node_var_array) + assoc_clear(symbol); + else if (symbol->type == Node_var) + unref(symbol->var_value); + + /* remove from symbol table */ + hp = remove_symbol(name); + efree(hp->hname); + freenode(hp->hvalue); + freenode(hp); +} + +#define pool_size d.dl +#define freei x.xi +static INSTRUCTION *pool_list; +static AWK_CONTEXT *curr_ctxt = NULL; + +/* new_context --- create a new execution context. */ + +AWK_CONTEXT * +new_context() +{ + AWK_CONTEXT *ctxt; + + emalloc(ctxt, AWK_CONTEXT *, sizeof(AWK_CONTEXT), "new_context"); + memset(ctxt, 0, sizeof(AWK_CONTEXT)); + ctxt->srcfiles.next = ctxt->srcfiles.prev = &ctxt->srcfiles; + ctxt->rule_list.opcode = Op_list; + ctxt->rule_list.lasti = &ctxt->rule_list; + return ctxt; +} + +/* set_context --- change current execution context. */ + +static void +set_context(AWK_CONTEXT *ctxt) +{ + pool_list = &ctxt->pools; + symbol_list = &ctxt->symbols; + srcfiles = &ctxt->srcfiles; + rule_list = &ctxt->rule_list; + install_func = ctxt->install_func; + curr_ctxt = ctxt; +} + +/* + * push_context: + * + * Switch to the given context after saving the current one. The set + * of active execution contexts forms a stack; the global or main context + * is at the bottom of the stack. + */ + +void +push_context(AWK_CONTEXT *ctxt) +{ + ctxt->prev = curr_ctxt; + /* save current source and sourceline */ + if (curr_ctxt != NULL) { + curr_ctxt->sourceline = sourceline; + curr_ctxt->source = source; + } + sourceline = 0; + source = NULL; + set_context(ctxt); +} + +/* pop_context --- switch to previous execution context. */ + +void +pop_context() +{ + AWK_CONTEXT *ctxt; + + assert(curr_ctxt != NULL); + ctxt = curr_ctxt->prev; + /* restore source and sourceline */ + sourceline = ctxt->sourceline; + source = ctxt->source; + set_context(ctxt); +} + +/* in_main_context --- are we in the main context ? */ + +int +in_main_context() +{ + assert(curr_ctxt != NULL); + return (curr_ctxt->prev == NULL); +} + +/* free_context --- free context structure and related data. */ + +void +free_context(AWK_CONTEXT *ctxt, int keep_globals) +{ + SRCFILE *s, *sn; + + if (ctxt == NULL) + return; + + assert(curr_ctxt != ctxt); + + /* free all code including function codes */ + free_bcpool(&ctxt->pools); + /* free symbols */ + release_symbols(&ctxt->symbols, keep_globals); + /* free srcfiles */ + for (s = &ctxt->srcfiles; s != &ctxt->srcfiles; s = sn) { + sn = s->next; + if (s->stype != SRC_CMDLINE && s->stype != SRC_STDIN) + efree(s->fullpath); + efree(s->src); + efree(s); + } + efree(ctxt); +} + +/* free_bc_internal --- free internal memory of an instruction. */ + +static void +free_bc_internal(INSTRUCTION *cp) +{ + NODE *m; + + switch(cp->opcode) { + case Op_func_call: + if (cp->func_name != NULL + && cp->func_name != builtin_func + ) + efree(cp->func_name); + break; + case Op_push_re: + case Op_match_rec: + case Op_match: + case Op_nomatch: + m = cp->memory; + if (m->re_reg != NULL) + refree(m->re_reg); + if (m->re_exp != NULL) + unref(m->re_exp); + if (m->re_text != NULL) + unref(m->re_text); + freenode(m); + break; + case Op_token: /* token lost during error recovery in yyparse */ + if (cp->lextok != NULL) + efree(cp->lextok); + break; + case Op_illegal: + cant_happen(); + default: + break; + } +} + + +/* INSTR_CHUNK must be > largest code size (3) */ +#define INSTR_CHUNK 127 + +/* bcfree --- deallocate instruction */ + +void +bcfree(INSTRUCTION *cp) +{ + cp->opcode = 0; + cp->nexti = pool_list->freei; + pool_list->freei = cp; +} + +/* bcalloc --- allocate a new instruction */ + +INSTRUCTION * +bcalloc(OPCODE op, int size, int srcline) +{ + INSTRUCTION *cp; + + if (size > 1) { + /* wide instructions Op_rule, Op_func_call .. */ + emalloc(cp, INSTRUCTION *, (size + 1) * sizeof(INSTRUCTION), "bcalloc"); + cp->pool_size = size; + cp->nexti = pool_list->nexti; + pool_list->nexti = cp++; + } else { + INSTRUCTION *pool; + + pool = pool_list->freei; + if (pool == NULL) { + INSTRUCTION *last; + emalloc(cp, INSTRUCTION *, (INSTR_CHUNK + 1) * sizeof(INSTRUCTION), "bcalloc"); + + cp->pool_size = INSTR_CHUNK; + cp->nexti = pool_list->nexti; + pool_list->nexti = cp; + pool = ++cp; + last = &pool[INSTR_CHUNK - 1]; + for (; cp <= last; cp++) { + cp->opcode = 0; + cp->nexti = cp + 1; + } + --cp; + cp->nexti = NULL; + } + cp = pool; + pool_list->freei = cp->nexti; + } + + memset(cp, 0, size * sizeof(INSTRUCTION)); + cp->opcode = op; + cp->source_line = srcline; + return cp; +} + +/* free_bcpool --- free list of instruction memory pools */ + +static void +free_bcpool(INSTRUCTION *pl) +{ + INSTRUCTION *pool, *tmp; + + for (pool = pl->nexti; pool != NULL; pool = tmp) { + INSTRUCTION *cp, *last; + long psiz; + psiz = pool->pool_size; + if (psiz == INSTR_CHUNK) + last = pool + psiz; + else + last = pool + 1; + for (cp = pool + 1; cp <= last ; cp++) { + if (cp->opcode != 0) + free_bc_internal(cp); + } + tmp = pool->nexti; + efree(pool); + } + memset(pl, 0, sizeof(INSTRUCTION)); +} + + +static inline INSTRUCTION * +list_create(INSTRUCTION *x) +{ + INSTRUCTION *l; + + l = instruction(Op_list); + l->nexti = x; + l->lasti = x; + return l; +} + +static inline INSTRUCTION * +list_append(INSTRUCTION *l, INSTRUCTION *x) +{ +#ifdef GAWKDEBUG + if (l->opcode != Op_list) + cant_happen(); +#endif + l->lasti->nexti = x; + l->lasti = x; + return l; +} + +static inline INSTRUCTION * +list_prepend(INSTRUCTION *l, INSTRUCTION *x) +{ +#ifdef GAWKDEBUG + if (l->opcode != Op_list) + cant_happen(); +#endif + x->nexti = l->nexti; + l->nexti = x; + return l; +} + +static inline INSTRUCTION * +list_merge(INSTRUCTION *l1, INSTRUCTION *l2) +{ +#ifdef GAWKDEBUG + if (l1->opcode != Op_list) + cant_happen(); + if (l2->opcode != Op_list) + cant_happen(); +#endif + l1->lasti->nexti = l2->nexti; + l1->lasti = l2->lasti; + bcfree(l2); + return l1; +} + /* See if name is a special token. */ int @@ -6024,13 +8652,13 @@ static int did_sort = FALSE; if (! did_sort) { - qsort(tokentab, sizeof(tokentab) / sizeof(tokentab[0]), + qsort((void *) tokentab, + sizeof(tokentab) / sizeof(tokentab[0]), sizeof(tokentab[0]), tokcompare); did_sort = TRUE; } #endif - low = 0; high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1; while (low <= high) { @@ -6043,8 +8671,12 @@ high = mid - 1; else if (i > 0) /* token > mid */ low = mid + 1; - else + else { + if ((do_traditional && (tokentab[mid].flags & GAWKX)) + || (do_posix && (tokentab[mid].flags & NOT_POSIX))) + return -1; return mid; + } } return -1; } @@ -6069,7 +8701,7 @@ fp = fdopen(fd, "r"); if (fp == NULL) { fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno)); - exit(EXIT_FAILURE); + gawk_exit(EXIT_FAILURE); } } @@ -6095,162 +8727,4 @@ return ret; } -/* constant_fold --- try to fold constant operations */ - -static NODE * -constant_fold(NODE *left, NODETYPE op, NODE *right) -{ - AWKNUM result; - extern double fmod P((double x, double y)); - - if (! do_optimize) - return node(left, op, right); - - /* Unary not */ - if (right == NULL) { - if (op == Node_not && left->type == Node_val) { - if ((left->flags & (STRCUR|STRING)) != 0) { - NODE *ret; - if (left->stlen == 0) { - ret = make_number((AWKNUM) 1.0); - } else { - ret = make_number((AWKNUM) 0.0); - } - unref(left); - - return ret; - } else { - if (left->numbr == 0) { - left->numbr = 1.0; - } else { - left->numbr = 0.0; - } - - return left; - } - } - - return node(left, op, right); - } - - /* String concatentation of two string constants */ - if (op == Node_concat - && left->type == Node_val - && (left->flags & (STRCUR|STRING)) != 0 - && right->type == Node_val - && (right->flags & (STRCUR|STRING)) != 0) { - size_t newlen = left->stlen + right->stlen + 2; - - erealloc(left->stptr, char *, newlen, "constant_fold"); - memcpy(left->stptr + left->stlen, right->stptr, right->stlen); - left->stptr[left->stlen + right->stlen] = '\0'; - left->stlen += right->stlen; - - unref(right); - return left; - } - - /* - * From here down, numeric operations. - * Check for string and bail out if have them. - */ - if (left->type != Node_val - || (left->flags & (STRCUR|STRING)) != 0 - || right->type != Node_val - || (right->flags & (STRCUR|STRING)) != 0) { - return node(left, op, right); - } - - /* Numeric operations: */ - switch (op) { - case Node_not: - case Node_exp: - case Node_times: - case Node_quotient: - case Node_mod: - case Node_plus: - case Node_minus: - break; - default: - return node(left, op, right); - } - - left->numbr = force_number(left); - right->numbr = force_number(right); - - result = left->numbr; - switch (op) { - case Node_exp: - result = calc_exp(left->numbr, right->numbr); - break; - case Node_times: - result *= right->numbr; - break; - case Node_quotient: - if (right->numbr == 0) - fatal(_("division by zero attempted in `/'")); - result /= right->numbr; - break; - case Node_mod: - if (right->numbr == 0) - fatal(_("division by zero attempted in `%%'")); -#ifdef HAVE_FMOD - result = fmod(result, right->numbr); -#else /* ! HAVE_FMOD */ - (void) modf(left->numbr / right->numbr, &result); - result = left->numbr - result * right->numbr; -#endif /* ! HAVE_FMOD */ - break; - case Node_plus: - result += right->numbr; - break; - case Node_minus: - result -= right->numbr; - break; - default: - /* Shut up compiler warnings */ - fatal("can't happen"); - break; - } - - unref(right); - left->numbr = result; - - return left; -} - -/* optimize_concat --- optimize the general "x = x y z a" case */ - -static NODE * -optimize_concat(NODE *left, NODETYPE op, NODE *right) -{ - NODE *top, *leftmost; - - if (op != Node_assign) - return node(left, op, right); - - /* - * optimization of `x = x y'. can save lots of time - * if done a lot. - */ - if (( left->type == Node_var - || left->type == Node_var_new - || left->type == Node_param_list) - && right->type == Node_concat) { - /* find bottom of tree, save it */ - for (top = right; top->lnode != NULL && top->type == Node_concat; top = top->lnode) { - leftmost = top->lnode; - if (leftmost->type == Node_concat) - continue; - - /* at this point, we've run out of concatentation */ - if (leftmost != left) - return node(left, op, right); - - top->lnode = Nnull_string; - return node(left, Node_assign_concat, right); - } - } - return node(left, op, right); -} diff -Nru gawk-3.1.8+dfsg/awkgram.y gawk-4.0.1+dfsg/awkgram.y --- gawk-3.1.8+dfsg/awkgram.y 2010-04-13 19:24:32.000000000 +0000 +++ gawk-4.0.1+dfsg/awkgram.y 2012-03-28 19:52:40.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -34,62 +34,106 @@ #define signed /**/ #endif -#define CAN_FREE TRUE -#define DONT_FREE FALSE - -#ifdef CAN_USE_STDARG_H static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1; -#else -static void yyerror(); /* va_alist */ -#endif -static char *get_src_buf P((void)); -static int yylex P((void)); -static NODE *node_common P((NODETYPE op)); -static NODE *snode P((NODE *subn, NODETYPE op, int sindex)); -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)); -static NODE *make_param P((char *name)); -static NODE *mk_rexp P((NODE *exp)); -static int dup_parms P((NODE *func)); -static void param_sanity P((NODE *arglist)); -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((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)); -static int isarray P((NODE *n)); +static void error_ln(int line, const char *m, ...) ATTRIBUTE_PRINTF_2; +static void lintwarn_ln(int line, const char *m, ...) ATTRIBUTE_PRINTF_2; +static void warning_ln(int line, const char *m, ...) ATTRIBUTE_PRINTF_2; +static char *get_src_buf(void); +static int yylex(void); +int yyparse(void); +static INSTRUCTION *snode(INSTRUCTION *subn, INSTRUCTION *op); +static int func_install(INSTRUCTION *fp, INSTRUCTION *def); +static void pop_params(NODE *params); +static NODE *make_param(char *pname); +static NODE *mk_rexp(INSTRUCTION *exp); +static void append_param(char *pname); +static int dup_parms(INSTRUCTION *fp, NODE *func); +static void param_sanity(INSTRUCTION *arglist); +static int parms_shadow(INSTRUCTION *pc, int *shadow); +static int isnoeffect(OPCODE type); +static INSTRUCTION *make_assignable(INSTRUCTION *ip); +static void dumpintlstr(const char *str, size_t len); +static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2); +static int isarray(NODE *n); +static int include_source(INSTRUCTION *file); +static void next_sourcefile(void); +static char *tokexpand(void); + +#define instruction(t) bcalloc(t, 1, 0) + +static INSTRUCTION *mk_program(void); +static INSTRUCTION *append_rule(INSTRUCTION *pattern, INSTRUCTION *action); +static INSTRUCTION *mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch, + INSTRUCTION *elsep, INSTRUCTION *false_branch); +static INSTRUCTION *mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1); +static INSTRUCTION *mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond, + INSTRUCTION *incr, INSTRUCTION *body); +static void fix_break_continue(INSTRUCTION *list, INSTRUCTION *b_target, INSTRUCTION *c_target); +static INSTRUCTION *mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op); +static INSTRUCTION *mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op); +static INSTRUCTION *mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op); +static INSTRUCTION *mk_getline(INSTRUCTION *op, INSTRUCTION *opt_var, INSTRUCTION *redir, int redirtype); +static NODE *make_regnode(int type, NODE *exp); +static int count_expressions(INSTRUCTION **list, int isarg); +static INSTRUCTION *optimize_assignment(INSTRUCTION *exp); +static void add_lint(INSTRUCTION *list, LINTTYPE linttype); enum defref { FUNC_DEFINE, FUNC_USE }; -static void func_use P((const char *name, enum defref how)); -static void check_funcs P((void)); +static void func_use(const char *name, enum defref how); +static void check_funcs(void); +static void free_bcpool(INSTRUCTION *pl); -static ssize_t read_one_line P((int fd, void *buffer, size_t count)); -static int one_line_close P((int fd)); +static ssize_t read_one_line(int fd, void *buffer, size_t count); +static int one_line_close(int fd); -static NODE *constant_fold P((NODE *left, NODETYPE op, NODE *right)); -static NODE *optimize_concat P((NODE *left, NODETYPE op, NODE *right)); +static void (*install_func)(char *) = NULL; +static int want_source = FALSE; static int want_regexp; /* 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 rule = 0; + +const char *const ruletab[] = { + "?", + "BEGIN", + "Rule", + "END", + "BEGINFILE", + "ENDFILE", +}; + 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 int sub_counter = 0; /* array dimension counter for use in delete */ +static char *lexptr = NULL; /* pointer to next char during parsing */ static char *lexend; static char *lexptr_begin; /* keep track of where we were for error msgs */ static char *lexeme; /* beginning of lexeme for debugging */ +static int lexeof; /* seen EOF for current source? */ static char *thisline = NULL; +static int in_braces = 0; /* count braces for firstline, lastline in an 'action' */ +static int lastline = 0; +static int firstline = 0; +static SRCFILE *sourcefile = NULL; /* current program source */ +static int lasttok = 0; +static int eof_warned = FALSE; /* GLOBAL: want warning for each file */ +static int break_allowed; /* kludge for break */ +static int continue_allowed; /* kludge for continue */ + + +#define END_FILE -1000 +#define END_SRC -2000 + #define YYDEBUG_LEXER_TEXT (lexeme) static int param_counter; +static NODE *func_params; /* list of parameters for the current function */ static char *tokstart = NULL; static char *tok = NULL; static char *tokend; +static int errcount = 0; + +static NODE *symbol_list; +extern void destroy_symbol(char *name); static long func_count; /* total number of functions */ @@ -99,12 +143,25 @@ extern char *source; extern int sourceline; -extern struct src *srcfiles; -extern long numfiles; -extern int errcount; -extern NODE *begin_block; -extern NODE *end_block; +extern SRCFILE *srcfiles; +extern INSTRUCTION *rule_list; +extern int max_args; + +static INSTRUCTION *rule_block[sizeof(ruletab)]; + +static INSTRUCTION *ip_rec; +static INSTRUCTION *ip_newfile; +static INSTRUCTION *ip_atexit = NULL; +static INSTRUCTION *ip_end; +static INSTRUCTION *ip_endfile; +static INSTRUCTION *ip_beginfile; + +static inline INSTRUCTION *list_create(INSTRUCTION *x); +static inline INSTRUCTION *list_append(INSTRUCTION *l, INSTRUCTION *x); +static inline INSTRUCTION *list_prepend(INSTRUCTION *l, INSTRUCTION *x); +static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2); +extern double fmod(double x, double y); /* * This string cannot occur as a real awk identifier. * Use it as a special token to make function parsing @@ -115,46 +172,27 @@ * should only produce one error message, and not core dump. */ static char builtin_func[] = "@builtin"; + +#define YYSTYPE INSTRUCTION * %} -%union { - long lval; - AWKNUM fval; - NODE *nodeval; - NODETYPE nodetypeval; - char *sval; - NODE *(*ptrval) P((void)); -} - -%type function_prologue pattern action variable param_list -%type exp common_exp -%type simp_exp simp_exp_nc non_post_simp_exp -%type expression_list opt_expression_list print_expression_list -%type statements statement if_statement switch_body case_statements case_statement case_value opt_param_list -%type simple_stmt opt_simple_stmt -%type opt_exp opt_variable regexp -%type input_redir output_redir field_spec -%type print -%type assign_operator a_relop relop_or_less -%type func_name opt_incdec -%type lex_builtin - -%token FUNC_CALL NAME REGEXP -%token ERROR -%token YNUMBER YSTRING -%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_SWITCH LEX_CASE LEX_DEFAULT LEX_WHILE LEX_DO LEX_FOR LEX_BREAK LEX_CONTINUE -%token LEX_PRINT LEX_PRINTF LEX_NEXT LEX_EXIT LEX_FUNCTION -%token LEX_GETLINE LEX_NEXTFILE -%token LEX_IN -%token LEX_AND LEX_OR INCREMENT DECREMENT -%token LEX_BUILTIN LEX_LENGTH +%token FUNC_CALL NAME REGEXP FILENAME +%token YNUMBER YSTRING +%token RELOP IO_OUT IO_IN +%token ASSIGNOP ASSIGN MATCHOP CONCAT_OP +%token SUBSCRIPT +%token LEX_BEGIN LEX_END LEX_IF LEX_ELSE LEX_RETURN LEX_DELETE +%token LEX_SWITCH LEX_CASE LEX_DEFAULT LEX_WHILE LEX_DO LEX_FOR LEX_BREAK LEX_CONTINUE +%token LEX_PRINT LEX_PRINTF LEX_NEXT LEX_EXIT LEX_FUNCTION +%token LEX_BEGINFILE LEX_ENDFILE +%token LEX_GETLINE LEX_NEXTFILE +%token LEX_IN +%token LEX_AND LEX_OR INCREMENT DECREMENT +%token LEX_BUILTIN LEX_LENGTH +%token LEX_EOF +%token LEX_INCLUDE LEX_EVAL %token NEWLINE -/* these are just yylval numbers */ - /* Lowest to highest */ %right ASSIGNOP ASSIGN SLASH_BEFORE_EQUAL %right '?' ':' @@ -164,7 +202,7 @@ %nonassoc LEX_IN %left FUNC_CALL LEX_BUILTIN LEX_LENGTH %nonassoc ',' -%nonassoc MATCHOP +%left MATCHOP %nonassoc RELOP '<' '>' IO_IN IO_OUT %left CONCAT_OP %left YSTRING YNUMBER @@ -177,117 +215,170 @@ %left '(' ')' %% -start - : opt_nls program opt_nls - { - check_funcs(); - } - ; - program : /* empty */ | program rule { - begin_or_end_rule = parsing_end_rule = FALSE; + rule = 0; yyerrok; } + | program nls + | program LEX_EOF + { + next_sourcefile(); + } | program error - { - begin_or_end_rule = parsing_end_rule = FALSE; + { + rule = 0; /* * If errors, give up, don't produce an infinite * stream of syntax error messages. */ /* yyerrok; */ - } + } ; rule : pattern action { - $1->rnode = $2; + (void) append_rule($1, $2); } | pattern statement_term { - 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) - msg(_("%s blocks must have an action part"), - (parsing_end_rule ? "END" : "BEGIN")); - else - msg(_("each rule must have a pattern or an action part")); + if (rule != Rule) { + msg(_("%s blocks must have an action part"), ruletab[rule]); errcount++; - } + } else if ($1 == NULL) { + msg(_("each rule must have a pattern or an action part")); + errcount++; + } else /* pattern rule with non-empty pattern */ + (void) append_rule($1, NULL); } | function_prologue action { can_return = FALSE; - if ($1) - func_install($1, $2); + if ($1 && func_install($1, $2) < 0) + YYABORT; + func_params = NULL; + yyerrok; + } + | '@' LEX_INCLUDE source statement_term + { + want_source = FALSE; yyerrok; } ; -pattern - : /* empty */ +source + : FILENAME { - $$ = append_pattern(&expression_value, (NODE *) NULL); + if (include_source($1) < 0) + YYABORT; + efree($1->lextok); + bcfree($1); + $$ = NULL; } + | FILENAME error + { $$ = NULL; } + | error + { $$ = NULL; } + ; + +pattern + : /* empty */ + { $$ = NULL; rule = Rule; } | exp + { $$ = $1; rule = Rule; } + | exp ',' opt_nls exp { - $$ = append_pattern(&expression_value, $1); - } - | exp ',' exp - { - NODE *r; + INSTRUCTION *tp; - getnode(r); - r->type = Node_line_range; - r->condpair = node($1, Node_cond_pair, $3); - r->triggered = FALSE; - $$ = append_pattern(&expression_value, r); + add_lint($1, LINT_assign_in_cond); + add_lint($4, LINT_assign_in_cond); + + tp = instruction(Op_no_op); + list_prepend($1, bcalloc(Op_line_range, !!do_profiling + 1, 0)); + $1->nexti->triggered = FALSE; + $1->nexti->target_jmp = $4->nexti; + + list_append($1, instruction(Op_cond_pair)); + $1->lasti->line_range = $1->nexti; + $1->lasti->target_jmp = tp; + + list_append($4, instruction(Op_cond_pair)); + $4->lasti->line_range = $1->nexti; + $4->lasti->target_jmp = tp; + if (do_profiling) { + ($1->nexti + 1)->condpair_left = $1->lasti; + ($1->nexti + 1)->condpair_right = $4->lasti; + } + $$ = list_append(list_merge($1, $4), tp); + rule = Rule; } | LEX_BEGIN { static int begin_seen = 0; if (do_lint_old && ++begin_seen == 2) - warning(_("old awk does not support multiple `BEGIN' or `END' rules")); + warning_ln($1->source_line, + _("old awk does not support multiple `BEGIN' or `END' rules")); - begin_or_end_rule = TRUE; - $$ = append_pattern(&begin_block, (NODE *) NULL); + $1->in_rule = rule = BEGIN; + $1->source_file = source; + $$ = $1; } | LEX_END { static int end_seen = 0; if (do_lint_old && ++end_seen == 2) - warning(_("old awk does not support multiple `BEGIN' or `END' rules")); + warning_ln($1->source_line, + _("old awk does not support multiple `BEGIN' or `END' rules")); - begin_or_end_rule = parsing_end_rule = TRUE; - $$ = append_pattern(&end_block, (NODE *) NULL); + $1->in_rule = rule = END; + $1->source_file = source; + $$ = $1; + } + | LEX_BEGINFILE + { + $1->in_rule = rule = BEGINFILE; + $1->source_file = source; + $$ = $1; + } + | LEX_ENDFILE + { + $1->in_rule = rule = ENDFILE; + $1->source_file = source; + $$ = $1; } ; action : l_brace statements r_brace opt_semi opt_nls - { $$ = $2; } + { + if ($2 == NULL) + $$ = list_create(instruction(Op_no_op)); + else + $$ = $2; + } ; func_name : NAME - { $$ = $1; } + { $$ = $1; } | FUNC_CALL - { $$ = $1; } + { $$ = $1; } | lex_builtin { yyerror(_("`%s' is a built-in function, it cannot be redefined"), tokstart); - errcount++; - $$ = builtin_func; + $1->opcode = Op_symbol; /* Op_symbol instead of Op_token so that + * free_bc_internal does not try to free it + */ + $1->lextok = builtin_func; + $$ = $1; /* yyerrok; */ } + | '@' LEX_EVAL + { $$ = $2; } ; lex_builtin @@ -296,20 +387,26 @@ ; function_prologue - : LEX_FUNCTION - { - param_counter = 0; - } - func_name '(' opt_param_list r_paren opt_nls - { + : LEX_FUNCTION + { + param_counter = 0; + func_params = NULL; + } + func_name '(' opt_param_list r_paren opt_nls + { NODE *t; - t = make_param($3); + $1->source_file = source; + t = make_param($3->lextok); + $3->lextok = NULL; + bcfree($3); t->flags |= FUNC; - $$ = append_right(t, $5); + t->rnode = func_params; + func_params = t; + $$ = $1; can_return = TRUE; /* check for duplicate parameter names */ - if (dup_parms($$)) + if (dup_parms($1, t)) errcount++; } ; @@ -323,55 +420,58 @@ { ++want_regexp; } REGEXP /* The terminating '/' is consumed by yylex(). */ { - NODE *n; - size_t len = strlen($3); + NODE *n, *exp; + char *re; + size_t len; + re = $3->lextok; + len = strlen(re); if (do_lint) { if (len == 0) - lintwarn(_("regexp constant `//' looks like a C++ comment, but is not")); - else if (($3)[0] == '*' && ($3)[len-1] == '*') + lintwarn_ln($3->source_line, + _("regexp constant `//' looks like a C++ comment, but is not")); + else if ((re)[0] == '*' && (re)[len-1] == '*') /* possible C comment */ - lintwarn(_("regexp constant `/%s/' looks like a C comment, but is not"), tokstart); + lintwarn_ln($3->source_line, + _("regexp constant `/%s/' looks like a C comment, but is not"), re); + } + + exp = make_str_node(re, len, ALREADY_MALLOCED); + n = make_regnode(Node_regex, exp); + if (n == NULL) { + unref(exp); + YYABORT; } - getnode(n); - n->type = Node_regex; - n->re_exp = make_string($3, len); - n->re_reg = make_regexp($3, len, FALSE, TRUE); - n->re_text = NULL; - n->re_flags = CONSTANT; - n->re_cnt = 1; - $$ = n; + $$ = $3; + $$->opcode = Op_match_rec; + $$->memory = n; } ; a_slash : '/' + { bcfree($1); } | SLASH_BEFORE_EQUAL ; statements : /* empty */ - { $$ = NULL; } + { $$ = NULL; } | statements statement { if ($2 == NULL) $$ = $1; else { - if (do_lint && isnoeffect($2->type)) - lintwarn(_("statement may have no effect")); + add_lint($2, LINT_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))); + $$ = list_merge($1, $2); } - yyerrok; + yyerrok; } | statements error - { $$ = NULL; } + { $$ = NULL; } ; statement_term @@ -381,21 +481,204 @@ statement : semi opt_nls - { $$ = NULL; } + { $$ = NULL; } | l_brace statements r_brace - { $$ = $2; } + { $$ = $2; } | if_statement - { $$ = $1; } - | LEX_SWITCH '(' exp r_paren opt_nls l_brace switch_body opt_nls r_brace - { $$ = node($3, Node_K_switch, $7); } + { + if (do_profiling) + $$ = list_prepend($1, instruction(Op_exec_count)); + else + $$ = $1; + } + | LEX_SWITCH '(' exp r_paren opt_nls l_brace case_statements opt_nls r_brace + { + INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt; + INSTRUCTION *ip, *nextc, *tbreak; + const char **case_values = NULL; + int maxcount = 128; + int case_count = 0; + int i; + + tbreak = instruction(Op_no_op); + cstmt = list_create(tbreak); + cexp = list_create(instruction(Op_pop)); + dflt = instruction(Op_jmp); + dflt->target_jmp = tbreak; /* if no case match and no explicit default */ + + if ($7 != NULL) { + curr = $7->nexti; + bcfree($7); /* Op_list */ + } /* else + curr = NULL; */ + + for(; curr != NULL; curr = nextc) { + INSTRUCTION *caseexp = curr->case_exp; + INSTRUCTION *casestmt = curr->case_stmt; + + nextc = curr->nexti; + if (curr->opcode == Op_K_case) { + if (caseexp->opcode == Op_push_i) { + /* a constant scalar */ + char *caseval; + caseval = force_string(caseexp->memory)->stptr; + for (i = 0; i < case_count; i++) { + if (strcmp(caseval, case_values[i]) == 0) + error_ln(curr->source_line, + _("duplicate case values in switch body: %s"), caseval); + } + + if (case_values == NULL) + emalloc(case_values, const char **, sizeof(char *) * maxcount, "statement"); + else if (case_count >= maxcount) { + maxcount += 128; + erealloc(case_values, const char **, sizeof(char*) * maxcount, "statement"); + } + case_values[case_count++] = caseval; + } else { + /* match a constant regex against switch expression. */ + (curr + 1)->match_exp = TRUE; + } + curr->stmt_start = casestmt->nexti; + curr->stmt_end = casestmt->lasti; + (void) list_prepend(cexp, curr); + (void) list_prepend(cexp, caseexp); + } else { + if (dflt->target_jmp != tbreak) + error_ln(curr->source_line, + _("duplicate `default' detected in switch body")); + else + dflt->target_jmp = casestmt->nexti; + + if (do_profiling) { + curr->stmt_start = casestmt->nexti; + curr->stmt_end = casestmt->lasti; + (void) list_prepend(cexp, curr); + } else + bcfree(curr); + } + + cstmt = list_merge(casestmt, cstmt); + } + + if (case_values != NULL) + efree(case_values); + + ip = $3; + if (do_profiling) { + (void) list_prepend(ip, $1); + (void) list_prepend(ip, instruction(Op_exec_count)); + $1->target_break = tbreak; + ($1 + 1)->switch_start = cexp->nexti; + ($1 + 1)->switch_end = cexp->lasti; + }/* else + $1 is NULL */ + + (void) list_append(cexp, dflt); + (void) list_merge(ip, cexp); + $$ = list_merge(ip, cstmt); + + break_allowed--; + fix_break_continue(ip, tbreak, NULL); + } | LEX_WHILE '(' exp r_paren opt_nls statement - { $$ = node($3, Node_K_while, $6); } + { + /* + * ----------------- + * tc: + * cond + * ----------------- + * [Op_jmp_false tb ] + * ----------------- + * body + * ----------------- + * [Op_jmp tc ] + * tb:[Op_no_op ] + */ + + INSTRUCTION *ip, *tbreak, *tcont; + + tbreak = instruction(Op_no_op); + add_lint($3, LINT_assign_in_cond); + tcont = $3->nexti; + ip = list_append($3, instruction(Op_jmp_false)); + ip->lasti->target_jmp = tbreak; + + if (do_profiling) { + (void) list_append(ip, instruction(Op_exec_count)); + $1->target_break = tbreak; + $1->target_continue = tcont; + ($1 + 1)->while_body = ip->lasti; + (void) list_prepend(ip, $1); + }/* else + $1 is NULL */ + + if ($6 != NULL) + (void) list_merge(ip, $6); + (void) list_append(ip, instruction(Op_jmp)); + ip->lasti->target_jmp = tcont; + $$ = list_append(ip, tbreak); + + break_allowed--; + continue_allowed--; + fix_break_continue(ip, tbreak, tcont); + } | LEX_DO opt_nls statement LEX_WHILE '(' exp r_paren opt_nls - { $$ = node($6, Node_K_do, $3); } - | LEX_FOR '(' NAME LEX_IN NAME r_paren opt_nls statement { /* - * Efficiency hack. Recognize the special case of + * ----------------- + * z: + * body + * ----------------- + * tc: + * cond + * ----------------- + * [Op_jmp_true | z ] + * tb:[Op_no_op ] + */ + + INSTRUCTION *ip, *tbreak, *tcont; + + tbreak = instruction(Op_no_op); + tcont = $6->nexti; + add_lint($6, LINT_assign_in_cond); + if ($3 != NULL) + ip = list_merge($3, $6); + else + ip = list_prepend($6, instruction(Op_no_op)); + if (do_profiling) + (void) list_prepend(ip, instruction(Op_exec_count)); + (void) list_append(ip, instruction(Op_jmp_true)); + ip->lasti->target_jmp = ip->nexti; + $$ = list_append(ip, tbreak); + + break_allowed--; + continue_allowed--; + fix_break_continue(ip, tbreak, tcont); + + if (do_profiling) { + $1->target_break = tbreak; + $1->target_continue = tcont; + ($1 + 1)->doloop_cond = tcont; + $$ = list_prepend(ip, $1); + bcfree($4); + } /* else + $1 and $4 are NULLs */ + } + | LEX_FOR '(' NAME LEX_IN simple_variable r_paren opt_nls statement + { + INSTRUCTION *ip; + char *var_name = $3->lextok; + + if ($8 != NULL + && $8->lasti->opcode == Op_K_delete + && $8->lasti->expr_count == 1 + && $8->nexti->opcode == Op_push + && ($8->nexti->memory->type != Node_var || !($8->nexti->memory->var_update)) + && strcmp($8->nexti->memory->vname, var_name) == 0 + ) { + + /* Efficiency hack. Recognize the special case of * * for (iggy in foo) * delete foo[iggy] @@ -406,96 +689,188 @@ * * Check that the body is a `delete a[i]' statement, * and that both the loop var and array names match. - */ - if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { - NODE *arr, *sub; + */ + NODE *arr = NULL; - assert($8->rnode->type == Node_expression_list); - arr = $8->lnode; /* array var */ - sub = $8->rnode->lnode; /* index var */ - - if ( (arr->type == Node_var_new - || arr->type == Node_var_array - || arr->type == Node_param_list) - && (sub->type == Node_var_new - || sub->type == Node_var - || sub->type == Node_param_list) - && strcmp($3, sub->vname) == 0 - && strcmp($5, arr->vname) == 0) { - $8->type = Node_K_delete_loop; + ip = $8->nexti->nexti; + if ($5->nexti->opcode == Op_push && $5->lasti == $5->nexti) + arr = $5->nexti->memory; + if (arr != NULL + && ip->opcode == Op_no_op + && ip->nexti->opcode == Op_push_array + && strcmp(ip->nexti->memory->vname, arr->vname) == 0 + && ip->nexti->nexti == $8->lasti + ) { + (void) make_assignable($8->nexti); + $8->lasti->opcode = Op_K_delete_loop; + $8->lasti->expr_count = 0; + if ($1 != NULL) + bcfree($1); + efree(var_name); + bcfree($3); + bcfree($4); + bcfree($5); $$ = $8; - free($3); /* thanks to valgrind for pointing these out */ - free($5); - } - else + } else goto regular_loop; } else { - regular_loop: - $$ = node($8, Node_K_arrayfor, - make_for_loop(variable($3, CAN_FREE, Node_var), - (NODE *) NULL, variable($5, CAN_FREE, Node_var_array))); - } + INSTRUCTION *tbreak, *tcont; + + /* [ Op_push_array a ] + * [ Op_arrayfor_init | ib ] + * ic:[ Op_arrayfor_incr | ib ] + * [ Op_var_assign if any ] + * + * body + * + * [Op_jmp | ic ] + * ib:[Op_arrayfor_final ] + */ +regular_loop: + ip = $5; + ip->nexti->opcode = Op_push_array; + + tbreak = instruction(Op_arrayfor_final); + $4->opcode = Op_arrayfor_incr; + $4->array_var = variable(var_name, Node_var); + $4->target_jmp = tbreak; + tcont = $4; + $3->opcode = Op_arrayfor_init; + $3->target_jmp = tbreak; + (void) list_append(ip, $3); + + if (do_profiling) { + $1->opcode = Op_K_arrayfor; + $1->target_continue = tcont; + $1->target_break = tbreak; + (void) list_append(ip, $1); + } /* else + $1 is NULL */ + + /* add update_FOO instruction if necessary */ + if ($4->array_var->type == Node_var && $4->array_var->var_update) { + (void) list_append(ip, instruction(Op_var_update)); + ip->lasti->update_var = $4->array_var->var_update; + } + (void) list_append(ip, $4); + + /* add set_FOO instruction if necessary */ + if ($4->array_var->type == Node_var && $4->array_var->var_assign) { + (void) list_append(ip, instruction(Op_var_assign)); + ip->lasti->assign_var = $4->array_var->var_assign; + } + + if (do_profiling) { + (void) list_append(ip, instruction(Op_exec_count)); + ($1 + 1)->forloop_cond = $4; + ($1 + 1)->forloop_body = ip->lasti; + } + + if ($8 != NULL) + (void) list_merge(ip, $8); + + (void) list_append(ip, instruction(Op_jmp)); + ip->lasti->target_jmp = $4; + $$ = list_append(ip, tbreak); + fix_break_continue(ip, tbreak, tcont); + } + + break_allowed--; + continue_allowed--; } | LEX_FOR '(' opt_simple_stmt semi opt_nls exp semi opt_nls opt_simple_stmt r_paren opt_nls statement { - $$ = node($12, Node_K_for, (NODE *) make_for_loop($3, $6, $9)); + $$ = mk_for_loop($1, $3, $6, $9, $12); + + break_allowed--; + continue_allowed--; } | LEX_FOR '(' opt_simple_stmt semi opt_nls semi opt_nls opt_simple_stmt r_paren opt_nls statement { - $$ = node($11, Node_K_for, - (NODE *) make_for_loop($3, (NODE *) NULL, $8)); + $$ = mk_for_loop($1, $3, (INSTRUCTION *) NULL, $8, $11); + + break_allowed--; + continue_allowed--; + } + | non_compound_stmt + { + if (do_profiling) + $$ = list_prepend($1, instruction(Op_exec_count)); + else + $$ = $1; + } + ; + +non_compound_stmt + : LEX_BREAK statement_term + { + if (! break_allowed) + error_ln($1->source_line, + _("`break' is not allowed outside a loop or switch")); + $1->target_jmp = NULL; + $$ = list_create($1); + } - | LEX_BREAK statement_term - /* for break, maybe we'll have to remember where to break to */ - { $$ = node((NODE *) NULL, Node_K_break, (NODE *) NULL); } | LEX_CONTINUE statement_term - /* similarly */ - { $$ = node((NODE *) NULL, Node_K_continue, (NODE *) NULL); } - | LEX_NEXT statement_term - { NODETYPE type; + { + if (! continue_allowed) + error_ln($1->source_line, + _("`continue' is not allowed outside a loop")); + $1->target_jmp = NULL; + $$ = list_create($1); - 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_NEXT statement_term + { + /* if inside function (rule = 0), resolve context at run-time */ + if (rule && rule != Rule) + error_ln($1->source_line, + _("`next' used in %s action"), ruletab[rule]); + $1->target_jmp = ip_rec; + $$ = list_create($1); + } | LEX_NEXTFILE statement_term - { - static short warned = FALSE; - - if (do_traditional) { - /* - * can't use yyerror, since may have overshot - * the source line - */ - errcount++; - error(_("`nextfile' is a gawk extension")); - } - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("`nextfile' is a gawk extension")); - } - if (begin_or_end_rule) { - /* same thing */ - errcount++; - error(_("`%s' used in %s action"), "nextfile", - (parsing_end_rule ? "END" : "BEGIN")); - } - $$ = node((NODE *) NULL, Node_K_nextfile, (NODE *) NULL); - } + { + if (do_traditional) + error_ln($1->source_line, + _("`nextfile' is a gawk extension")); + + /* if inside function (rule = 0), resolve context at run-time */ + if (rule == BEGIN || rule == END || rule == ENDFILE) + error_ln($1->source_line, + _("`nextfile' used in %s action"), ruletab[rule]); + + $1->target_newfile = ip_newfile; + $1->target_endfile = ip_endfile; + $$ = list_create($1); + } | LEX_EXIT opt_exp statement_term - { $$ = node($2, Node_K_exit, (NODE *) NULL); } + { + /* Initialize the two possible jump targets, the actual target + * is resolved at run-time. + */ + $1->target_end = ip_end; /* first instruction in end_block */ + $1->target_atexit = ip_atexit; /* cleanup and go home */ + + if ($2 == NULL) { + $$ = list_create($1); + (void) list_prepend($$, instruction(Op_push_i)); + $$->nexti->memory = Nnull_string; + } else + $$ = list_append($2, $1); + } | LEX_RETURN - { - if (! can_return) + { + if (! can_return) yyerror(_("`return' used outside function context")); - } - opt_exp statement_term - { - $$ = node($3 == NULL ? Nnull_string : $3, - Node_K_return, (NODE *) NULL); - } + } opt_exp statement_term { + if ($3 == NULL) { + $$ = list_create($1); + (void) list_prepend($$, instruction(Op_push_i)); + $$->nexti->memory = Nnull_string; + } else + $$ = list_append($3, $1); + } | simple_stmt statement_term ; @@ -512,136 +887,155 @@ { /* * 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 $3 is NULL or is a bytecode list for $0 use Op_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)) + + if ($1->opcode == Op_K_print && + ($3 == NULL + || ($3->lasti->opcode == Op_field_spec + && $3->nexti->nexti->nexti == $3->lasti + && $3->nexti->nexti->opcode == Op_push_i + && $3->nexti->nexti->memory->type == Node_val + && $3->nexti->nexti->memory->numbr == 0.0) + ) ) { static short warned = FALSE; + /* ----------------- + * output_redir + * [ redirect exp ] + * ----------------- + * expression_list + * ------------------ + * [Op_K_print_rec | NULL | redir_type | expr_count] + */ - $$ = node(NULL, Node_K_print_rec, $4); + if ($3 != NULL) { + bcfree($3->lasti); /* Op_field_spec */ + $3->nexti->nexti->memory->flags &= ~PERM; + $3->nexti->nexti->memory->flags |= MALLOC; + unref($3->nexti->nexti->memory); /* Node_val */ + bcfree($3->nexti->nexti); /* Op_push_i */ + bcfree($3->nexti); /* Op_list */ + bcfree($3); /* Op_list */ + } else { + if (do_lint && (rule == BEGIN || rule == END) && ! warned) { + warned = TRUE; + lintwarn_ln($1->source_line, + _("plain `print' in BEGIN or END rule should probably be `print \"\"'")); + } + } - if (do_lint && $3 == NULL && begin_or_end_rule && ! warned) { - warned = TRUE; - lintwarn( - _("plain `print' in BEGIN or END rule should probably be `print \"\"'")); + $1->expr_count = 0; + $1->opcode = Op_K_print_rec; + if ($4 == NULL) { /* no redircetion */ + $1->redir_type = 0; + $$ = list_create($1); + } else { + INSTRUCTION *ip; + ip = $4->nexti; + $1->redir_type = ip->redir_type; + $4->nexti = ip->nexti; + bcfree(ip); + $$ = list_append($4, $1); } } else { - $$ = node($3, $1, $4); - if ($$->type == Node_K_printf) - count_args($$); + /* ----------------- + * [ output_redir ] + * [ redirect exp ] + * ----------------- + * [ expression_list ] + * ------------------ + * [$1 | NULL | redir_type | expr_count] + * + */ + + if ($4 == NULL) { /* no redirection */ + if ($3 == NULL) { /* printf without arg */ + $1->expr_count = 0; + $1->redir_type = 0; + $$ = list_create($1); + } else { + INSTRUCTION *t = $3; + $1->expr_count = count_expressions(&t, FALSE); + $1->redir_type = 0; + $$ = list_append(t, $1); + } + } else { + INSTRUCTION *ip; + ip = $4->nexti; + $1->redir_type = ip->redir_type; + $4->nexti = ip->nexti; + bcfree(ip); + if ($3 == NULL) { + $1->expr_count = 0; + $$ = list_append($4, $1); + } else { + INSTRUCTION *t = $3; + $1->expr_count = count_expressions(&t, FALSE); + $$ = list_append(list_merge($4, t), $1); + } + } } } - | LEX_DELETE NAME '[' expression_list ']' - { $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, $4); } - | LEX_DELETE NAME - { - static short warned = FALSE; - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("`delete array' is a gawk extension")); - } - if (do_traditional) { - /* - * can't use yyerror, since may have overshot - * the source line - */ - errcount++; - error(_("`delete array' is a gawk extension")); - } - $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL); + | LEX_DELETE NAME { sub_counter = 0; } delete_subscript_list + { + char *arr = $2->lextok; + + $2->opcode = Op_push_array; + $2->memory = variable(arr, Node_var_new); + + if ($4 == NULL) { + static short warned = FALSE; + + if (do_lint && ! warned) { + warned = TRUE; + lintwarn_ln($1->source_line, + _("`delete array' is a gawk extension")); + } + if (do_traditional) + error_ln($1->source_line, + _("`delete array' is a gawk extension")); + $1->expr_count = 0; + $$ = list_append(list_create($2), $1); + } else { + $1->expr_count = sub_counter; + $$ = list_append(list_append($4, $2), $1); } + } | LEX_DELETE '(' NAME ')' - { /* * this is for tawk compatibility. maybe the warnings * should always be done. */ - static short warned = FALSE; + { + static short warned = FALSE; + char *arr = $3->lextok; - if (do_lint && ! warned) { + if (do_lint && ! warned) { warned = TRUE; - 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); + lintwarn_ln($1->source_line, + _("`delete(array)' is a non-portable tawk extension")); } + if (do_traditional) { + error_ln($1->source_line, + _("`delete array' is a gawk extension")); + } + $3->memory = variable(arr, Node_var_new); + $3->opcode = Op_push_array; + $1->expr_count = 0; + $$ = list_append(list_create($3), $1); + } | exp - { $$ = $1; } + { $$ = optimize_assignment($1); } ; opt_simple_stmt : /* empty */ - { $$ = NULL; } + { $$ = NULL; } | simple_stmt - { $$ = $1; } - ; - -switch_body - : case_statements - { - if ($1 == NULL) { - $$ = NULL; - } else { - NODE *dflt = NULL; - NODE *head = $1; - NODE *curr; - - const char **case_values = NULL; - - int maxcount = 128; - int case_count = 0; - int i; - - emalloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body"); - for (curr = $1; curr != NULL; curr = curr->rnode) { - /* Assure that case statement values are unique. */ - if (curr->lnode->type == Node_K_case) { - char *caseval; - - if (curr->lnode->lnode->type == Node_regex) - caseval = curr->lnode->lnode->re_exp->stptr; - else - caseval = force_string(tree_eval(curr->lnode->lnode))->stptr; - - for (i = 0; i < case_count; i++) - if (strcmp(caseval, case_values[i]) == 0) - yyerror(_("duplicate case values in switch body: %s"), caseval); - - if (case_count >= maxcount) { - maxcount += 128; - erealloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body"); - } - case_values[case_count++] = caseval; - } else { - /* Otherwise save a pointer to the default node. */ - if (dflt != NULL) - yyerror(_("Duplicate `default' detected in switch body")); - dflt = curr; - } - } - - free(case_values); - - /* Create the switch body. */ - $$ = node(head, Node_switch_body, dflt); - } - } + { $$ = $1; } ; case_statements @@ -649,20 +1043,10 @@ { $$ = NULL; } | case_statements case_statement { - if ($2 == NULL) - $$ = $1; - else { - if (do_lint && isnoeffect($2->type)) - lintwarn(_("statement may have no effect")); - if ($1 == NULL) - $$ = node($2, Node_case_list, (NODE *) NULL); - else - $$ = append_right( - ($1->type == Node_case_list ? $1 : node($1, Node_case_list, (NODE *) NULL)), - ($2->type == Node_case_list ? $2 : node($2, Node_case_list, (NODE *) NULL)) - ); - } - yyerrok; + if ($1 == NULL) + $$ = list_create($2); + else + $$ = list_prepend($1, $2); } | case_statements error { $$ = NULL; } @@ -670,30 +1054,58 @@ case_statement : LEX_CASE case_value colon opt_nls statements - { $$ = node($2, Node_K_case, $5); } + { + INSTRUCTION *casestmt = $5; + if ($5 == NULL) + casestmt = list_create(instruction(Op_no_op)); + if (do_profiling) + (void) list_prepend(casestmt, instruction(Op_exec_count)); + $1->case_exp = $2; + $1->case_stmt = casestmt; + bcfree($3); + $$ = $1; + } | LEX_DEFAULT colon opt_nls statements - { $$ = node((NODE *) NULL, Node_K_default, $4); } + { + INSTRUCTION *casestmt = $4; + if ($4 == NULL) + casestmt = list_create(instruction(Op_no_op)); + if (do_profiling) + (void) list_prepend(casestmt, instruction(Op_exec_count)); + bcfree($2); + $1->case_stmt = casestmt; + $$ = $1; + } ; case_value : YNUMBER - { $$ = $1; } + { $$ = $1; } | '-' YNUMBER %prec UNARY - { - $2->numbr = -(force_number($2)); + { + $2->memory->numbr = -(force_number($2->memory)); + bcfree($1); $$ = $2; } | '+' YNUMBER %prec UNARY - { $$ = $2; } - | YSTRING - { $$ = $1; } - | regexp - { $$ = $1; } + { + bcfree($1); + $$ = $2; + } + | YSTRING + { $$ = $1; } + | regexp + { + $1->opcode = Op_push_re; + $$ = $1; + } ; print : LEX_PRINT + { $$ = $1; } | LEX_PRINTF + { $$ = $1; } ; /* @@ -702,8 +1114,10 @@ */ print_expression_list : opt_expression_list - | '(' exp comma expression_list r_paren - { $$ = node($2, Node_expression_list, $4); } + | '(' expression_list r_paren + { + $$ = $2; + } ; output_redir @@ -715,25 +1129,24 @@ } | 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 != NULL - && $3->rnode->type == Node_redirect_twoway) + if ($1->redir_type == redirect_twoway + && $3->lasti->opcode == Op_K_getline_redir + && $3->lasti->redir_type == redirect_twoway) yyerror(_("multistage two-way pipelines don't work")); + $$ = list_prepend($3, $1); } ; if_statement : LEX_IF '(' exp r_paren opt_nls statement { - $$ = node($3, Node_K_if, - node($6, Node_if_branches, (NODE *) NULL)); + $$ = mk_condition($3, $1, $6, NULL, NULL); } | LEX_IF '(' exp r_paren opt_nls statement LEX_ELSE opt_nls statement - { $$ = node($3, Node_K_if, - node($6, Node_if_branches, $9)); } + { + $$ = mk_condition($3, $1, $6, $7, $9); + } ; nls @@ -748,163 +1161,277 @@ input_redir : /* empty */ - { $$ = NULL; } + { $$ = NULL; } | '<' simp_exp - { $$ = node($2, Node_redirect_input, (NODE *) NULL); } + { + bcfree($1); + $$ = $2; + } ; opt_param_list : /* empty */ - { $$ = NULL; } | param_list - { $$ = $1; } ; param_list : NAME - { $$ = make_param($1); } + { + append_param($1->lextok); + $1->lextok = NULL; + bcfree($1); + } | param_list comma NAME - { $$ = append_right($1, make_param($3)); yyerrok; } + { + append_param($3->lextok); + $3->lextok = NULL; + bcfree($3); + yyerrok; + } | error - { $$ = NULL; } + { /* func_params = NULL; */ } | param_list error - { $$ = NULL; } + { /* func_params = NULL; */ } | param_list comma error - { $$ = NULL; } + { /* func_params = NULL; */ } ; /* optional expression, as in for loop */ opt_exp : /* empty */ - { $$ = NULL; } + { $$ = NULL; } | exp - { $$ = $1; } + { $$ = $1; } ; opt_expression_list : /* empty */ - { $$ = NULL; } + { $$ = NULL; } | expression_list - { $$ = $1; } + { $$ = $1; } ; expression_list : exp - { $$ = node($1, Node_expression_list, (NODE *) NULL); } + { $$ = mk_expression_list(NULL, $1); } | expression_list comma exp - { - $$ = append_right($1, - node($3, Node_expression_list, (NODE *) NULL)); - yyerrok; - } + { + $$ = mk_expression_list($1, $3); + yyerrok; + } | error - { $$ = NULL; } + { $$ = NULL; } | expression_list error - { $$ = NULL; } + { $$ = NULL; } | expression_list error exp - { $$ = NULL; } + { $$ = NULL; } | expression_list comma error - { $$ = NULL; } + { $$ = NULL; } ; /* Expressions, not including the comma operator. */ -exp : variable assign_operator exp %prec ASSIGNOP - { - if (do_lint && $3->type == Node_regex) - lintwarn(_("regular expression on right of assignment")); - $$ = optimize_concat($1, $2, $3); - } +exp + : variable assign_operator exp %prec ASSIGNOP + { + if (do_lint && $3->lasti->opcode == Op_match_rec) + lintwarn_ln($2->source_line, + _("regular expression on right of assignment")); + $$ = mk_assignment($1, $3, $2); + } | exp LEX_AND exp - { $$ = node($1, Node_and, $3); } + { $$ = mk_boolean($1, $3, $2); } | exp LEX_OR exp - { $$ = node($1, Node_or, $3); } + { $$ = mk_boolean($1, $3, $2); } | exp MATCHOP exp - { - if ($1->type == Node_regex) - warning(_("regular expression on left of `~' or `!~' operator")); - $$ = node($1, $2, mk_rexp($3)); - } - | exp LEX_IN NAME - { - if (do_lint_old) - warning(_("old awk does not support the keyword `in' except after `for'")); - $$ = node(variable($3, CAN_FREE, Node_var_array), Node_in_array, $1); + { + if ($1->lasti->opcode == Op_match_rec) + warning_ln($2->source_line, + _("regular expression on left of `~' or `!~' operator")); + + if ($3->lasti == $3->nexti && $3->nexti->opcode == Op_match_rec) { + $2->memory = $3->nexti->memory; + bcfree($3->nexti); /* Op_match_rec */ + bcfree($3); /* Op_list */ + $$ = list_append($1, $2); + } else { + $2->memory = make_regnode(Node_dynregex, NULL); + $$ = list_append(list_merge($1, $3), $2); } + } + | exp LEX_IN simple_variable + { + if (do_lint_old) + warning_ln($2->source_line, + _("old awk does not support the keyword `in' except after `for'")); + $3->nexti->opcode = Op_push_array; + $2->opcode = Op_in_array; + $2->expr_count = 1; + $$ = list_append(list_merge($1, $3), $2); + } | exp a_relop exp %prec RELOP - { - if (do_lint && $3->type == Node_regex) - lintwarn(_("regular expression on right of comparison")); - $$ = node($1, $2, $3); - } + { + if (do_lint && $3->lasti->opcode == Op_match_rec) + lintwarn_ln($2->source_line, + _("regular expression on right of comparison")); + $$ = list_append(list_merge($1, $3), $2); + } | exp '?' exp ':' exp - { $$ = node($1, Node_cond_exp, node($3, Node_if_branches, $5));} + { $$ = mk_condition($1, $2, $3, $4, $5); } | common_exp - { $$ = $1; } + { $$ = $1; } ; assign_operator : ASSIGN - { $$ = $1; } + { $$ = $1; } | ASSIGNOP - { $$ = $1; } + { $$ = $1; } | SLASH_BEFORE_EQUAL ASSIGN /* `/=' */ - { $$ = Node_assign_quotient; } + { + $2->opcode = Op_assign_quotient; + $$ = $2; + } ; relop_or_less : RELOP - { $$ = $1; } + { $$ = $1; } | '<' - { $$ = Node_less; } + { $$ = $1; } ; + a_relop : relop_or_less + { $$ = $1; } | '>' - { $$ = Node_greater; } + { $$ = $1; } ; common_exp : simp_exp - { $$ = $1; } + { $$ = $1; } | simp_exp_nc - { $$ = $1; } + { $$ = $1; } | common_exp simp_exp %prec CONCAT_OP - { $$ = constant_fold($1, Node_concat, $2); } + { + int count = 2; + int is_simple_var = FALSE; + + if ($1->lasti->opcode == Op_concat) { + /* multiple (> 2) adjacent strings optimization */ + is_simple_var = ($1->lasti->concat_flag & CSVAR); + count = $1->lasti->expr_count + 1; + $1->lasti->opcode = Op_no_op; + } else { + is_simple_var = ($1->nexti->opcode == Op_push + && $1->lasti == $1->nexti); /* first exp. is a simple + * variable?; kludge for use + * in Op_assign_concat. + */ + } + + if (do_optimize > 1 + && $1->nexti == $1->lasti && $1->nexti->opcode == Op_push_i + && $2->nexti == $2->lasti && $2->nexti->opcode == Op_push_i + ) { + NODE *n1 = $1->nexti->memory; + NODE *n2 = $2->nexti->memory; + size_t nlen; + + (void) force_string(n1); + (void) force_string(n2); + nlen = n1->stlen + n2->stlen; + erealloc(n1->stptr, char *, nlen + 2, "constant fold"); + memcpy(n1->stptr + n1->stlen, n2->stptr, n2->stlen); + n1->stlen = nlen; + n1->stptr[nlen] = '\0'; + n1->flags &= ~(NUMCUR|NUMBER); + n1->flags |= (STRING|STRCUR); + + n2->flags &= ~PERM; + n2->flags |= MALLOC; + unref(n2); + bcfree($2->nexti); + bcfree($2); + $$ = $1; + } else { + $$ = list_append(list_merge($1, $2), instruction(Op_concat)); + $$->lasti->concat_flag = (is_simple_var ? CSVAR : 0); + $$->lasti->expr_count = count; + if (count > max_args) + max_args = count; + } + } ; simp_exp : non_post_simp_exp /* Binary operators in order of decreasing precedence. */ | simp_exp '^' simp_exp - { $$ = constant_fold($1, Node_exp, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp '*' simp_exp - { $$ = constant_fold($1, Node_times, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp '/' simp_exp - { $$ = constant_fold($1, Node_quotient, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp '%' simp_exp - { $$ = constant_fold($1, Node_mod, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp '+' simp_exp - { $$ = constant_fold($1, Node_plus, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp '-' simp_exp - { $$ = constant_fold($1, Node_minus, $3); } + { $$ = mk_binary($1, $3, $2); } | 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); + { + /* + * In BEGINFILE/ENDFILE, allow `getline var < file' + */ + + if (rule == BEGINFILE || rule == ENDFILE) { + if ($2 != NULL && $3 != NULL) + ; /* all ok */ + else { + if ($2 != NULL) + error_ln($1->source_line, + _("`getline var' invalid inside `%s' rule"), ruletab[rule]); + else + error_ln($1->source_line, + _("`getline' invalid inside `%s' rule"), ruletab[rule]); + } } + if (do_lint && rule == END && $3 == NULL) + lintwarn_ln($1->source_line, + _("non-redirected `getline' undefined inside END action")); + $$ = mk_getline($1, $2, $3, redirect_input); + } | variable INCREMENT - { $$ = node($1, Node_postincrement, (NODE *) NULL); } + { + $2->opcode = Op_postincrement; + $$ = mk_assignment($1, NULL, $2); + } | variable DECREMENT - { $$ = node($1, Node_postdecrement, (NODE *) NULL); } - | '(' expression_list r_paren LEX_IN NAME - { - if (do_lint_old) { - warning(_("old awk does not support the keyword `in' except after `for'")); - warning(_("old awk does not support multidimensional arrays")); - } - $$ = node(variable($5, CAN_FREE, Node_var_array), Node_in_array, $2); + { + $2->opcode = Op_postdecrement; + $$ = mk_assignment($1, NULL, $2); + } + | '(' expression_list r_paren LEX_IN simple_variable + { + if (do_lint_old) { + warning_ln($4->source_line, + _("old awk does not support the keyword `in' except after `for'")); + warning_ln($4->source_line, + _("old awk does not support multidimensional arrays")); + } + $5->nexti->opcode = Op_push_array; + $4->opcode = Op_in_array; + if ($2 == NULL) { /* error */ + errcount++; + $4->expr_count = 0; + $$ = list_merge($5, $4); + } else { + INSTRUCTION *t = $2; + $4->expr_count = count_expressions(&t, FALSE); + $$ = list_append(list_merge(t, $5), $4); } + } ; /* Expressions containing "| getline" lose the ability to be on the @@ -912,137 +1439,312 @@ simp_exp_nc : common_exp IO_IN LEX_GETLINE opt_variable { - $$ = node($4, Node_K_getline, - node($1, $2, (NODE *) NULL)); + $$ = mk_getline($3, $4, $1, $2->redir_type); + bcfree($2); } + /* Binary operators in order of decreasing precedence. */ | simp_exp_nc '^' simp_exp - { $$ = node($1, Node_exp, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '*' simp_exp - { $$ = node($1, Node_times, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '/' simp_exp - { $$ = node($1, Node_quotient, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '%' simp_exp - { $$ = node($1, Node_mod, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '+' simp_exp - { $$ = node($1, Node_plus, $3); } + { $$ = mk_binary($1, $3, $2); } | simp_exp_nc '-' simp_exp - { $$ = node($1, Node_minus, $3); } + { $$ = mk_binary($1, $3, $2); } ; non_post_simp_exp : regexp - { $$ = $1; } + { + $$ = list_create($1); + } | '!' simp_exp %prec UNARY - { $$ = constant_fold($2, Node_not, (NODE *) NULL); } + { + if ($2->opcode == Op_match_rec) { + $2->opcode = Op_nomatch; + $1->opcode = Op_push_i; + $1->memory = mk_number(0.0, (PERM|NUMCUR|NUMBER)); + $$ = list_append(list_append(list_create($1), + instruction(Op_field_spec)), $2); + } else { + if (do_optimize > 1 && $2->nexti == $2->lasti + && $2->nexti->opcode == Op_push_i + ) { + NODE *n = $2->nexti->memory; + if ((n->flags & (STRCUR|STRING)) != 0) { + n->numbr = (AWKNUM) (n->stlen == 0); + n->flags &= ~(STRCUR|STRING); + n->flags |= (NUMCUR|NUMBER); + efree(n->stptr); + n->stptr = NULL; + n->stlen = 0; + } else + n->numbr = (AWKNUM) (n->numbr == 0.0); + bcfree($1); + $$ = $2; + } else { + $1->opcode = Op_not; + add_lint($2, LINT_assign_in_cond); + $$ = list_append($2, $1); + } + } + } | '(' exp r_paren - { $$ = $2; } - | LEX_BUILTIN - '(' opt_expression_list r_paren - { $$ = snode($3, Node_builtin, (int) $1); } + { $$ = $2; } + | LEX_BUILTIN '(' opt_expression_list r_paren + { + $$ = snode($3, $1); + if ($$ == NULL) + YYABORT; + } | LEX_LENGTH '(' opt_expression_list r_paren - { $$ = snode($3, Node_builtin, (int) $1); } + { + $$ = snode($3, $1); + if ($$ == NULL) + YYABORT; + } | LEX_LENGTH { - static short warned1 = FALSE, warned2 = FALSE; + static short warned1 = FALSE; if (do_lint && ! warned1) { warned1 = TRUE; - lintwarn(_("call of `length' without parentheses is not portable")); + lintwarn_ln($1->source_line, + _("call of `length' without parentheses is not portable")); } - $$ = snode((NODE *) NULL, Node_builtin, (int) $1); - if (do_posix && ! warned2) { - warned2 = TRUE; - warning(_("call of `length' without parentheses is deprecated by POSIX")); - } - } - | 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); + $$ = snode(NULL, $1); + if ($$ == NULL) + YYABORT; } + | func_call | variable | INCREMENT variable - { $$ = node($2, Node_preincrement, (NODE *) NULL); } + { + $1->opcode = Op_preincrement; + $$ = mk_assignment($2, NULL, $1); + } | DECREMENT variable - { $$ = node($2, Node_predecrement, (NODE *) NULL); } + { + $1->opcode = Op_predecrement; + $$ = mk_assignment($2, NULL, $1); + } | YNUMBER - { $$ = $1; } + { + $$ = list_create($1); + } | YSTRING - { $$ = $1; } - + { + $$ = list_create($1); + } | '-' simp_exp %prec UNARY - { - if ($2->type == Node_val && ($2->flags & (STRCUR|STRING)) == 0) { - $2->numbr = -(force_number($2)); + { + if ($2->lasti->opcode == Op_push_i + && ($2->lasti->memory->flags & (STRCUR|STRING)) == 0) { + $2->lasti->memory->numbr = -(force_number($2->lasti->memory)); $$ = $2; - } else - $$ = node($2, Node_unary_minus, (NODE *) NULL); + bcfree($1); + } else { + $1->opcode = Op_unary_minus; + $$ = list_append($2, $1); } + } | '+' simp_exp %prec UNARY - { - /* - * was: $$ = $2 - * POSIX semantics: force a conversion to numeric type - */ - $$ = node (make_number(0.0), Node_plus, $2); + { + /* + * was: $$ = $2 + * POSIX semantics: force a conversion to numeric type + */ + $1->opcode = Op_plus_i; + $1->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + $$ = list_append($2, $1); + } + ; + +func_call + : direct_func_call + { + func_use($1->lasti->func_name, FUNC_USE); + $$ = $1; + } + | '@' direct_func_call + { + /* indirect function call */ + INSTRUCTION *f, *t; + char *name; + NODE *indirect_var; + static short warned = FALSE; + const char *msg = _("indirect function calls are a gawk extension"); + + if (do_traditional || do_posix) + yyerror("%s", msg); + else if (do_lint && ! warned) { + warned = TRUE; + lintwarn("%s", msg); + } + + f = $2->lasti; + f->opcode = Op_indirect_func_call; + name = estrdup(f->func_name, strlen(f->func_name)); + if (is_std_var(name)) + yyerror(_("can not use special variable `%s' for indirect function call"), name); + indirect_var = variable(name, Node_var_new); + t = instruction(Op_push); + t->memory = indirect_var; + + /* prepend indirect var instead of appending to arguments (opt_expression_list), + * and pop it off in setup_frame (eval.c) (left to right evaluation order); Test case: + * f = "fun" + * @f(f="real_fun") + */ + + $$ = list_prepend($2, t); + } + ; + +direct_func_call + : FUNC_CALL '(' opt_expression_list r_paren + { + param_sanity($3); + $1->opcode = Op_func_call; + $1->func_body = NULL; + if ($3 == NULL) { /* no argument or error */ + ($1 + 1)->expr_count = 0; + $$ = list_create($1); + } else { + INSTRUCTION *t = $3; + ($1 + 1)->expr_count = count_expressions(&t, TRUE); + $$ = list_append(t, $1); } + } ; opt_variable : /* empty */ - { $$ = NULL; } + { $$ = NULL; } | variable - { $$ = $1; } + { $$ = $1; } ; -variable +delete_subscript_list + : /* empty */ + { $$ = NULL; } + | delete_subscript SUBSCRIPT + { $$ = $1; } + ; + +delete_subscript + : delete_exp_list + { $$ = $1; } + | delete_subscript delete_exp_list + { + $$ = list_merge($1, $2); + } + ; + +delete_exp_list + : bracketed_exp_list + { + INSTRUCTION *ip = $1->lasti; + int count = ip->sub_count; /* # of SUBSEP-seperated expressions */ + if (count > 1) { + /* change Op_subscript or Op_sub_array to Op_concat */ + ip->opcode = Op_concat; + ip->concat_flag = CSUBSEP; + ip->expr_count = count; + } else + ip->opcode = Op_no_op; + sub_counter++; /* count # of dimensions */ + $$ = $1; + } + ; + +bracketed_exp_list + : '[' expression_list ']' + { + INSTRUCTION *t = $2; + if ($2 == NULL) { + error_ln($3->source_line, + _("invalid subscript expression")); + /* install Null string as subscript. */ + t = list_create(instruction(Op_push_i)); + t->nexti->memory = Nnull_string; + $3->sub_count = 1; + } else + $3->sub_count = count_expressions(&t, FALSE); + $$ = list_append(t, $3); + } + ; + +subscript + : bracketed_exp_list + { $$ = $1; } + | subscript bracketed_exp_list + { + $$ = list_merge($1, $2); + } + ; + +subscript_list + : subscript SUBSCRIPT + { $$ = $1; } + ; + +simple_variable : NAME - { $$ = variable($1, CAN_FREE, Node_var_new); } - | NAME '[' expression_list ']' + { + char *var_name = $1->lextok; + + $1->opcode = Op_push; + $1->memory = variable(var_name, Node_var_new); + $$ = list_create($1); + } + | NAME subscript_list { NODE *n; - if ((n = lookup($1)) != NULL && ! isarray(n)) { + char *arr = $1->lextok; + if ((n = lookup(arr)) != NULL && ! isarray(n)) yyerror(_("use of non-array as array")); - $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3); - } else if ($3 == NULL) { - fatal(_("invalid subscript expression")); - } else if ($3->rnode == NULL) { - $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3->lnode); - freenode($3); - } else - $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3); + $1->memory = variable(arr, Node_var_new); + $1->opcode = Op_push_array; + $$ = list_prepend($2, $1); } - | field_spec { $$ = $1; } -/* -#if 0 - | lex_builtin - { fatal(_("can't use built-in function `%s' as a variable"), tokstart); } -#endif -*/ ; -field_spec - : '$' non_post_simp_exp opt_incdec +variable + : simple_variable { - NODE *n = node($2, Node_field_spec, (NODE *) NULL); - if ($3 != NULL) { - if ($3[0] == '+') - $$ = node(n, Node_postincrement, (NODE *) NULL); - else - $$ = node(n, Node_postdecrement, (NODE *) NULL); - } else { - $$ = n; - } + INSTRUCTION *ip = $1->nexti; + if (ip->opcode == Op_push + && ip->memory->type == Node_var + && ip->memory->var_update + ) { + $$ = list_prepend($1, instruction(Op_var_update)); + $$->nexti->update_var = ip->memory->var_update; + } else + $$ = $1; + } + | '$' non_post_simp_exp opt_incdec + { + $$ = list_append($2, $1); + if ($3 != NULL) + mk_assignment($2, NULL, $3); } ; opt_incdec - : INCREMENT { $$ = "+"; } - | DECREMENT { $$ = "-"; } + : INCREMENT + { + $1->opcode = Op_postincrement; + } + | DECREMENT + { + $1->opcode = Op_postdecrement; + } | /* empty */ { $$ = NULL; } ; @@ -1068,19 +1770,19 @@ ; colon - : ':' { yyerrok; } + : ':' { $$ = $1; yyerrok; } ; -comma : ',' opt_nls { yyerrok; } +comma + : ',' opt_nls { yyerrok; } ; - %% struct token { - const char *operator; /* text to match */ - NODETYPE value; /* node type */ - int class; /* lexical class */ - unsigned flags; /* # of args. allowed and compatability */ + const char *operator; /* text to match */ + OPCODE value; /* type */ + int class; /* lexical class */ + unsigned flags; /* # of args. allowed and compatability */ # define ARGS 0xFF /* 0, 1, 2, 3 args allowed (any combination */ # define A(n) (1<<(n)) # define VERSION_MASK 0xFF00 /* old awk is zero */ @@ -1088,14 +1790,17 @@ # define NOT_POSIX 0x0200 /* feature not in POSIX */ # define GAWKX 0x0400 /* gawk extension */ # define RESX 0x0800 /* Bell Labs Research extension */ - NODE *(*ptr) P((NODE *)); /* function that implements this keyword */ +# define BREAK 0x1000 /* break allowed inside */ +# define CONTINUE 0x2000 /* continue allowed inside */ + + NODE *(*ptr)(int); /* function that implements this keyword */ }; #if 'a' == 0x81 /* it's EBCDIC */ /* tokcompare --- lexicographically compare token names for sorting */ static int -tokcompare(void *l, void *r) +tokcompare(const void *l, const void *r) { struct token *lhs, *rhs; @@ -1113,83 +1818,83 @@ */ static const struct token tokentab[] = { -{"BEGIN", Node_illegal, LEX_BEGIN, 0, 0}, -{"END", Node_illegal, LEX_END, 0, 0}, +{"BEGIN", Op_rule, LEX_BEGIN, 0, 0}, +{"BEGINFILE", Op_rule, LEX_BEGINFILE, GAWKX, 0}, +{"END", Op_rule, LEX_END, 0, 0}, +{"ENDFILE", Op_rule, LEX_ENDFILE, GAWKX, 0}, #ifdef ARRAYDEBUG -{"adump", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, -#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}, -#ifdef ALLOW_SWITCH -{"case", Node_K_case, LEX_CASE, GAWKX, 0}, -#endif -{"close", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close}, -{"compl", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl}, -{"continue", Node_K_continue, LEX_CONTINUE, 0, 0}, -{"cos", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos}, -{"dcgettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext}, -{"dcngettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext}, -#ifdef ALLOW_SWITCH -{"default", Node_K_default, LEX_DEFAULT, GAWKX, 0}, +{"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump}, #endif -{"delete", Node_K_delete, LEX_DELETE, NOT_OLD, 0}, -{"do", Node_K_do, LEX_DO, NOT_OLD, 0}, -{"else", Node_illegal, LEX_ELSE, 0, 0}, -{"exit", Node_K_exit, LEX_EXIT, 0, 0}, -{"exp", Node_builtin, LEX_BUILTIN, A(1), do_exp}, -{"extension", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext}, -{"fflush", Node_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush}, -{"for", Node_K_for, LEX_FOR, 0, 0}, -{"func", Node_K_function, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0}, -{"function", Node_K_function, LEX_FUNCTION, NOT_OLD, 0}, -{"gensub", Node_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), do_gensub}, -{"getline", Node_K_getline, LEX_GETLINE, NOT_OLD, 0}, -{"gsub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_gsub}, -{"if", Node_K_if, LEX_IF, 0, 0}, -{"in", Node_illegal, LEX_IN, 0, 0}, -{"index", Node_builtin, LEX_BUILTIN, A(2), do_index}, -{"int", Node_builtin, LEX_BUILTIN, A(1), do_int}, -{"length", Node_builtin, LEX_LENGTH, A(0)|A(1), do_length}, -{"log", Node_builtin, LEX_BUILTIN, A(1), do_log}, -{"lshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift}, -{"match", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match}, -{"mktime", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime}, -{"next", Node_K_next, LEX_NEXT, 0, 0}, -{"nextfile", Node_K_nextfile, LEX_NEXTFILE, GAWKX, 0}, -{"or", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_or}, -{"print", Node_K_print, LEX_PRINT, 0, 0}, -{"printf", Node_K_printf, LEX_PRINTF, 0, 0}, -{"rand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand}, -{"return", Node_K_return, LEX_RETURN, NOT_OLD, 0}, -{"rshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift}, -{"sin", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin}, -{"split", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_split}, -{"sprintf", Node_builtin, LEX_BUILTIN, 0, do_sprintf}, -{"sqrt", Node_builtin, LEX_BUILTIN, A(1), do_sqrt}, -{"srand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand}, +{"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and}, +{"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asort}, +{"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_asorti}, +{"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2}, +{"bindtextdomain", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain}, +{"break", Op_K_break, LEX_BREAK, 0, 0}, +{"case", Op_K_case, LEX_CASE, GAWKX, 0}, +{"close", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close}, +{"compl", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl}, +{"continue", Op_K_continue, LEX_CONTINUE, 0, 0}, +{"cos", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos}, +{"dcgettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext}, +{"dcngettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext}, +{"default", Op_K_default, LEX_DEFAULT, GAWKX, 0}, +{"delete", Op_K_delete, LEX_DELETE, NOT_OLD, 0}, +{"do", Op_K_do, LEX_DO, NOT_OLD|BREAK|CONTINUE, 0}, +{"else", Op_K_else, LEX_ELSE, 0, 0}, +{"eval", Op_symbol, LEX_EVAL, 0, 0}, +{"exit", Op_K_exit, LEX_EXIT, 0, 0}, +{"exp", Op_builtin, LEX_BUILTIN, A(1), do_exp}, +{"extension", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext}, +{"fflush", Op_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush}, +{"for", Op_K_for, LEX_FOR, BREAK|CONTINUE, 0}, +{"func", Op_func, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0}, +{"function",Op_func, LEX_FUNCTION, NOT_OLD, 0}, +{"gensub", Op_sub_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), 0}, +{"getline", Op_K_getline_redir, LEX_GETLINE, NOT_OLD, 0}, +{"gsub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0}, +{"if", Op_K_if, LEX_IF, 0, 0}, +{"in", Op_symbol, LEX_IN, 0, 0}, +{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0}, +{"index", Op_builtin, LEX_BUILTIN, A(2), do_index}, +{"int", Op_builtin, LEX_BUILTIN, A(1), do_int}, +{"isarray", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_isarray}, +{"length", Op_builtin, LEX_LENGTH, A(0)|A(1), do_length}, +{"log", Op_builtin, LEX_BUILTIN, A(1), do_log}, +{"lshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift}, +{"match", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match}, +{"mktime", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime}, +{"next", Op_K_next, LEX_NEXT, 0, 0}, +{"nextfile", Op_K_nextfile, LEX_NEXTFILE, GAWKX, 0}, +{"or", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_or}, +{"patsplit", Op_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit}, +{"print", Op_K_print, LEX_PRINT, 0, 0}, +{"printf", Op_K_printf, LEX_PRINTF, 0, 0}, +{"rand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand}, +{"return", Op_K_return, LEX_RETURN, NOT_OLD, 0}, +{"rshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift}, +{"sin", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin}, +{"split", Op_builtin, LEX_BUILTIN, A(2)|A(3)|A(4), do_split}, +{"sprintf", Op_builtin, LEX_BUILTIN, 0, do_sprintf}, +{"sqrt", Op_builtin, LEX_BUILTIN, A(1), do_sqrt}, +{"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand}, #if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */ -{"stopme", Node_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, +{"stopme", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, #endif -{"strftime", Node_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime}, -{"strtonum", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum}, -{"sub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub}, -{"substr", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_substr}, -#ifdef ALLOW_SWITCH -{"switch", Node_K_switch, LEX_SWITCH, GAWKX, 0}, -#endif -{"system", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system}, -{"systime", Node_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime}, -{"tolower", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower}, -{"toupper", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper}, -{"while", Node_K_while, LEX_WHILE, 0, 0}, -{"xor", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor}, +{"strftime", Op_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime}, +{"strtonum", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum}, +{"sub", Op_sub_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), 0}, +{"substr", Op_builtin, LEX_BUILTIN, A(2)|A(3), do_substr}, +{"switch", Op_K_switch, LEX_SWITCH, GAWKX|BREAK, 0}, +{"system", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system}, +{"systime", Op_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime}, +{"tolower", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower}, +{"toupper", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper}, +{"while", Op_K_while, LEX_WHILE, BREAK|CONTINUE, 0}, +{"xor", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor}, }; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT /* Variable containing the current shift state. */ static mbstate_t cur_mbstate; /* Ring buffer containing current characters. */ @@ -1209,9 +1914,9 @@ /* getfname --- return name of a builtin function (for pretty printing) */ const char * -getfname(register NODE *(*fptr)(NODE *)) +getfname(NODE *(*fptr)(int)) { - register int i, j; + int i, j; j = sizeof(tokentab) / sizeof(tokentab[0]); /* linear search, no other way to do it */ @@ -1222,31 +1927,112 @@ return NULL; } -/* yyerror --- print a syntax error message, show where */ +/* print_included_from --- print `Included from ..' file names and locations */ -/* - * Function identifier purposely indented to avoid mangling - * by ansi2knr. Sigh. - */ +static void +print_included_from() +{ + int saveline, line; + SRCFILE *s; + + /* suppress current file name, line # from `.. included from ..' msgs */ + saveline = sourceline; + sourceline = 0; + + for (s = sourcefile; s != NULL && s->stype == SRC_INC; ) { + s = s->next; + if (s == NULL || s->fd <= INVALID_HANDLE) + continue; + line = s->srclines; + + /* if last token is NEWLINE, line number is off by 1. */ + if (s->lasttok == NEWLINE) + line--; + msg("%s %s:%d%c", + s->prev == sourcefile ? "In file included from" + : " from", + (s->stype == SRC_INC || + s->stype == SRC_FILE) ? s->src : "cmd. line", + line, + s->stype == SRC_INC ? ',' : ':' + ); + } + sourceline = saveline; +} + +/* warning_ln --- print a warning message with location */ static void -#ifdef CAN_USE_STDARG_H - yyerror(const char *m, ...) -#else -/* VARARGS0 */ - yyerror(va_alist) - va_dcl -#endif +warning_ln(int line, const char *mesg, ...) +{ + va_list args; + int saveline; + + saveline = sourceline; + sourceline = line; + print_included_from(); + va_start(args, mesg); + err(_("warning: "), mesg, args); + va_end(args); + sourceline = saveline; +} + +/* lintwarn_ln --- print a lint warning and location */ + +static void +lintwarn_ln(int line, const char *mesg, ...) +{ + va_list args; + int saveline; + + saveline = sourceline; + sourceline = line; + print_included_from(); + va_start(args, mesg); + if (lintfunc == r_fatal) + err(_("fatal: "), mesg, args); + else + err(_("warning: "), mesg, args); + va_end(args); + sourceline = saveline; + if (lintfunc == r_fatal) + gawk_exit(EXIT_FATAL); +} + +/* error_ln --- print an error message and location */ + +static void +error_ln(int line, const char *m, ...) +{ + va_list args; + int saveline; + + saveline = sourceline; + sourceline = line; + print_included_from(); + errcount++; + va_start(args, m); + err("error: ", m, args); + va_end(args); + sourceline = saveline; +} + +/* yyerror --- print a syntax error message, show where */ + +static void +yyerror(const char *m, ...) { va_list args; const char *mesg = NULL; - register char *bp, *cp; + char *bp, *cp; char *scan; char *buf; int count; static char end_of_file_line[] = "(END OF FILE)"; char save; + print_included_from(); + errcount++; /* Find the current line in the input file */ if (lexptr && lexeme) { @@ -1284,16 +2070,10 @@ msg("%.*s", (int) (bp - thisline), thisline); *bp = save; - -#ifdef CAN_USE_STDARG_H va_start(args, m); if (mesg == NULL) mesg = m; -#else - va_start(args); - if (mesg == NULL) - mesg = va_arg(args, char *); -#endif + count = (bp - thisline) + strlen(mesg) + 2 + 1; emalloc(buf, char *, count, "yyerror"); @@ -1312,125 +2092,462 @@ strcpy(bp, mesg); err("", buf, args); va_end(args); - free(buf); + efree(buf); } -/* get_src_buf --- read the next buffer of source program */ +/* mk_program --- create a single list of instructions */ -static char * -get_src_buf() +static INSTRUCTION * +mk_program() { - static int samefile = FALSE; - static int nextfile = 0; - static char *buf = NULL; - static size_t buflen = 0; - static int fd; + INSTRUCTION *cp, *tmp; - /* - * No argument prototype on readfunc on purpose, - * avoids problems with some ancient systems where - * the types of arguments to read() aren't up to date. - */ - static ssize_t (*readfunc)() = 0; - static int (*closefunc)P((int fd)) = NULL; +#define begin_block rule_block[BEGIN] +#define end_block rule_block[END] +#define prog_block rule_block[Rule] +#define beginfile_block rule_block[BEGINFILE] +#define endfile_block rule_block[ENDFILE] - int n; - register char *scan; - int newfile; - struct stat sbuf; - int readcount = 0; - int l; - char *readloc; + if (end_block == NULL) + end_block = list_create(ip_end); + else + (void) list_prepend(end_block, ip_end); - if (readfunc == NULL) { - char *cp = getenv("AWKREADFUNC"); + if (! in_main_context()) { + if (begin_block != NULL && prog_block != NULL) + cp = list_merge(begin_block, prog_block); + else + cp = (begin_block != NULL) ? begin_block : prog_block; - /* If necessary, one day, test value for different functions. */ - if (cp == NULL) { - readfunc = read; - closefunc = close; - } else { - readfunc = read_one_line; - closefunc = one_line_close; - } + if (cp != NULL) + (void) list_merge(cp, end_block); + else + cp = end_block; + + (void) list_append(cp, instruction(Op_stop)); + goto out; } -again: - newfile = FALSE; - if (nextfile > numfiles) - return NULL; + if (endfile_block == NULL) + endfile_block = list_create(ip_endfile); + else { + ip_rec->has_endfile = TRUE; + (void) list_prepend(endfile_block, ip_endfile); + } - if (srcfiles[nextfile].stype == CMDLINE) { - if ((l = strlen(srcfiles[nextfile].val)) == 0) { - /* - * Yet Another Special case: - * gawk '' /path/name - * Sigh. - */ - static short warned = FALSE; + if (beginfile_block == NULL) + beginfile_block = list_create(ip_beginfile); + else + (void) list_prepend(beginfile_block, ip_beginfile); - if (do_lint && ! warned) { - warned = TRUE; - lintwarn(_("empty program text on command line")); - } - ++nextfile; - goto again; - } - if (srcfiles[nextfile].val[l-1] == '\n') { - /* has terminating newline, can use it directly */ - sourceline = 1; - source = NULL; - lexptr = lexptr_begin = srcfiles[nextfile].val; - /* fall through to pointer adjustment and return, below */ - } else { - /* copy it into static buffer */ + if (prog_block == NULL) { + if (end_block->nexti == end_block->lasti + && beginfile_block->nexti == beginfile_block->lasti + && endfile_block->nexti == endfile_block->lasti + ) { + /* no pattern-action and (real) end, beginfile or endfile blocks */ + bcfree(ip_rec); + bcfree(ip_newfile); + ip_rec = ip_newfile = NULL; - /* make sure buffer exists and has room */ - if (buflen == 0) { - emalloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } else if (l+2 > buflen) { - erealloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } /* else - buffer has room, just use it */ + list_append(beginfile_block, instruction(Op_after_beginfile)); + (void) list_append(endfile_block, instruction(Op_after_endfile)); - /* copy in data */ - memcpy(buf, srcfiles[nextfile].val, l); - buf[l] = '\n'; - buf[++l] = '\0'; + if (begin_block == NULL) /* no program at all */ + cp = end_block; + else + cp = list_merge(begin_block, end_block); + (void) list_append(cp, ip_atexit); + (void) list_append(cp, instruction(Op_stop)); - /* set vars and return */ - sourceline = 0; - source = NULL; - lexptr = lexptr_begin = buf; - } - lexend = lexptr + l; - nextfile++; /* for next entry to this routine */ - return lexptr; - } + /* append beginfile_block and endfile_block for sole use + * in getline without redirection (Op_K_getline). + */ + + (void) list_merge(cp, beginfile_block); + (void) list_merge(cp, endfile_block); + + goto out; + + } else { + /* install a do-nothing prog block */ + prog_block = list_create(instruction(Op_no_op)); + } + } + + (void) list_append(endfile_block, instruction(Op_after_endfile)); + (void) list_prepend(prog_block, ip_rec); + (void) list_append(prog_block, instruction(Op_jmp)); + prog_block->lasti->target_jmp = ip_rec; + + list_append(beginfile_block, instruction(Op_after_beginfile)); + + cp = list_merge(beginfile_block, prog_block); + (void) list_prepend(cp, ip_newfile); + (void) list_merge(cp, endfile_block); + (void) list_merge(cp, end_block); + if (begin_block != NULL) + cp = list_merge(begin_block, cp); + + (void) list_append(cp, ip_atexit); + (void) list_append(cp, instruction(Op_stop)); + +out: + /* delete the Op_list, not needed */ + tmp = cp->nexti; + bcfree(cp); + return tmp; + +#undef begin_block +#undef end_block +#undef prog_block +#undef beginfile_block +#undef endfile_block +} + +/* parse_program --- read in the program and convert into a list of instructions */ + +int +parse_program(INSTRUCTION **pcode) +{ + int ret; - if (! samefile) { - source = srcfiles[nextfile].val; - if (source == NULL) { /* read all the source files, all done */ - if (buf != NULL) { - free(buf); - buf = NULL; + /* pre-create non-local jump targets + * ip_end (Op_no_op) -- used as jump target for `exit' + * outside an END block. + */ + ip_end = instruction(Op_no_op); + + if (! in_main_context()) + ip_newfile = ip_rec = ip_atexit = ip_beginfile = ip_endfile = NULL; + else { + ip_endfile = instruction(Op_no_op); + ip_beginfile = instruction(Op_no_op); + ip_rec = instruction(Op_get_record); /* target for `next', also ip_newfile */ + ip_newfile = bcalloc(Op_newfile, 2, 0); /* target for `nextfile' */ + ip_newfile->target_jmp = ip_end; + ip_newfile->target_endfile = ip_endfile; + (ip_newfile + 1)->target_get_record = ip_rec; + ip_rec->target_newfile = ip_newfile; + ip_atexit = instruction(Op_atexit); /* target for `exit' in END block */ + } + + sourcefile = srcfiles->next; + lexeof = FALSE; + lexptr = NULL; + lasttok = 0; + memset(rule_block, 0, sizeof(ruletab) * sizeof(INSTRUCTION *)); + errcount = 0; + tok = tokstart != NULL ? tokstart : tokexpand(); + + ret = yyparse(); + *pcode = mk_program(); + + /* avoid false source indications */ + source = NULL; + sourceline = 0; + if (ret == 0) /* avoid spurious warning if parser aborted with YYABORT */ + check_funcs(); + + return (ret || errcount); +} + +/* do_add_srcfile --- add one item to srcfiles */ + +static SRCFILE * +do_add_srcfile(int stype, char *src, char *path, SRCFILE *thisfile) +{ + SRCFILE *s; + + emalloc(s, SRCFILE *, sizeof(SRCFILE), "do_add_srcfile"); + memset(s, 0, sizeof(SRCFILE)); + s->src = estrdup(src, strlen(src)); + s->fullpath = path; + s->stype = stype; + s->fd = INVALID_HANDLE; + s->next = thisfile; + s->prev = thisfile->prev; + thisfile->prev->next = s; + thisfile->prev = s; + return s; +} + +/* add_srcfile --- add one item to srcfiles after checking if + * a source file exists and not already in list. + */ + +SRCFILE * +add_srcfile(int stype, char *src, SRCFILE *thisfile, int *already_included, int *errcode) +{ + SRCFILE *s; + struct stat sbuf; + char *path; + int errno_val = 0; + + if (already_included) + *already_included = FALSE; + if (errcode) + *errcode = 0; + if (stype == SRC_CMDLINE || stype == SRC_STDIN) + return do_add_srcfile(stype, src, NULL, thisfile); + + path = find_source(src, &sbuf, &errno_val); + if (path == NULL) { + if (errcode) { + *errcode = errno_val; + return NULL; + } + fatal(_("can't open source file `%s' for reading (%s)"), + src, errno_val ? strerror(errno_val) : _("reason unknown")); + } + + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC) + && files_are_same(path, s) + ) { + if (do_lint) { + int line = sourceline; + /* Kludge: the line number may be off for `@include file'. + * Since, this function is also used for '-f file' in main.c, + * sourceline > 1 check ensures that the call is at + * parse time. + */ + if (sourceline > 1 && lasttok == NEWLINE) + line--; + lintwarn_ln(line, _("already included source file `%s'"), src); } - buflen = 0; - return lexeme = lexptr = lexptr_begin = NULL; + efree(path); + if (already_included) + *already_included = TRUE; + return NULL; } - fd = pathopen(source); + } + + s = do_add_srcfile(stype, src, path, thisfile); + s->sbuf = sbuf; + s->mtime = sbuf.st_mtime; + return s; +} + +/* include_source --- read program from source included using `@include' */ + +static int +include_source(INSTRUCTION *file) +{ + SRCFILE *s; + char *src = file->lextok; + int errcode; + int already_included; + + if (do_traditional || do_posix) { + error_ln(file->source_line, _("@include is a gawk extension")); + return -1; + } + + if (strlen(src) == 0) { + if (do_lint) + lintwarn_ln(file->source_line, _("empty filename after @include")); + return 0; + } + + s = add_srcfile(SRC_INC, src, sourcefile, &already_included, &errcode); + if (s == NULL) { + if (already_included) + return 0; + error_ln(file->source_line, + _("can't open source file `%s' for reading (%s)"), + src, errcode ? strerror(errcode) : _("reason unknown")); + return -1; + } + + /* save scanner state for the current sourcefile */ + sourcefile->srclines = sourceline; + sourcefile->lexptr = lexptr; + sourcefile->lexend = lexend; + sourcefile->lexptr_begin = lexptr_begin; + sourcefile->lexeme = lexeme; + sourcefile->lasttok = lasttok; + + /* included file becomes the current source */ + sourcefile = s; + lexptr = NULL; + sourceline = 0; + source = NULL; + lasttok = 0; + lexeof = FALSE; + eof_warned = FALSE; + return 0; +} + +/* next_sourcefile --- read program from the next source in srcfiles */ + +static void +next_sourcefile() +{ + static int (*closefunc)(int fd) = NULL; + + if (closefunc == NULL) { + char *cp = getenv("AWKREADFUNC"); + + /* If necessary, one day, test value for different functions. */ + if (cp == NULL) + closefunc = close; + else + closefunc = one_line_close; + } + + /* + * This won't be true if there's an invalid character in + * the source file or source string (e.g., user typo). + * Previous versions of gawk did not core dump in such a + * case. + * + * assert(lexeof == TRUE); + */ + lexeof = FALSE; + eof_warned = FALSE; + sourcefile->srclines = sourceline; /* total no of lines in current file */ + if (sourcefile->fd > INVALID_HANDLE) { + if (sourcefile->fd != fileno(stdin)) /* safety */ + (*closefunc)(sourcefile->fd); + sourcefile->fd = INVALID_HANDLE; + } + if (sourcefile->buf != NULL) { + efree(sourcefile->buf); + sourcefile->buf = NULL; + sourcefile->lexptr_begin = NULL; + } + + sourcefile = sourcefile->next; + if (sourcefile == srcfiles) + return; + + if (sourcefile->lexptr_begin != NULL) { + /* resume reading from already opened file (postponed to process '@include') */ + lexptr = sourcefile->lexptr; + lexend = sourcefile->lexend; + lasttok = sourcefile->lasttok; + lexptr_begin = sourcefile->lexptr_begin; + lexeme = sourcefile->lexeme; + sourceline = sourcefile->srclines; + source = sourcefile->src; + } else { + lexptr = NULL; + sourceline = 0; + source = NULL; + lasttok = 0; + } +} + +/* get_src_buf --- read the next buffer of source program */ + +static char * +get_src_buf() +{ + int n; + char *scan; + int newfile; + int savelen; + struct stat sbuf; + + /* + * No argument prototype on readfunc on purpose, + * avoids problems with some ancient systems where + * the types of arguments to read() aren't up to date. + */ + static ssize_t (*readfunc)() = 0; + + if (readfunc == NULL) { + char *cp = getenv("AWKREADFUNC"); + + /* If necessary, one day, test value for different functions. */ + if (cp == NULL) + /* + * cast is to remove warnings on systems with + * different return types for read. + */ + readfunc = ( ssize_t(*)() ) read; + else + readfunc = read_one_line; + } + + newfile = FALSE; + if (sourcefile == srcfiles) + return NULL; + + if (sourcefile->stype == SRC_CMDLINE) { + if (sourcefile->bufsize == 0) { + sourcefile->bufsize = strlen(sourcefile->src); + lexptr = lexptr_begin = lexeme = sourcefile->src; + lexend = lexptr + sourcefile->bufsize; + sourceline = 1; + if (sourcefile->bufsize == 0) { + /* + * Yet Another Special case: + * gawk '' /path/name + * Sigh. + */ + static short warned = FALSE; + + if (do_lint && ! warned) { + warned = TRUE; + lintwarn(_("empty program text on command line")); + } + lexeof = TRUE; + } + } else if (sourcefile->buf == NULL && *(lexptr-1) != '\n') { + /* + * The following goop is to ensure that the source + * ends with a newline and that the entire current + * line is available for error messages. + */ + int offset; + char *buf; + + offset = lexptr - lexeme; + for (scan = lexeme; scan > lexptr_begin; scan--) + if (*scan == '\n') { + scan++; + break; + } + savelen = lexptr - scan; + emalloc(buf, char *, savelen + 1, "get_src_buf"); + memcpy(buf, scan, savelen); + thisline = buf; + lexptr = buf + savelen; + *lexptr = '\n'; + lexeme = lexptr - offset; + lexptr_begin = buf; + lexend = lexptr + 1; + sourcefile->buf = buf; + } else + lexeof = TRUE; + return lexptr; + } + + if (sourcefile->fd <= INVALID_HANDLE) { + int fd; + int l; + + source = sourcefile->src; + if (source == NULL) + return NULL; + fd = srcopen(sourcefile); if (fd <= INVALID_HANDLE) { char *in; /* suppress file name and line no. in error mesg */ in = source; source = NULL; - fatal(_("can't open source file `%s' for reading (%s)"), + error(_("can't open source file `%s' for reading (%s)"), in, strerror(errno)); + errcount++; + lexeof = TRUE; + return sourcefile->src; } - l = optimal_bufsize(fd, & sbuf); + + sourcefile->fd = fd; + l = optimal_bufsize(fd, &sbuf); /* * Make sure that something silly like * AWKBUFSIZE=8 make check @@ -1440,110 +2557,72 @@ if (l < A_DECENT_BUFFER_SIZE) l = A_DECENT_BUFFER_SIZE; #undef A_DECENT_BUFFER_SIZE - + sourcefile->bufsize = l; newfile = TRUE; - - /* make sure buffer exists and has room */ - if (buflen == 0) { - emalloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } else if (l+2 > buflen) { - erealloc(buf, char *, l+2, "get_src_buf"); - buflen = l + 2; - } /* else - buffer has room, just use it */ - - readcount = l; - readloc = lexeme = lexptr = lexptr_begin = buf; - samefile = TRUE; + emalloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf"); + lexptr = lexptr_begin = lexeme = sourcefile->buf; + savelen = 0; sourceline = 1; + thisline = NULL; } else { /* - * In same file, ran off edge of buffer. - * Shift current line down to front, adjust - * pointers and fill in the rest of the buffer. + * Here, we retain the current source line in the beginning of the buffer. */ - - int lexeme_offset = lexeme - lexptr_begin; - int lexptr_offset = lexptr - lexptr_begin; - int lexend_offset = lexend - lexptr_begin; - - /* find beginning of current line */ - for (scan = lexeme; scan >= lexptr_begin; scan--) { + int offset; + for (scan = lexeme; scan > lexptr_begin; scan--) if (*scan == '\n') { scan++; break; } - } - /* - * This condition can be read as follows: IF - * 1. The beginning of the line is at the beginning of the - * buffer (no newline was found: scan <= buf) - * AND: - * 2. The start of valid lexical data is into the buffer - * (lexptr_begin > buf) - * OR: - * 3. We have scanned past the end of the last data read - * (lexptr == lexend) - * AND: - * 4. There's no room left in the buffer - * (lexptr_offset >= buflen - 2) - * - * If all that's true, grow the buffer to add more to - * the current line. - */ + savelen = lexptr - scan; + offset = lexptr - lexeme; - if (scan <= buf - && (lexptr_begin > buf - || (lexptr == lexend - && lexptr_offset >= buflen - 2))) { - /* have to grow the buffer */ - buflen *= 2; - erealloc(buf, char *, buflen, "get_src_buf"); - } else if (scan > buf) { - /* Line starts in middle of the buffer, shift things down. */ - memmove(buf, scan, lexend - scan); + if (savelen > 0) { /* - * make offsets relative to start of line, - * not start of buffer. + * Need to make sure we have room left for reading new text; + * grow the buffer (by doubling, an arbitrary choice), if the retained line + * takes up more than a certain percentage (50%, again an arbitrary figure) + * of the available space. */ - lexend_offset = lexend - scan; - lexeme_offset = lexeme - scan; - lexptr_offset = lexptr - scan; - } - - /* adjust pointers */ - lexeme = buf + lexeme_offset; - lexptr = buf + lexptr_offset; - lexend = buf + lexend_offset; - lexptr_begin = buf; - readcount = buflen - (lexend - buf); - readloc = lexend; - } - - /* add more data to buffer */ - n = (*readfunc)(fd, readloc, readcount); - if (n == -1) - fatal(_("can't read sourcefile `%s' (%s)"), - source, strerror(errno)); - if (n == 0) { - if (newfile) { - static short warned = FALSE; - if (do_lint && ! warned) { + if (savelen > sourcefile->bufsize / 2) { /* long line or token */ + sourcefile->bufsize *= 2; + erealloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf"); + scan = sourcefile->buf + (scan - lexptr_begin); + lexptr_begin = sourcefile->buf; + } + + thisline = lexptr_begin; + memmove(thisline, scan, savelen); + lexptr = thisline + savelen; + lexeme = lexptr - offset; + } else { + savelen = 0; + lexptr = lexeme = lexptr_begin; + thisline = NULL; + } + } + + n = (*readfunc)(sourcefile->fd, lexptr, sourcefile->bufsize - savelen); + if (n == -1) { + error(_("can't read sourcefile `%s' (%s)"), + source, strerror(errno)); + errcount++; + lexeof = TRUE; + } else { + lexend = lexptr + n; + if (n == 0) { + static short warned = FALSE; + if (do_lint && newfile && ! warned){ warned = TRUE; + sourceline = 0; lintwarn(_("source file `%s' is empty"), source); } + lexeof = TRUE; } - if (fd != fileno(stdin)) /* safety */ - (*closefunc)(fd); - samefile = FALSE; - nextfile++; - goto again; } - lexend = lexptr + n; - return lexptr; + return sourcefile->buf; } /* tokadd --- add a character to the token buffer */ @@ -1552,34 +2631,41 @@ /* tokexpand --- grow the token buffer */ -char * +static char * tokexpand() { - static int toksize = 60; + static int toksize; int tokoffset; - - tokoffset = tok - tokstart; - toksize *= 2; - if (tokstart != NULL) + + if (tokstart != NULL) { + tokoffset = tok - tokstart; + toksize *= 2; erealloc(tokstart, char *, toksize, "tokexpand"); - else + tok = tokstart + tokoffset; + } else { + toksize = 60; emalloc(tokstart, char *, toksize, "tokexpand"); + tok = tokstart; + } tokend = tokstart + toksize; - tok = tokstart + tokoffset; return tok; } /* nextc --- get the next input character */ -#ifdef MBS_SUPPORT +#if MBS_SUPPORT static int nextc(void) { if (gawk_mb_cur_max > 1) { - if (!lexptr || lexptr >= lexend) { - if (! get_src_buf()) - return EOF; +again: + if (lexeof) + return END_FILE; + if (lexptr == NULL || lexptr >= lexend) { + if (get_src_buf()) + goto again; + return END_SRC; } /* Update the buffer index. */ @@ -1592,7 +2678,7 @@ int idx, work_ring_idx = cur_ring_idx; mbstate_t tmp_state; size_t mbclen; - + for (idx = 0 ; lexptr + idx < lexend ; idx++) { tmp_state = cur_mbstate; mbclen = mbrlen(lexptr, idx + 1, &tmp_state); @@ -1623,44 +2709,30 @@ } return (int) (unsigned char) *lexptr++; - } - else { - int c; - - if (lexptr && lexptr < lexend) - c = (int) (unsigned char) *lexptr++; - else if (get_src_buf()) - c = (int) (unsigned char) *lexptr++; - else - c = EOF; - - return c; + } else { + do { + if (lexeof) + return END_FILE; + if (lexptr && lexptr < lexend) + return ((int) (unsigned char) *lexptr++); + } while (get_src_buf()); + return END_SRC; } } #else /* MBS_SUPPORT */ -#if GAWKDEBUG int -nextc(void) +nextc() { - int c; - - if (lexptr && lexptr < lexend) - c = (int) (unsigned char) *lexptr++; - else if (get_src_buf()) - c = (int) (unsigned char) *lexptr++; - else - c = EOF; - - return c; + do { + if (lexeof) + return END_FILE; + if (lexptr && lexptr < lexend) + return ((int) (unsigned char) *lexptr++); + } while (get_src_buf()); + return END_SRC; } -#else -#define nextc() ((lexptr && lexptr < lexend) ? \ - ((int) (unsigned char) *lexptr++) : \ - (get_src_buf() ? ((int) (unsigned char) *lexptr++) : EOF) \ - ) -#endif #endif /* MBS_SUPPORT */ @@ -1669,12 +2741,12 @@ static inline void pushback(void) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) cur_ring_idx = (cur_ring_idx == 0)? RING_BUFFER_SIZE - 1 : cur_ring_idx - 1; #endif - (lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); + (! lexeof && lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); } @@ -1687,13 +2759,17 @@ for (;;) { c = nextc(); - if (c == EOF) + if (c == END_FILE) { + pushback(); break; + } if (c == '#') { - while ((c = nextc()) != '\n' && c != EOF) + while ((c = nextc()) != '\n' && c != END_FILE) continue; - if (c == EOF) + if (c == END_FILE) { + pushback(); break; + } } if (c == '\n') sourceline++; @@ -1704,36 +2780,68 @@ } } +/* newline_eof --- return newline or EOF as needed and adjust variables */ + +/* + * This routine used to be a macro, however GCC 4.6.2 warned about + * the result of a computation not being used. Converting to a function + * removes the warnings. + */ + +static int newline_eof() +{ + /* NB: a newline at end does not start a source line. */ + if (lasttok != NEWLINE) { + pushback(); + if (do_lint && ! eof_warned) { + lintwarn(_("source file does not end in newline")); + eof_warned = TRUE; + } + sourceline++; + return NEWLINE; + } + + sourceline--; + eof_warned = FALSE; + return LEX_EOF; +} + /* yylex --- Read the input and turn it into tokens. */ static int yylex(void) { - register int c; + int c; int seen_e = FALSE; /* These are for numbers */ int seen_point = FALSE; int esc_seen; /* for literal strings */ int mid; static int did_newline = FALSE; char *tokkey; - static int lasttok = 0; - static short eof_warned = FALSE; int inhex = FALSE; int intlstr = FALSE; - if (nextc() == EOF) { - if (lasttok != NEWLINE) { - lasttok = NEWLINE; - if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } - return NEWLINE; /* fake it */ - } - return 0; +#define GET_INSTRUCTION(op) bcalloc(op, 1, sourceline) + +#define NEWLINE_EOF newline_eof() + + yylval = (INSTRUCTION *) NULL; + if (lasttok == SUBSCRIPT) { + lasttok = 0; + return SUBSCRIPT; } + + if (lasttok == LEX_EOF) /* error earlier in current source, must give up !! */ + return 0; + + c = nextc(); + if (c == END_SRC) + return 0; + if (c == END_FILE) + return lasttok = NEWLINE_EOF; pushback(); -#if defined OS2 || defined __EMX__ + +#if defined __EMX__ /* * added for OS/2's extproc feature of cmd.exe * (like #! in BSD sh) @@ -1743,6 +2851,7 @@ lexptr++; } #endif + lexeme = lexptr; thisline = NULL; if (want_regexp) { @@ -1786,7 +2895,8 @@ in_brack--; break; case '\\': - if ((c = nextc()) == EOF) { + if ((c = nextc()) == END_FILE) { + pushback(); yyerror(_("unterminated regexp ends with `\\' at end of file")); goto end_regexp; /* kludge */ } else if (c == '\n') { @@ -1802,8 +2912,8 @@ if (in_brack > 0) break; end_regexp: - tokadd('\0'); - yylval.sval = tokstart; + yylval = GET_INSTRUCTION(Op_token); + yylval->lextok = estrdup(tokstart, tok - tokstart); if (do_lint) { int peek = nextc(); @@ -1824,7 +2934,8 @@ pushback(); yyerror(_("unterminated regexp")); goto end_regexp; /* kludge */ - case EOF: + case END_FILE: + pushback(); yyerror(_("unterminated regexp at end of file")); goto end_regexp; /* kludge */ } @@ -1840,42 +2951,32 @@ lexeme = lexptr ? lexptr - 1 : lexptr; thisline = NULL; tok = tokstart; - yylval.nodetypeval = Node_illegal; - if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) { - case EOF: - if (lasttok != NEWLINE) { - lasttok = NEWLINE; - if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } - return NEWLINE; /* fake it */ - } +#if MBS_SUPPORT + if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) +#endif + switch (c) { + case END_SRC: return 0; + case END_FILE: + return lasttok = NEWLINE_EOF; + case '\n': sourceline++; return lasttok = NEWLINE; case '#': /* it's a comment */ while ((c = nextc()) != '\n') { - if (c == EOF) { - if (lasttok != NEWLINE) { - lasttok = NEWLINE; - if (do_lint && ! eof_warned) { - lintwarn( - _("source file does not end in newline")); - eof_warned = TRUE; - } - return NEWLINE; /* fake it */ - } - return 0; - } + if (c == END_FILE) + return lasttok = NEWLINE_EOF; } sourceline++; return lasttok = NEWLINE; + case '@': + return lasttok = '@'; + case '\\': #ifdef RELAXED_CONTINUATION /* @@ -1897,23 +2998,27 @@ _("use of `\\ #...' line continuation is not portable")); } while ((c = nextc()) != '\n') - if (c == EOF) + if (c == END_FILE) break; } pushback(); } #endif /* RELAXED_CONTINUATION */ - if (nextc() == '\n') { + c = nextc(); + if (c == '\r') /* allow MS-DOS files. bleah */ + c = nextc(); + if (c == '\n') { sourceline++; goto retry; } else { yyerror(_("backslash not last character on line")); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } break; case ':': case '?': + yylval = GET_INSTRUCTION(Op_cond_exp); if (! do_posix) allow_newline(); return lasttok = c; @@ -1928,21 +3033,36 @@ case '(': in_parens++; - /* FALL THROUGH */ + return lasttok = c; case '$': - case ';': + yylval = GET_INSTRUCTION(Op_field_spec); + return lasttok = c; case '{': + if (++in_braces == 1) + firstline = sourceline; + case ';': case ',': case '[': + return lasttok = c; case ']': - return lasttok = c; + c = nextc(); + pushback(); + if (c == '[') { + yylval = GET_INSTRUCTION(Op_sub_array); + lasttok = ']'; + } else { + yylval = GET_INSTRUCTION(Op_subscript); + lasttok = SUBSCRIPT; /* end of subscripts */ + } + return ']'; case '*': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_assign_times; + yylval = GET_INSTRUCTION(Op_assign_times); return lasttok = ASSIGNOP; } else if (do_posix) { pushback(); + yylval = GET_INSTRUCTION(Op_times); return lasttok = '*'; } else if (c == '*') { /* make ** and **= aliases for ^ and ^= */ @@ -1956,7 +3076,7 @@ if (do_lint_old) warning(_("old awk does not support operator `**='")); } - yylval.nodetypeval = Node_assign_exp; + yylval = GET_INSTRUCTION(Op_assign_exp); return ASSIGNOP; } else { pushback(); @@ -1967,10 +3087,12 @@ if (do_lint_old) warning(_("old awk does not support operator `**'")); } + yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; } } pushback(); + yylval = GET_INSTRUCTION(Op_times); return lasttok = '*'; case '/': @@ -1979,14 +3101,16 @@ return lasttok = SLASH_BEFORE_EQUAL; } pushback(); + yylval = GET_INSTRUCTION(Op_quotient); return lasttok = '/'; case '%': if (nextc() == '=') { - yylval.nodetypeval = Node_assign_mod; + yylval = GET_INSTRUCTION(Op_assign_mod); return lasttok = ASSIGNOP; } pushback(); + yylval = GET_INSTRUCTION(Op_mod); return lasttok = '%'; case '^': @@ -1998,7 +3122,7 @@ did_warn_assgn = TRUE; warning(_("operator `^=' is not supported in old awk")); } - yylval.nodetypeval = Node_assign_exp; + yylval = GET_INSTRUCTION(Op_assign_exp); return lasttok = ASSIGNOP; } pushback(); @@ -2006,67 +3130,74 @@ did_warn_op = TRUE; warning(_("operator `^' is not supported in old awk")); } + yylval = GET_INSTRUCTION(Op_exp); return lasttok = '^'; } case '+': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_assign_plus; + yylval = GET_INSTRUCTION(Op_assign_plus); return lasttok = ASSIGNOP; } - if (c == '+') + if (c == '+') { + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = INCREMENT; + } pushback(); + yylval = GET_INSTRUCTION(Op_plus); return lasttok = '+'; case '!': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_notequal; + yylval = GET_INSTRUCTION(Op_notequal); return lasttok = RELOP; } if (c == '~') { - yylval.nodetypeval = Node_nomatch; + yylval = GET_INSTRUCTION(Op_nomatch); return lasttok = MATCHOP; } pushback(); + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '!'; case '<': if (nextc() == '=') { - yylval.nodetypeval = Node_leq; + yylval = GET_INSTRUCTION(Op_leq); return lasttok = RELOP; } - yylval.nodetypeval = Node_less; + yylval = GET_INSTRUCTION(Op_less); pushback(); return lasttok = '<'; case '=': if (nextc() == '=') { - yylval.nodetypeval = Node_equal; + yylval = GET_INSTRUCTION(Op_equal); return lasttok = RELOP; } - yylval.nodetypeval = Node_assign; + yylval = GET_INSTRUCTION(Op_assign); pushback(); return lasttok = ASSIGN; case '>': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_geq; + yylval = GET_INSTRUCTION(Op_geq); return lasttok = RELOP; } else if (c == '>') { - yylval.nodetypeval = Node_redirect_append; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_append; return lasttok = IO_OUT; } pushback(); if (in_print && in_parens == 0) { - yylval.nodetypeval = Node_redirect_output; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_output; return lasttok = IO_OUT; } - yylval.nodetypeval = Node_greater; + yylval = GET_INSTRUCTION(Op_greater); return lasttok = '>'; case '~': - yylval.nodetypeval = Node_match; + yylval = GET_INSTRUCTION(Op_match); return lasttok = MATCHOP; case '}': @@ -2076,6 +3207,8 @@ */ if (did_newline) { did_newline = FALSE; + if (--in_braces == 0) + lastline = sourceline; return lasttok = c; } did_newline++; @@ -2089,7 +3222,7 @@ if (c == '\n') { pushback(); yyerror(_("unterminated string")); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) && c == '\\') { @@ -2099,35 +3232,46 @@ continue; } esc_seen = TRUE; - tokadd('\\'); + if (! want_source || c != '"') + tokadd('\\'); } - if (c == EOF) { + if (c == END_FILE) { pushback(); yyerror(_("unterminated string")); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } tokadd(c); } - yylval.nodeval = make_str_node(tokstart, - tok - tokstart, esc_seen ? SCAN : 0); - yylval.nodeval->flags |= PERM; + yylval = GET_INSTRUCTION(Op_token); + if (want_source) { + yylval->lextok = estrdup(tokstart, tok - tokstart); + return lasttok = FILENAME; + } + + yylval->opcode = Op_push_i; + yylval->memory = make_str_node(tokstart, + tok - tokstart, esc_seen ? SCAN : 0); + yylval->memory->flags &= ~MALLOC; + yylval->memory->flags |= PERM; if (intlstr) { - yylval.nodeval->flags |= INTLSTR; + yylval->memory->flags |= INTLSTR; intlstr = FALSE; if (do_intl) - dumpintlstr(yylval.nodeval->stptr, - yylval.nodeval->stlen); - } + dumpintlstr(yylval->memory->stptr, yylval->memory->stlen); + } return lasttok = YSTRING; case '-': if ((c = nextc()) == '=') { - yylval.nodetypeval = Node_assign_minus; + yylval = GET_INSTRUCTION(Op_assign_minus); return lasttok = ASSIGNOP; } - if (c == '-') + if (c == '-') { + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = DECREMENT; + } pushback(); + yylval = GET_INSTRUCTION(Op_minus); return lasttok = '-'; case '.': @@ -2237,59 +3381,60 @@ break; c = nextc(); } - if (c != EOF) - pushback(); - else if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } + pushback(); + tokadd('\0'); + yylval = GET_INSTRUCTION(Op_push_i); if (! do_traditional && isnondecimal(tokstart, FALSE)) { if (do_lint) { - if (isdigit(tokstart[1])) /* not an 'x' or 'X' */ + if (isdigit((unsigned char) tokstart[1])) /* not an 'x' or 'X' */ lintwarn("numeric constant `%.*s' treated as octal", (int) strlen(tokstart)-1, tokstart); else if (tokstart[1] == 'x' || tokstart[1] == 'X') lintwarn("numeric constant `%.*s' treated as hexadecimal", (int) strlen(tokstart)-1, tokstart); } - yylval.nodeval = make_number(nondec2awknum(tokstart, strlen(tokstart))); + yylval->memory = mk_number(nondec2awknum(tokstart, strlen(tokstart)), + PERM|NUMCUR|NUMBER); } else - yylval.nodeval = make_number(atof(tokstart)); - yylval.nodeval->flags |= PERM; + yylval->memory = mk_number(atof(tokstart), PERM|NUMCUR|NUMBER); return lasttok = YNUMBER; case '&': if ((c = nextc()) == '&') { - yylval.nodetypeval = Node_and; + yylval = GET_INSTRUCTION(Op_and); allow_newline(); return lasttok = LEX_AND; } pushback(); + yylval = GET_INSTRUCTION(Op_symbol); return lasttok = '&'; case '|': if ((c = nextc()) == '|') { - yylval.nodetypeval = Node_or; + yylval = GET_INSTRUCTION(Op_or); allow_newline(); return lasttok = LEX_OR; } else if (! do_traditional && c == '&') { - yylval.nodetypeval = Node_redirect_twoway; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_twoway; return lasttok = (in_print && in_parens == 0 ? IO_OUT : IO_IN); } pushback(); if (in_print && in_parens == 0) { - yylval.nodetypeval = Node_redirect_pipe; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_pipe; return lasttok = IO_OUT; } else { - yylval.nodetypeval = Node_redirect_pipein; + yylval = GET_INSTRUCTION(Op_symbol); + yylval->redir_type = redirect_pipein; return lasttok = IO_IN; } } if (c != '_' && ! isalpha(c)) { yyerror(_("invalid char '%c' in expression"), c); - exit(EXIT_FAILURE); + return lasttok = LEX_EOF; } /* @@ -2317,57 +3462,105 @@ /* it's some type of name-type-thing. Find its length. */ tok = tokstart; - while (is_identchar(c)) { + while (c != END_FILE && is_identchar(c)) { tokadd(c); c = nextc(); } tokadd('\0'); - emalloc(tokkey, char *, tok - tokstart, "yylex"); - memcpy(tokkey, tokstart, tok - tokstart); - if (c != EOF) - pushback(); - else if (do_lint && ! eof_warned) { - lintwarn(_("source file does not end in newline")); - eof_warned = TRUE; - } + pushback(); /* See if it is a special token. */ - if ((mid = check_special(tokstart)) >= 0) { + static int warntab[sizeof(tokentab) / sizeof(tokentab[0])]; + int class = tokentab[mid].class; + + if ((class == LEX_INCLUDE || class == LEX_EVAL) + && lasttok != '@') + goto out; + if (do_lint) { - if (tokentab[mid].flags & GAWKX) + if ((tokentab[mid].flags & GAWKX) && ! (warntab[mid] & GAWKX)) { lintwarn(_("`%s' is a gawk extension"), tokentab[mid].operator); - if (tokentab[mid].flags & RESX) + warntab[mid] |= GAWKX; + } + if ((tokentab[mid].flags & RESX) && ! (warntab[mid] & RESX)) { lintwarn(_("`%s' is a Bell Labs extension"), tokentab[mid].operator); - if (tokentab[mid].flags & NOT_POSIX) + warntab[mid] |= RESX; + } + if ((tokentab[mid].flags & NOT_POSIX) && ! (warntab[mid] & NOT_POSIX)) { lintwarn(_("POSIX does not allow `%s'"), tokentab[mid].operator); + warntab[mid] |= NOT_POSIX; + } } - if (do_lint_old && (tokentab[mid].flags & NOT_OLD)) + if (do_lint_old && (tokentab[mid].flags & NOT_OLD) + && ! (warntab[mid] & NOT_OLD) + ) { warning(_("`%s' is not supported in old awk"), tokentab[mid].operator); - if ((do_traditional && (tokentab[mid].flags & GAWKX)) - || (do_posix && (tokentab[mid].flags & NOT_POSIX))) - ; - else { - if (tokentab[mid].class == LEX_BUILTIN - || tokentab[mid].class == LEX_LENGTH) - yylval.lval = mid; - else - yylval.nodetypeval = tokentab[mid].value; - free(tokkey); - return lasttok = tokentab[mid].class; + warntab[mid] |= NOT_OLD; } - } - yylval.sval = tokkey; - if (*lexptr == '(') + if (tokentab[mid].flags & BREAK) + break_allowed++; + if (tokentab[mid].flags & CONTINUE) + continue_allowed++; + + switch (class) { + case LEX_INCLUDE: + want_source = TRUE; + break; + case LEX_EVAL: + if (in_main_context()) + goto out; + emalloc(tokkey, char *, tok - tokstart + 1, "yylex"); + tokkey[0] = '@'; + memcpy(tokkey + 1, tokstart, tok - tokstart); + yylval = GET_INSTRUCTION(Op_token); + yylval->lextok = tokkey; + break; + + case LEX_FUNCTION: + case LEX_BEGIN: + case LEX_END: + case LEX_BEGINFILE: + case LEX_ENDFILE: + yylval = bcalloc(tokentab[mid].value, 3, sourceline); + break; + + case LEX_FOR: + case LEX_WHILE: + case LEX_DO: + case LEX_SWITCH: + if (! do_profiling) + return lasttok = class; + /* fall through */ + case LEX_CASE: + yylval = bcalloc(tokentab[mid].value, 2, sourceline); + break; + + default: + yylval = GET_INSTRUCTION(tokentab[mid].value); + if (class == LEX_BUILTIN || class == LEX_LENGTH) + yylval->builtin_idx = mid; + break; + } + return lasttok = class; + } +out: + tokkey = estrdup(tokstart, tok - tokstart); + if (*lexptr == '(') { + yylval = bcalloc(Op_token, 2, sourceline); + yylval->lextok = tokkey; return lasttok = FUNC_CALL; - else { + } else { static short goto_warned = FALSE; + yylval = GET_INSTRUCTION(Op_token); + yylval->lextok = tokkey; + #define SMART_ALECK 1 if (SMART_ALECK && do_lint && ! goto_warned && strcasecmp(tokkey, "goto") == 0) { @@ -2376,140 +3569,236 @@ } return lasttok = NAME; } + +#undef GET_INSTRUCTION +#undef NEWLINE_EOF } -/* node_common --- common code for allocating a new node */ +/* mk_symbol --- allocates a symbol for the symbol table. */ -static NODE * -node_common(NODETYPE op) +NODE * +mk_symbol(NODETYPE type, NODE *value) { - register NODE *r; + NODE *r; getnode(r); - r->type = op; + r->type = type; r->flags = MALLOC; - /* if lookahead is a NL, lineno is 1 too high */ - if (lexeme && lexeme >= lexptr_begin && *lexeme == '\n') - r->source_line = sourceline - 1; - else - r->source_line = sourceline; - r->source_file = source; - return r; -} - -/* node --- allocates a node with defined lnode and rnode. */ - -NODE * -node(NODE *left, NODETYPE op, NODE *right) -{ - register NODE *r; - - r = node_common(op); - r->lnode = left; - r->rnode = right; + r->lnode = value; + r->rnode = NULL; + r->parent_array = NULL; + r->var_assign = (Func_ptr) 0; return r; } -/* snode --- allocate a node with defined subnode and builtin for builtin - functions. Checks for arg. count and supplies defaults where - possible. */ +/* snode --- instructions for builtin functions. Checks for arg. count + and supplies defaults where possible. */ -static NODE * -snode(NODE *subn, NODETYPE op, int idx) +static INSTRUCTION * +snode(INSTRUCTION *subn, INSTRUCTION *r) { - register NODE *r; - register NODE *n; + INSTRUCTION *arg; + INSTRUCTION *ip; + NODE *n; int nexp = 0; int args_allowed; + int idx = r->builtin_idx; - r = node_common(op); - - /* traverse expression list to see how many args. given */ - for (n = subn; n != NULL; n = n->rnode) { - nexp++; - if (nexp > 5) - break; - } + if (subn != NULL) { + INSTRUCTION *tp; + for (tp = subn->nexti; tp; tp = tp->nexti) { + tp = tp->lasti; + nexp++; + } + assert(nexp > 0); + } /* check against how many args. are allowed for this builtin */ args_allowed = tokentab[idx].flags & ARGS; - if (args_allowed && (args_allowed & A(nexp)) == 0) - fatal(_("%d is invalid as number of arguments for %s"), + if (args_allowed && (args_allowed & A(nexp)) == 0) { + yyerror(_("%d is invalid as number of arguments for %s"), nexp, tokentab[idx].operator); + return NULL; + } + + /* special processing for sub, gsub and gensub */ + + if (tokentab[idx].value == Op_sub_builtin) { + const char *operator = tokentab[idx].operator; + + r->sub_flags = 0; + + arg = subn->nexti; /* first arg list */ + (void) mk_rexp(arg); + + if (strcmp(operator, "gensub") != 0) { + /* sub and gsub */ + + if (strcmp(operator, "gsub") == 0) + r->sub_flags |= GSUB; + + arg = arg->lasti->nexti; /* 2nd arg list */ + if (nexp == 2) { + INSTRUCTION *expr; + + expr = list_create(instruction(Op_push_i)); + expr->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + (void) mk_expression_list(subn, + list_append(expr, instruction(Op_field_spec))); + } + + arg = arg->lasti->nexti; /* third arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push_i) { + if (do_lint) + lintwarn(_("%s: string literal as last arg of substitute has no effect"), + operator); + r->sub_flags |= LITERAL; + } else { + if (make_assignable(ip) == NULL) + yyerror(_("%s third parameter is not a changeable object"), + operator); + else + ip->do_reference = TRUE; + } + + r->expr_count = count_expressions(&subn, FALSE); + ip = subn->lasti; + + (void) list_append(subn, r); + + /* add after_assign code */ + if (ip->opcode == Op_push_lhs && ip->memory->type == Node_var && ip->memory->var_assign) { + (void) list_append(subn, instruction(Op_var_assign)); + subn->lasti->assign_ctxt = Op_sub_builtin; + subn->lasti->assign_var = ip->memory->var_assign; + } else if (ip->opcode == Op_field_spec_lhs) { + (void) list_append(subn, instruction(Op_field_assign)); + subn->lasti->assign_ctxt = Op_sub_builtin; + subn->lasti->field_assign = (Func_ptr) 0; + ip->target_assign = subn->lasti; + } + return subn; + + } else { + /* gensub */ + + r->sub_flags |= GENSUB; + if (nexp == 3) { + ip = instruction(Op_push_i); + ip->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + (void) mk_expression_list(subn, + list_append(list_create(ip), instruction(Op_field_spec))); + } + + r->expr_count = count_expressions(&subn, FALSE); + return list_append(subn, r); + } + } r->builtin = tokentab[idx].ptr; /* special case processing for a few builtins */ - if (nexp == 0 && r->builtin == do_length) { - subn = node(node(make_number(0.0), Node_field_spec, (NODE *) NULL), - Node_expression_list, - (NODE *) NULL); + + if (r->builtin == do_length) { + if (nexp == 0) { + /* no args. Use $0 */ + + INSTRUCTION *list; + r->expr_count = 1; + list = list_create(r); + (void) list_prepend(list, instruction(Op_field_spec)); + (void) list_prepend(list, instruction(Op_push_i)); + list->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER)); + return list; + } else { + arg = subn->nexti; + if (arg->nexti == arg->lasti && arg->nexti->opcode == Op_push) + arg->nexti->opcode = Op_push_arg; /* argument may be array */ + } + } else if (r->builtin == do_isarray) { + arg = subn->nexti; + if (arg->nexti == arg->lasti && arg->nexti->opcode == Op_push) + arg->nexti->opcode = Op_push_arg; /* argument may be array */ } else if (r->builtin == do_match) { static short warned = FALSE; - if (subn->rnode->lnode->type != Node_regex) - subn->rnode->lnode = mk_rexp(subn->rnode->lnode); + arg = subn->nexti->lasti->nexti; /* 2nd arg list */ + (void) mk_rexp(arg); - if (subn->rnode->rnode != NULL) { /* 3rd argument there */ + if (nexp == 3) { /* 3rd argument there */ if (do_lint && ! warned) { warned = TRUE; lintwarn(_("match: third argument is a gawk extension")); } - if (do_traditional) - fatal(_("match: third argument is a gawk extension")); + if (do_traditional) { + yyerror(_("match: third argument is a gawk extension")); + return NULL; + } + + arg = arg->lasti->nexti; /* third arg list */ + ip = arg->lasti; + if (/*ip == arg->nexti && */ ip->opcode == Op_push) + ip->opcode = Op_push_array; } - } 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) - append_right(subn, node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_expression_list, - (NODE *) NULL)); - else if (subn->rnode->rnode->lnode->type == Node_val) { - 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)) { - yyerror(_("%s third parameter is not a changeable object"), - (r->builtin == do_sub) ? "sub" : "gsub"); - } - } else if (r->builtin == do_gensub) { - if (subn->lnode->type != Node_regex) - subn->lnode = mk_rexp(subn->lnode); - if (nexp == 3) - append_right(subn, node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_expression_list, - (NODE *) NULL)); } else if (r->builtin == do_split) { + arg = subn->nexti->lasti->nexti; /* 2nd arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + if (nexp == 2) { + INSTRUCTION *expr; + expr = list_create(instruction(Op_push)); + expr->nexti->memory = FS_node; + (void) mk_expression_list(subn, expr); + } + arg = arg->lasti->nexti; + n = mk_rexp(arg); if (nexp == 2) - append_right(subn, - node(FS_node, Node_expression_list, (NODE *) NULL)); - n = subn->rnode->rnode->lnode; - if (n->type != Node_regex) - subn->rnode->rnode->lnode = mk_rexp(n); - if (nexp == 2) - subn->rnode->rnode->lnode->re_flags |= FS_DFLT; + n->re_flags |= FS_DFLT; + if (nexp == 4) { + arg = arg->lasti->nexti; + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } + } else if (r->builtin == do_patsplit) { + arg = subn->nexti->lasti->nexti; /* 2nd arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + if (nexp == 2) { + INSTRUCTION *expr; + expr = list_create(instruction(Op_push)); + expr->nexti->memory = FPAT_node; + (void) mk_expression_list(subn, expr); + } + arg = arg->lasti->nexti; + n = mk_rexp(arg); + if (nexp == 4) { + arg = arg->lasti->nexti; + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } } else if (r->builtin == do_close) { static short warned = FALSE; - - if ( nexp == 2) { - if (do_lint && nexp == 2 && ! warned) { + if (nexp == 2) { + if (do_lint && ! warned) { warned = TRUE; lintwarn(_("close: second argument is a gawk extension")); } - if (do_traditional) - fatal(_("close: second argument is a gawk extension")); + if (do_traditional) { + yyerror(_("close: second argument is a gawk extension")); + return NULL; + } } } else if (do_intl /* --gen-po */ && r->builtin == do_dcgettext /* dcgettext(...) */ - && subn->lnode->type == Node_val /* 1st arg is constant */ - && (subn->lnode->flags & STRCUR) != 0) { /* it's a string constant */ + && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */ + && (subn->nexti->lasti->memory->flags & STRCUR) != 0) { /* it's a string constant */ /* ala xgettext, dcgettext("some string" ...) dumps the string */ - NODE *str = subn->lnode; + NODE *str = subn->nexti->lasti->memory; if ((str->flags & INTLSTR) != 0) warning(_("use of dcgettext(_\"...\") is incorrect: remove leading underscore")); @@ -2518,53 +3807,73 @@ dumpintlstr(str->stptr, str->stlen); } else if (do_intl /* --gen-po */ && r->builtin == do_dcngettext /* dcngettext(...) */ - && subn->lnode->type == Node_val /* 1st arg is 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 & STRCUR) != 0) { /* it's a string constant */ + && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */ + && (subn->nexti->lasti->memory->flags & STRCUR) != 0 /* it's a string constant */ + && subn->nexti->lasti->nexti->lasti->opcode == Op_push_i /* 2nd arg is constant too */ + && (subn->nexti->lasti->nexti->lasti->memory->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; + NODE *str1 = subn->nexti->lasti->memory; + NODE *str2 = subn->nexti->lasti->nexti->lasti->memory; if (((str1->flags | str2->flags) & INTLSTR) != 0) warning(_("use of dcngettext(_\"...\") is incorrect: remove leading underscore")); else dumpintlstr2(str1->stptr, str1->stlen, str2->stptr, str2->stlen); + } else if (r->builtin == do_asort || r->builtin == do_asorti) { + arg = subn->nexti; /* 1st arg list */ + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + if (nexp >= 2) { + arg = ip->nexti; + ip = arg->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } } +#ifdef ARRAYDEBUG + else if (r->builtin == do_adump) { + ip = subn->nexti->lasti; + if (ip->opcode == Op_push) + ip->opcode = Op_push_array; + } +#endif - r->subnode = subn; - if (r->builtin == do_sprintf) { - count_args(r); - if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */ - r->lnode->printf_count = r->printf_count; /* hack */ + if (subn != NULL) { + r->expr_count = count_expressions(&subn, FALSE); + return list_append(subn, r); } - return r; + + r->expr_count = 0; + return list_create(r); } -/* make_for_loop --- build a for loop */ +/* append_param --- append PNAME to the list of parameters + * for the current function. + */ -static NODE * -make_for_loop(NODE *init, NODE *cond, NODE *incr) +static void +append_param(char *pname) { - register FOR_LOOP_HEADER *r; - NODE *n; + static NODE *savetail = NULL; + NODE *p; - emalloc(r, FOR_LOOP_HEADER *, sizeof(FOR_LOOP_HEADER), "make_for_loop"); - getnode(n); - n->type = Node_illegal; - r->init = init; - r->cond = cond; - r->incr = incr; - n->sub.nodep.r.hd = r; - return n; + p = make_param(pname); + if (func_params == NULL) { + func_params = p; + savetail = p; + } else if (savetail != NULL) { + savetail->rnode = p; + savetail = p; + } } /* dup_parms --- return TRUE if there are duplicate parameters */ static int -dup_parms(NODE *func) +dup_parms(INSTRUCTION *fp, NODE *func) { - register NODE *np; + NODE *np; const char *fname, **names; int count, i, j, dups; NODE *params; @@ -2587,7 +3896,7 @@ i = 0; for (np = params; np != NULL; np = np->rnode) { if (np->param == NULL) { /* error earlier, give up, go home */ - free(names); + efree(names); return TRUE; } names[i++] = np->param; @@ -2598,38 +3907,47 @@ for (j = 0; j < i; j++) { if (strcmp(names[i], names[j]) == 0) { dups++; - error( + error_ln(fp->source_line, _("function `%s': parameter #%d, `%s', duplicates parameter #%d"), - fname, i+1, names[j], j+1); + fname, i + 1, names[j], j+1); } } } - free(names); + efree(names); return (dups > 0 ? TRUE : FALSE); } /* parms_shadow --- check if parameters shadow globals */ static int -parms_shadow(const char *fname, NODE *func) +parms_shadow(INSTRUCTION *pc, int *shadow) { - int count, i; + int pcount, i; int ret = FALSE; + NODE *func; + char *fname; + func = pc->func_body; + fname = func->lnode->param; + +#if 0 /* can't happen, already exited if error ? */ if (fname == NULL || func == NULL) /* error earlier */ return FALSE; +#endif - count = func->lnode->param_cnt; + pcount = func->lnode->param_cnt; - if (count == 0) /* no args, no problem */ - return FALSE; + if (pcount == 0) /* no args, no problem */ + return 0; + source = pc->source_file; + sourceline = pc->source_line; /* * Use warning() and not lintwarn() so that can warn * about all shadowed parameters. */ - for (i = 0; i < count; i++) { + for (i = 0; i < pcount; i++) { if (lookup(func->parmlist[i]) != NULL) { warning( _("function `%s': parameter `%s' shadows global variable"), @@ -2638,21 +3956,27 @@ } } - return ret; + *shadow |= ret; + return 0; } + /* - * install: + * install_symbol: * Install a name in the symbol table, even if it is already there. * Caller must check against redefinition if that is desired. */ + NODE * -install(char *name, NODE *value) +install_symbol(char *name, NODE *value) { - register NODE *hp; - register size_t len; - register int bucket; + NODE *hp; + size_t len; + int bucket; + + if (install_func) + (*install_func)(name); var_count++; len = strlen(name); @@ -2668,27 +3992,26 @@ return hp->hvalue; } -/* lookup --- find the most recent hash node for name installed by install */ +/* lookup --- find the most recent hash node for name installed by install_symbol */ NODE * lookup(const char *name) { - register NODE *bucket; - register size_t len; + NODE *bucket; + size_t len; len = strlen(name); for (bucket = variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]; bucket != NULL; bucket = bucket->hnext) - if (bucket->hlength == len && STREQN(bucket->hname, name, len)) + if (bucket->hlength == len && strncmp(bucket->hname, name, len) == 0) return bucket->hvalue; - return NULL; } -/* var_comp --- compare two variable names */ +/* sym_comp --- compare two symbol (variable or function) names */ static int -var_comp(const void *v1, const void *v2) +sym_comp(const void *v1, const void *v2) { const NODE *const *npp1, *const *npp2; const NODE *n1, *n2; @@ -2709,77 +4032,90 @@ /* valinfo --- dump var info */ -static void -valinfo(NODE *n, FILE *fp) +void +valinfo(NODE *n, int (*print_func)(FILE *, const char *, ...), FILE *fp) { - if (n->flags & STRING) { - fprintf(fp, "string ("); - pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE); - fprintf(fp, ")\n"); + if (n == Nnull_string) + print_func(fp, "uninitialized scalar\n"); + else if (n->flags & STRING) { + pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE); + print_func(fp, "\n"); } else if (n->flags & NUMBER) - fprintf(fp, "number (%.17g)\n", n->numbr); + print_func(fp, "%.17g\n", n->numbr); else if (n->flags & STRCUR) { - fprintf(fp, "string value ("); - pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE); - fprintf(fp, ")\n"); + pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE); + print_func(fp, "\n"); } else if (n->flags & NUMCUR) - fprintf(fp, "number value (%.17g)\n", n->numbr); + print_func(fp, "%.17g\n", n->numbr); else - fprintf(fp, "?? flags %s\n", flags2str(n->flags)); + print_func(fp, "?? flags %s\n", flags2str(n->flags)); } +/* get_varlist --- list of global variables */ -/* dump_vars --- dump the symbol table */ - -void -dump_vars(const char *fname) +NODE ** +get_varlist() { int i, j; NODE **table; NODE *p; - FILE *fp; - - emalloc(table, NODE **, var_count * sizeof(NODE *), "dump_vars"); - - if (fname == NULL) - fp = stderr; - else if ((fp = fopen(fname, "w")) == NULL) { - warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno)); - warning(_("sending profile to standard error")); - fp = stderr; - } + emalloc(table, NODE **, (var_count + 1) * sizeof(NODE *), "get_varlist"); + update_global_values(); for (i = j = 0; i < HASHSIZE; i++) for (p = variables[i]; p != NULL; p = p->hnext) table[j++] = p; - assert(j == var_count); /* Shazzam! */ - qsort(table, j, sizeof(NODE *), var_comp); + qsort(table, j, sizeof(NODE *), sym_comp); - for (i = 0; i < j; i++) { - p = table[i]; + table[j] = NULL; + return table; +} + +/* print_vars --- print names and values of global variables */ + +void +print_vars(int (*print_func)(FILE *, const char *, ...), FILE *fp) +{ + int i; + NODE **table; + NODE *p; + + table = get_varlist(); + for (i = 0; (p = table[i]) != NULL; i++) { if (p->hvalue->type == Node_func) continue; - fprintf(fp, "%.*s: ", (int) p->hlength, p->hname); + print_func(fp, "%.*s: ", (int) p->hlength, p->hname); if (p->hvalue->type == Node_var_array) - fprintf(fp, "array, %ld elements\n", p->hvalue->table_size); + print_func(fp, "array, %ld elements\n", p->hvalue->table_size); else if (p->hvalue->type == Node_var_new) - fprintf(fp, "unused variable\n"); + print_func(fp, "untyped variable\n"); else if (p->hvalue->type == Node_var) - valinfo(p->hvalue->var_value, fp); - else { - NODE **lhs = get_lhs(p->hvalue, NULL, FALSE); + valinfo(p->hvalue->var_value, print_func, fp); + } + efree(table); +} - valinfo(*lhs, fp); - } +/* dump_vars --- dump the symbol table */ + +void +dump_vars(const char *fname) +{ + FILE *fp; + + if (fname == NULL) + fp = stderr; + else if ((fp = fopen(fname, "w")) == NULL) { + warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno)); + warning(_("sending variable list to standard error")); + fp = stderr; } + print_vars(fprintf, fp); if (fp != stderr && fclose(fp) != 0) warning(_("%s: close failed (%s)"), fname, strerror(errno)); - - free(table); } /* release_all_vars --- free all variable memory */ @@ -2789,8 +4125,8 @@ { int i; NODE *p, *next; - - for (i = 0; i < HASHSIZE; i++) + + for (i = 0; i < HASHSIZE; i++) { for (p = variables[i]; p != NULL; p = next) { next = p->hnext; @@ -2798,40 +4134,14 @@ continue; else if (p->hvalue->type == Node_var_array) assoc_clear(p->hvalue); - else if (p->hvalue->type != Node_var_new) { - NODE **lhs = get_lhs(p->hvalue, NULL, FALSE); - - unref(*lhs); - } - unref(p); - } -} - -/* finfo --- for use in comparison and sorting of function names */ - -struct finfo { - const char *name; - size_t nlen; - NODE *func; -}; - -/* fcompare --- comparison function for qsort */ - -static int -fcompare(const void *p1, const void *p2) -{ - const struct finfo *f1, *f2; - int minlen; - - f1 = (const struct finfo *) p1; - f2 = (const struct finfo *) p2; - - if (f1->nlen > f2->nlen) - minlen = f2->nlen; - else - minlen = f1->nlen; + else if (p->hvalue->type != Node_var_new) + unref(p->hvalue->var_value); - return strncmp(f1->name, f2->name, minlen); + efree(p->hname); + freenode(p->hvalue); + freenode(p); + } + } } /* dump_funcs --- print all functions */ @@ -2839,48 +4149,10 @@ void dump_funcs() { - int i, j; - NODE *p; - struct finfo *tab = NULL; - - /* - * 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 (j == 0) + if (func_count <= 0) return; - 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) { - tab[j].name = p->hname; - tab[j].nlen = p->hlength; - tab[j].func = p->hvalue; - j++; - } - } - } - - - /* Shazzam! */ - qsort(tab, j, sizeof(struct finfo), fcompare); - - for (i = 0; i < j; i++) - pp_func(tab[i].name, tab[i].nlen, tab[i].func); - - free(tab); + (void) foreach_func((int (*)(INSTRUCTION *, void *)) pp_func, TRUE, (void *) 0); } /* shadow_funcs --- check all functions for parameters that shadow globals */ @@ -2888,40 +4160,16 @@ void shadow_funcs() { - int i, j; - NODE *p; - struct finfo *tab; static int calls = 0; int shadow = FALSE; - if (func_count == 0) + if (func_count <= 0) return; if (calls++ != 0) fatal(_("shadow_funcs() called twice!")); - emalloc(tab, struct finfo *, func_count * sizeof(struct finfo), "shadow_funcs"); - - for (i = j = 0; i < HASHSIZE; i++) { - for (p = variables[i]; p != NULL; p = p->hnext) { - if (p->hvalue->type == Node_func) { - tab[j].name = p->hname; - tab[j].nlen = p->hlength; - tab[j].func = p->hvalue; - j++; - } - } - } - - assert(j == func_count); - - /* Shazzam! */ - qsort(tab, func_count, sizeof(struct finfo), fcompare); - - for (i = 0; i < j; i++) - shadow |= parms_shadow(tab[i].name, tab[i].func); - - free(tab); + (void) foreach_func((int (*)(INSTRUCTION *, void *)) parms_shadow, TRUE, &shadow); /* End with fatal if the user requested it. */ if (shadow && lintfunc != warning) @@ -2929,54 +4177,6 @@ } /* - * append_right: - * Add new to the rightmost branch of LIST. This uses n^2 time, so we make - * a simple attempt at optimizing it. - */ - -static NODE * -append_right(NODE *list, NODE *new) -{ - register NODE *oldlist; - static NODE *savefront = NULL, *savetail = NULL; - - if (list == NULL || new == NULL) - return list; - - oldlist = list; - if (savefront == oldlist) - list = savetail; /* Be careful: maybe list->rnode != NULL */ - else - savefront = oldlist; - - while (list->rnode != NULL) - list = list->rnode; - savetail = list->rnode = new; - return oldlist; -} - -/* - * 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 @@ -2987,92 +4187,116 @@ * of each function parameter during a function call. See eval.c. */ -static void -func_install(NODE *params, NODE *def) +static int +func_install(INSTRUCTION *func, INSTRUCTION *def) { - NODE *r, *n, *thisfunc; - char **pnames, *names, *sp; - size_t pcount = 0, space = 0; + NODE *params; + NODE *r, *n, *thisfunc, *hp; + char **pnames = NULL; + char *fname; + int pcount = 0; int i; + params = func_params; + /* check for function foo(foo) { ... }. bleah. */ for (n = params->rnode; n != NULL; n = n->rnode) { - if (strcmp(n->param, params->param) == 0) - fatal(_("function `%s': can't use function name as parameter name"), - params->param); - else if (is_std_var(n->param)) - fatal(_("function `%s': can't use special variable `%s' as a function parameter"), - params->param, n->param); + if (strcmp(n->param, params->param) == 0) { + error_ln(func->source_line, + _("function `%s': can't use function name as parameter name"), params->param); + return -1; + } else if (is_std_var(n->param)) { + error_ln(func->source_line, + _("function `%s': can't use special variable `%s' as a function parameter"), + params->param, n->param); + return -1; + } } - thisfunc = NULL; /* turn off warnings */ - - /* symbol table managment */ - pop_var(params, FALSE); - r = lookup(params->param); + thisfunc = NULL; /* turn off warnings */ + + fname = params->param; + /* symbol table management */ + hp = remove_symbol(params->param); /* remove function name out of symbol table */ + if (hp != NULL) + freenode(hp); + r = lookup(fname); if (r != NULL) { - fatal(_("function name `%s' previously defined"), params->param); - } else if (params->param == builtin_func) /* not a valid function name */ + error_ln(func->source_line, + _("function name `%s' previously defined"), fname); + return -1; + } else if (fname == builtin_func) /* not a valid function name */ goto remove_params; + /* add an implicit return at end; + * also used by 'return' command in debugger + */ + + (void) list_append(def, instruction(Op_push_i)); + def->lasti->memory = Nnull_string; + (void) list_append(def, instruction(Op_K_return)); + + if (do_profiling) + (void) list_prepend(def, instruction(Op_exec_count)); + + /* func->opcode is Op_func */ + (func + 1)->firsti = def->nexti; + (func + 1)->lasti = def->lasti; + (func + 2)->first_line = func->source_line; + (func + 2)->last_line = lastline; + + func->nexti = def->nexti; + bcfree(def); + + (void) list_append(rule_list, func + 1); /* debugging */ + /* install the function */ - thisfunc = node(params, Node_func, def); - (void) install(params->param, thisfunc); + thisfunc = mk_symbol(Node_func, params); + (void) install_symbol(fname, thisfunc); + thisfunc->code_ptr = func; + func->func_body = thisfunc; - /* figure out amount of space to allocate for variable names */ - for (n = params->rnode; n != NULL; n = n->rnode) { + for (n = params->rnode; n != NULL; n = n->rnode) pcount++; - space += strlen(n->param) + 1; - } - /* allocate it and fill it in */ if (pcount != 0) { - emalloc(names, char *, space, "func_install"); - emalloc(pnames, char **, pcount * sizeof(char *), "func_install"); - sp = names; - for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode) { - pnames[i] = sp; - strcpy(sp, n->param); - sp += strlen(n->param) + 1; - } - thisfunc->parmlist = pnames; - } else { - thisfunc->parmlist = NULL; + emalloc(pnames, char **, (pcount + 1) * sizeof(char *), "func_install"); + for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode) + pnames[i] = n->param; + pnames[pcount] = NULL; } + thisfunc->parmlist = pnames; /* update lint table info */ - func_use(params->param, FUNC_DEFINE); + func_use(fname, FUNC_DEFINE); - func_count++; /* used by profiling / pretty printer */ + func_count++; /* used in profiler / pretty printer */ remove_params: /* remove params from symbol table */ pop_params(params->rnode); + return 0; } -/* pop_var --- remove a variable from the symbol table */ +/* remove_symbol --- remove a variable from the symbol table */ -static void -pop_var(NODE *np, int freeit) +NODE * +remove_symbol(char *name) { - register NODE *bucket, **save; - register size_t len; - char *name; + NODE *bucket, **save; + size_t len; - name = np->param; len = strlen(name); save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]); for (bucket = *save; bucket != NULL; bucket = bucket->hnext) { - if (len == bucket->hlength && STREQN(bucket->hname, name, len)) { + if (len == bucket->hlength && strncmp(bucket->hname, name, len) == 0) { var_count--; *save = bucket->hnext; - freenode(bucket); - if (freeit) - free(np->param); - return; + return bucket; } save = &(bucket->hnext); } + return NULL; } /* pop_params --- remove list of function parameters from symbol table */ @@ -3084,10 +4308,13 @@ static void pop_params(NODE *params) { + NODE *hp; if (params == NULL) return; pop_params(params->rnode); - pop_var(params, TRUE); + hp = remove_symbol(params->param); + if (hp != NULL) + freenode(hp); } /* make_param --- make NAME into a function parameter */ @@ -3100,9 +4327,8 @@ getnode(r); r->type = Node_param_list; r->rnode = NULL; - r->param = name; r->param_cnt = param_counter++; - return (install(name, r)); + return (install_symbol(name, r)); } static struct fdesc { @@ -3156,6 +4382,9 @@ struct fdesc *fp, *next; int i; + if (! in_main_context()) + goto free_mem; + for (i = 0; i < HASHSIZE; i++) { for (fp = ftable[i]; fp != NULL; fp = fp->next) { #ifdef REALLYMEAN @@ -3171,35 +4400,105 @@ _("function `%s' called but never defined"), fp->name); #endif if (do_lint && fp->used == 0) { - lintwarn(_("function `%s' defined but never called"), + lintwarn(_("function `%s' defined but never called directly"), fp->name); } } } +free_mem: /* now let's free all the memory */ for (i = 0; i < HASHSIZE; i++) { for (fp = ftable[i]; fp != NULL; fp = next) { next = fp->next; - free(fp->name); - free(fp); + efree(fp->name); + efree(fp); } + ftable[i] = NULL; } } /* param_sanity --- look for parameters that are regexp constants */ static void -param_sanity(NODE *arglist) +param_sanity(INSTRUCTION *arglist) { - NODE *argp, *arg; - int i; + INSTRUCTION *argl, *arg; + int i = 1; + + if (arglist == NULL) + return; + for (argl = arglist->nexti; argl; ) { + arg = argl->lasti; + if (arg->opcode == Op_match_rec) + warning_ln(arg->source_line, + _("regexp constant for parameter #%d yields boolean value"), i); + argl = arg->nexti; + i++; + } +} + +/* foreach_func --- execute given function for each awk function in symbol table. */ + +int +foreach_func(int (*pfunc)(INSTRUCTION *, void *), int sort, void *data) +{ + int i, j; + NODE *p; + int ret = 0; + + if (sort) { + NODE **tab; + + /* + * Walk through symbol table counting 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 (j == 0) + return 0; + + emalloc(tab, NODE **, j * sizeof(NODE *), "foreach_func"); + + /* 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) { + tab[j] = p; + j++; + } + } + } + + /* Shazzam! */ + qsort(tab, j, sizeof(NODE *), sym_comp); + + for (i = 0; i < j; i++) { + if ((ret = pfunc(tab[i]->hvalue->code_ptr, data)) != 0) + break; + } + + efree(tab); + return ret; + } - for (i = 1, argp = arglist; argp != NULL; argp = argp->rnode, i++) { - arg = argp->lnode; - if (arg->type == Node_regex) - warning(_("regexp constant for parameter #%d yields boolean value"), i); + /* unsorted */ + for (i = 0; i < HASHSIZE; i++) { + for (p = variables[i]; p != NULL; p = p->hnext) { + if (p->hvalue->type == Node_func + && (ret = pfunc(p->hvalue->code_ptr, data)) != 0) + return ret; + } } + return 0; } /* deferred variables --- those that are only defined if needed. */ @@ -3236,116 +4535,122 @@ /* variable --- make sure NAME is in the symbol table */ NODE * -variable(char *name, int can_free, NODETYPE type) +variable(char *name, NODETYPE type) { - register NODE *r; + NODE *r; if ((r = lookup(name)) != NULL) { - if (r->type == Node_func) - fatal(_("function `%s' called with space between name and `(',\nor used as a variable or an array"), + if (r->type == Node_func) { + error(_("function `%s' called with space between name and `(',\nor used as a variable or an array"), r->vname); - + errcount++; + r->type = Node_var_new; /* continue parsing instead of exiting */ + } } else { /* not found */ struct deferred_variable *dv; for (dv = deferred_variables; TRUE; dv = dv->next) { if (dv == NULL) { - /* - * This is the only case in which we may not - * free the string. - */ - NODE *n; - - if (type == Node_var_array) - n = node(NULL, type, NULL); - else - n = node(Nnull_string, type, NULL); - - return install(name, n); + /* + * This is the only case in which we may not free the string. + */ + if (type == Node_var) + r = mk_symbol(type, Nnull_string); + else + r = mk_symbol(type, (NODE *) NULL); + return install_symbol(name, r); } - if (STREQ(name, dv->name)) { + if (strcmp(name, dv->name) == 0) { r = (*dv->load_func)(); break; } } } - if (can_free) - free(name); + efree(name); return r; } -/* mk_rexp --- make a regular expression constant */ +/* make_regnode --- make a regular expression node */ static NODE * -mk_rexp(NODE *exp) +make_regnode(int type, NODE *exp) { NODE *n; - if (exp->type == Node_regex) - return exp; - getnode(n); - n->type = Node_dynregex; - n->re_exp = exp; - n->re_text = NULL; - n->re_reg = NULL; - n->re_flags = 0; + memset(n, 0, sizeof(NODE)); + n->type = type; n->re_cnt = 1; + + if (type == Node_regex) { + n->re_reg = make_regexp(exp->stptr, exp->stlen, FALSE, TRUE, FALSE); + if (n->re_reg == NULL) { + freenode(n); + return NULL; + } + n->re_exp = exp; + n->re_flags = CONSTANT; + } return n; } -/* isnoeffect --- when used as a statement, has no side effects */ -/* - * To be completely general, we should recursively walk the parse - * tree, to make sure that all the subexpressions also have no effect. - * Instead, we just weaken the actual warning that's printed, up above - * in the grammar. - */ +/* mk_rexp --- make a regular expression constant */ + +static NODE * +mk_rexp(INSTRUCTION *list) +{ + INSTRUCTION *ip; + + ip = list->nexti; + if (ip == list->lasti && ip->opcode == Op_match_rec) + ip->opcode = Op_push_re; + else { + ip = instruction(Op_push_re); + ip->memory = make_regnode(Node_dynregex, NULL); + ip->nexti = list->lasti->nexti; + list->lasti->nexti = ip; + list->lasti = ip; + } + return ip->memory; +} + +/* isnoeffect --- when used as a statement, has no side effects */ static int -isnoeffect(NODETYPE type) +isnoeffect(OPCODE type) { switch (type) { - case Node_times: - case Node_quotient: - case Node_mod: - case Node_plus: - case Node_minus: - case Node_subscript: - case Node_concat: - case Node_exp: - case Node_unary_minus: - case Node_field_spec: - case Node_and: - case Node_or: - case Node_equal: - case Node_notequal: - case Node_less: - case Node_greater: - case Node_leq: - case Node_geq: - case Node_match: - case Node_nomatch: - case Node_not: - case Node_val: - case Node_in_array: - case Node_NF: - case Node_NR: - case Node_FNR: - case Node_FS: - case Node_RS: - case Node_FIELDWIDTHS: - case Node_IGNORECASE: - case Node_OFS: - case Node_ORS: - case Node_OFMT: - case Node_CONVFMT: - case Node_BINMODE: - case Node_LINT: - case Node_SUBSEP: - case Node_TEXTDOMAIN: + case Op_times: + case Op_times_i: + case Op_quotient: + case Op_quotient_i: + case Op_mod: + case Op_mod_i: + case Op_plus: + case Op_plus_i: + case Op_minus: + case Op_minus_i: + case Op_subscript: + case Op_concat: + case Op_exp: + case Op_exp_i: + case Op_unary_minus: + case Op_field_spec: + case Op_and_final: + case Op_or_final: + case Op_equal: + case Op_notequal: + case Op_less: + case Op_greater: + case Op_leq: + case Op_geq: + case Op_match: + case Op_nomatch: + case Op_match_rec: + case Op_not: + case Op_in_array: return TRUE; default: break; /* keeps gcc -Wall happy */ @@ -3354,44 +4659,34 @@ return FALSE; } -/* isassignable --- can this node be assigned to? */ +/* make_assignable --- make this operand an assignable one if posiible */ -static int -isassignable(register NODE *n) +static INSTRUCTION * +make_assignable(INSTRUCTION *ip) { - switch (n->type) { - case Node_var_new: - case Node_var: - case Node_FIELDWIDTHS: - case Node_RS: - case Node_FS: - case Node_FNR: - case Node_NR: - case Node_NF: - case Node_IGNORECASE: - case Node_OFMT: - case Node_CONVFMT: - case Node_ORS: - case Node_OFS: - case Node_LINT: - case Node_BINMODE: - case Node_SUBSEP: - case Node_TEXTDOMAIN: - case Node_field_spec: - case Node_subscript: - return TRUE; - case Node_param_list: - return ((n->flags & FUNC) == 0); /* ok if not func name */ + switch (ip->opcode) { + case Op_push: + if (ip->memory->type == Node_param_list + && (ip->memory->flags & FUNC) != 0) + return NULL; + ip->opcode = Op_push_lhs; + return ip; + case Op_field_spec: + ip->opcode = Op_field_spec_lhs; + return ip; + case Op_subscript: + ip->opcode = Op_subscript_lhs; + return ip; default: break; /* keeps gcc -Wall happy */ } - return FALSE; + return NULL; } /* stopme --- for debugging */ NODE * -stopme(NODE *tree ATTRIBUTE_UNUSED) +stopme(int nargs ATTRIBUTE_UNUSED) { return (NODE *) 0; } @@ -3413,7 +4708,7 @@ } printf("msgid "); - pp_string_fp(stdout, str, len, '"', TRUE); + pp_string_fp(fprintf, stdout, str, len, '"', TRUE); putchar('\n'); printf("msgstr \"\"\n\n"); fflush(stdout); @@ -3436,35 +4731,15 @@ } printf("msgid "); - pp_string_fp(stdout, str1, len1, '"', TRUE); + pp_string_fp(fprintf, stdout, str1, len1, '"', TRUE); putchar('\n'); printf("msgid_plural "); - pp_string_fp(stdout, str2, len2, '"', TRUE); + pp_string_fp(fprintf, stdout, str2, len2, '"', TRUE); putchar('\n'); printf("msgstr[0] \"\"\nmsgstr[1] \"\"\n\n"); fflush(stdout); } -/* count_args --- count the number of printf arguments */ - -static void -count_args(NODE *tree) -{ - size_t count = 0; - NODE *save_tree; - - assert(tree->type == Node_K_printf - || (tree->type == Node_builtin && tree->builtin == do_sprintf)); - save_tree = tree; - - tree = tree->lnode; /* printf format string */ - - for (count = 0; tree != NULL; tree = tree->rnode) - count++; - - save_tree->printf_count = count; -} - /* isarray --- can this type be subscripted? */ static int @@ -3486,6 +4761,1196 @@ return FALSE; } +/* mk_binary --- instructions for binary operators */ + +static INSTRUCTION * +mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op) +{ + INSTRUCTION *ip1,*ip2; + AWKNUM res; + + ip2 = s2->nexti; + if (s2->lasti == ip2 && ip2->opcode == Op_push_i) { + /* do any numeric constant folding */ + ip1 = s1->nexti; + if (do_optimize > 1 + && ip1 == s1->lasti && ip1->opcode == Op_push_i + && (ip1->memory->flags & (STRCUR|STRING)) == 0 + && (ip2->memory->flags & (STRCUR|STRING)) == 0 + ) { + NODE *n1 = ip1->memory, *n2 = ip2->memory; + res = force_number(n1); + (void) force_number(n2); + switch (op->opcode) { + case Op_times: + res *= n2->numbr; + break; + case Op_quotient: + if (n2->numbr == 0.0) { + /* don't fatalize, allow parsing rest of the input */ + error_ln(op->source_line, _("division by zero attempted")); + goto regular; + } + + res /= n2->numbr; + break; + case Op_mod: + if (n2->numbr == 0.0) { + /* don't fatalize, allow parsing rest of the input */ + error_ln(op->source_line, _("division by zero attempted in `%%'")); + goto regular; + } +#ifdef HAVE_FMOD + res = fmod(res, n2->numbr); +#else /* ! HAVE_FMOD */ + (void) modf(res / n2->numbr, &res); + res = n1->numbr - res * n2->numbr; +#endif /* ! HAVE_FMOD */ + break; + case Op_plus: + res += n2->numbr; + break; + case Op_minus: + res -= n2->numbr; + break; + case Op_exp: + res = calc_exp(res, n2->numbr); + break; + default: + goto regular; + } + + op->opcode = Op_push_i; + op->memory = mk_number(res, (PERM|NUMCUR|NUMBER)); + n1->flags &= ~PERM; + n1->flags |= MALLOC; + n2->flags &= ~PERM; + n2->flags |= MALLOC; + unref(n1); + unref(n2); + bcfree(ip1); + bcfree(ip2); + bcfree(s1); + bcfree(s2); + return list_create(op); + } else { + /* do basic arithmetic optimisation */ + /* convert (Op_push_i Node_val) + (Op_plus) to (Op_plus_i Node_val) */ + switch (op->opcode) { + case Op_times: + op->opcode = Op_times_i; + break; + case Op_quotient: + op->opcode = Op_quotient_i; + break; + case Op_mod: + op->opcode = Op_mod_i; + break; + case Op_plus: + op->opcode = Op_plus_i; + break; + case Op_minus: + op->opcode = Op_minus_i; + break; + case Op_exp: + op->opcode = Op_exp_i; + break; + default: + goto regular; + } + + op->memory = ip2->memory; + bcfree(ip2); + bcfree(s2); /* Op_list */ + return list_append(s1, op); + } + } + +regular: + /* append lists s1, s2 and add `op' bytecode */ + (void) list_merge(s1, s2); + return list_append(s1, op); +} + +/* mk_boolean --- instructions for boolean and, or */ + +static INSTRUCTION * +mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op) +{ + INSTRUCTION *tp; + OPCODE opc, final_opc; + + opc = op->opcode; /* Op_and or Op_or */ + final_opc = (opc == Op_or) ? Op_or_final : Op_and_final; + + add_lint(right, LINT_assign_in_cond); + + tp = left->lasti; + + if (tp->opcode != final_opc) { /* x || y */ + list_append(right, instruction(final_opc)); + add_lint(left, LINT_assign_in_cond); + (void) list_append(left, op); + left->lasti->target_jmp = right->lasti; + + /* NB: target_stmt points to previous Op_and(Op_or) in a chain; + * target_stmt only used in the parser (see below). + */ + + left->lasti->target_stmt = left->lasti; + right->lasti->target_stmt = left->lasti; + } else { /* optimization for x || y || z || ... */ + INSTRUCTION *ip; + + op->opcode = final_opc; + (void) list_append(right, op); + op->target_stmt = tp; + tp->opcode = opc; + tp->target_jmp = op; + + /* update jump targets */ + for (ip = tp->target_stmt; ; ip = ip->target_stmt) { + assert(ip->opcode == opc); + assert(ip->target_jmp == tp); + /* if (ip->opcode == opc && ip->target_jmp == tp) */ + ip->target_jmp = op; + if (ip->target_stmt == ip) + break; + } + } + + return list_merge(left, right); +} + +/* mk_condition --- if-else and conditional */ + +static INSTRUCTION * +mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch, + INSTRUCTION *elsep, INSTRUCTION *false_branch) +{ + /* + * ---------------- + * cond + * ---------------- + * t: [Op_jmp_false f ] + * ---------------- + * true_branch + * + * ---------------- + * [Op_jmp y] + * ---------------- + * f: + * false_branch + * ---------------- + * y: [Op_no_op] + * ---------------- + */ + + INSTRUCTION *ip; + + if (false_branch == NULL) { + false_branch = list_create(instruction(Op_no_op)); + if (elsep != NULL) { /* else { } */ + if (do_profiling) + (void) list_prepend(false_branch, elsep); + else + bcfree(elsep); + } + } else { + /* assert(elsep != NULL); */ + + /* avoid a series of no_op's: if .. else if .. else if .. */ + if (false_branch->lasti->opcode != Op_no_op) + (void) list_append(false_branch, instruction(Op_no_op)); + if (do_profiling) { + (void) list_prepend(false_branch, elsep); + false_branch->nexti->branch_end = false_branch->lasti; + (void) list_prepend(false_branch, instruction(Op_exec_count)); + } else + bcfree(elsep); + } + + (void) list_prepend(false_branch, instruction(Op_jmp)); + false_branch->nexti->target_jmp = false_branch->lasti; + + add_lint(cond, LINT_assign_in_cond); + ip = list_append(cond, instruction(Op_jmp_false)); + ip->lasti->target_jmp = false_branch->nexti->nexti; + + if (do_profiling) { + (void) list_prepend(ip, ifp); + (void) list_append(ip, instruction(Op_exec_count)); + ip->nexti->branch_if = ip->lasti; + ip->nexti->branch_else = false_branch->nexti; + } else + bcfree(ifp); + + if (true_branch != NULL) + list_merge(ip, true_branch); + return list_merge(ip, false_branch); +} + +enum defline { FIRST_LINE, LAST_LINE }; + +/* find_line -- find the first(last) line in a list of (pattern) instructions */ + +static int +find_line(INSTRUCTION *pattern, enum defline what) +{ + INSTRUCTION *ip; + int lineno = 0; + + for (ip = pattern->nexti; ip; ip = ip->nexti) { + if (what == LAST_LINE) { + if (ip->source_line > lineno) + lineno = ip->source_line; + } else { /* FIRST_LINE */ + if (ip->source_line > 0 + && (lineno == 0 || ip->source_line < lineno)) + lineno = ip->source_line; + } + if (ip == pattern->lasti) + break; + } + assert(lineno > 0); + return lineno; +} + +/* append_rule --- pattern-action instructions */ + +static INSTRUCTION * +append_rule(INSTRUCTION *pattern, INSTRUCTION *action) +{ + /* + * ---------------- + * pattern + * ---------------- + * [Op_jmp_false f ] + * ---------------- + * action + * ---------------- + * f: [Op_no_op ] + * ---------------- + */ + + INSTRUCTION *rp; + INSTRUCTION *tp; + INSTRUCTION *ip; + + if (rule != Rule) { + rp = pattern; + if (do_profiling) + (void) list_append(action, instruction(Op_no_op)); + (rp + 1)->firsti = action->nexti; + (rp + 1)->lasti = action->lasti; + (rp + 2)->first_line = pattern->source_line; + (rp + 2)->last_line = lastline; + ip = list_prepend(action, rp); + + } else { + rp = bcalloc(Op_rule, 3, 0); + rp->in_rule = Rule; + rp->source_file = source; + tp = instruction(Op_no_op); + + if (pattern == NULL) { + /* assert(action != NULL); */ + if (do_profiling) + (void) list_prepend(action, instruction(Op_exec_count)); + (rp + 1)->firsti = action->nexti; + (rp + 1)->lasti = tp; + (rp + 2)->first_line = firstline; + (rp + 2)->last_line = lastline; + rp->source_line = firstline; + ip = list_prepend(list_append(action, tp), rp); + } else { + (void) list_append(pattern, instruction(Op_jmp_false)); + pattern->lasti->target_jmp = tp; + (rp + 2)->first_line = find_line(pattern, FIRST_LINE); + rp->source_line = (rp + 2)->first_line; + if (action == NULL) { + (rp + 2)->last_line = find_line(pattern, LAST_LINE); + action = list_create(instruction(Op_K_print_rec)); + if (do_profiling) + (void) list_prepend(action, instruction(Op_exec_count)); + } else + (rp + 2)->last_line = lastline; + + if (do_profiling) { + (void) list_prepend(pattern, instruction(Op_exec_count)); + (void) list_prepend(action, instruction(Op_exec_count)); + } + (rp + 1)->firsti = action->nexti; + (rp + 1)->lasti = tp; + ip = list_append( + list_merge(list_prepend(pattern, rp), + action), + tp); + } + + } + + list_append(rule_list, rp + 1); + + if (rule_block[rule] == NULL) + rule_block[rule] = ip; + else + (void) list_merge(rule_block[rule], ip); + + return rule_block[rule]; +} + +/* mk_assignment --- assignment bytecodes */ + +static INSTRUCTION * +mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op) +{ + INSTRUCTION *tp; + INSTRUCTION *ip; + + tp = lhs->lasti; + switch (tp->opcode) { + case Op_field_spec: + tp->opcode = Op_field_spec_lhs; + break; + case Op_subscript: + tp->opcode = Op_subscript_lhs; + break; + case Op_push: + case Op_push_array: + tp->opcode = Op_push_lhs; + break; + default: + cant_happen(); + } + + tp->do_reference = (op->opcode != Op_assign); /* check for uninitialized reference */ + + if (rhs != NULL) + ip = list_merge(rhs, lhs); + else + ip = lhs; + + (void) list_append(ip, op); + + if (tp->opcode == Op_push_lhs + && tp->memory->type == Node_var + && tp->memory->var_assign + ) { + tp->do_reference = FALSE; /* no uninitialized reference checking + * for a special variable. + */ + (void) list_append(ip, instruction(Op_var_assign)); + ip->lasti->assign_var = tp->memory->var_assign; + } else if (tp->opcode == Op_field_spec_lhs) { + (void) list_append(ip, instruction(Op_field_assign)); + ip->lasti->field_assign = (Func_ptr) 0; + tp->target_assign = ip->lasti; + } + + return ip; +} + +/* optimize_assignment --- peephole optimization for assignment */ + +static INSTRUCTION * +optimize_assignment(INSTRUCTION *exp) +{ + INSTRUCTION *i1; + INSTRUCTION *i2; + INSTRUCTION *i3; + + /* + * Optimize assignment statements array[subs] = x; var = x; $n = x; + * string concatenation of the form s = s t. + * + * 1) Array element assignment array[subs] = x: + * Replaces Op_push_array + Op_subscript_lhs + Op_assign + Op_pop + * with single instruction Op_store_sub. + * Limitation: 1 dimension and sub is simple var/value. + * + * 2) Simple variable assignment var = x: + * Replaces Op_push_lhs + Op_assign + Op_pop with Op_store_var. + * + * 3) Field assignment $n = x: + * Replaces Op_field_spec_lhs + Op_assign + Op_field_assign + Op_pop + * with Op_store_field. + * + * 4) Optimization for string concatenation: + * For cases like x = x y, uses realloc to include y in x; + * also eliminates instructions Op_push_lhs and Op_pop. + */ + + /* + * N.B.: do not append Op_pop instruction to the returned + * instruction list if optimized. None of these + * optimized instructions pushes the r-value of assignment + * onto the runtime stack. + */ + + i2 = NULL; + i1 = exp->lasti; + + if ( ! do_optimize + || ( i1->opcode != Op_assign + && i1->opcode != Op_field_assign) + ) + return list_append(exp, instruction(Op_pop)); + + for (i2 = exp->nexti; i2 != i1; i2 = i2->nexti) { + switch (i2->opcode) { + case Op_concat: + if (i2->nexti->opcode == Op_push_lhs /* l.h.s is a simple variable */ + && (i2->concat_flag & CSVAR) /* 1st exp in r.h.s is a simple variable; + * see Op_concat in the grammer above. + */ + && i2->nexti->memory == exp->nexti->memory /* and the same as in l.h.s */ + && i2->nexti->nexti == i1 + && i1->opcode == Op_assign + ) { + /* s = s ... optimization */ + + /* avoid stuff like x = x (x = y) or x = x gsub(/./, "b", x); + * check for l-value reference to this variable in the r.h.s. + * Also, avoid function calls in general to guard against + * global variable assignment. + */ + + for (i3 = exp->nexti->nexti; i3 != i2; i3 = i3->nexti) { + if ((i3->opcode == Op_push_lhs && i3->memory == i2->nexti->memory) + || i3->opcode == Op_func_call) + return list_append(exp, instruction(Op_pop)); /* no optimization */ + } + + /* remove the variable from r.h.s */ + i3 = exp->nexti; + exp->nexti = i3->nexti; + bcfree(i3); + + if (--i2->expr_count == 1) /* one less expression in Op_concat */ + i2->opcode = Op_no_op; + + i3 = i2->nexti; + assert(i3->opcode == Op_push_lhs); + i3->opcode = Op_assign_concat; /* change Op_push_lhs to Op_assign_concat */ + i3->nexti = NULL; + bcfree(i1); /* Op_assign */ + exp->lasti = i3; /* update Op_list */ + return exp; + } + break; + + case Op_field_spec_lhs: + if (i2->nexti->opcode == Op_assign + && i2->nexti->nexti == i1 + && i1->opcode == Op_field_assign + ) { + /* $n = .. */ + i2->opcode = Op_store_field; + bcfree(i2->nexti); /* Op_assign */ + i2->nexti = NULL; + bcfree(i1); /* Op_field_assign */ + exp->lasti = i2; /* update Op_list */ + return exp; + } + break; + + case Op_push_array: + if (i2->nexti->nexti->opcode == Op_subscript_lhs) { + i3 = i2->nexti->nexti; + if (i3->sub_count == 1 + && i3->nexti == i1 + && i1->opcode == Op_assign + ) { + /* array[sub] = .. */ + i3->opcode = Op_store_sub; + i3->memory = i2->memory; + i3->expr_count = 1; /* sub_count shadows memory, + * so use expr_count instead. + */ + i3->nexti = NULL; + i2->opcode = Op_no_op; + bcfree(i1); /* Op_assign */ + exp->lasti = i3; /* update Op_list */ + return exp; + } + } + break; + + case Op_push_lhs: + if (i2->nexti == i1 + && i1->opcode == Op_assign + ) { + /* var = .. */ + i2->opcode = Op_store_var; + i2->nexti = NULL; + bcfree(i1); /* Op_assign */ + exp->lasti = i2; /* update Op_list */ + return exp; + } + break; + + default: + break; + } + } + + /* no optimization */ + return list_append(exp, instruction(Op_pop)); +} + + +/* mk_getline --- make instructions for getline */ + +static INSTRUCTION * +mk_getline(INSTRUCTION *op, INSTRUCTION *var, INSTRUCTION *redir, int redirtype) +{ + INSTRUCTION *ip; + INSTRUCTION *tp; + INSTRUCTION *asgn = NULL; + + /* + * getline [var] < [file] + * + * [ file (simp_exp)] + * [ [ var ] ] + * [ Op_K_getline_redir|NULL|redir_type|into_var] + * [ [var_assign] ] + * + */ + + if (redir == NULL) { + int sline = op->source_line; + bcfree(op); + op = bcalloc(Op_K_getline, 2, sline); + (op + 1)->target_endfile = ip_endfile; + (op + 1)->target_beginfile = ip_beginfile; + } + + if (var != NULL) { + tp = make_assignable(var->lasti); + assert(tp != NULL); + + /* check if we need after_assign bytecode */ + if (tp->opcode == Op_push_lhs + && tp->memory->type == Node_var + && tp->memory->var_assign + ) { + asgn = instruction(Op_var_assign); + asgn->assign_ctxt = op->opcode; + asgn->assign_var = tp->memory->var_assign; + } else if (tp->opcode == Op_field_spec_lhs) { + asgn = instruction(Op_field_assign); + asgn->assign_ctxt = op->opcode; + asgn->field_assign = (Func_ptr) 0; /* determined at run time */ + tp->target_assign = asgn; + } + if (redir != NULL) { + ip = list_merge(redir, var); + (void) list_append(ip, op); + } else + ip = list_append(var, op); + } else if (redir != NULL) + ip = list_append(redir, op); + else + ip = list_create(op); + op->into_var = (var != NULL); + op->redir_type = (redir != NULL) ? redirtype : 0; + + return (asgn == NULL ? ip : list_append(ip, asgn)); +} + + +/* mk_for_loop --- for loop bytecodes */ + +static INSTRUCTION * +mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond, + INSTRUCTION *incr, INSTRUCTION *body) +{ + /* + * ------------------------ + * init (may be NULL) + * ------------------------ + * x: + * cond (Op_no_op if NULL) + * ------------------------ + * [ Op_jmp_false tb ] + * ------------------------ + * body (may be NULL) + * ------------------------ + * tc: + * incr (may be NULL) + * [ Op_jmp x ] + * ------------------------ + * tb:[ Op_no_op ] + */ + + INSTRUCTION *ip, *tbreak, *tcont; + INSTRUCTION *jmp; + INSTRUCTION *pp_cond; + INSTRUCTION *ret; + + tbreak = instruction(Op_no_op); + + if (cond != NULL) { + add_lint(cond, LINT_assign_in_cond); + pp_cond = cond->nexti; + ip = cond; + (void) list_append(ip, instruction(Op_jmp_false)); + ip->lasti->target_jmp = tbreak; + } else { + pp_cond = instruction(Op_no_op); + ip = list_create(pp_cond); + } + + if (init != NULL) + ip = list_merge(init, ip); + + if (do_profiling) { + (void) list_append(ip, instruction(Op_exec_count)); + (forp + 1)->forloop_cond = pp_cond; + (forp + 1)->forloop_body = ip->lasti; + } + + if (body != NULL) + (void) list_merge(ip, body); + + jmp = instruction(Op_jmp); + jmp->target_jmp = pp_cond; + if (incr == NULL) + tcont = jmp; + else { + tcont = incr->nexti; + (void) list_merge(ip, incr); + } + + (void) list_append(ip, jmp); + ret = list_append(ip, tbreak); + fix_break_continue(ret, tbreak, tcont); + + if (do_profiling) { + forp->target_break = tbreak; + forp->target_continue = tcont; + ret = list_prepend(ret, forp); + } /* else + forp is NULL */ + + return ret; +} + +/* add_lint --- add lint warning bytecode if needed */ + +static void +add_lint(INSTRUCTION *list, LINTTYPE linttype) +{ +#ifndef NO_LINT + INSTRUCTION *ip; + + switch (linttype) { + case LINT_assign_in_cond: + ip = list->lasti; + if (ip->opcode == Op_var_assign || ip->opcode == Op_field_assign) { + assert(ip != list->nexti); + for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti) + ; + } + + if (ip->opcode == Op_assign || ip->opcode == Op_assign_concat) { + list_append(list, instruction(Op_lint)); + list->lasti->lint_type = linttype; + } + break; + + case LINT_no_effect: + if (list->lasti->opcode == Op_pop && list->nexti != list->lasti) { + for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti) + ; + + if (do_lint) { /* compile-time warning */ + if (isnoeffect(ip->opcode)) + lintwarn_ln(ip->source_line, ("statement may have no effect")); + } + + if (ip->opcode == Op_push) { /* run-time warning */ + list_append(list, instruction(Op_lint)); + list->lasti->lint_type = linttype; + } + } + break; + + default: + break; + } +#endif +} + +/* mk_expression_list --- list of bytecode lists */ + +static INSTRUCTION * +mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1) +{ + INSTRUCTION *r; + + /* we can't just combine all bytecodes, since we need to + * process individual expressions for a few builtins in snode() (-: + */ + + /* -- list of lists */ + /* [Op_list| ... ]------ + * | + * [Op_list| ... ] -- | + * ... | | + * ... <------- | + * [Op_list| ... ] -- | + * ... | | + * ... | | + * ... <------- -- + */ + + assert(s1 != NULL && s1->opcode == Op_list); + if (list == NULL) { + list = instruction(Op_list); + list->nexti = s1; + list->lasti = s1->lasti; + return list; + } + + /* append expression to the end of the list */ + + r = list->lasti; + r->nexti = s1; + list->lasti = s1->lasti; + return list; +} + +/* count_expressions --- fixup expression_list from mk_expression_list. + * returns no of expressions in list. isarg is true + * for function arguments. + */ + +static int +count_expressions(INSTRUCTION **list, int isarg) +{ + INSTRUCTION *expr; + INSTRUCTION *r = NULL; + int count = 0; + + if (*list == NULL) /* error earlier */ + return 0; + + for (expr = (*list)->nexti; expr; ) { + INSTRUCTION *t1, *t2; + t1 = expr->nexti; + t2 = expr->lasti; + if (isarg && t1 == t2 && t1->opcode == Op_push) + t1->opcode = Op_push_param; + if (++count == 1) + r = expr; + else + (void) list_merge(r, expr); + expr = t2->nexti; + } + + assert(count > 0); + if (! isarg && count > max_args) + max_args = count; + bcfree(*list); + *list = r; + return count; +} + +/* fix_break_continue --- fix up break & continue codes in loop bodies */ + +static void +fix_break_continue(INSTRUCTION *list, INSTRUCTION *b_target, INSTRUCTION *c_target) +{ + INSTRUCTION *ip; + + list->lasti->nexti = NULL; /* just to make sure */ + + for (ip = list->nexti; ip != NULL; ip = ip->nexti) { + switch (ip->opcode) { + case Op_K_break: + if (ip->target_jmp == NULL) + ip->target_jmp = b_target; + break; + + case Op_K_continue: + if (ip->target_jmp == NULL) + ip->target_jmp = c_target; + break; + + default: + /* this is to keep the compiler happy. sheesh. */ + break; + } + } +} + + +/* append_symbol --- append symbol to the list of symbols + * installed in the symbol table. + */ + +void +append_symbol(char *name) +{ + NODE *hp; + + /* N.B.: func_install removes func name and reinstalls it; + * and we get two entries for it here!. destroy_symbol() + * will find and destroy the Node_func which is what we want. + */ + + getnode(hp); + hp->hname = name; /* shallow copy */ + hp->hnext = symbol_list->hnext; + symbol_list->hnext = hp; +} + +/* release_symbol --- free symbol list and optionally remove symbol from symbol table */ + +void +release_symbols(NODE *symlist, int keep_globals) +{ + NODE *hp, *n; + + for (hp = symlist->hnext; hp != NULL; hp = n) { + if (! keep_globals) { + /* destroys globals, function, and params + * if still in symbol table and not removed by func_install + * due to parse error. + */ + destroy_symbol(hp->hname); + } + n = hp->hnext; + freenode(hp); + } + symlist->hnext = NULL; +} + +/* destroy_symbol --- remove a symbol from symbol table +* and free all associated memory. +*/ + +void +destroy_symbol(char *name) +{ + NODE *symbol, *hp; + + symbol = lookup(name); + if (symbol == NULL) + return; + + if (symbol->type == Node_func) { + char **varnames; + NODE *func, *n; + + func = symbol; + varnames = func->parmlist; + if (varnames != NULL) + efree(varnames); + + /* function parameters of type Node_param_list */ + for (n = func->lnode->rnode; n != NULL; ) { + NODE *np; + np = n->rnode; + efree(n->param); + freenode(n); + n = np; + } + freenode(func->lnode); + func_count--; + + } else if (symbol->type == Node_var_array) + assoc_clear(symbol); + else if (symbol->type == Node_var) + unref(symbol->var_value); + + /* remove from symbol table */ + hp = remove_symbol(name); + efree(hp->hname); + freenode(hp->hvalue); + freenode(hp); +} + +#define pool_size d.dl +#define freei x.xi +static INSTRUCTION *pool_list; +static AWK_CONTEXT *curr_ctxt = NULL; + +/* new_context --- create a new execution context. */ + +AWK_CONTEXT * +new_context() +{ + AWK_CONTEXT *ctxt; + + emalloc(ctxt, AWK_CONTEXT *, sizeof(AWK_CONTEXT), "new_context"); + memset(ctxt, 0, sizeof(AWK_CONTEXT)); + ctxt->srcfiles.next = ctxt->srcfiles.prev = &ctxt->srcfiles; + ctxt->rule_list.opcode = Op_list; + ctxt->rule_list.lasti = &ctxt->rule_list; + return ctxt; +} + +/* set_context --- change current execution context. */ + +static void +set_context(AWK_CONTEXT *ctxt) +{ + pool_list = &ctxt->pools; + symbol_list = &ctxt->symbols; + srcfiles = &ctxt->srcfiles; + rule_list = &ctxt->rule_list; + install_func = ctxt->install_func; + curr_ctxt = ctxt; +} + +/* + * push_context: + * + * Switch to the given context after saving the current one. The set + * of active execution contexts forms a stack; the global or main context + * is at the bottom of the stack. + */ + +void +push_context(AWK_CONTEXT *ctxt) +{ + ctxt->prev = curr_ctxt; + /* save current source and sourceline */ + if (curr_ctxt != NULL) { + curr_ctxt->sourceline = sourceline; + curr_ctxt->source = source; + } + sourceline = 0; + source = NULL; + set_context(ctxt); +} + +/* pop_context --- switch to previous execution context. */ + +void +pop_context() +{ + AWK_CONTEXT *ctxt; + + assert(curr_ctxt != NULL); + ctxt = curr_ctxt->prev; + /* restore source and sourceline */ + sourceline = ctxt->sourceline; + source = ctxt->source; + set_context(ctxt); +} + +/* in_main_context --- are we in the main context ? */ + +int +in_main_context() +{ + assert(curr_ctxt != NULL); + return (curr_ctxt->prev == NULL); +} + +/* free_context --- free context structure and related data. */ + +void +free_context(AWK_CONTEXT *ctxt, int keep_globals) +{ + SRCFILE *s, *sn; + + if (ctxt == NULL) + return; + + assert(curr_ctxt != ctxt); + + /* free all code including function codes */ + free_bcpool(&ctxt->pools); + /* free symbols */ + release_symbols(&ctxt->symbols, keep_globals); + /* free srcfiles */ + for (s = &ctxt->srcfiles; s != &ctxt->srcfiles; s = sn) { + sn = s->next; + if (s->stype != SRC_CMDLINE && s->stype != SRC_STDIN) + efree(s->fullpath); + efree(s->src); + efree(s); + } + efree(ctxt); +} + +/* free_bc_internal --- free internal memory of an instruction. */ + +static void +free_bc_internal(INSTRUCTION *cp) +{ + NODE *m; + + switch(cp->opcode) { + case Op_func_call: + if (cp->func_name != NULL + && cp->func_name != builtin_func + ) + efree(cp->func_name); + break; + case Op_push_re: + case Op_match_rec: + case Op_match: + case Op_nomatch: + m = cp->memory; + if (m->re_reg != NULL) + refree(m->re_reg); + if (m->re_exp != NULL) + unref(m->re_exp); + if (m->re_text != NULL) + unref(m->re_text); + freenode(m); + break; + case Op_token: /* token lost during error recovery in yyparse */ + if (cp->lextok != NULL) + efree(cp->lextok); + break; + case Op_illegal: + cant_happen(); + default: + break; + } +} + + +/* INSTR_CHUNK must be > largest code size (3) */ +#define INSTR_CHUNK 127 + +/* bcfree --- deallocate instruction */ + +void +bcfree(INSTRUCTION *cp) +{ + cp->opcode = 0; + cp->nexti = pool_list->freei; + pool_list->freei = cp; +} + +/* bcalloc --- allocate a new instruction */ + +INSTRUCTION * +bcalloc(OPCODE op, int size, int srcline) +{ + INSTRUCTION *cp; + + if (size > 1) { + /* wide instructions Op_rule, Op_func_call .. */ + emalloc(cp, INSTRUCTION *, (size + 1) * sizeof(INSTRUCTION), "bcalloc"); + cp->pool_size = size; + cp->nexti = pool_list->nexti; + pool_list->nexti = cp++; + } else { + INSTRUCTION *pool; + + pool = pool_list->freei; + if (pool == NULL) { + INSTRUCTION *last; + emalloc(cp, INSTRUCTION *, (INSTR_CHUNK + 1) * sizeof(INSTRUCTION), "bcalloc"); + + cp->pool_size = INSTR_CHUNK; + cp->nexti = pool_list->nexti; + pool_list->nexti = cp; + pool = ++cp; + last = &pool[INSTR_CHUNK - 1]; + for (; cp <= last; cp++) { + cp->opcode = 0; + cp->nexti = cp + 1; + } + --cp; + cp->nexti = NULL; + } + cp = pool; + pool_list->freei = cp->nexti; + } + + memset(cp, 0, size * sizeof(INSTRUCTION)); + cp->opcode = op; + cp->source_line = srcline; + return cp; +} + +/* free_bcpool --- free list of instruction memory pools */ + +static void +free_bcpool(INSTRUCTION *pl) +{ + INSTRUCTION *pool, *tmp; + + for (pool = pl->nexti; pool != NULL; pool = tmp) { + INSTRUCTION *cp, *last; + long psiz; + psiz = pool->pool_size; + if (psiz == INSTR_CHUNK) + last = pool + psiz; + else + last = pool + 1; + for (cp = pool + 1; cp <= last ; cp++) { + if (cp->opcode != 0) + free_bc_internal(cp); + } + tmp = pool->nexti; + efree(pool); + } + memset(pl, 0, sizeof(INSTRUCTION)); +} + + +static inline INSTRUCTION * +list_create(INSTRUCTION *x) +{ + INSTRUCTION *l; + + l = instruction(Op_list); + l->nexti = x; + l->lasti = x; + return l; +} + +static inline INSTRUCTION * +list_append(INSTRUCTION *l, INSTRUCTION *x) +{ +#ifdef GAWKDEBUG + if (l->opcode != Op_list) + cant_happen(); +#endif + l->lasti->nexti = x; + l->lasti = x; + return l; +} + +static inline INSTRUCTION * +list_prepend(INSTRUCTION *l, INSTRUCTION *x) +{ +#ifdef GAWKDEBUG + if (l->opcode != Op_list) + cant_happen(); +#endif + x->nexti = l->nexti; + l->nexti = x; + return l; +} + +static inline INSTRUCTION * +list_merge(INSTRUCTION *l1, INSTRUCTION *l2) +{ +#ifdef GAWKDEBUG + if (l1->opcode != Op_list) + cant_happen(); + if (l2->opcode != Op_list) + cant_happen(); +#endif + l1->lasti->nexti = l2->nexti; + l1->lasti = l2->lasti; + bcfree(l2); + return l1; +} + /* See if name is a special token. */ int @@ -3497,13 +5962,13 @@ static int did_sort = FALSE; if (! did_sort) { - qsort(tokentab, sizeof(tokentab) / sizeof(tokentab[0]), + qsort((void *) tokentab, + sizeof(tokentab) / sizeof(tokentab[0]), sizeof(tokentab[0]), tokcompare); did_sort = TRUE; } #endif - low = 0; high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1; while (low <= high) { @@ -3516,8 +5981,12 @@ high = mid - 1; else if (i > 0) /* token > mid */ low = mid + 1; - else + else { + if ((do_traditional && (tokentab[mid].flags & GAWKX)) + || (do_posix && (tokentab[mid].flags & NOT_POSIX))) + return -1; return mid; + } } return -1; } @@ -3542,7 +6011,7 @@ fp = fdopen(fd, "r"); if (fp == NULL) { fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno)); - exit(EXIT_FAILURE); + gawk_exit(EXIT_FAILURE); } } @@ -3568,161 +6037,3 @@ return ret; } -/* constant_fold --- try to fold constant operations */ - -static NODE * -constant_fold(NODE *left, NODETYPE op, NODE *right) -{ - AWKNUM result; - extern double fmod P((double x, double y)); - - if (! do_optimize) - return node(left, op, right); - - /* Unary not */ - if (right == NULL) { - if (op == Node_not && left->type == Node_val) { - if ((left->flags & (STRCUR|STRING)) != 0) { - NODE *ret; - if (left->stlen == 0) { - ret = make_number((AWKNUM) 1.0); - } else { - ret = make_number((AWKNUM) 0.0); - } - unref(left); - - return ret; - } else { - if (left->numbr == 0) { - left->numbr = 1.0; - } else { - left->numbr = 0.0; - } - - return left; - } - } - - return node(left, op, right); - } - - /* String concatentation of two string constants */ - if (op == Node_concat - && left->type == Node_val - && (left->flags & (STRCUR|STRING)) != 0 - && right->type == Node_val - && (right->flags & (STRCUR|STRING)) != 0) { - size_t newlen = left->stlen + right->stlen + 2; - - erealloc(left->stptr, char *, newlen, "constant_fold"); - memcpy(left->stptr + left->stlen, right->stptr, right->stlen); - left->stptr[left->stlen + right->stlen] = '\0'; - left->stlen += right->stlen; - - unref(right); - return left; - } - - /* - * From here down, numeric operations. - * Check for string and bail out if have them. - */ - if (left->type != Node_val - || (left->flags & (STRCUR|STRING)) != 0 - || right->type != Node_val - || (right->flags & (STRCUR|STRING)) != 0) { - return node(left, op, right); - } - - /* Numeric operations: */ - switch (op) { - case Node_not: - case Node_exp: - case Node_times: - case Node_quotient: - case Node_mod: - case Node_plus: - case Node_minus: - break; - default: - return node(left, op, right); - } - - left->numbr = force_number(left); - right->numbr = force_number(right); - - result = left->numbr; - switch (op) { - case Node_exp: - result = calc_exp(left->numbr, right->numbr); - break; - case Node_times: - result *= right->numbr; - break; - case Node_quotient: - if (right->numbr == 0) - fatal(_("division by zero attempted in `/'")); - result /= right->numbr; - break; - case Node_mod: - if (right->numbr == 0) - fatal(_("division by zero attempted in `%%'")); -#ifdef HAVE_FMOD - result = fmod(result, right->numbr); -#else /* ! HAVE_FMOD */ - (void) modf(left->numbr / right->numbr, &result); - result = left->numbr - result * right->numbr; -#endif /* ! HAVE_FMOD */ - break; - case Node_plus: - result += right->numbr; - break; - case Node_minus: - result -= right->numbr; - break; - default: - /* Shut up compiler warnings */ - fatal("can't happen"); - break; - } - - unref(right); - left->numbr = result; - - return left; -} - -/* optimize_concat --- optimize the general "x = x y z a" case */ - -static NODE * -optimize_concat(NODE *left, NODETYPE op, NODE *right) -{ - NODE *top, *leftmost; - - if (op != Node_assign) - return node(left, op, right); - - /* - * optimization of `x = x y'. can save lots of time - * if done a lot. - */ - if (( left->type == Node_var - || left->type == Node_var_new - || left->type == Node_param_list) - && right->type == Node_concat) { - /* find bottom of tree, save it */ - for (top = right; top->lnode != NULL && top->type == Node_concat; top = top->lnode) { - leftmost = top->lnode; - if (leftmost->type == Node_concat) - continue; - - /* at this point, we've run out of concatentation */ - if (leftmost != left) - return node(left, op, right); - - top->lnode = Nnull_string; - return node(left, Node_assign_concat, right); - } - } - return node(left, op, right); -} diff -Nru gawk-3.1.8+dfsg/awklib/ChangeLog gawk-4.0.1+dfsg/awklib/ChangeLog --- gawk-3.1.8+dfsg/awklib/ChangeLog 2010-05-06 17:56:49.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/ChangeLog 2012-03-28 20:01:53.000000000 +0000 @@ -1,172 +1,14 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2011-06-24 Arnold D. Robbins - * Release 3.1.7: Release tar file made. + * Makefile.am (EXTRA_DIST): Add ChangeLog.0. + * 4.0.0: Remake the tar ball. -Mon Oct 22 08:49:05 2007 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * Release 3.1.6: Release tar file made. - -2007-05-25 Andreas Schwab - - * Makefile.am: Add missing dependencies on stamp-eg. - -Wed Mar 14 13:22:52 2007 Andrew J. Schorr - - * Makefile.am (AWKPROG): New macro to set locale sanely. - (stamp-eg): Use it instead of $AWK to do the extractions. - -Wed Mar 14 13:16:28 2007 Arnold D. Robbins - - * Makefile.am (clean-local): Remove `eg.old' also. - -Sat Jan 13 21:17:33 2007 Ralf Wildenhues - - * Makefile.am (stamp-eg): Allow rebuilding from a VPATH build. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Mon Jun 20 23:20:22 2005 Andreas Schwab - - * Makefile.am: Install pwcat and grcat in pkglibexecdir instead of - libexecdir. - -Wed Feb 9 10:13:27 2005 Arnold D. Robbins - - * Makefile.am (pkgdatadir, pkglibexecdir): Use $(datadir) and - $(libexecdir) instead of @datadir@ and @libexecdir@ for coolest - GNU Coding Standards compatibility and functionality. Per Stepan - Kasal. - -Tue Feb 8 18:57:08 2005 Arnold D. Robbins - - * Makefile.am (pkgdatadir, pkglibexecdir): New variables for compatibility - with current GNU Coding Standards. Fixed uses. Thanks to Stepan Kasal - and the discussion in bug-gnu-utils. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Thu Mar 18 17:43:59 2004 Arnold D. Robbins - - * Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS. Per - Stepan Kasal. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -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. - -Wed Apr 17 15:20:27 2002 Arnold D. Robbins - - * Makefile.am (clean): Add *.exe to list of files to be cleaned. - -2002-01-27 Bruno Haible - - * eg/lib/libintl.awk (dcngettext): New function. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -2001-02-26 Paul Eggert - - * Makefile.am (stamp-eg): Use $(AWK), not awk, as the - native awk might not work. - -2001-02-26 Andreas Schwab - - * Makefile.am: Install igawk as script. - -Mon Nov 6 15:29:08 2000 Arnold D. Robbins - - * Makefile.am: Fixed to have all functionality from before - the switch to automake. - * extract.awk: Updated to match version in the doc. - -Sat Jul 26 23:08:29 1997 Arnold D. Robbins - - * Makefile.in (install-strip): new target. - -Mon Aug 7 15:23:00 2000 Arnold D. Robbins - - * Release 3.0.6: Release tar file made. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Sun Apr 13 15:40:55 1997 Arnold D. Robbins - - * Makefile.in (install): fix second for loop to use $$i. Sigh. - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Wed Dec 25 11:17:32 1996 Arnold D. Robbins - - * Makefile.in (install): remove chmod command; let - $(INSTALL_PROGRAM) use -m. - -Tue Dec 17 22:29:49 1996 Arnold D. Robbins - - * Makefile.in (install): fix installation of files in eg/lib. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Sun Oct 20 12:30:41 1996 Arnold D. Robbins - - * Makefile.in (install): minor tweaks for portability. - -Fri Mar 15 06:33:38 1996 Arnold D. Robbins - - * Makefile.in (pwcat, grcat): Add $(LDFLAGS). - (clean): add `*~' to list of files to be removed. - -Wed Jan 24 10:06:16 1996 Arnold D. Robbins - - * Makefile.in (clean): Remove $(AUXAWK). - (maintainer-clean): Depend on distclean, not the other way around. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/awklib/ChangeLog.0 gawk-4.0.1+dfsg/awklib/ChangeLog.0 --- gawk-3.1.8+dfsg/awklib/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/ChangeLog.0 2012-03-26 19:28:42.000000000 +0000 @@ -0,0 +1,180 @@ +Mon Jan 10 21:40:05 2011 Andreas Buening + + * Makefile.am (AWKPROG): Get correct path to gawk executable. + +Fri Nov 19 11:53:16 2010 Arnold D. Robbins + + * Makefile.am: Remove special handling of CVS directories. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +2007-05-25 Andreas Schwab + + * Makefile.am: Add missing dependencies on stamp-eg. + +Wed Mar 14 13:22:52 2007 Andrew J. Schorr + + * Makefile.am (AWKPROG): New macro to set locale sanely. + (stamp-eg): Use it instead of $AWK to do the extractions. + +Wed Mar 14 13:16:28 2007 Arnold D. Robbins + + * Makefile.am (clean-local): Remove `eg.old' also. + +Sat Jan 13 21:17:33 2007 Ralf Wildenhues + + * Makefile.am (stamp-eg): Allow rebuilding from a VPATH build. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Mon Jun 20 23:20:22 2005 Andreas Schwab + + * Makefile.am: Install pwcat and grcat in pkglibexecdir instead of + libexecdir. + +Wed Feb 9 10:13:27 2005 Arnold D. Robbins + + * Makefile.am (pkgdatadir, pkglibexecdir): Use $(datadir) and + $(libexecdir) instead of @datadir@ and @libexecdir@ for coolest + GNU Coding Standards compatibility and functionality. Per Stepan + Kasal. + +Tue Feb 8 18:57:08 2005 Arnold D. Robbins + + * Makefile.am (pkgdatadir, pkglibexecdir): New variables for compatibility + with current GNU Coding Standards. Fixed uses. Thanks to Stepan Kasal + and the discussion in bug-gnu-utils. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Thu Mar 18 17:43:59 2004 Arnold D. Robbins + + * Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS. Per + Stepan Kasal. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +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. + +Wed Apr 17 15:20:27 2002 Arnold D. Robbins + + * Makefile.am (clean): Add *.exe to list of files to be cleaned. + +2002-01-27 Bruno Haible + + * eg/lib/libintl.awk (dcngettext): New function. + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +2001-02-26 Paul Eggert + + * Makefile.am (stamp-eg): Use $(AWK), not awk, as the + native awk might not work. + +2001-02-26 Andreas Schwab + + * Makefile.am: Install igawk as script. + +Mon Nov 6 15:29:08 2000 Arnold D. Robbins + + * Makefile.am: Fixed to have all functionality from before + the switch to automake. + * extract.awk: Updated to match version in the doc. + +Sat Jul 26 23:08:29 1997 Arnold D. Robbins + + * Makefile.in (install-strip): new target. + +Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + +Thu May 15 12:49:08 1997 Arnold D. Robbins + + * Release 3.0.3: Release tar file made. + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Sun Apr 13 15:40:55 1997 Arnold D. Robbins + + * Makefile.in (install): fix second for loop to use $$i. Sigh. + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Wed Dec 25 11:17:32 1996 Arnold D. Robbins + + * Makefile.in (install): remove chmod command; let + $(INSTALL_PROGRAM) use -m. + +Tue Dec 17 22:29:49 1996 Arnold D. Robbins + + * Makefile.in (install): fix installation of files in eg/lib. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Sun Oct 20 12:30:41 1996 Arnold D. Robbins + + * Makefile.in (install): minor tweaks for portability. + +Fri Mar 15 06:33:38 1996 Arnold D. Robbins + + * Makefile.in (pwcat, grcat): Add $(LDFLAGS). + (clean): add `*~' to list of files to be removed. + +Wed Jan 24 10:06:16 1996 Arnold D. Robbins + + * Makefile.in (clean): Remove $(AUXAWK). + (maintainer-clean): Depend on distclean, not the other way around. diff -Nru gawk-3.1.8+dfsg/awklib/Makefile.am gawk-4.0.1+dfsg/awklib/Makefile.am --- gawk-3.1.8+dfsg/awklib/Makefile.am 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/Makefile.am 2012-03-26 19:28:42.000000000 +0000 @@ -23,10 +23,10 @@ ## process this file with automake to produce Makefile.in -EXTRA_DIST = ChangeLog extract.awk eg $(srcdir)/stamp-eg +EXTRA_DIST = ChangeLog ChangeLog.0 extract.awk eg $(srcdir)/stamp-eg # With some locales, the script extract.awk fails. # So we fix the locale to some sensible value. -AWKPROG = LC_ALL=C LANG=C ../gawk$(EXEEXT) +AWKPROG = LC_ALL=C LANG=C $(abs_top_builddir)/gawk$(EXEEXT) # Get config.h from the build directory and custom.h from the source directory. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) @@ -60,20 +60,11 @@ $(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi cd $(srcdir) && \ - mv eg eg.old && \ - rm -fr stamp-eg && \ + rm -fr eg && \ + rm -fr stamp-eg && \ $(AWKPROG) -f extract.awk ../doc/gawk.texi ../doc/gawkinet.texi @echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg @echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg - cd $(srcdir) && \ - if [ -d eg.old ] && [ -d eg.old/CVS ] ; then \ - mv eg.old/CVS eg ; \ - mv eg.old/data/CVS eg/data ; \ - mv eg.old/lib/CVS eg/lib ; \ - mv eg.old/misc/CVS eg/misc ; \ - mv eg.old/network/CVS eg/network ; \ - mv eg.old/prog/CVS eg/prog ; \ - rm -fr eg.old ; fi $(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \ $(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @: diff -Nru gawk-3.1.8+dfsg/awklib/Makefile.in gawk-4.0.1+dfsg/awklib/Makefile.in --- gawk-3.1.8+dfsg/awklib/Makefile.in 2010-05-06 17:55:44.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/Makefile.in 2012-03-28 20:03:22.000000000 +0000 @@ -62,13 +62,14 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -157,6 +158,7 @@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ +LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ @@ -184,7 +186,6 @@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ -U = @U@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ @@ -242,10 +243,10 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = ChangeLog extract.awk eg $(srcdir)/stamp-eg +EXTRA_DIST = ChangeLog ChangeLog.0 extract.awk eg $(srcdir)/stamp-eg # With some locales, the script extract.awk fails. # So we fix the locale to some sensible value. -AWKPROG = LC_ALL=C LANG=C ../gawk$(EXEEXT) +AWKPROG = LC_ALL=C LANG=C $(abs_top_builddir)/gawk$(EXEEXT) # Get config.h from the build directory and custom.h from the source directory. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) @@ -606,20 +607,11 @@ $(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi cd $(srcdir) && \ - mv eg eg.old && \ - rm -fr stamp-eg && \ + rm -fr eg && \ + rm -fr stamp-eg && \ $(AWKPROG) -f extract.awk ../doc/gawk.texi ../doc/gawkinet.texi @echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg @echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg - cd $(srcdir) && \ - if [ -d eg.old ] && [ -d eg.old/CVS ] ; then \ - mv eg.old/CVS eg ; \ - mv eg.old/data/CVS eg/data ; \ - mv eg.old/lib/CVS eg/lib ; \ - mv eg.old/misc/CVS eg/misc ; \ - mv eg.old/network/CVS eg/network ; \ - mv eg.old/prog/CVS eg/prog ; \ - rm -fr eg.old ; fi $(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \ $(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @: diff -Nru gawk-3.1.8+dfsg/awklib/eg/data/class_data1 gawk-4.0.1+dfsg/awklib/eg/data/class_data1 --- gawk-3.1.8+dfsg/awklib/eg/data/class_data1 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/data/class_data1 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1,3 @@ +Biology_101 sum average data: 87.0 92.4 78.5 94.9 +Chemistry_305 sum average data: 75.2 98.3 94.7 88.2 +English_401 sum average data: 100.0 95.6 87.1 93.4 diff -Nru gawk-3.1.8+dfsg/awklib/eg/data/class_data2 gawk-4.0.1+dfsg/awklib/eg/data/class_data2 --- gawk-3.1.8+dfsg/awklib/eg/data/class_data2 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/data/class_data2 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1,3 @@ +Biology_101 sum average sort rsort data: 87.0 92.4 78.5 94.9 +Chemistry_305 sum average sort rsort data: 75.2 98.3 94.7 88.2 +English_401 sum average sort rsort data: 100.0 95.6 87.1 93.4 diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/ctime.awk gawk-4.0.1+dfsg/awklib/eg/lib/ctime.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/ctime.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/ctime.awk 2012-03-28 20:03:37.000000000 +0000 @@ -4,7 +4,7 @@ function ctime(ts, format) { - format = "%a %b %d %H:%M:%S %Z %Y" + format = "%a %b %e %H:%M:%S %Z %Y" if (ts == 0) ts = systime() # use current time as default return strftime(format, ts) diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/getopt.awk gawk-4.0.1+dfsg/awklib/eg/lib/getopt.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/getopt.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/getopt.awk 2012-03-28 20:03:37.000000000 +0000 @@ -1,4 +1,4 @@ -# getopt.awk --- do C library getopt(3) function in awk +# getopt.awk --- Do C library getopt(3) function in awk # # Arnold Robbins, arnold@skeeve.com, Public Domain # @@ -13,7 +13,7 @@ # Returns: # -1 at end of options -# ? for unrecognized option +# "?" for unrecognized option # a character representing the current option # Private Data: @@ -27,7 +27,7 @@ Optind++ _opti = 0 return -1 - } else if (argv[Optind] !~ /^-[^: \t\n\f\r\v\b]/) { + } else if (argv[Optind] !~ /^-[^:[:space:]]/) { _opti = 0 return -1 } diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/gettime.awk gawk-4.0.1+dfsg/awklib/eg/lib/gettime.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/gettime.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/gettime.awk 2012-03-28 20:03:37.000000000 +0000 @@ -31,7 +31,7 @@ now = systime() # return date(1)-style output - ret = strftime("%a %b %d %H:%M:%S %Z %Y", now) + ret = strftime("%a %b %e %H:%M:%S %Z %Y", now) # clear out target array delete time diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/grcat.c gawk-4.0.1+dfsg/awklib/eg/lib/grcat.c --- gawk-3.1.8+dfsg/awklib/eg/lib/grcat.c 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/grcat.c 2012-03-28 20:03:37.000000000 +0000 @@ -6,6 +6,7 @@ /* * Arnold Robbins, arnold@skeeve.com, May 1993 * Public Domain + * December 2010, move to ANSI C definition for main(). */ /* For OS/2, do nothing. */ @@ -24,9 +25,7 @@ #include int -main(argc, argv) -int argc; -char **argv; +main(int argc, char **argv) { struct group *g; int i; diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/groupawk.in gawk-4.0.1+dfsg/awklib/eg/lib/groupawk.in --- gawk-3.1.8+dfsg/awklib/eg/lib/groupawk.in 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/groupawk.in 2012-03-28 20:03:37.000000000 +0000 @@ -3,6 +3,7 @@ # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised October 2000 +# Revised December 2010 BEGIN \ { @@ -11,7 +12,7 @@ } function _gr_init( oldfs, oldrs, olddol0, grcat, - using_fw, n, a, i) + using_fw, using_fpat, n, a, i) { if (_gr_inited) return @@ -20,6 +21,7 @@ oldrs = RS olddol0 = $0 using_fw = (PROCINFO["FS"] == "FIELDWIDTHS") + using_fpat = (PROCINFO["FS"] == "FPAT") FS = ":" RS = "\n" @@ -50,29 +52,25 @@ FS = oldfs if (using_fw) FIELDWIDTHS = FIELDWIDTHS + else if (using_fpat) + FPAT = FPAT RS = oldrs $0 = olddol0 } function getgrnam(group) { _gr_init() - if (group in _gr_byname) - return _gr_byname[group] - return "" + return _gr_byname[group] } function getgrgid(gid) { _gr_init() - if (gid in _gr_bygid) - return _gr_bygid[gid] - return "" + return _gr_bygid[gid] } function getgruser(user) { _gr_init() - if (user in _gr_groupsbyuser) - return _gr_groupsbyuser[user] - return "" + return _gr_groupsbyuser[user] } function getgrent() { diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/nextfile.awk gawk-4.0.1+dfsg/awklib/eg/lib/nextfile.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/nextfile.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/nextfile.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -# nextfile --- skip remaining records in current file -# correctly handle successive occurrences of the same file -# -# Arnold Robbins, arnold@skeeve.com, Public Domain -# May, 1993 - -# this should be read in before the "main" awk program - -function nextfile() { _abandon_ = FILENAME; next } - -_abandon_ == FILENAME { - if (FNR == 1) - _abandon_ = "" - else - next -} diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/noassign.awk gawk-4.0.1+dfsg/awklib/eg/lib/noassign.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/noassign.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/noassign.awk 2012-03-28 20:03:37.000000000 +0000 @@ -7,7 +7,7 @@ function disable_assigns(argc, argv, i) { for (i = 1; i < argc; i++) - if (argv[i] ~ /^[A-Za-z_][A-Za-z_0-9]*=.*/) + if (argv[i] ~ /^[[:alpha:]_][[:alnum:]_]*=.*/) argv[i] = ("./" argv[i]) } diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/passwdawk.in gawk-4.0.1+dfsg/awklib/eg/lib/passwdawk.in --- gawk-3.1.8+dfsg/awklib/eg/lib/passwdawk.in 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/passwdawk.in 2012-03-28 20:03:37.000000000 +0000 @@ -3,13 +3,14 @@ # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised October 2000 +# Revised December 2010 BEGIN { # tailor this to suit your system _pw_awklib = "/usr/local/libexec/awk/" } -function _pw_init( oldfs, oldrs, olddol0, pwcat, using_fw) +function _pw_init( oldfs, oldrs, olddol0, pwcat, using_fw, using_fpat) { if (_pw_inited) return @@ -18,6 +19,7 @@ oldrs = RS olddol0 = $0 using_fw = (PROCINFO["FS"] == "FIELDWIDTHS") + using_fpat = (PROCINFO["FS"] == "FPAT") FS = ":" RS = "\n" @@ -33,22 +35,20 @@ FS = oldfs if (using_fw) FIELDWIDTHS = FIELDWIDTHS + else if (using_fpat) + FPAT = FPAT RS = oldrs $0 = olddol0 } function getpwnam(name) { _pw_init() - if (name in _pw_byname) - return _pw_byname[name] - return "" + return _pw_byname[name] } function getpwuid(uid) { _pw_init() - if (uid in _pw_byuid) - return _pw_byuid[uid] - return "" + return _pw_byuid[uid] } function getpwent() { diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/pwcat.c gawk-4.0.1+dfsg/awklib/eg/lib/pwcat.c --- gawk-3.1.8+dfsg/awklib/eg/lib/pwcat.c 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/pwcat.c 2012-03-28 20:03:37.000000000 +0000 @@ -6,6 +6,7 @@ /* * Arnold Robbins, arnold@skeeve.com, May 1993 * Public Domain + * December 2010, move to ANSI C definition for main(). */ #if HAVE_CONFIG_H @@ -20,9 +21,7 @@ #endif int -main(argc, argv) -int argc; -char **argv; +main(int argc, char **argv) { struct passwd *p; diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/quicksort.awk gawk-4.0.1+dfsg/awklib/eg/lib/quicksort.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/quicksort.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/quicksort.awk 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1,33 @@ +# quicksort.awk --- Quicksort algorithm, with user-supplied +# comparison function +# +# Arnold Robbins, arnoldskeeve.com, Public Domain +# January 2009 +# quicksort --- C.A.R. Hoare's quick sort algorithm. See Wikipedia +# or almost any algorithms or computer science text +# +# Adapted from K&R-II, page 110 + +function quicksort(data, left, right, less_than, i, last) +{ + if (left >= right) # do nothing if array contains fewer + return # than two elements + + quicksort_swap(data, left, int((left + right) / 2)) + last = left + for (i = left + 1; i <= right; i++) + if (@less_than(data[i], data[left])) + quicksort_swap(data, ++last, i) + quicksort_swap(data, left, last) + quicksort(data, left, last - 1, less_than) + quicksort(data, last + 1, right, less_than) +} + +# quicksort_swap --- helper function for quicksort, should really be inline + +function quicksort_swap(data, i, j, temp) +{ + temp = data[i] + data[i] = data[j] + data[j] = temp +} diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/readable.awk gawk-4.0.1+dfsg/awklib/eg/lib/readable.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/readable.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/readable.awk 2012-03-28 20:03:37.000000000 +0000 @@ -2,11 +2,12 @@ # # Arnold Robbins, arnold@skeeve.com, Public Domain # October 2000 +# December 2010 BEGIN { for (i = 1; i < ARGC; i++) { - if (ARGV[i] ~ /^[A-Za-z_][A-Za-z0-9_]*=.*/ \ - || ARGV[i] == "-") + if (ARGV[i] ~ /^[[:alpha:]_][[:alnum:]_]*=.*/ \ + || ARGV[i] == "-" || ARGV[i] == "/dev/stdin") continue # assignment or standard input else if ((getline junk < ARGV[i]) < 0) # unreadable delete ARGV[i] diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/strtonum.awk gawk-4.0.1+dfsg/awklib/eg/lib/strtonum.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/strtonum.awk 2010-04-20 08:51:24.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/strtonum.awk 2012-03-28 20:03:37.000000000 +0000 @@ -1,4 +1,4 @@ -# strtonum --- convert string to number +# mystrtonum --- convert string to number # # Arnold Robbins, arnold@skeeve.com, Public Domain @@ -17,7 +17,7 @@ ret = ret * 8 + k } - } else if (str ~ /^0[xX][0-9a-fA-f]+/) { + } else if (str ~ /^0[xX][[:xdigit:]]+/) { # hexadecimal str = substr(str, 3) # lop off leading 0x n = length(str) @@ -32,7 +32,8 @@ ret = ret * 16 + k } - } else if (str ~ /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) { + } else if (str ~ \ + /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) { # decimal number, possibly floating point ret = str + 0 } else diff -Nru gawk-3.1.8+dfsg/awklib/eg/lib/walkarray.awk gawk-4.0.1+dfsg/awklib/eg/lib/walkarray.awk --- gawk-3.1.8+dfsg/awklib/eg/lib/walkarray.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/lib/walkarray.awk 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1,9 @@ +function walk_array(arr, name, i) +{ + for (i in arr) { + if (isarray(arr[i])) + walk_array(arr[i], (name "[" i "]")) + else + printf("%s[%s] = %s\n", name, i, arr[i]) + } +} diff -Nru gawk-3.1.8+dfsg/awklib/eg/misc/addresses.csv gawk-4.0.1+dfsg/awklib/eg/misc/addresses.csv --- gawk-3.1.8+dfsg/awklib/eg/misc/addresses.csv 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/misc/addresses.csv 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1 @@ +Robbins,Arnold,"1234 A Pretty Street, NE",MyTown,MyState,12345-6789,USA diff -Nru gawk-3.1.8+dfsg/awklib/eg/misc/simple-csv.awk gawk-4.0.1+dfsg/awklib/eg/misc/simple-csv.awk --- gawk-3.1.8+dfsg/awklib/eg/misc/simple-csv.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/misc/simple-csv.awk 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1,10 @@ +BEGIN { + FPAT = "([^,]+)|(\"[^\"]+\")" +} + +{ + print "NF = ", NF + for (i = 1; i <= NF; i++) { + printf("$%d = <%s>\n", i, $i) + } +} diff -Nru gawk-3.1.8+dfsg/awklib/eg/network/maze.awk gawk-4.0.1+dfsg/awklib/eg/network/maze.awk --- gawk-3.1.8+dfsg/awklib/eg/network/maze.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/network/maze.awk 2012-03-28 20:03:37.000000000 +0000 @@ -61,7 +61,7 @@ if (x SUBSEP y-2 in Maze) d[p++] = "-y" if (x+2 SUBSEP y in Maze) d[p++] = "+x" if (x SUBSEP y+2 in Maze) d[p++] = "+y" - if (p>0) { # if there are univisited fields, go there + if (p>0) { # if there are unvisited fields, go there p = int(p*rand()) # choose one unvisited field at random if (d[p] == "-x") { delete Maze[x - 1, y]; MakeMaze(x - 2, y) } else if (d[p] == "-y") { delete Maze[x, y - 1]; MakeMaze(x, y - 2) diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/alarm.awk gawk-4.0.1+dfsg/awklib/eg/prog/alarm.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/alarm.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/alarm.awk 2012-03-28 20:03:37.000000000 +0000 @@ -1,9 +1,10 @@ # alarm.awk --- set an alarm # -# Requires gettimeofday library function +# Requires gettimeofday() library function # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 +# Revised December 2010 # usage: alarm time [ "message" [ count [ delay ] ] ] @@ -17,19 +18,24 @@ print usage1 > "/dev/stderr" print usage2 > "/dev/stderr" exit 1 - } else if (ARGC == 5) { + } + switch (ARGC) { + case 5: delay = ARGV[4] + 0 + # fall through + case 4: count = ARGV[3] + 0 + # fall through + case 3: message = ARGV[2] - } else if (ARGC == 4) { - count = ARGV[3] + 0 - message = ARGV[2] - } else if (ARGC == 3) { - message = ARGV[2] - } else if (ARGV[1] !~ /[0-9]?[0-9]:[0-9][0-9]/) { - print usage1 > "/dev/stderr" - print usage2 > "/dev/stderr" - exit 1 + break + default: + if (ARGV[1] !~ /[[:digit:]]?[[:digit:]]:[[:digit:]]{2}/) { + print usage1 > "/dev/stderr" + print usage2 > "/dev/stderr" + exit 1 + } + break } # set defaults for once we reach the desired time diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/anagram.awk gawk-4.0.1+dfsg/awklib/eg/prog/anagram.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/anagram.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/anagram.awk 2012-03-28 20:03:37.000000000 +0000 @@ -0,0 +1,50 @@ +# anagram.awk --- An implementation of the anagram finding algorithm +# from Jon Bentley's "Programming Pearls", 2nd edition. +# Addison Wesley, 2000, ISBN 0-201-65788-0. +# Column 2, Problem C, section 2.8, pp 18-20. +# +# This program requires gawk 4.0 or newer. +# Required gawk-specific features: +# - True multidimensional arrays +# - split() with "" as separator splits out individual characters +# - asort() and asorti() functions +# +# See http://savannah.gnu.org/projects/gawk. +# +# Arnold Robbins +# arnold@skeeve.com +# Public Domain +# January, 2011 + +/'s$/ { next } # Skip possessives +{ + key = word2key($1) # Build signature + data[key][$1] = $1 # Store word with signature +} +# word2key --- split word apart into letters, sort, joining back together + +function word2key(word, a, i, n, result) +{ + n = split(word, a, "") + asort(a) + + for (i = 1; i <= n; i++) + result = result a[i] + + return result +} +END { + sort = "sort" + for (key in data) { + # Sort words with same key + nwords = asorti(data[key], words) + if (nwords == 1) + continue + + # And print. Minor glitch: trailing space at end of each line + for (j = 1; j <= nwords; j++) + printf("%s ", words[j]) | sort + print "" | sort + } + close(sort) +} diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/cut.awk gawk-4.0.1+dfsg/awklib/eg/prog/cut.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/cut.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/cut.awk 2012-03-28 20:03:37.000000000 +0000 @@ -10,7 +10,7 @@ # # -s Suppress lines without the delimiter # -# Requires getopt and join library functions +# Requires getopt() and join() library functions function usage( e1, e2) { @@ -35,7 +35,7 @@ } else if (c == "d") { if (length(Optarg) > 1) { printf("Using first character of %s" \ - " for delimiter\n", Optarg) > "/dev/stderr" + " for delimiter\n", Optarg) > "/dev/stderr" Optarg = substr(Optarg, 1, 1) } FS = Optarg @@ -48,6 +48,7 @@ usage() } + # Clear out options for (i = 1; i < Optind; i++) ARGV[i] = "" if (by_fields && by_chars) diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/egrep.awk gawk-4.0.1+dfsg/awklib/eg/prog/egrep.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/egrep.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/egrep.awk 2012-03-28 20:03:37.000000000 +0000 @@ -54,11 +54,12 @@ } function endfile(file) { - if (! no_print && count_only) + if (! no_print && count_only) { if (do_filenames) print file ":" fcount else print fcount + } total += fcount } diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/extract.awk gawk-4.0.1+dfsg/awklib/eg/prog/extract.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/extract.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/extract.awk 2012-03-28 20:03:37.000000000 +0000 @@ -63,7 +63,8 @@ print join(a, 1, n, SUBSEP) > curfile } } -function unexpected_eof() { +function unexpected_eof() +{ printf("%s:%d: unexpected EOF or error\n", FILENAME, FNR) > "/dev/stderr" exit 1 diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/igawk.sh gawk-4.0.1+dfsg/awklib/eg/prog/igawk.sh --- gawk-3.1.8+dfsg/awklib/eg/prog/igawk.sh 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/igawk.sh 2012-03-28 20:03:37.000000000 +0000 @@ -3,6 +3,7 @@ # # Arnold Robbins, arnold@skeeve.com, Public Domain # July 1993 +# December 2010, minor edits if [ "$1" = debug ] then @@ -21,49 +22,50 @@ while [ $# -ne 0 ] # loop over arguments do case $1 in - --) shift; break;; + --) shift + break ;; -W) shift # The ${x?'message here'} construct prints a # diagnostic if $x is the null string set -- -W"${@?'missing operand'}" - continue;; + continue ;; -[vF]) opts="$opts $1 '${2?'missing operand'}'" - shift;; + shift ;; -[vF]*) opts="$opts '$1'" ;; -f) program="$program$n@include ${2?'missing operand'}" - shift;; + shift ;; - -f*) f=`expr "$1" : '-f\(.*\)'` - program="$program$n@include $f";; + -f*) f=$(expr "$1" : '-f\(.*\)') + program="$program$n@include $f" ;; -[W-]file=*) - f=`expr "$1" : '-.file=\(.*\)'` - program="$program$n@include $f";; + f=$(expr "$1" : '-.file=\(.*\)') + program="$program$n@include $f" ;; -[W-]file) program="$program$n@include ${2?'missing operand'}" - shift;; + shift ;; -[W-]source=*) - t=`expr "$1" : '-.source=\(.*\)'` - program="$program$n$t";; + t=$(expr "$1" : '-.source=\(.*\)') + program="$program$n$t" ;; -[W-]source) program="$program$n${2?'missing operand'}" - shift;; + shift ;; -[W-]version) - echo igawk: version 2.0 1>&2 + echo igawk: version 3.0 1>&2 gawk --version exit 0 ;; -[W-]*) opts="$opts '$1'" ;; - *) break;; + *) break ;; esac shift done @@ -82,6 +84,9 @@ if (index(file, "/") != 0) return file + if (file == "-") + return file + for (i = 1; i <= ndirs; i++) { t = (pathlist[i] "/" file) if ((getline junk < t) > 0) { @@ -126,8 +131,8 @@ } }' # close quote ends `expand_prog' variable -processed_program=`gawk -- "$expand_prog" /dev/stdin <= (right + 0)) +} +# do_sort --- sort the data according to `compare' +# and return it as a string + +function do_sort(first, last, compare, data, i, retval) +{ + delete data + for (i = 1; first <= last; first++) { + data[i] = $first + i++ + } + + quicksort(data, 1, i-1, compare) + + retval = data[1] + for (i = 2; i in data; i++) + retval = retval " " data[i] + + return retval +} +# sort --- sort the data in ascending order and return it as a string + +function sort(first, last) +{ + return do_sort(first, last, "num_lt") +} + +# rsort --- sort the data in descending order and return it as a string + +function rsort(first, last) +{ + return do_sort(first, last, "num_ge") +} diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/labels.awk gawk-4.0.1+dfsg/awklib/eg/prog/labels.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/labels.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/labels.awk 2012-03-28 20:03:37.000000000 +0000 @@ -2,6 +2,7 @@ # # Arnold Robbins, arnold@skeeve.com, Public Domain # June 1992 +# December 2010, minor edits # Each label is 5 lines of data that may have blank lines. # The label sheets have 2 blank lines at the top and 2 at @@ -29,8 +30,7 @@ printf "\n\n" # footer - for (i in line) - line[i] = "" + delete line } # main rule diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/split.awk gawk-4.0.1+dfsg/awklib/eg/prog/split.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/split.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/split.awk 2012-03-28 20:03:37.000000000 +0000 @@ -1,6 +1,6 @@ # split.awk --- do split in awk # -# Requires ord and chr library functions +# Requires ord() and chr() library functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 @@ -14,7 +14,7 @@ usage() i = 1 - if (ARGV[i] ~ /^-[0-9]+$/) { + if (ARGV[i] ~ /^-[[:digit:]]+$/) { count = -ARGV[i] ARGV[i] = "" i++ diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/tee.awk gawk-4.0.1+dfsg/awklib/eg/prog/tee.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/tee.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/tee.awk 2012-03-28 20:03:37.000000000 +0000 @@ -1,5 +1,8 @@ # tee.awk --- tee in awk # +# Copy standard input to all named output files. +# Append content if -a option is supplied. +# # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised December 1995 diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/uniq.awk gawk-4.0.1+dfsg/awklib/eg/prog/uniq.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/uniq.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/uniq.awk 2012-03-28 20:03:37.000000000 +0000 @@ -1,6 +1,6 @@ # uniq.awk --- do uniq in awk # -# Requires getopt and join library functions +# Requires getopt() and join() library functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 @@ -14,7 +14,7 @@ # -c count lines. overrides -d and -u # -d only repeated lines -# -u only non-repeated lines +# -u only nonrepeated lines # -n skip n fields # +n skip n characters, skip fields first @@ -33,7 +33,7 @@ else if (index("0123456789", c) != 0) { # getopt requires args to options # this messes us up for things like -5 - if (Optarg ~ /^[0-9]+$/) + if (Optarg ~ /^[[:digit:]]+$/) fcount = (c Optarg) + 0 else { fcount = c + 0 @@ -43,7 +43,7 @@ usage() } - if (ARGV[Optind] ~ /^\+[0-9]+$/) { + if (ARGV[Optind] ~ /^\+[[:digit:]]+$/) { charcount = substr(ARGV[Optind], 2) + 0 Optind++ } @@ -116,4 +116,5 @@ else if ((repeated_only && count > 1) || (non_repeated_only && count == 1)) print last > outputfile + close(outputfile) } diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/wc.awk gawk-4.0.1+dfsg/awklib/eg/prog/wc.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/wc.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/wc.awk 2012-03-28 20:03:37.000000000 +0000 @@ -10,10 +10,10 @@ # # Default is to count lines, words, characters # -# Requires getopt and file transition library functions +# Requires getopt() and file transition library functions BEGIN { - # let getopt print a message about + # let getopt() print a message about # invalid options. we ignore them while ((c = getopt(ARGC, ARGV, "lwc")) != -1) { if (c == "l") @@ -34,14 +34,14 @@ } function beginfile(file) { - chars = lines = words = 0 + lines = words = chars = 0 fname = FILENAME } function endfile(file) { - tchars += chars tlines += lines twords += words + tchars += chars if (do_lines) printf "\t%d", lines if (do_words) diff -Nru gawk-3.1.8+dfsg/awklib/eg/prog/wordfreq.awk gawk-4.0.1+dfsg/awklib/eg/prog/wordfreq.awk --- gawk-3.1.8+dfsg/awklib/eg/prog/wordfreq.awk 2010-04-20 08:51:25.000000000 +0000 +++ gawk-4.0.1+dfsg/awklib/eg/prog/wordfreq.awk 2012-03-28 20:03:37.000000000 +0000 @@ -9,10 +9,6 @@ } END { - for (word in freq) - printf "%s\t%d\n", word, freq[word] -} -END { sort = "sort -k 2nr" for (word in freq) printf "%s\t%d\n", word, freq[word] | sort diff -Nru gawk-3.1.8+dfsg/bisonfix.awk gawk-4.0.1+dfsg/bisonfix.awk --- gawk-3.1.8+dfsg/bisonfix.awk 2010-01-03 19:02:37.000000000 +0000 +++ gawk-4.0.1+dfsg/bisonfix.awk 2010-10-31 10:25:52.000000000 +0000 @@ -19,18 +19,24 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -/^#if \(! defined \(yyoverflow\) \\/ { +BEGIN { sfile = ARGV[1] ; delete ARGV[1] } + +/^#if.*\\$/ { line = $0 sub(/\\$/, "", line) getline line2 - sub(/\\$/, "", line2) - getline line3 - - line = line line2 line3 + while (line2 ~ /\\$/) { + line = line line2 + sub(/\\$/, "", line) + getline line2 + } + line = line line2 + sub(/\\$/, "", line) print line next } -/^#line.*y\.tab\.c/ { sub(/y.tab.c/, "awkgram.c") } +/^#line.*y\.tab\.c/ { sub(/y.tab/, sfile) } { print } + diff -Nru gawk-3.1.8+dfsg/builtin.c gawk-4.0.1+dfsg/builtin.c --- gawk-3.1.8+dfsg/builtin.c 2010-04-27 19:24:36.000000000 +0000 +++ gawk-4.0.1+dfsg/builtin.c 2012-03-28 19:54:55.000000000 +0000 @@ -1,9 +1,9 @@ /* - * builtin.c - Builtin functions and various utility procedures + * builtin.c - Builtin functions and various utility procedures. */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -32,6 +32,10 @@ #include "random.h" #include "floatmagic.h" +#if defined(HAVE_POPEN_H) +#include "popen.h" +#endif + #ifndef CHAR_BIT # define CHAR_BIT 8 #endif @@ -55,34 +59,30 @@ #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)); -extern long random P((void)); -extern void srandom P((unsigned long seed)); +#define DEFAULT_G_PRECISION 6 + +static size_t mbc_byte_count(const char *ptr, size_t numchars); +static size_t mbc_char_count(const char *ptr, size_t numbytes); +/* Can declare these, since we always use the random shipped with gawk */ +extern char *initstate(unsigned long seed, char *state, long n); +extern char *setstate(char *state); +extern long random(void); +extern void srandom(unsigned long seed); + +extern NODE **args_array; +extern int max_args; extern NODE **fields_arr; extern int output_is_tty; +extern FILE *output_fp; -static NODE *sub_common P((NODE *tree, long how_many, int backdigs)); - -#ifdef _CRAY -/* Force the standard C compiler to use the library math functions. */ -extern double exp(double); -double (*Exp)() = exp; -#define exp(x) (*Exp)(x) -extern double log(double); -double (*Log)() = log; -#define log(x) (*Log)(x) -#endif -#define DEFAULT_G_PRECISION 6 +#define POP_TWO_SCALARS(s1, s2) \ +s2 = POP_SCALAR(); \ +s1 = POP(); \ +if ((s1)->type == Node_var_array) \ + DEREF(s2), fatal(_("attempt to use array `%s' in a scalar context"), array_vname(s1)), 0 -#ifdef GFMT_WORKAROUND -/* semi-temporary hack, mostly to gracefully handle VMS */ -static void sgfmt P((char *buf, const char *format, int alt, - int fwidth, int precision, double value)); -#endif /* GFMT_WORKAROUND */ /* * Since we supply the version of random(), we know what @@ -90,10 +90,8 @@ */ #define GAWK_RANDOM_MAX 0x7fffffffL -static void efwrite P((const void *ptr, size_t size, size_t count, FILE *fp, - const char *from, struct redirect *rp, int flush)); -static size_t mbc_byte_count P((const char *ptr, size_t numchars)); -static size_t mbc_char_count P((const char *ptr, size_t numbytes)); +static void efwrite(const void *ptr, size_t size, size_t count, FILE *fp, + const char *from, struct redirect *rp, int flush); /* efwrite --- like fwrite, but with error checking */ @@ -111,7 +109,7 @@ goto wrerror; if (flush && ((fp == stdout && output_is_tty) - || (rp != NULL && (rp->flag & RED_NOBUF)))) { + || (rp != NULL && (rp->flag & RED_NOBUF)))) { fflush(fp); if (ferror(fp)) goto wrerror; @@ -127,21 +125,21 @@ /* do_exp --- exponential function */ NODE * -do_exp(NODE *tree) +do_exp(int nargs) { NODE *tmp; double d, res; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("exp: received non-numeric argument")); d = force_number(tmp); - free_temp(tmp); + DEREF(tmp); errno = 0; res = exp(d); if (errno == ERANGE) warning(_("exp: argument %g is out of range"), d); - return tmp_number((AWKNUM) res); + return make_number((AWKNUM) res); } /* stdfile --- return fp for a standard file */ @@ -156,9 +154,9 @@ stdfile(const char *name, size_t len) { if (len == 11) { - if (STREQN(name, "/dev/stderr", 11)) + if (strncmp(name, "/dev/stderr", 11) == 0) return stderr; - else if (STREQN(name, "/dev/stdout", 11)) + else if (strncmp(name, "/dev/stdout", 11) == 0) return stdout; } @@ -168,7 +166,7 @@ /* do_fflush --- flush output, either named file or pipe or everything */ NODE * -do_fflush(NODE *tree) +do_fflush(int nargs) { struct redirect *rp; NODE *tmp; @@ -177,20 +175,21 @@ const char *file; /* fflush() --- flush stdout */ - if (tree == NULL) { + if (nargs == 0) { + if (output_fp != stdout) + (void) fflush(output_fp); status = fflush(stdout); - return tmp_number((AWKNUM) status); + return make_number((AWKNUM) status); } - tmp = tree_eval(tree->lnode); - tmp = force_string(tmp); + tmp = POP_STRING(); file = tmp->stptr; /* fflush("") --- flush all */ if (tmp->stlen == 0) { status = flush_io(); - free_temp(tmp); - return tmp_number((AWKNUM) status); + DEREF(tmp); + return make_number((AWKNUM) status); } rp = getredirect(tmp->stptr, tmp->stlen); @@ -203,8 +202,8 @@ else warning(_("fflush: cannot flush: file `%s' opened for reading, not writing"), file); - free_temp(tmp); - return tmp_number((AWKNUM) status); + DEREF(tmp); + return make_number((AWKNUM) status); } fp = rp->fp; if (fp != NULL) @@ -215,37 +214,53 @@ status = -1; warning(_("fflush: `%s' is not an open file, pipe or co-process"), file); } - free_temp(tmp); - return tmp_number((AWKNUM) status); + DEREF(tmp); + return make_number((AWKNUM) status); } -#ifdef MBS_SUPPORT -/* strncasecmpmbs --- like strncasecmp(multibyte string version) */ +#if MBS_SUPPORT +/* strncasecmpmbs --- like strncasecmp (multibyte string version) */ + int -strncasecmpmbs(const char *s1, mbstate_t mbs1, const char *s2, - mbstate_t mbs2, size_t n) +strncasecmpmbs(const unsigned char *s1, const unsigned char *s2, size_t n) { - int i1, i2, mbclen1, mbclen2, gap; + size_t i1, i2, mbclen1, mbclen2, gap; wchar_t wc1, wc2; + mbstate_t mbs1, mbs2; + + memset(& mbs1, 0, sizeof(mbs1)); + memset(& mbs2, 0, sizeof(mbs2)); for (i1 = i2 = 0 ; i1 < n && i2 < n ;i1 += mbclen1, i2 += mbclen2) { - mbclen1 = mbrtowc(&wc1, s1 + i1, n - i1, &mbs1); - if (mbclen1 == (size_t) -1 || mbclen1 == (size_t) -2 || mbclen1 == 0) { - /* We treat it as a singlebyte character. */ + if (is_valid_character(s1[i1])) { mbclen1 = 1; - wc1 = s1[i1]; + wc1 = btowc_cache(s1[i1]); + } else { + mbclen1 = mbrtowc(& wc1, (const char *)s1 + i1, + n - i1, & mbs1); + if (mbclen1 == (size_t) -1 || mbclen1 == (size_t) -2 || mbclen1 == 0) { + /* We treat it as a singlebyte character. */ + mbclen1 = 1; + wc1 = btowc_cache(s1[i1]); + } } - mbclen2 = mbrtowc(&wc2, s2 + i2, n - i2, &mbs2); - if (mbclen2 == (size_t) -1 || mbclen2 == (size_t) -2 || mbclen2 == 0) { - /* We treat it as a singlebyte character. */ + if (is_valid_character(s2[i2])) { mbclen2 = 1; - wc2 = s2[i2]; + wc2 = btowc_cache(s2[i2]); + } else { + mbclen2 = mbrtowc(& wc2, (const char *)s2 + i2, + n - i2, & mbs2); + if (mbclen2 == (size_t) -1 || mbclen2 == (size_t) -2 || mbclen2 == 0) { + /* We treat it as a singlebyte character. */ + mbclen2 = 1; + wc2 = btowc_cache(s2[i2]); + } } if ((gap = towlower(wc1) - towlower(wc2)) != 0) - /* s1 and s2 are not equivalent. */ + /* s1 and s2 are not equivalent. */ return gap; } - /* s1 and s2 are equivalent. */ + /* s1 and s2 are equivalent. */ return 0; } @@ -260,12 +275,12 @@ { int idx, prev_idx; mbstate_t mbs, prevs; - memset(&prevs, 0, sizeof(mbstate_t)); + memset(& prevs, 0, sizeof(mbstate_t)); for (idx = prev_idx = 0 ; idx < len ; idx++) { size_t mbclen; mbs = prevs; - mbclen = mbrlen(src + prev_idx, idx - prev_idx + 1, &mbs); + mbclen = mbrlen(src + prev_idx, idx - prev_idx + 1, & mbs); if (mbclen == (size_t) -1 || mbclen == 1 || mbclen == 0) { /* singlebyte character. */ mbclen = 1; @@ -295,16 +310,24 @@ /* do_index --- find index of a string */ NODE * -do_index(NODE *tree) +do_index(int nargs) { NODE *s1, *s2; - register const char *p1, *p2; - register size_t l1, l2; + const char *p1, *p2; + size_t l1, l2; long ret; +#if MBS_SUPPORT int do_single_byte = FALSE; + mbstate_t mbs1, mbs2; + + if (gawk_mb_cur_max > 1) { + memset(& mbs1, 0, sizeof(mbstate_t)); + memset(& mbs2, 0, sizeof(mbstate_t)); + } +#endif + + POP_TWO_SCALARS(s1, s2); - s1 = tree_eval(tree->lnode); - s2 = tree_eval(tree->rnode->lnode); if (do_lint) { if ((s1->flags & (STRING|STRCUR)) == 0) lintwarn(_("index: received non-string first argument")); @@ -329,7 +352,7 @@ goto out; } -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { s1 = force_wstring(s1); s2 = force_wstring(s2); @@ -347,7 +370,7 @@ while (l1 > 0) { if (l2 > l1) break; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (! do_single_byte && gawk_mb_cur_max > 1) { const wchar_t *pos; @@ -360,8 +383,8 @@ } else { #endif /* - * Could use tolower(*p1) == tolower(*p2) here. See discussion - * in eval.c as to why not. + * Could use tolower(*p1) == tolower(*p2) here. + * See discussion in eval.c as to why not. */ if (casetable[(unsigned char)*p1] == casetable[(unsigned char)*p2] && (l2 == 1 || strncasecmp(p1, p2, l2) == 0)) { @@ -370,7 +393,7 @@ } l1--; p1++; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT } #endif } @@ -383,7 +406,7 @@ ret = 1 + s1->stlen - l1; break; } -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (! do_single_byte && gawk_mb_cur_max > 1) { const wchar_t *pos; @@ -404,9 +427,9 @@ } } out: - free_temp(s1); - free_temp(s2); - return tmp_number((AWKNUM) ret); + DEREF(s1); + DEREF(s2); + return make_number((AWKNUM) ret); } /* double_to_int --- convert double to int, used several places */ @@ -424,105 +447,103 @@ /* do_int --- convert double to int for awk */ NODE * -do_int(NODE *tree) +do_int(int nargs) { NODE *tmp; double d; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("int: received non-numeric argument")); d = force_number(tmp); d = double_to_int(d); - free_temp(tmp); - return tmp_number((AWKNUM) d); + DEREF(tmp); + return make_number((AWKNUM) d); +} + +/* do_isarray --- check if argument is array */ + +NODE * +do_isarray(int nargs) +{ + NODE *tmp; + int ret = 1; + + tmp = POP(); + if (tmp->type != Node_var_array) { + ret = 0; + DEREF(tmp); + } + return make_number((AWKNUM) ret); } -/* do_length --- length of a string or $0 */ +/* do_length --- length of a string, array or $0 */ NODE * -do_length(NODE *tree) +do_length(int nargs) { NODE *tmp; size_t len; - NODE *n; - n = tree->lnode; - if (n->type == Node_param_list) - n = stack_ptr[n->param_cnt]; - - if (n->type == Node_var_array - || n->type == Node_array_ref) { - NODE *array_var = n; + tmp = POP(); + if (tmp->type == Node_var_array) { static short warned = FALSE; - if (array_var->type == Node_array_ref) - array_var = array_var->orig_array; - - if (do_lint && ! warned) { + if (do_posix) + fatal(_("length: received array argument")); + if (do_lint && ! warned) { warned = TRUE; lintwarn(_("`length(array)' is a gawk extension")); } - if (do_posix) - goto normal; /* will die as fatal error */ - - if (array_var->type == Node_var_new) { - if (do_lint) - lintwarn(_("length: untyped parameter argument will be forced to scalar")); + return make_number((AWKNUM) tmp->table_size); + } - return tmp_number(0.0); - } + assert(tmp->type == Node_val); - return tmp_number((AWKNUM) array_var->table_size); - } else { -normal: - if (do_lint && n->type == Node_var_new) - lintwarn(_("length: untyped argument will be forced to scalar")); + if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) + lintwarn(_("length: received non-string argument")); + (void) force_string(tmp); - tmp = tree_eval(n); - if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) - lintwarn(_("length: received non-string argument")); - tmp = force_string(tmp); -#ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) { - tmp = force_wstring(tmp); - len = tmp->wstlen; - /* - * If the bytes don't make a valid wide character - * string, fall back to the bytes themselves. - */ - if (len == 0 && tmp->stlen > 0) - len = tmp->stlen; - } else +#if MBS_SUPPORT + if (gawk_mb_cur_max > 1) { + tmp = force_wstring(tmp); + len = tmp->wstlen; + /* + * If the bytes don't make a valid wide character + * string, fall back to the bytes themselves. + */ + if (len == 0 && tmp->stlen > 0) + len = tmp->stlen; + } else #endif - len = tmp->stlen; + len = tmp->stlen; - free_temp(tmp); - return tmp_number((AWKNUM) len); - } + DEREF(tmp); + return make_number((AWKNUM) len); } /* do_log --- the log function */ NODE * -do_log(NODE *tree) +do_log(int nargs) { NODE *tmp; double d, arg; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("log: received non-numeric argument")); arg = (double) force_number(tmp); if (arg < 0.0) warning(_("log: received negative argument %g"), arg); d = log(arg); - free_temp(tmp); - return tmp_number((AWKNUM) d); + DEREF(tmp); + return make_number((AWKNUM) d); } + /* - * format_tree() formats nodes of a tree, starting with a left node, + * format_tree() formats arguments of sprintf, * and accordingly to a fmt_string providing a format like in * printf family from C library. Returns a string node which value * is a formatted string. Called by sprintf function. @@ -535,7 +556,7 @@ format_tree( const char *fmt_string, size_t n0, - register NODE *carg, + NODE **the_args, long num_args) { /* copy 'l' bytes from 's' to 'obufout' checking for space in the process */ @@ -576,15 +597,8 @@ osiz += delta; \ } - static NODE **the_args = 0; - static size_t args_size = 0; size_t cur_arg = 0; - - auto NODE **save_args = 0; - auto size_t save_args_size = 0; - static int call_level = 0; - - NODE *r; + NODE *r = NULL; int i; int toofew = FALSE; char *obuf, *obufout; @@ -595,14 +609,11 @@ NODE *arg; long fw, prec, argnum; int used_dollar; - int lj, alt, big, bigbig, small, have_prec, need_format; + int lj, alt, big_flag, bigbig_flag, small_flag, have_prec, need_format; long *cur = NULL; -#ifdef sun386 /* Can't cast unsigned (int/long) from ptr->value */ - long tmp_uval; /* on 386i 4.0.1 C compiler -- it just hangs */ -#endif uintmax_t uval; int sgn; - int base = 0; + int base; /* * Although this is an array, the elements serve two different * purposes. The first element is the general buffer meant @@ -639,6 +650,8 @@ osiz = INITIAL_OUT_SIZE; ofre = osiz - 2; + cur_arg = 1; + { size_t k; for (k = 0; k < sizeof(cpbufs)/sizeof(cpbufs[0]); k++) { @@ -661,58 +674,13 @@ cpbufs[0].bufsize); \ cpbufs[0].bufsize *= 2; \ if (prev != cpbufs[0].stackbuf) \ - free(prev); \ + efree(prev); \ cend = cpbufs[0].buf+cpbufs[0].bufsize; \ } \ *--cp = (CH); \ } while(0) /* - * Icky problem. If the args make a nested call to printf/sprintf, - * we end up clobbering the static variable `the_args'. Not good. - * We don't just malloc and free the_args each time, since most of the - * time there aren't nested calls. But if this is a nested call, - * save the memory pointed to by the_args and allocate a fresh - * array. Then free it on end. - */ - if (++call_level > 1) { /* nested */ - save_args = the_args; - save_args_size = args_size; - - args_size = 0; /* force fresh allocation */ - } - - if (args_size == 0) { - /* allocate array */ - emalloc(the_args, NODE **, (num_args+1) * sizeof(NODE *), "format_tree"); - args_size = num_args + 1; - } else if (num_args + 1 > args_size) { - /* grow it */ - erealloc(the_args, NODE **, (num_args+1) * sizeof(NODE *), "format_tree"); - args_size = num_args + 1; - } - - - /* fill it in */ - /* - * We ignore the_args[0] since format strings use - * 1-based numbers to indicate the arguments. It's - * easiest to just convert to int and index, without - * having to remember to subtract 1. - */ - memset(the_args, '\0', num_args * sizeof(NODE *)); - for (i = 1; carg != NULL; i++, carg = carg->rnode) { - NODE *tmp; - - /* Here lies the wumpus's other brother. R.I.P. */ - tmp = tree_eval(carg->lnode); - the_args[i] = dupnode(tmp); - free_temp(tmp); - } - assert(i == num_args); - cur_arg = 1; - - /* * Check first for use of `count$'. * If plain argument retrieval was used earlier, choke. * Otherwise, return the requested argument. @@ -722,12 +690,15 @@ */ #define parse_next_arg() { \ if (argnum > 0) { \ - if (cur_arg > 1) \ - fatal(_("must use `count$' on all formats or none")); \ + if (cur_arg > 1) { \ + msg(_("fatal: must use `count$' on all formats or none")); \ + goto out; \ + } \ arg = the_args[argnum]; \ } else if (used_dollar) { \ - fatal(_("must use `count$' on all formats or none")); \ + msg(_("fatal: must use `count$' on all formats or none")); \ arg = 0; /* shutup the compiler */ \ + goto out; \ } else if (cur_arg >= num_args) { \ arg = 0; /* shutup the compiler */ \ toofew = TRUE; \ @@ -753,12 +724,13 @@ cur = &fw; fw = 0; prec = 0; + base = 0; argnum = 0; have_prec = FALSE; signchar = FALSE; zero_flag = FALSE; quote_flag = FALSE; - lj = alt = big = bigbig = small = FALSE; + lj = alt = big_flag = bigbig_flag = small_flag = FALSE; fill = sp; cp = cend; chbuf = lchbuf; @@ -787,14 +759,14 @@ const char *msg = NULL; if (fw && ! have_prec) - msg = _("field width is ignored for `%%%%' specifier"); + msg = _("field width is ignored for `%%' specifier"); else if (fw == 0 && have_prec) - msg = _("precision is ignored for `%%%%' specifier"); + msg = _("precision is ignored for `%%' specifier"); else if (fw && have_prec) - msg = _("field width and precision are ignored for `%%%%' specifier"); + msg = _("field width and precision are ignored for `%%' specifier"); if (msg != NULL) - lintwarn(msg); + lintwarn("%s", msg); } bchunk_one("%"); s0 = s1; @@ -841,31 +813,42 @@ continue; goto retry; case '$': - if (do_traditional) - fatal(_("`$' is not permitted in awk formats")); + if (do_traditional) { + msg(_("fatal: `$' is not permitted in awk formats")); + goto out; + } + if (cur == &fw) { argnum = fw; fw = 0; used_dollar = TRUE; - if (argnum <= 0) - fatal(_("arg count with `$' must be > 0")); - if (argnum >= num_args) - fatal(_("arg count %ld greater than total number of supplied arguments"), argnum); - } else - fatal(_("`$' not permitted after period in format")); + if (argnum <= 0) { + msg(_("fatal: arg count with `$' must be > 0")); + goto out; + } + if (argnum >= num_args) { + msg(_("fatal: arg count %ld greater than total number of supplied arguments"), argnum); + goto out; + } + } else { + msg(_("fatal: `$' not permitted after period in format")); + goto out; + } + goto retry; case '*': if (cur == NULL) break; - if (! do_traditional && isdigit(*s1)) { + if (! do_traditional && isdigit((unsigned char) *s1)) { int val = 0; - for (; n0 > 0 && *s1 && isdigit(*s1); s1++, n0--) { + for (; n0 > 0 && *s1 && isdigit((unsigned char) *s1); s1++, n0--) { val *= 10; val += *s1 - '0'; } if (*s1 != '$') { - fatal(_("no `$' supplied for positional field width or precision")); + msg(_("fatal: no `$' supplied for positional field width or precision")); + goto out; } else { s1++; n0--; @@ -920,16 +903,16 @@ alt = TRUE; goto check_pos; case '\'': -#if defined(HAVE_LOCALE_H) +#if defined(HAVE_LOCALE_H) /* allow quote_flag if there is a thousands separator. */ if (loc.thousands_sep[0] != '\0') - quote_flag = TRUE; + quote_flag = TRUE; goto check_pos; #else - goto retry; + goto retry; #endif case 'l': - if (big) + if (big_flag) break; else { static short warned = FALSE; @@ -938,13 +921,15 @@ lintwarn(_("`l' is meaningless in awk formats; ignored")); warned = TRUE; } - if (do_posix) - fatal(_("`l' is not permitted in POSIX awk formats")); + if (do_posix) { + msg(_("fatal: `l' is not permitted in POSIX awk formats")); + goto out; + } } - big = TRUE; + big_flag = TRUE; goto retry; case 'L': - if (bigbig) + if (bigbig_flag) break; else { static short warned = FALSE; @@ -953,13 +938,15 @@ lintwarn(_("`L' is meaningless in awk formats; ignored")); warned = TRUE; } - if (do_posix) - fatal(_("`L' is not permitted in POSIX awk formats")); + if (do_posix) { + msg(_("fatal: `L' is not permitted in POSIX awk formats")); + goto out; + } } - bigbig = TRUE; + bigbig_flag = TRUE; goto retry; case 'h': - if (small) + if (small_flag) break; else { static short warned = FALSE; @@ -968,10 +955,12 @@ lintwarn(_("`h' is meaningless in awk formats; ignored")); warned = TRUE; } - if (do_posix) - fatal(_("`h' is not permitted in POSIX awk formats")); + if (do_posix) { + msg(_("fatal: `h' is not permitted in POSIX awk formats")); + goto out; + } } - small = TRUE; + small_flag = TRUE; goto retry; case 'c': need_format = FALSE; @@ -980,11 +969,32 @@ if ((arg->flags & (MAYBE_NUM|NUMBER)) == MAYBE_NUM) (void) force_number(arg); if (arg->flags & NUMBER) { -#ifdef sun386 - tmp_uval = arg->numbr; - uval = (unsigned long) tmp_uval; -#else uval = (uintmax_t) arg->numbr; +#if MBS_SUPPORT + if (gawk_mb_cur_max > 1) { + char buf[100]; + wchar_t wc; + mbstate_t mbs; + size_t count; + + memset(& mbs, 0, sizeof(mbs)); + wc = uval; + + count = wcrtomb(buf, wc, & mbs); + if (count == 0 + || count == (size_t)-1 + || count == (size_t)-2) + goto out0; + + memcpy(cpbuf, buf, count); + prec = count; + cp = cpbuf; + goto pr_tail; + } +out0: + ; + /* else, + fall through */ #endif if (do_lint && uval > 255) { lintwarn("[s]printf: value %g is too big for %%c format", @@ -1001,8 +1011,29 @@ * precision, forcing it to 1. (Didn't this * used to work? 6/2003.) */ - prec = 1; cp = arg->stptr; +#if MBS_SUPPORT + /* + * First character can be multiple bytes if + * it's a multibyte character. Grr. + */ + if (gawk_mb_cur_max > 1) { + mbstate_t state; + size_t count; + + memset(& state, 0, sizeof(state)); + count = mbrlen(cp, arg->stlen, & state); + if (count == 0 + || count == (size_t)-1 + || count == (size_t)-2) + goto out2; + prec = count; + goto pr_tail; + } +out2: + ; +#endif + prec = 1; goto pr_tail; case 's': need_format = FALSE; @@ -1081,7 +1112,7 @@ jj = 0; /* keep using current val in loc.grouping[ii] */ else if (loc.grouping[ii+1] == CHAR_MAX) quote_flag = FALSE; - else { + else { ii++; jj = 0; } @@ -1171,7 +1202,6 @@ && ((zero_flag && ! have_prec) || (fw == 0 && have_prec))) fill = zero_string; - ii = jj = 0; do { PREPEND(chbuf[uval % base]); @@ -1180,11 +1210,11 @@ if (base == 10 && quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) { if (uval) /* only add if more digits coming */ PREPEND(loc.thousands_sep[0]); /* XXX --- assumption it's one char */ - if (loc.grouping[ii+1] == 0) - jj = 0; /* keep using current val in loc.grouping[ii] */ - else if (loc.grouping[ii+1] == CHAR_MAX) + if (loc.grouping[ii+1] == 0) + jj = 0; /* keep using current val in loc.grouping[ii] */ + else if (loc.grouping[ii+1] == CHAR_MAX) quote_flag = FALSE; - else { + else { ii++; jj = 0; } @@ -1225,18 +1255,8 @@ if (fw == 0 && ! have_prec) ; else if (gawk_mb_cur_max > 1 && (cs1 == 's' || cs1 == 'c')) { - int nchars_needed = 0; - assert(cp == arg->stptr || cp == cpbuf); - - if (cs1 == 'c') - nchars_needed = 1; - else if (have_prec) - nchars_needed = prec; - else - nchars_needed = arg->stlen; - - copy_count = mbc_byte_count(arg->stptr, nchars_needed); + copy_count = mbc_byte_count(arg->stptr, prec); } bchunk(cp, copy_count); while (fw > prec) { @@ -1271,13 +1291,6 @@ if (! have_prec) prec = DEFAULT_G_PRECISION; chksize(fw + prec + 9); /* 9 == slop */ -#ifdef VAXCRTL - /* pre-ANSI library doesn't handle '0' flag - correctly in many cases; reject it */ - if (zero_flag - && (lj || (signchar && signchar != '+'))) - zero_flag = FALSE; -#endif cp = cpbuf; *cp++ = '%'; if (lj) @@ -1294,7 +1307,6 @@ cp += 3; *cp++ = cs1; *cp = '\0'; -#ifndef GFMT_WORKAROUND #if defined(LC_NUMERIC) if (quote_flag && ! use_lc_numeric) setlocale(LC_NUMERIC, ""); @@ -1310,18 +1322,6 @@ if (quote_flag && ! use_lc_numeric) setlocale(LC_NUMERIC, "C"); #endif -#else /* GFMT_WORKAROUND */ - if (cs1 == 'g' || cs1 == 'G') - sgfmt(obufout, cpbuf, (int) alt, - (int) fw, (int) prec, (double) tmpval); - else { - int n; - while ((n = snprintf(obufout, ofre, cpbuf, - (int) fw, (int) prec, - (double) tmpval)) >= ofre) - chksize(n) - } -#endif /* GFMT_WORKAROUND */ len = strlen(obufout); ofre -= len; obufout += len; @@ -1333,11 +1333,11 @@ break; } if (toofew) { - free(obuf); /* silence valgrind */ - fatal("%s\n\t`%s'\n\t%*s%s", - _("not enough arguments to satisfy format string"), + msg("%s\n\t`%s'\n\t%*s%s", + _("fatal: not enough arguments to satisfy format string"), fmt_string, (int) (s1 - fmt_string - 1), "", _("^ ran out for this one")); + goto out; } } if (do_lint) { @@ -1350,128 +1350,178 @@ } bchunk(s0, s1 - s0); r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED); - r->flags |= TEMP; - - for (i = 1; i < num_args; i++) { - unref(the_args[i]); - } - - if (call_level-- > 1) { - free(the_args); - the_args = save_args; - args_size = save_args_size; - } - + obuf = NULL; +out: { size_t k; size_t count = sizeof(cpbufs)/sizeof(cpbufs[0]); for (k = 0; k < count; k++) { if (cpbufs[k].buf != cpbufs[k].stackbuf) - free(cpbufs[k].buf); + efree(cpbufs[k].buf); } + if (obuf != NULL) + efree(obuf); } - + if (r == NULL) + gawk_exit(EXIT_FATAL); return r; } -/* do_sprintf --- perform sprintf */ -NODE * -do_sprintf(NODE *tree) +/* printf_common --- common code for sprintf and printf */ + +static NODE * +printf_common(int nargs) { - NODE *r; - NODE *sfmt = force_string(tree_eval(tree->lnode)); + int i; + NODE *r, *tmp; + + assert(nargs <= max_args); + for (i = 1; i <= nargs; i++) { + tmp = args_array[nargs - i] = POP(); + if (tmp->type == Node_var_array) { + while (--i > 0) + DEREF(args_array[nargs - i]); + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(tmp)); + } + } - r = format_tree(sfmt->stptr, sfmt->stlen, tree->rnode, tree->printf_count); - free_temp(sfmt); + force_string(args_array[0]); + r = format_tree(args_array[0]->stptr, args_array[0]->stlen, args_array, nargs); + for (i = 0; i < nargs; i++) + DEREF(args_array[i]); return r; } -/* - * redirect_to_fp --- return fp for redirection, NULL on failure - * or stdout if no redirection, used by all print routines - */ +/* do_sprintf --- perform sprintf */ -static inline FILE * -redirect_to_fp(NODE *tree, struct redirect **rpp) +NODE * +do_sprintf(int nargs) { - 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; + NODE *r; + r = printf_common(nargs); + if (r == NULL) + gawk_exit(EXIT_FATAL); + return r; } + /* do_printf --- perform printf, including redirection */ void -do_printf(NODE *tree) +do_printf(int nargs, int redirtype) { + FILE *fp = NULL; + NODE *tmp; struct redirect *rp = NULL; - register FILE *fp; + int errflg; /* not used, sigh */ + NODE *redir_exp = NULL; - if (tree->lnode == NULL) { + if (nargs == 0) { if (do_traditional) { if (do_lint) lintwarn(_("printf: no arguments")); + if (redirtype != 0) { + redir_exp = TOP(); + if (redir_exp->type != Node_val) + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(redir_exp)); + rp = redirect(redir_exp, redirtype, & errflg); + DEREF(redir_exp); + decr_sp(); + } return; /* bwk accepts it silently */ } fatal(_("printf: no arguments")); } - 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); - if (rp != NULL && (rp->flag & RED_TWOWAY) != 0) - fflush(rp->fp); - free_temp(tree); + if (redirtype != 0) { + redir_exp = PEEK(nargs); + if (redir_exp->type != Node_val) + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(redir_exp)); + rp = redirect(redir_exp, redirtype, & errflg); + if (rp != NULL) + fp = rp->fp; + } else + fp = output_fp; + + tmp = printf_common(nargs); + if (redir_exp != NULL) { + DEREF(redir_exp); + decr_sp(); + } + if (tmp != NULL) { + if (fp == NULL) { + DEREF(tmp); + return; + } + efwrite(tmp->stptr, sizeof(char), tmp->stlen, fp, "printf", rp, TRUE); + if (rp != NULL && (rp->flag & RED_TWOWAY) != 0) + fflush(rp->fp); + DEREF(tmp); + } else + gawk_exit(EXIT_FATAL); } /* do_sqrt --- do the sqrt function */ NODE * -do_sqrt(NODE *tree) +do_sqrt(int nargs) { NODE *tmp; double arg; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("sqrt: received non-numeric argument")); arg = (double) force_number(tmp); - free_temp(tmp); + DEREF(tmp); if (arg < 0.0) warning(_("sqrt: called with negative argument %g"), arg); - return tmp_number((AWKNUM) sqrt(arg)); + return make_number((AWKNUM) sqrt(arg)); } /* do_substr --- do the substr function */ NODE * -do_substr(NODE *tree) +do_substr(int nargs) { - NODE *t1, *t2, *t3; + NODE *t1; NODE *r; - register size_t indx; - size_t length; - double d_index, d_length; + size_t indx; + size_t length = 0; + double d_index = 0, d_length = 0; size_t src_len; - t1 = force_string(tree_eval(tree->lnode)); - t2 = tree_eval(tree->rnode->lnode); - d_index = force_number(t2); - free_temp(t2); + if (nargs == 3) + POP_NUMBER(d_length); + POP_NUMBER(d_index); + t1 = POP_STRING(); + + if (nargs == 3) { + if (! (d_length >= 1)) { + if (do_lint == LINT_ALL) + lintwarn(_("substr: length %g is not >= 1"), d_length); + else if (do_lint == LINT_INVALID && ! (d_length >= 0)) + lintwarn(_("substr: length %g is not >= 0"), d_length); + DEREF(t1); + return Nnull_string; + } + 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; + } /* the weird `! (foo)' tests help catch NaN values. */ if (! (d_index >= 1)) { @@ -1490,10 +1540,10 @@ else indx = SIZE_MAX; - if (tree->rnode->rnode == NULL) { /* third arg. missing */ + if (nargs == 2) { /* third arg. missing */ /* use remainder of string */ length = t1->stlen - indx; /* default to bytes */ -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { t1 = force_wstring(t1); if (t1->wstlen > 0) /* use length of wide char string if we have one */ @@ -1501,45 +1551,18 @@ } #endif 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 >= 1)) { - if (do_lint == LINT_ALL) - lintwarn(_("substr: length %g is not >= 1"), d_length); - else if (do_lint == LINT_INVALID && ! (d_length >= 0)) - lintwarn(_("substr: length %g is not >= 0"), d_length); - free_temp(t1); - return Nnull_string; - } - 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) { /* 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); + DEREF(t1); return Nnull_string; } /* get total len of input string, for following checks */ -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { t1 = force_wstring(t1); src_len = t1->wstlen; @@ -1551,7 +1574,7 @@ if (do_lint) lintwarn(_("substr: start index %g is past end of string"), d_index); - free_temp(t1); + DEREF(t1); return Nnull_string; } if (length > src_len - indx) { @@ -1562,19 +1585,18 @@ length = src_len - indx; } -#ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) { +#if MBS_SUPPORT + /* force_wstring() already called */ + if (gawk_mb_cur_max == 1 || t1->wstlen == t1->stlen) + /* single byte case */ + r = make_string(t1->stptr + indx, length); + else { /* multibyte case, more work */ size_t result; wchar_t *wp; mbstate_t mbs; char *substr, *cp; - /* force_wstring() already called */ - - if (t1->stlen == t1->wstlen) - goto single_byte_case; - /* * Convert the wide chars in t1->wstptr back into m.b. chars. * This is pretty grotty, but it's the most straightforward @@ -1592,84 +1614,95 @@ } *cp = '\0'; r = make_str_node(substr, cp - substr, ALREADY_MALLOCED); - r->flags |= TEMP; - } else { - /* single byte case, easy */ -single_byte_case: - r = tmp_string(t1->stptr + indx, length); } #else - r = tmp_string(t1->stptr + indx, length); + r = make_string(t1->stptr + indx, length); #endif - free_temp(t1); + DEREF(t1); return r; } /* do_strftime --- format a time stamp */ NODE * -do_strftime(NODE *tree) +do_strftime(int nargs) { NODE *t1, *t2, *t3, *ret; struct tm *tm; time_t fclock; + long clock_val; char *bufp; size_t buflen, bufsize; char buf[BUFSIZ]; - /* FIXME: One day make %d be %e, after C 99 is common. */ - static const char def_format[] = "%a %b %d %H:%M:%S %Z %Y"; const char *format; int formatlen; int do_gmt; + NODE *val = NULL; + NODE *sub = NULL; /* set defaults first */ - format = def_format; /* traditional date format */ + format = def_strftime_format; /* traditional date format */ formatlen = strlen(format); - (void) time(&fclock); /* current time of day */ + (void) time(& fclock); /* current time of day */ do_gmt = FALSE; + if (PROCINFO_node != NULL) { + sub = make_string("strftime", 8); + val = in_array(PROCINFO_node, sub); + unref(sub); + + if (val != NULL) { + if (do_lint && (val->flags & STRING) == 0) + lintwarn(_("strftime: format value in PROCINFO[\"strftime\"] has numeric type")); + val = force_string(val); + format = val->stptr; + formatlen = val->stlen; + } + } + t1 = t2 = t3 = NULL; - if (tree != NULL) { /* have args */ - if (tree->lnode != NULL) { - NODE *tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) - lintwarn(_("strftime: received non-string first argument")); - t1 = force_string(tmp); - format = t1->stptr; - formatlen = t1->stlen; - if (formatlen == 0) { - if (do_lint) - lintwarn(_("strftime: received empty format string")); - free_temp(t1); - return tmp_string("", 0); - } + if (nargs > 0) { /* have args */ + NODE *tmp; + + if (nargs == 3) { + t3 = POP_SCALAR(); + if ((t3->flags & (NUMCUR|NUMBER)) != 0) + do_gmt = (t3->numbr != 0); + else + do_gmt = (t3->stlen > 0); + DEREF(t3); } - - if (tree->rnode != NULL) { - t2 = tree_eval(tree->rnode->lnode); + + if (nargs >= 2) { + t2 = POP_SCALAR(); if (do_lint && (t2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("strftime: received non-numeric second argument")); - fclock = (time_t) force_number(t2); - free_temp(t2); - - if (tree->rnode->rnode != NULL) { - tree = tree->rnode->rnode; - t3 = tree_eval(tree->lnode); - if ((t3->flags & (NUMCUR|NUMBER)) != 0) - do_gmt = (t3->numbr != 0); - else - do_gmt = (t3->stlen > 0); + clock_val = (long) force_number(t2); + if (clock_val < 0) + fatal(_("strftime: second argument less than 0 or too big for time_t")); + fclock = (time_t) clock_val; + DEREF(t2); + } - free_temp(t3); - } + tmp = POP_SCALAR(); + if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) + lintwarn(_("strftime: received non-string first argument")); + t1 = force_string(tmp); + format = t1->stptr; + formatlen = t1->stlen; + if (formatlen == 0) { + if (do_lint) + lintwarn(_("strftime: received empty format string")); + DEREF(t1); + return make_string("", 0); } } if (do_gmt) - tm = gmtime(&fclock); + tm = gmtime(& fclock); else - tm = localtime(&fclock); + tm = localtime(& fclock); bufp = buf; bufsize = sizeof(buf); @@ -1692,29 +1725,29 @@ else erealloc(bufp, char *, bufsize, "do_strftime"); } - ret = tmp_string(bufp, buflen); + ret = make_string(bufp, buflen); if (bufp != buf) - free(bufp); + efree(bufp); if (t1) - free_temp(t1); + DEREF(t1); return ret; } /* do_systime --- get the time of day */ NODE * -do_systime(NODE *tree ATTRIBUTE_UNUSED) +do_systime(int nargs ATTRIBUTE_UNUSED) { time_t lclock; - (void) time(&lclock); - return tmp_number((AWKNUM) lclock); + (void) time(& lclock); + return make_number((AWKNUM) lclock); } /* do_mktime --- turn a time string into a timestamp */ NODE * -do_mktime(NODE *tree) +do_mktime(int nargs) { NODE *t1; struct tm then; @@ -1724,7 +1757,7 @@ time_t then_stamp; char save; - t1 = tree_eval(tree->lnode); + t1 = POP_SCALAR(); if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("mktime: received non-string argument")); t1 = force_string(t1); @@ -1737,22 +1770,22 @@ & hour, & minute, & second, & dst); - if (do_lint /* Ready? Set! Go: */ - && ( (second < 0 || second > 60) - || (minute < 0 || minute > 60) - || (hour < 0 || hour > 23) - || (day < 1 || day > 31) - || (month < 1 || month > 12) )) - lintwarn(_("mktime: at least one of the values is out of the default range")); + if (do_lint /* Ready? Set! Go: */ + && ( (second < 0 || second > 60) + || (minute < 0 || minute > 60) + || (hour < 0 || hour > 23) + || (day < 1 || day > 31) + || (month < 1 || month > 12) )) + lintwarn(_("mktime: at least one of the values is out of the default range")); t1->stptr[t1->stlen] = save; - free_temp(t1); + DEREF(t1); if (count < 6 || month == INT_MIN || year < INT_MIN + 1900 || year - 1900 > INT_MAX) - return tmp_number((AWKNUM) -1); + return make_number((AWKNUM) -1); memset(& then, '\0', sizeof(then)); then.tm_sec = second; @@ -1764,42 +1797,30 @@ then.tm_isdst = dst; then_stamp = mktime(& then); - return tmp_number((AWKNUM) then_stamp); + return make_number((AWKNUM) then_stamp); } /* do_system --- run an external command */ NODE * -do_system(NODE *tree) +do_system(int nargs) { NODE *tmp; int ret = 0; char *cmd; char save; + if (do_sandbox) + fatal(_("'system' function not allowed in sandbox mode")); + (void) flush_io(); /* so output is synchronous with gawk's */ - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) lintwarn(_("system: received non-string argument")); cmd = force_string(tmp)->stptr; if (cmd && *cmd) { /* insure arg to system is zero-terminated */ - - /* - * From: David Trueman - * To: arnold@cc.gatech.edu (Arnold Robbins) - * Date: Wed, 3 Nov 1993 12:49:41 -0400 - * - * It may not be necessary to save the character, but - * I'm not sure. It would normally be the field - * separator. If the parse has not yet gone beyond - * that, it could mess up (although I doubt it). If - * FIELDWIDTHS is being used, it might be the first - * character of the next field. Unless someone wants - * to check it out exhaustively, I suggest saving it - * for now... - */ save = cmd[tmp->stlen]; cmd[tmp->stlen] = '\0'; @@ -1812,8 +1833,8 @@ cmd[tmp->stlen] = save; } - free_temp(tmp); - return tmp_number((AWKNUM) ret); + DEREF(tmp); + return make_number((AWKNUM) ret); } extern NODE **fmt_list; /* declared in eval.c */ @@ -1821,54 +1842,60 @@ /* do_print --- print items, separated by OFS, terminated with ORS */ void -do_print(register NODE *tree) +do_print(int nargs, int redirtype) { - register NODE **t; struct redirect *rp = NULL; - register FILE *fp; - int numnodes, i; - NODE *save; - NODE *tval; + int errflg; /* not used, sigh */ + FILE *fp = NULL; + int i; + NODE *redir_exp = NULL; + NODE *tmp; - fp = redirect_to_fp(tree->rnode, & rp); - if (fp == NULL) - return; + assert(nargs <= max_args); - /* - * General idea is to evaluate all the expressions first and - * then print them, otherwise you get suprising behavior. - * See test/prtoeval.awk for an example program. - */ - save = tree = tree->lnode; - for (numnodes = 0; tree != NULL; tree = tree->rnode) - numnodes++; - emalloc(t, NODE **, numnodes * sizeof(NODE *), "do_print"); - - tree = save; - for (i = 0; tree != NULL; i++, tree = tree->rnode) { - NODE *n; - - /* Here lies the wumpus. R.I.P. */ - n = tree_eval(tree->lnode); - t[i] = dupnode(n); - free_temp(n); + if (redirtype != 0) { + redir_exp = PEEK(nargs); + if (redir_exp->type != Node_val) + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(redir_exp)); + rp = redirect(redir_exp, redirtype, & errflg); + if (rp != NULL) + fp = rp->fp; + } else + fp = output_fp; - if ((t[i]->flags & (NUMBER|STRING)) == NUMBER) { + for (i = 1; i <= nargs; i++) { + tmp = args_array[i] = POP(); + if (tmp->type == Node_var_array) { + while (--i > 0) + DEREF(args_array[i]); + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(tmp)); + } + if (do_lint && tmp->type == Node_var_new) + lintwarn(_("reference to uninitialized variable `%s'"), + tmp->vname); + if ((tmp->flags & (NUMBER|STRING)) == NUMBER) { if (OFMTidx == CONVFMTidx) - (void) force_string(t[i]); - else { - tval = tmp_number(t[i]->numbr); - unref(t[i]); - t[i] = format_val(OFMT, OFMTidx, tval); - } + (void) force_string(tmp); + else + args_array[i] = format_val(OFMT, OFMTidx, tmp); } } - for (i = 0; i < numnodes; i++) { - efwrite(t[i]->stptr, sizeof(char), t[i]->stlen, fp, "print", rp, FALSE); - unref(t[i]); + if (redir_exp != NULL) { + DEREF(redir_exp); + decr_sp(); + } + + if (fp == NULL) { + for (i = nargs; i > 0; i--) + DEREF(args_array[i]); + return; + } - if (i != numnodes - 1 && OFSlen > 0) + for (i = nargs; i > 0; i--) { + efwrite(args_array[i]->stptr, sizeof(char), args_array[i]->stlen, fp, "print", rp, FALSE); + DEREF(args_array[i]); + if (i != 1 && OFSlen > 0) efwrite(OFS, sizeof(char), (size_t) OFSlen, fp, "print", rp, FALSE); @@ -1878,20 +1905,30 @@ if (rp != NULL && (rp->flag & RED_TWOWAY) != 0) fflush(rp->fp); - - free(t); } /* do_print_rec --- special case printing of $0, for speed */ void -do_print_rec(register NODE *tree) +do_print_rec(int nargs, int redirtype) { + FILE *fp = NULL; + NODE *f0; struct redirect *rp = NULL; - register FILE *fp; - register NODE *f0; + int errflg; /* not used, sigh */ + NODE *redir_exp = NULL; + + assert(nargs == 0); + if (redirtype != 0) { + redir_exp = TOP(); + rp = redirect(redir_exp, redirtype, & errflg); + if (rp != NULL) + fp = rp->fp; + DEREF(redir_exp); + decr_sp(); + } else + fp = output_fp; - fp = redirect_to_fp(tree->rnode, & rp); if (fp == NULL) return; @@ -1912,161 +1949,150 @@ fflush(rp->fp); } -#ifdef MBS_SUPPORT -/* wide_tolower_toupper --- lower- or uppercase a multibyte string */ +#if MBS_SUPPORT -typedef int (*isw_func)(wint_t); -typedef wint_t (*tow_func)(wint_t); +/* is_wupper --- function version of iswupper for passing function pointers */ -static NODE * -wide_tolower_toupper(NODE *t1, isw_func iswu, tow_func towl) +static int +is_wupper(wchar_t c) { - register unsigned char *cp, *cpe; - register unsigned char *cp2; - size_t mbclen; - mbstate_t mbs, prev_mbs; - wchar_t wc; - NODE *t2; - /* - * Since the lowercase char and its uppercase equivalent may occupy - * different number of bytes (Turkish `i'), we cannot say the length - * of the output string. - * This approach is adapted from format_tree(). - */ - unsigned char *obuf; - size_t osiz, ofre; + return iswupper(c); +} - /* - * Better 2 spare bytes than 1, consistently with make_str_node(). - * And we need gawk_mb_cur_max free bytes before we convert the last - * char, so we add (gawk_mb_cur_max - 1). - */ - osiz = t1->stlen + 2 + (gawk_mb_cur_max - 1); - ofre = osiz - 2; - emalloc(obuf, unsigned char *, osiz, "wide_tolower_toupper"); +/* is_wlower --- function version of iswlower for passing function pointers */ - memset(&mbs, 0, sizeof(mbstate_t)); - cp = (unsigned char *)t1->stptr; - cpe = (unsigned char *)(t1->stptr + t1->stlen); - cp2 = obuf; - while (cp < cpe) { - if (ofre < gawk_mb_cur_max) { - size_t olen = cp2 - obuf; - ofre += osiz; - osiz *= 2; - erealloc(obuf, unsigned char *, osiz, "wide_tolower_toupper"); - cp2 = obuf + olen; - } - prev_mbs = mbs; - mbclen = (size_t) mbrtowc(&wc, (char *) cp, cpe - cp, - &mbs); - if (mbclen == 0 || mbclen == (size_t) -1 || mbclen == (size_t) -2) { - /* Null wide char, or a problem appeared. */ - *cp2++ = *cp++; - ofre--; - continue; - } - - /* If the character doesn't need change, copy it. */ - if (!(*iswu)(wc)) { - ofre -= mbclen; - while (mbclen--) - *cp2++ = *cp++; - continue; - } +static int +is_wlower(wchar_t c) +{ + return iswlower(c); +} - /* Increment the input pointer. */ - cp += mbclen; +/* to_wupper --- function version of towupper for passing function pointers */ - /* Write the modified wide character. */ - mbclen = wcrtomb((char *) cp2, (*towl)(wc), &prev_mbs); +static int +to_wlower(wchar_t c) +{ + return towlower(c); +} - if (mbclen > 0 && mbclen < (size_t) -2) { - /* Increment the output pointer. */ - cp2 += mbclen; - ofre -= mbclen; - } else { - /* A problem appeared. */ - cp2++; - ofre--; - } - } - t2 = make_str_node((char *) obuf, cp2 - obuf, ALREADY_MALLOCED); - t2->flags |= TEMP; - return t2; +/* to_wlower --- function version of towlower for passing function pointers */ + +static int +to_wupper(wchar_t c) +{ + return towupper(c); +} + +/* wide_change_case --- generic case converter for wide characters */ + +static void +wide_change_case(wchar_t *wstr, + size_t wlen, + int (*is_x)(wchar_t c), + int (*to_y)(wchar_t c)) +{ + size_t i; + wchar_t *wcp; + + for (i = 0, wcp = wstr; i < wlen; i++, wcp++) + if (is_x(*wcp)) + *wcp = to_y(*wcp); +} + +/* wide_toupper --- map a wide string to upper case */ + +static void +wide_toupper(wchar_t *wstr, size_t wlen) +{ + wide_change_case(wstr, wlen, is_wlower, to_wupper); +} + +/* wide_tolower --- map a wide string to lower case */ + +static void +wide_tolower(wchar_t *wstr, size_t wlen) +{ + wide_change_case(wstr, wlen, is_wupper, to_wlower); } #endif /* do_tolower --- lower case a string */ NODE * -do_tolower(NODE *tree) +do_tolower(int nargs) { NODE *t1, *t2; - t1 = tree_eval(tree->lnode); + t1 = POP_SCALAR(); if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("tolower: received non-string argument")); t1 = force_string(t1); + t2 = make_string(t1->stptr, t1->stlen); -#ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) - t2 = wide_tolower_toupper(t1, iswupper, towlower); - else -#endif - { - register unsigned char *cp, *cpe; + if (gawk_mb_cur_max == 1) { + unsigned char *cp, *cp2; - t2 = tmp_string(t1->stptr, t1->stlen); for (cp = (unsigned char *)t2->stptr, - cpe = (unsigned char *)(t2->stptr + t2->stlen); cp < cpe; cp++) + cp2 = (unsigned char *)(t2->stptr + t2->stlen); + cp < cp2; cp++) if (isupper(*cp)) *cp = tolower(*cp); } - free_temp(t1); +#if MBS_SUPPORT + else { + force_wstring(t2); + wide_tolower(t2->wstptr, t2->wstlen); + wstr2str(t2); + } +#endif + + DEREF(t1); return t2; } /* do_toupper --- upper case a string */ NODE * -do_toupper(NODE *tree) +do_toupper(int nargs) { NODE *t1, *t2; - t1 = tree_eval(tree->lnode); + t1 = POP_SCALAR(); if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("toupper: received non-string argument")); t1 = force_string(t1); + t2 = make_string(t1->stptr, t1->stlen); -#ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) - t2 = wide_tolower_toupper(t1, iswlower, towupper); - else -#endif - { - register unsigned char *cp, *cpe; + if (gawk_mb_cur_max == 1) { + unsigned char *cp, *cp2; - t2 = tmp_string(t1->stptr, t1->stlen); for (cp = (unsigned char *)t2->stptr, - cpe = (unsigned char *)(t2->stptr + t2->stlen); cp < cpe; cp++) + cp2 = (unsigned char *)(t2->stptr + t2->stlen); + cp < cp2; cp++) if (islower(*cp)) *cp = toupper(*cp); } - free_temp(t1); +#if MBS_SUPPORT + else { + force_wstring(t2); + wide_toupper(t2->wstptr, t2->wstlen); + wstr2str(t2); + } +#endif + + DEREF(t1); return t2; } /* do_atan2 --- do the atan2 function */ NODE * -do_atan2(NODE *tree) +do_atan2(int nargs) { NODE *t1, *t2; double d1, d2; - t1 = tree_eval(tree->lnode); - t2 = tree_eval(tree->rnode->lnode); + POP_TWO_SCALARS(t1, t2); if (do_lint) { if ((t1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("atan2: received non-numeric first argument")); @@ -2075,41 +2101,41 @@ } d1 = force_number(t1); d2 = force_number(t2); - free_temp(t1); - free_temp(t2); - return tmp_number((AWKNUM) atan2(d1, d2)); + DEREF(t1); + DEREF(t2); + return make_number((AWKNUM) atan2(d1, d2)); } /* do_sin --- do the sin function */ NODE * -do_sin(NODE *tree) +do_sin(int nargs) { NODE *tmp; double d; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("sin: received non-numeric argument")); d = sin((double) force_number(tmp)); - free_temp(tmp); - return tmp_number((AWKNUM) d); + DEREF(tmp); + return make_number((AWKNUM) d); } /* do_cos --- do the cos function */ NODE * -do_cos(NODE *tree) +do_cos(int nargs) { NODE *tmp; double d; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("cos: received non-numeric argument")); d = cos((double) force_number(tmp)); - free_temp(tmp); - return tmp_number((AWKNUM) d); + DEREF(tmp); + return make_number((AWKNUM) d); } /* do_rand --- do the rand function */ @@ -2122,7 +2148,7 @@ /* ARGSUSED */ NODE * -do_rand(NODE *tree ATTRIBUTE_UNUSED) +do_rand(int nargs ATTRIBUTE_UNUSED) { if (firstrand) { (void) initstate((unsigned) 1, state, SIZEOF_STATE); @@ -2135,13 +2161,13 @@ * * 0 <= n < 1 */ - return tmp_number((AWKNUM) (random() % GAWK_RANDOM_MAX) / GAWK_RANDOM_MAX); + return make_number((AWKNUM) (random() % GAWK_RANDOM_MAX) / GAWK_RANDOM_MAX); } /* do_srand --- seed the random number generator */ NODE * -do_srand(NODE *tree) +do_srand(int nargs) { NODE *tmp; static long save_seed = 1; @@ -2154,16 +2180,16 @@ (void) setstate(state); } - if (tree == NULL) + if (nargs == 0) srandom((unsigned int) (save_seed = (long) time((time_t *) 0))); else { - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); 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); + DEREF(tmp); } - return tmp_number((AWKNUM) ret); + return make_number((AWKNUM) ret); } /* do_match --- match a regexp, set RSTART and RLENGTH, @@ -2172,9 +2198,9 @@ */ NODE * -do_match(NODE *tree) +do_match(int nargs) { - NODE *t1, *dest, *it; + NODE *tre, *t1, *dest, *it; int rstart, len, ii; int rlength; Regexp *rp; @@ -2186,25 +2212,23 @@ char *subsepstr; size_t subseplen; - t1 = force_string(tree_eval(tree->lnode)); - tree = tree->rnode; - rp = re_update(tree->lnode); - dest = NULL; - if (tree->rnode != NULL) { /* 3rd optional arg for the subpatterns */ - dest = get_param(tree->rnode->lnode); + if (nargs == 3) { /* 3rd optional arg for the subpatterns */ + dest = POP_PARAM(); if (dest->type != Node_var_array) fatal(_("match: third argument is not an array")); - assoc_clear(dest); } + tre = POP(); + rp = re_update(tre); + t1 = POP_STRING(); rstart = research(rp, t1->stptr, 0, t1->stlen, RE_NEED_START); if (rstart >= 0) { /* match succeded */ size_t *wc_indices = NULL; rlength = REEND(rp, t1->stptr) - RESTART(rp, t1->stptr); /* byte length */ -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (rlength > 0 && gawk_mb_cur_max > 1) { t1 = str2wstr(t1, & wc_indices); rlength = wc_indices[rstart + rlength - 1] - wc_indices[rstart] + 1; @@ -2226,11 +2250,13 @@ if ((s = SUBPATSTART(rp, t1->stptr, ii)) != -1) { size_t subpat_start; size_t subpat_len; - + NODE **lhs; + NODE *sub; + start = t1->stptr + s; subpat_start = s; subpat_len = len = SUBPATEND(rp, t1->stptr, ii) - s; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (len > 0 && gawk_mb_cur_max > 1) { subpat_start = wc_indices[s]; subpat_len = wc_indices[s + len - 1] - subpat_start + 1; @@ -2239,11 +2265,13 @@ it = make_string(start, len); it->flags |= MAYBE_NUM; /* user input */ - /* - * assoc_lookup() does free_temp() on 2nd arg. - */ - *assoc_lookup(dest, tmp_number((AWKNUM) (ii)), FALSE) = it; - + + sub = make_number((AWKNUM) (ii)); + lhs = assoc_lookup(dest, sub, FALSE); + unref(*lhs); + *lhs = it; + unref(sub); + sprintf(buff, "%d", ii); ilen = strlen(buff); amt = ilen + subseplen + strlen("length") + 2; @@ -2261,7 +2289,11 @@ slen = ilen + subseplen + 5; it = make_number((AWKNUM) subpat_start + 1); - *assoc_lookup(dest, tmp_string(buf, slen), FALSE) = it; + sub = make_string(buf, slen); + lhs = assoc_lookup(dest, sub, FALSE); + unref(*lhs); + *lhs = it; + unref(sub); memcpy(buf, buff, ilen); memcpy(buf + ilen, subsepstr, subseplen); @@ -2270,27 +2302,32 @@ slen = ilen + subseplen + 6; it = make_number((AWKNUM) subpat_len); - *assoc_lookup(dest, tmp_string(buf, slen), FALSE) = it; + sub = make_string(buf, slen); + lhs = assoc_lookup(dest, sub, FALSE); + unref(*lhs); + *lhs = it; + unref(sub); } } - free(buf); + efree(buf); } if (wc_indices != NULL) - free(wc_indices); + efree(wc_indices); } else { /* match failed */ rstart = 0; rlength = -1; } - free_temp(t1); + + DEREF(t1); unref(RSTART_node->var_value); RSTART_node->var_value = make_number((AWKNUM) rstart); unref(RLENGTH_node->var_value); RLENGTH_node->var_value = make_number((AWKNUM) rlength); - return tmp_number((AWKNUM) rstart); + return make_number((AWKNUM) rstart); } -/* sub_common --- the common code (does the work) for sub, gsub, and gensub */ +/* do_sub --- do the work for sub, gsub, and gensub */ /* * Gsub can be tricksy; particularly when handling the case of null strings. @@ -2360,40 +2397,41 @@ * 2001 standard: * * sub(ere, repl[, in ]) - * Substitute the string repl in place of the first instance of the extended regular - * expression ERE in string in and return the number of substitutions. An ampersand - * ('&') appearing in the string repl shall be replaced by the string from in that - * matches the ERE. An ampersand preceded with a backslash ('\') shall be - * interpreted as the literal ampersand character. An occurrence of two consecutive - * backslashes shall be interpreted as just a single literal backslash character. Any - * other occurrence of a backslash (for example, preceding any other character) shall - * be treated as a literal backslash character. Note that if repl is a string literal (the - * lexical token STRING; see Grammar (on page 170)), the handling of the - * ampersand character occurs after any lexical processing, including any lexical - * backslash escape sequence processing. If in is specified and it is not an lvalue (see - * Expressions in awk (on page 156)), the behavior is undefined. If in is omitted, awk - * shall use the current record ($0) in its place. + * Substitute the string repl in place of the first instance of the extended regular + * expression ERE in string in and return the number of substitutions. An ampersand + * ('&') appearing in the string repl shall be replaced by the string from in that + * matches the ERE. An ampersand preceded with a backslash ('\') shall be + * interpreted as the literal ampersand character. An occurrence of two consecutive + * backslashes shall be interpreted as just a single literal backslash character. Any + * other occurrence of a backslash (for example, preceding any other character) shall + * be treated as a literal backslash character. Note that if repl is a string literal (the + * lexical token STRING; see Grammar (on page 170)), the handling of the + * ampersand character occurs after any lexical processing, including any lexical + * backslash escape sequence processing. If in is specified and it is not an lvalue (see + * Expressions in awk (on page 156)), the behavior is undefined. If in is omitted, awk + * shall use the current record ($0) in its place. * - * Because gawk has had its behavior for 7+ years, that behavior is remaining as - * the default, with the POSIX behavior available for do_posix. Fun, fun, fun. + * 11/2010: The text in the 2008 standard is the same as just quoted. However, POSIX behavior + * is now the default. This can change the behavior of awk programs. The old behavior + * is not available. */ /* * NB: `howmany' conflicts with a SunOS 4.x macro in . */ -static NODE * -sub_common(NODE *tree, long how_many, int backdigs) +NODE * +do_sub(int nargs, unsigned int flags) { - register char *scan; - register char *bp, *cp; - char *buf; + char *scan; + char *bp, *cp; + char *buf = NULL; size_t buflen; - register char *matchend; - register size_t len; + char *matchend; + size_t len; char *matchstart; char *text; - size_t textlen; + size_t textlen = 0; char *repl; char *replend; size_t repllen; @@ -2404,47 +2442,80 @@ NODE *s; /* subst. pattern */ NODE *t; /* string to make sub. in; $0 if none given */ NODE *tmp; - NODE **lhs = &tree; /* value not used -- just different from NULL */ - int priv = FALSE; - Func_ptr after_assign = NULL; - - int global = (how_many == -1); + NODE **lhs = NULL; + long how_many = 1; /* one substitution for sub, also gensub default */ + int global; long current; int lastmatchnonzero; char *mb_indices = NULL; + + if ((flags & GENSUB) != 0) { + double d; + NODE *t1; + + tmp = PEEK(3); + rp = re_update(tmp); + + t = POP_STRING(); /* original string */ + + t1 = POP_SCALAR(); /* value of global flag */ + if ((t1->flags & (STRCUR|STRING)) != 0) { + if (t1->stlen > 0 && (t1->stptr[0] == 'g' || t1->stptr[0] == 'G')) + how_many = -1; + else { + d = force_number(t1); + + if ((t1->flags & NUMCUR) != 0) + goto set_how_many; + + how_many = 1; + } + } else { + d = force_number(t1); +set_how_many: + if (d < 1) + how_many = 1; + else if (d < LONG_MAX) + how_many = d; + else + how_many = LONG_MAX; + if (d == 0) + warning(_("gensub: third argument of 0 treated as 1")); + } + DEREF(t1); + + } else { + + /* take care of regexp early, in case re_update is fatal */ + + tmp = PEEK(2); + rp = re_update(tmp); - tmp = tree->lnode; /* regexp */ - rp = re_update(tmp); + if ((flags & GSUB) != 0) + how_many = -1; + + /* original string */ + + if ((flags & LITERAL) != 0) + t = POP_STRING(); + else { + lhs = POP_ADDRESS(); + t = force_string(*lhs); + } + } + + global = (how_many == -1); - tree = tree->rnode; /* replacement text */ - s = tree->lnode; - s = force_string(tree_eval(s)); - - tree = tree->rnode; /* original string */ - tmp = tree->lnode; - t = force_string(tree_eval(tmp)); + s = POP_STRING(); /* replacement text */ + decr_sp(); /* regexp, already updated above */ /* do the search early to avoid work on non-match */ if (research(rp, t->stptr, 0, t->stlen, RE_NEED_START) == -1 || - RESTART(rp, t->stptr) > t->stlen) { - free_temp(t); - free_temp(s); - return tmp_number((AWKNUM) 0.0); - } + RESTART(rp, t->stptr) > t->stlen) + goto done; - if (tmp->type == Node_val) - lhs = NULL; - else - lhs = get_lhs(tmp, &after_assign, FALSE); t->flags |= STRING; - /* - * create a private copy of the string - */ - if (t->stref > 1 || (t->flags & (PERM|FIELD)) != 0) { - tmp = copynode(t); - t = tmp; - priv = TRUE; - } + text = t->stptr; textlen = t->stlen; buflen = textlen + 2; @@ -2452,7 +2523,7 @@ repl = s->stptr; replend = repl + s->stlen; repllen = replend - repl; - emalloc(buf, char *, buflen + 2, "sub_common"); + emalloc(buf, char *, buflen + 2, "do_sub"); buf[buflen] = '\0'; buf[buflen + 1] = '\0'; ampersands = 0; @@ -2466,7 +2537,7 @@ * for example. */ if (gawk_mb_cur_max > 1 && repllen > 0) { - emalloc(mb_indices, char *, repllen * sizeof(char), "sub_common"); + emalloc(mb_indices, char *, repllen * sizeof(char), "do_sub"); index_multibyte_buffer(repl, mb_indices, repllen); } @@ -2476,8 +2547,8 @@ repllen--; ampersands++; } else if (*scan == '\\') { - if (backdigs) { /* gensub, behave sanely */ - if (isdigit(scan[1])) { + if (flags & GENSUB) { /* gensub, behave sanely */ + if (isdigit((unsigned char) scan[1])) { ampersands++; scan++; } else { /* \q for any q --> q */ @@ -2555,21 +2626,21 @@ */ for (scan = repl; scan < replend; scan++) if (*scan == '&' - /* - * Don't test repllen here. A simple "&" could - * end up with repllen == 0. - */ - && (gawk_mb_cur_max == 1 - || mb_indices[scan - repl] == 1) + /* + * Don't test repllen here. A simple "&" could + * end up with repllen == 0. + */ + && (gawk_mb_cur_max == 1 + || mb_indices[scan - repl] == 1) ) { - for (cp = matchstart; cp < matchend; cp++) - *bp++ = *cp; + for (cp = matchstart; cp < matchend; cp++) + *bp++ = *cp; } else if (*scan == '\\' - && (gawk_mb_cur_max == 1 - || (repllen > 0 && mb_indices[scan - repl] == 1)) + && (gawk_mb_cur_max == 1 + || (repllen > 0 && mb_indices[scan - repl] == 1)) ) { - if (backdigs) { /* gensub, behave sanely */ - if (isdigit(scan[1])) { + if (flags & GENSUB) { /* gensub, behave sanely */ + if (isdigit((unsigned char) scan[1])) { int dig = scan[1] - '0'; if (dig < NUMSUBPATS(rp, t->stptr) && SUBPATSTART(rp, tp->stptr, dig) != -1) { char *start, *end; @@ -2631,7 +2702,7 @@ textlen = text + textlen - matchend; text = matchend; - if ((current >= how_many && !global) + if ((current >= how_many && ! global) || ((long) textlen <= 0 && matchstart == matchend) || research(rp, t->stptr, text - t->stptr, textlen, RE_NEED_START) == -1) break; @@ -2640,221 +2711,66 @@ sofar = bp - buf; if (buflen - sofar - textlen - 1) { buflen = sofar + textlen + 2; - erealloc(buf, char *, buflen, "sub_common"); + erealloc(buf, char *, buflen, "do_sub"); bp = buf + sofar; } for (scan = matchend; scan < text + textlen; scan++) *bp++ = *scan; *bp = '\0'; textlen = bp - buf; - free(t->stptr); - t->stptr = buf; - t->stlen = textlen; - free_wstr(t); - t->flags &= ~(NUMCUR|NUMBER); - - free_temp(s); - if (matches > 0 && lhs) { - if (priv) { - unref(*lhs); - *lhs = t; - } - if (after_assign != NULL) - (*after_assign)(); - } - if (mb_indices != NULL) - free(mb_indices); - - return tmp_number((AWKNUM) matches); -} - -/* do_gsub --- global substitution */ - -NODE * -do_gsub(NODE *tree) -{ - return sub_common(tree, -1, FALSE); -} - -/* do_sub --- single substitution */ - -NODE * -do_sub(NODE *tree) -{ - return sub_common(tree, 1, FALSE); -} - -/* do_gensub --- fix up the tree for sub_common for the gensub function */ - -NODE * -do_gensub(NODE *tree) -{ - NODE n1, n2, n3, *t, *tmp, *target, *ret; - long how_many = 1; /* default is one substitution */ - double d; - - /* - * We have to pull out the value of the global flag, and - * build up a tree without the flag in it, turning it into the - * kind of tree that sub_common() expects. It helps to draw - * a picture of this ... - */ - n1 = *tree; - n2 = *(tree->rnode); - n1.rnode = & n2; - - t = tree_eval(n2.rnode->lnode); /* value of global flag */ - - tmp = force_string(tree_eval(n2.rnode->rnode->lnode)); /* target */ - - /* - * We make copy of the original target string, and pass that - * in to sub_common() as the target to make the substitution in. - * We will then return the result string as the return value of - * this function. - */ - target = make_string(tmp->stptr, tmp->stlen); - free_temp(tmp); - n3 = *(n2.rnode->rnode); - n3.lnode = target; - n2.rnode = & n3; + if (mb_indices != NULL) + efree(mb_indices); - if ((t->flags & (STRCUR|STRING)) != 0) { - if (t->stlen > 0 && (t->stptr[0] == 'g' || t->stptr[0] == 'G')) - how_many = -1; - else { - d = force_number(t); +done: + DEREF(s); - if ((t->flags & NUMCUR) != 0) - goto set_how_many; + if ((matches == 0 || (flags & LITERAL) != 0) && buf != NULL) + efree(buf); - how_many = 1; + if (flags & GENSUB) { + if (matches > 0) { + /* return the result string */ + DEREF(t); + return make_str_node(buf, textlen, ALREADY_MALLOCED); } - } else { - d = force_number(t); -set_how_many: - if (d < 1) - how_many = 1; - else if (d < LONG_MAX) - how_many = d; - else - how_many = LONG_MAX; - if (d == 0) - warning(_("gensub: third argument of 0 treated as 1")); - } - - free_temp(t); - - ret = sub_common(&n1, how_many, TRUE); - free_temp(ret); - - /* - * Note that we don't care what sub_common() returns, since the - * easiest thing for the programmer is to return the string, even - * if no substitutions were done. - */ - target->flags |= TEMP; - return target; -} -#ifdef GFMT_WORKAROUND -/* - * printf's %g format [can't rely on gcvt()] - * caveat: don't use as argument to *printf()! - * 'format' string HAS to be of "*.*g" kind, or we bomb! - */ -static void -sgfmt(char *buf, /* return buffer; assumed big enough to hold result */ - const char *format, - int alt, /* use alternate form flag */ - int fwidth, /* field width in a format */ - int prec, /* indicates desired significant digits, not decimal places */ - double g) /* value to format */ -{ - char dform[40]; - register char *gpos; - register char *d, *e, *p; - int again = FALSE; - - strncpy(dform, format, sizeof dform - 1); - dform[sizeof dform - 1] = '\0'; - gpos = strrchr(dform, '.'); - - if (g == 0.0 && ! alt) { /* easy special case */ - *gpos++ = 'd'; - *gpos = '\0'; - (void) sprintf(buf, dform, fwidth, 0); - return; + /* return the original string */ + return t; } - /* advance to location of 'g' in the format */ - while (*gpos && *gpos != 'g' && *gpos != 'G') - gpos++; - - if (prec <= 0) /* negative precision is ignored */ - prec = (prec < 0 ? DEFAULT_G_PRECISION : 1); - - if (*gpos == 'G') - again = TRUE; - /* start with 'e' format (it'll provide nice exponent) */ - *gpos = 'e'; - prec--; - (void) sprintf(buf, dform, fwidth, prec, g); - if ((e = strrchr(buf, 'e')) != NULL) { /* find exponent */ - int expn = atoi(e+1); /* fetch exponent */ - if (expn >= -4 && expn <= prec) { /* per K&R2, B1.2 */ - /* switch to 'f' format and re-do */ - *gpos = 'f'; - prec -= expn; /* decimal precision */ - (void) sprintf(buf, dform, fwidth, prec, g); - e = buf + strlen(buf); - while (*--e == ' ') - continue; - e++; - } - else if (again) - *gpos = 'E'; - - /* if 'alt' in force, then trailing zeros are not removed */ - if (! alt && (d = strrchr(buf, '.')) != NULL) { - /* throw away an excess of precision */ - for (p = e; p > d && *--p == '0'; ) - prec--; - if (d == p) - prec--; - if (prec < 0) - prec = 0; - /* and do that once again */ - again = TRUE; - } - if (again) - (void) sprintf(buf, dform, fwidth, prec, g); + /* For a string literal, must not change the original string. */ + if (flags & LITERAL) + DEREF(t); + else if (matches > 0) { + unref(*lhs); + *lhs = make_str_node(buf, textlen, ALREADY_MALLOCED); } + + return make_number((AWKNUM) matches); } -#endif /* GFMT_WORKAROUND */ -/* tmp_integer - Convert an integer to a temporary number node. */ + +/* make_integer - Convert an integer to a number node. */ static NODE * -tmp_integer(uintmax_t n) +make_integer(uintmax_t n) { n = adjust_uint(n); - return tmp_number((AWKNUM) n); + return make_number((AWKNUM) n); } /* do_lshift --- perform a << operation */ NODE * -do_lshift(NODE *tree) +do_lshift(int nargs) { NODE *s1, *s2; uintmax_t uval, ushift, res; AWKNUM val, shift; - s1 = tree_eval(tree->lnode); - s2 = tree_eval(tree->rnode->lnode); + POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("lshift: received non-numeric first argument")); @@ -2872,27 +2788,26 @@ lintwarn(_("lshift(%lf, %lf): too large shift value will give strange results"), val, shift); } - free_temp(s1); - free_temp(s2); + DEREF(s1); + DEREF(s2); uval = (uintmax_t) val; ushift = (uintmax_t) shift; res = uval << ushift; - return tmp_integer(res); + return make_integer(res); } /* do_rshift --- perform a >> operation */ NODE * -do_rshift(NODE *tree) +do_rshift(int nargs) { NODE *s1, *s2; uintmax_t uval, ushift, res; AWKNUM val, shift; - s1 = tree_eval(tree->lnode); - s2 = tree_eval(tree->rnode->lnode); + POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("rshift: received non-numeric first argument")); @@ -2910,27 +2825,26 @@ lintwarn(_("rshift(%lf, %lf): too large shift value will give strange results"), val, shift); } - free_temp(s1); - free_temp(s2); + DEREF(s1); + DEREF(s2); uval = (uintmax_t) val; ushift = (uintmax_t) shift; res = uval >> ushift; - return tmp_integer(res); + return make_integer(res); } /* do_and --- perform an & operation */ NODE * -do_and(NODE *tree) +do_and(int nargs) { NODE *s1, *s2; uintmax_t uleft, uright, res; AWKNUM left, right; - s1 = tree_eval(tree->lnode); - s2 = tree_eval(tree->rnode->lnode); + POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("and: received non-numeric first argument")); @@ -2946,27 +2860,26 @@ lintwarn(_("and(%lf, %lf): fractional values will be truncated"), left, right); } - free_temp(s1); - free_temp(s2); + DEREF(s1); + DEREF(s2); uleft = (uintmax_t) left; uright = (uintmax_t) right; res = uleft & uright; - return tmp_integer(res); + return make_integer(res); } /* do_or --- perform an | operation */ NODE * -do_or(NODE *tree) +do_or(int nargs) { NODE *s1, *s2; uintmax_t uleft, uright, res; AWKNUM left, right; - s1 = tree_eval(tree->lnode); - s2 = tree_eval(tree->rnode->lnode); + POP_TWO_SCALARS(s1, s2); if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("or: received non-numeric first argument")); @@ -2982,27 +2895,29 @@ lintwarn(_("or(%lf, %lf): fractional values will be truncated"), left, right); } - free_temp(s1); - free_temp(s2); + DEREF(s1); + DEREF(s2); uleft = (uintmax_t) left; uright = (uintmax_t) right; res = uleft | uright; - return tmp_integer(res); + return make_integer(res); } /* do_xor --- perform an ^ operation */ NODE * -do_xor(NODE *tree) +do_xor(int nargs) { NODE *s1, *s2; uintmax_t uleft, uright, res; AWKNUM left, right; - s1 = tree_eval(tree->lnode); - s2 = tree_eval(tree->rnode->lnode); + POP_TWO_SCALARS(s1, s2); + left = force_number(s1); + right = force_number(s2); + if (do_lint) { if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("xor: received non-numeric first argument")); @@ -3018,32 +2933,34 @@ lintwarn(_("xor(%lf, %lf): fractional values will be truncated"), left, right); } - free_temp(s1); - free_temp(s2); + DEREF(s1); + DEREF(s2); uleft = (uintmax_t) left; uright = (uintmax_t) right; res = uleft ^ uright; - return tmp_integer(res); + return make_integer(res); } /* do_compl --- perform a ~ operation */ NODE * -do_compl(NODE *tree) +do_compl(int nargs) { NODE *tmp; double d; uintmax_t uval; - tmp = tree_eval(tree->lnode); + tmp = POP_SCALAR(); if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("compl: received non-numeric argument")); d = force_number(tmp); - free_temp(tmp); + DEREF(tmp); if (do_lint) { + 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); if (double_to_int(d) != d) @@ -3052,19 +2969,18 @@ uval = (uintmax_t) d; uval = ~ uval; - return tmp_integer(uval); + return make_integer(uval); } /* do_strtonum --- the strtonum function */ NODE * -do_strtonum(NODE *tree) +do_strtonum(int nargs) { NODE *tmp; AWKNUM d; - tmp = tree_eval(tree->lnode); - + tmp = POP_SCALAR(); if ((tmp->flags & (NUMBER|NUMCUR)) != 0) d = (AWKNUM) force_number(tmp); else if (isnondecimal(tmp->stptr, use_lc_numeric)) @@ -3072,8 +2988,8 @@ else d = (AWKNUM) force_number(tmp); - free_temp(tmp); - return tmp_number((AWKNUM) d); + DEREF(tmp); + return make_number((AWKNUM) d); } /* nondec2awknum --- convert octal or hex value to double */ @@ -3137,7 +3053,7 @@ } } else if (*str == '0') { for (; len > 0; len--) { - if (! isdigit(*str)) + if (! isdigit((unsigned char) *str)) goto done; else if (*str == '8' || *str == '9') { str = start; @@ -3161,7 +3077,7 @@ #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT static int -localecategory_from_argument(NODE *tree) +localecategory_from_argument(NODE *t) { static const struct category_table { int val; @@ -3193,14 +3109,11 @@ #endif /* LC_TIME */ }; - if (tree != NULL) { + if (t != NULL) { int low, high, i, mid; - NODE *tmp, *t; char *category; int lc_cat = -1; - tmp = tree->lnode; - t = force_string(tree_eval(tmp)); category = t->stptr; /* binary search the table */ @@ -3222,7 +3135,6 @@ if (lc_cat == -1) /* not there */ fatal(_("dcgettext: `%s' is not a valid locale category"), category); - free_temp(t); return lc_cat; } else return LC_MESSAGES; @@ -3240,94 +3152,108 @@ */ NODE * -do_dcgettext(NODE *tree) +do_dcgettext(int nargs) { - NODE *tmp, *t1, *t2; + NODE *tmp, *t1, *t2 = NULL; char *string; char *the_result; #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; -#endif /* ENABLE_NLS */ - tmp = tree->lnode; /* first argument */ - t1 = force_string(tree_eval(tmp)); - string = t1->stptr; + if (nargs == 3) { /* third argument */ + tmp = POP_STRING(); + lc_cat = localecategory_from_argument(tmp); + DEREF(tmp); + } else + lc_cat = LC_MESSAGES; - t2 = NULL; -#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT - tree = tree->rnode; /* second argument */ - if (tree != NULL) { - tmp = tree->lnode; - t2 = force_string(tree_eval(tmp)); + if (nargs >= 2) { /* second argument */ + t2 = POP_STRING(); domain = t2->stptr; } else domain = TEXTDOMAIN; +#else + if (nargs == 3) { + tmp = POP_STRING(); + DEREF(tmp); + } + if (nargs >= 2) { + t2 = POP_STRING(); + DEREF(t2); + } +#endif - if (tree && tree->rnode != NULL) { /* third argument */ - lc_cat = localecategory_from_argument(tree->rnode); - } else - lc_cat = LC_MESSAGES; + t1 = POP_STRING(); /* first argument */ + string = t1->stptr; +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT the_result = dcgettext(domain, string, lc_cat); + if (t2 != NULL) + DEREF(t2); #else the_result = string; #endif - free_temp(t1); - if (t2 != NULL) - free_temp(t2); - - return tmp_string(the_result, strlen(the_result)); + DEREF(t1); + return make_string(the_result, strlen(the_result)); } + NODE * -do_dcngettext(NODE *tree) +do_dcngettext(int nargs) { NODE *tmp, *t1, *t2, *t3; char *string1, *string2; unsigned long number; + AWKNUM d; char *the_result; + #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; -#endif /* ENABLE_NLS */ - - tmp = tree->lnode; /* first argument */ - t1 = force_string(tree_eval(tmp)); - string1 = t1->stptr; - tmp = tree->rnode->lnode; /* second argument */ - t2 = force_string(tree_eval(tmp)); - string2 = t2->stptr; - - tmp = tree->rnode->rnode->lnode; /* third argument */ - number = (unsigned long) double_to_int(force_number(tree_eval(tmp))); + if (nargs == 5) { /* fifth argument */ + tmp = POP_STRING(); + lc_cat = localecategory_from_argument(tmp); + DEREF(tmp); + } else + lc_cat = LC_MESSAGES; t3 = NULL; -#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT - tree = tree->rnode->rnode->rnode; /* fourth argument */ - if (tree != NULL) { - tmp = tree->lnode; - t3 = force_string(tree_eval(tmp)); + if (nargs >= 4) { /* fourth argument */ + t3 = POP_STRING(); domain = t3->stptr; } else domain = TEXTDOMAIN; +#else + if (nargs == 5) { + tmp = POP_STRING(); + DEREF(tmp); + } + if (nargs >= 4) { + t3 = POP_STRING(); + DEREF(t3); + } +#endif - if (tree && tree->rnode != NULL) { /* fifth argument */ - lc_cat = localecategory_from_argument(tree->rnode); - } else - lc_cat = LC_MESSAGES; + POP_NUMBER(d); /* third argument */ + number = (unsigned long) double_to_int(d); + t2 = POP_STRING(); /* second argument */ + string2 = t2->stptr; + t1 = POP_STRING(); /* first argument */ + string1 = t1->stptr; + +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT the_result = dcngettext(domain, string1, string2, number, lc_cat); + if (t3 != NULL) + DEREF(t3); #else the_result = (number == 1 ? string1 : string2); #endif - free_temp(t1); - free_temp(t2); - if (t3 != NULL) - free_temp(t3); - - return tmp_string(the_result, strlen(the_result)); + DEREF(t1); + DEREF(t2); + return make_string(the_result, strlen(the_result)); } /* do_bindtextdomain --- set the directory for a text domain */ @@ -3342,44 +3268,43 @@ */ NODE * -do_bindtextdomain(NODE *tree) +do_bindtextdomain(int nargs) { - NODE *tmp, *t1, *t2; - char *directory, *domain; - char *the_result; + NODE *t1, *t2; + const char *directory, *domain; + const char *the_result; t1 = t2 = NULL; /* set defaults */ directory = NULL; domain = TEXTDOMAIN; - tmp = tree->lnode; /* first argument */ - t1 = force_string(tree_eval(tmp)); - if (t1->stlen > 0) - directory = t1->stptr; - - tree = tree->rnode; /* second argument */ - if (tree != NULL) { - tmp = tree->lnode; - t2 = force_string(tree_eval(tmp)); - domain = t2->stptr; + if (nargs == 2) { /* second argument */ + t2 = POP_STRING(); + domain = (const char *) t2->stptr; } + /* first argument */ + t1 = POP_STRING(); + if (t1->stlen > 0) + directory = (const char *) t1->stptr; + the_result = bindtextdomain(domain, directory); - free_temp(t1); + DEREF(t1); if (t2 != NULL) - free_temp(t2); + DEREF(t2); - return tmp_string(the_result, strlen(the_result)); + return make_string(the_result, strlen(the_result)); } + /* mbc_byte_count --- return number of bytes for corresponding numchars multibyte characters */ static size_t mbc_byte_count(const char *ptr, size_t numchars) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT mbstate_t cur_state; size_t sum = 0; int mb_len; @@ -3410,16 +3335,16 @@ static size_t mbc_char_count(const char *ptr, size_t numbytes) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT mbstate_t cur_state; size_t sum = 0; int mb_len; - memset(& cur_state, 0, sizeof(cur_state)); - if (gawk_mb_cur_max == 1) return numbytes; + memset(& cur_state, 0, sizeof(cur_state)); + mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state); if (mb_len <= 0) return numbytes; /* no valid m.b. char */ diff -Nru gawk-3.1.8+dfsg/cmd.h gawk-4.0.1+dfsg/cmd.h --- gawk-3.1.8+dfsg/cmd.h 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/cmd.h 2012-03-28 19:47:53.000000000 +0000 @@ -0,0 +1,213 @@ +/* + * cmd.h - definitions for command parser + */ + +/* + * Copyright (C) 2004, 2010, 2011 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 + */ + +#ifdef HAVE_LIBREADLINE +#include +#include +extern char **command_completion(const char *text, int start, int end); +extern void initialize_pager(FILE *fp); /* debug.c */ +extern NODE **get_varlist(void); +extern char **get_parmlist(void); +#else +#define initialize_pager(x) /* nothing */ +#define add_history(x) /* nothing */ +#endif + +extern int gprintf(FILE *fp, const char *format, ...); +extern jmp_buf pager_quit_tag; +extern int pager_quit_tag_valid; + +extern int output_is_tty; +extern int input_fd; +extern int input_from_tty; +extern FILE *out_fp; +extern char *dPrompt; +extern char *commands_Prompt; +extern char *eval_Prompt; +extern char *dgawk_Prompt; + +enum argtype { + D_illegal, + + /* commands */ + D_backtrace, + D_break, + D_clear, + D_commands, + D_condition, + D_continue, + D_delete, + D_disable, + D_display, + D_down, + D_dump, + D_enable, + D_end, + D_eval, + D_finish, + D_frame, + D_help, + D_ignore, + D_info, + D_list, + D_next, + D_nexti, + D_option, + D_print, + D_printf, + D_quit, + D_return, + D_run, + D_save, + D_set, + D_silent, + D_source, + D_step, + D_stepi, + D_tbreak, + D_trace, + D_undisplay, + D_until, + D_unwatch, + D_up, + D_watch, + + /* arguments */ + D_argument, + D_int, + D_string, + D_variable, + D_node, + D_field, + D_array, + D_subscript, + D_func, + D_range +}; + +/* non-number arguments to commands */ + +enum nametypeval { + A_ARGS = 1, + A_BREAK, + A_DEL, + A_DISPLAY, + A_FRAME, + A_FUNCTIONS, + A_LOCALS, + A_ONCE, + A_SOURCE, + A_SOURCES, + A_TRACE_ON, + A_TRACE_OFF, + A_VARIABLES, + A_WATCH +}; + +typedef struct cmd_argument { + struct cmd_argument *next; + enum argtype type; + union { + long lval; + char *sval; + NODE *nodeval; + } value; + +#define a_int value.lval /* type = D_int or D_range */ +#define a_argument value.lval /* type = D_argument */ +#define a_string value.sval /* type = D_string, D_array, D_subscript or D_variable */ +#define a_node value.nodeval /* type = D_node, D_field or D_func */ + + int a_count; /* subscript count for D_subscript and D_array */ +} CMDARG; + +typedef int (*Func_cmd)(CMDARG *, int); + +struct cmdtoken { + const char *name; + char *abbrvn; /* abbreviation */ + enum argtype type; + int class; + Func_cmd cf_ptr; + const char *help_txt; +}; + +/* command.c */ +extern void free_cmdarg(CMDARG *list); +extern Func_cmd get_command(int ctype); +extern const char *get_command_name(int ctype); + +/* debug.c */ +extern void d_error(const char *mesg, ...); + +/* command.c */ +extern int find_option(char *name); +extern void option_help(void); +extern char *(*read_a_line)(const char *prompt); +extern char *read_commands_string(const char *prompt); +extern int in_cmd_src(const char *); +extern int get_eof_status(void); +extern void push_cmd_src(int fd, int istty, char * (*readfunc)(const char *), int (*closefunc)(int), int cmd, int eofstatus); +extern int pop_cmd_src(void); +extern int has_break_or_watch_point(int *pnum, int any); +extern int do_list(CMDARG *arg, int cmd); +extern int do_info(CMDARG *arg, int cmd); +extern int do_print_var(CMDARG *arg, int cmd); +extern int do_backtrace(CMDARG *arg, int cmd); +extern int do_breakpoint(CMDARG *arg, int cmd); +extern int do_tmp_breakpoint(CMDARG *arg, int cmd); +extern int do_delete_breakpoint(CMDARG *arg, int cmd); +extern int do_enable_breakpoint(CMDARG *arg, int cmd); +extern int do_disable_breakpoint(CMDARG *arg, int cmd) ; +extern int do_ignore_breakpoint(CMDARG *arg, int cmd) ; +extern int do_run(CMDARG *arg, int cmd); +extern int do_quit(CMDARG *arg, int cmd); +extern int do_continue(CMDARG *arg, int cmd); +extern int do_step(CMDARG *arg, int cmd) ; +extern int do_stepi(CMDARG *arg, int cmd) ; +extern int do_next(CMDARG *arg, int cmd); +extern int do_nexti(CMDARG *arg, int cmd); +extern int do_clear(CMDARG *arg, int cmd); +extern int do_finish(CMDARG *arg, int cmd) ; +extern int do_help(CMDARG *arg, int cmd) ; +extern int do_up(CMDARG *arg, int cmd); +extern int do_down(CMDARG *arg, int cmd); +extern int do_frame(CMDARG *arg, int cmd); +extern int do_until(CMDARG *arg, int cmd); +extern int do_set_var(CMDARG *arg, int cmd); +extern int do_return(CMDARG *arg, int cmd); +extern int do_display(CMDARG *arg, int cmd); +extern int do_undisplay(CMDARG *arg, int cmd); +extern int do_watch(CMDARG *arg, int cmd); +extern int do_unwatch(CMDARG *arg, int cmd); +extern int do_dump_instructions(CMDARG *arg, int cmd); +extern int do_trace_instruction(CMDARG *arg, int cmd); +extern int do_option(CMDARG *arg, int cmd); +extern int do_commands(CMDARG *arg, int cmd); +extern int do_print_f(CMDARG *arg, int cmd); +extern int do_source(CMDARG *arg, int cmd); +extern int do_save(CMDARG *arg, int cmd); +extern int do_eval(CMDARG *arg, int cmd); +extern int do_condition(CMDARG *arg, int cmd); diff -Nru gawk-3.1.8+dfsg/command.c gawk-4.0.1+dfsg/command.c --- gawk-3.1.8+dfsg/command.c 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/command.c 2012-03-28 20:03:35.000000000 +0000 @@ -0,0 +1,3695 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 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 3 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, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ +#define yyparse zzparse +#define yylex zzlex +#define yyerror zzerror +#define yylval zzlval +#define yychar zzchar +#define yydebug zzdebug +#define yynerrs zznerrs + + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 26 "command.y" + +#include "awk.h" +#include "cmd.h" + +#if 0 +#define YYDEBUG 12 +int yydebug = 2; +#endif + +static int yylex(void); +static void yyerror(const char *mesg, ...); + +static int find_command(const char *token, size_t toklen); + +static int want_nodeval = FALSE; + +static int cmd_idx = -1; /* index of current command in cmd table */ +static int repeat_idx = -1; /* index of last repeatable command in command table */ +static CMDARG *arg_list = NULL; /* list of arguments */ +static long errcount = 0; +static char *lexptr_begin = NULL; +static int in_commands = FALSE; +static int num_dim; + +static int in_eval = FALSE; +static const char start_EVAL[] = "function @eval(){"; +static const char end_EVAL[] = "}"; +static CMDARG *append_statement(CMDARG *alist, char *stmt); +static char *next_word(char *p, int len, char **endp); +static NODE *concat_args(CMDARG *a, int count); + +#ifdef HAVE_LIBREADLINE +static void history_expand_line(char **line); +static char *command_generator(const char *text, int state); +static char *srcfile_generator(const char *text, int state); +static char *argument_generator(const char *text, int state); +static char *variable_generator(const char *text, int state); +extern char *option_generator(const char *text, int state); +static int this_cmd = D_illegal; +#else +#define history_expand_line(p) /* nothing */ +static int rl_inhibit_completion; /* dummy variable */ +#endif + +struct argtoken { + const char *name; + enum argtype cmd; + enum nametypeval value; +}; + +/* + * These two should be static, but there are some compilers that + * don't like the static keyword with an empty size. Therefore give + * them names that are less likely to conflict with the rest of gawk. + */ +#define argtab zz_debug_argtab +#define cmdtab zz_debug_cmdtab + +extern struct argtoken argtab[]; +extern struct cmdtoken cmdtab[]; + +static CMDARG *mk_cmdarg(enum argtype type); +static void append_cmdarg(CMDARG *arg); +static int find_argument(CMDARG *arg); +#define YYSTYPE CMDARG * + + +/* Line 268 of yacc.c */ +#line 147 "command.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + D_BACKTRACE = 258, + D_BREAK = 259, + D_CLEAR = 260, + D_CONTINUE = 261, + D_DELETE = 262, + D_DISABLE = 263, + D_DOWN = 264, + D_ENABLE = 265, + D_FINISH = 266, + D_FRAME = 267, + D_HELP = 268, + D_IGNORE = 269, + D_INFO = 270, + D_LIST = 271, + D_NEXT = 272, + D_NEXTI = 273, + D_PRINT = 274, + D_PRINTF = 275, + D_QUIT = 276, + D_RETURN = 277, + D_RUN = 278, + D_SET = 279, + D_STEP = 280, + D_STEPI = 281, + D_TBREAK = 282, + D_UP = 283, + D_UNTIL = 284, + D_DISPLAY = 285, + D_UNDISPLAY = 286, + D_WATCH = 287, + D_UNWATCH = 288, + D_DUMP = 289, + D_TRACE = 290, + D_INT = 291, + D_STRING = 292, + D_NODE = 293, + D_VARIABLE = 294, + D_OPTION = 295, + D_COMMANDS = 296, + D_END = 297, + D_SILENT = 298, + D_SOURCE = 299, + D_SAVE = 300, + D_EVAL = 301, + D_CONDITION = 302, + D_STATEMENT = 303 + }; +#endif +/* Tokens. */ +#define D_BACKTRACE 258 +#define D_BREAK 259 +#define D_CLEAR 260 +#define D_CONTINUE 261 +#define D_DELETE 262 +#define D_DISABLE 263 +#define D_DOWN 264 +#define D_ENABLE 265 +#define D_FINISH 266 +#define D_FRAME 267 +#define D_HELP 268 +#define D_IGNORE 269 +#define D_INFO 270 +#define D_LIST 271 +#define D_NEXT 272 +#define D_NEXTI 273 +#define D_PRINT 274 +#define D_PRINTF 275 +#define D_QUIT 276 +#define D_RETURN 277 +#define D_RUN 278 +#define D_SET 279 +#define D_STEP 280 +#define D_STEPI 281 +#define D_TBREAK 282 +#define D_UP 283 +#define D_UNTIL 284 +#define D_DISPLAY 285 +#define D_UNDISPLAY 286 +#define D_WATCH 287 +#define D_UNWATCH 288 +#define D_DUMP 289 +#define D_TRACE 290 +#define D_INT 291 +#define D_STRING 292 +#define D_NODE 293 +#define D_VARIABLE 294 +#define D_OPTION 295 +#define D_COMMANDS 296 +#define D_END 297 +#define D_SILENT 298 +#define D_SOURCE 299 +#define D_SAVE 300 +#define D_EVAL 301 +#define D_CONDITION 302 +#define D_STATEMENT 303 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 343 of yacc.c */ +#line 285 "command.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow && (! defined __cplusplus || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 203 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 59 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 55 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 156 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 203 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 303 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 58, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 57, 2, 2, 2, + 2, 2, 2, 53, 50, 54, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 51, 2, + 2, 49, 2, 2, 52, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 55, 2, 56, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 4, 7, 9, 12, 15, 17, 19, + 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, + 41, 43, 45, 46, 51, 52, 53, 58, 62, 66, + 69, 71, 73, 75, 78, 81, 84, 88, 91, 92, + 96, 97, 101, 104, 107, 110, 113, 114, 120, 123, + 124, 128, 129, 133, 134, 139, 142, 145, 148, 151, + 154, 156, 158, 161, 162, 167, 169, 171, 173, 175, + 176, 178, 180, 183, 187, 189, 190, 192, 194, 196, + 197, 199, 203, 205, 206, 208, 210, 214, 218, 219, + 220, 224, 226, 227, 233, 237, 238, 240, 241, 243, + 244, 246, 247, 249, 251, 254, 256, 259, 263, 265, + 268, 272, 274, 276, 278, 280, 284, 286, 287, 289, + 291, 293, 295, 297, 301, 305, 309, 313, 314, 316, + 318, 320, 322, 325, 328, 330, 334, 336, 340, 344, + 346, 349, 351, 354, 357, 359, 362, 365, 366, 368, + 369, 371, 373, 376, 378, 381, 384 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 60, 0, -1, -1, 60, 61, -1, 113, -1, 71, + 113, -1, 1, 113, -1, 6, -1, 17, -1, 18, + -1, 25, -1, 26, -1, 31, -1, 33, -1, 8, + -1, 7, -1, 28, -1, 9, -1, 3, -1, 12, + -1, 4, -1, 27, -1, -1, 46, 66, 81, 113, + -1, -1, -1, 68, 48, 69, 113, -1, 67, 68, + 42, -1, 46, 66, 84, -1, 13, 94, -1, 21, + -1, 23, -1, 11, -1, 62, 109, -1, 64, 110, + -1, 15, 37, -1, 14, 111, 36, -1, 10, 95, + -1, -1, 19, 72, 97, -1, -1, 20, 73, 99, + -1, 16, 100, -1, 29, 87, -1, 5, 87, -1, + 65, 88, -1, -1, 24, 74, 107, 49, 108, -1, + 40, 85, -1, -1, 22, 75, 93, -1, -1, 30, + 76, 91, -1, -1, 32, 77, 107, 79, -1, 63, + 102, -1, 34, 92, -1, 44, 37, -1, 45, 37, + -1, 41, 80, -1, 42, -1, 43, -1, 35, 37, + -1, -1, 47, 111, 78, 79, -1, 70, -1, 83, + -1, 109, -1, 1, -1, -1, 82, -1, 39, -1, + 82, 39, -1, 82, 50, 39, -1, 1, -1, -1, + 84, -1, 1, -1, 38, -1, -1, 37, -1, 37, + 49, 37, -1, 37, -1, -1, 111, -1, 86, -1, + 37, 51, 111, -1, 37, 51, 86, -1, -1, -1, + 111, 89, 79, -1, 86, -1, -1, 37, 51, 111, + 90, 79, -1, 37, 51, 86, -1, -1, 107, -1, + -1, 37, -1, -1, 108, -1, -1, 37, -1, 102, + -1, 37, 102, -1, 107, -1, 52, 39, -1, 52, + 39, 106, -1, 96, -1, 97, 96, -1, 97, 50, + 96, -1, 1, -1, 38, -1, 107, -1, 98, -1, + 99, 50, 98, -1, 1, -1, -1, 53, -1, 54, + -1, 111, -1, 86, -1, 101, -1, 37, 51, 111, + -1, 37, 51, 86, -1, 37, 51, 101, -1, 111, + 54, 111, -1, -1, 103, -1, 1, -1, 111, -1, + 101, -1, 103, 111, -1, 103, 101, -1, 108, -1, + 104, 50, 108, -1, 1, -1, 55, 104, 56, -1, + 55, 104, 1, -1, 105, -1, 106, 105, -1, 39, + -1, 57, 38, -1, 39, 106, -1, 38, -1, 53, + 38, -1, 54, 38, -1, -1, 111, -1, -1, 112, + -1, 36, -1, 53, 36, -1, 36, -1, 53, 36, + -1, 54, 36, -1, 58, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 106, 106, 108, 126, 127, 177, 184, 185, 186, + 187, 188, 192, 193, 194, 195, 199, 200, 201, 202, + 206, 207, 212, 216, 235, 242, 242, 249, 265, 279, + 280, 281, 282, 283, 284, 290, 302, 303, 304, 304, + 305, 305, 306, 307, 308, 309, 310, 310, 311, 312, + 312, 313, 313, 314, 314, 315, 316, 317, 322, 327, + 353, 363, 368, 380, 380, 388, 402, 415, 416, 422, + 423, 427, 428, 429, 430, 436, 437, 438, 443, 454, + 455, 460, 468, 485, 486, 487, 488, 489, 494, 495, + 495, 496, 497, 497, 498, 503, 504, 509, 510, 515, + 516, 519, 521, 525, 526, 541, 542, 547, 555, 556, + 557, 558, 562, 563, 567, 568, 569, 574, 575, 577, + 584, 585, 586, 587, 588, 589, 593, 606, 607, 608, + 612, 613, 614, 615, 619, 621, 623, 627, 642, 646, + 648, 653, 654, 663, 673, 675, 682, 695, 696, 702, + 703, 708, 714, 723, 725, 727, 735 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "D_BACKTRACE", "D_BREAK", "D_CLEAR", + "D_CONTINUE", "D_DELETE", "D_DISABLE", "D_DOWN", "D_ENABLE", "D_FINISH", + "D_FRAME", "D_HELP", "D_IGNORE", "D_INFO", "D_LIST", "D_NEXT", "D_NEXTI", + "D_PRINT", "D_PRINTF", "D_QUIT", "D_RETURN", "D_RUN", "D_SET", "D_STEP", + "D_STEPI", "D_TBREAK", "D_UP", "D_UNTIL", "D_DISPLAY", "D_UNDISPLAY", + "D_WATCH", "D_UNWATCH", "D_DUMP", "D_TRACE", "D_INT", "D_STRING", + "D_NODE", "D_VARIABLE", "D_OPTION", "D_COMMANDS", "D_END", "D_SILENT", + "D_SOURCE", "D_SAVE", "D_EVAL", "D_CONDITION", "D_STATEMENT", "'='", + "','", "':'", "'@'", "'+'", "'-'", "'['", "']'", "'$'", "'\\n'", + "$accept", "input", "line", "control_cmd", "d_cmd", "frame_cmd", + "break_cmd", "set_want_nodeval", "eval_prologue", "statement_list", "@1", + "eval_cmd", "command", "$@2", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", + "condition_exp", "commands_arg", "opt_param_list", "param_list", + "opt_string_node", "string_node", "option_args", "func_name", "location", + "break_args", "$@9", "$@10", "opt_variable", "opt_string", "opt_node", + "help_args", "enable_args", "print_exp", "print_args", "printf_exp", + "printf_args", "list_args", "integer_range", "opt_integer_list", + "integer_list", "exp_list", "subscript", "subscript_list", "variable", + "node", "opt_plus_integer", "opt_integer", "plus_integer", "integer", + "nls", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 61, + 44, 58, 64, 43, 45, 91, 93, 36, 10 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 59, 60, 60, 61, 61, 61, 62, 62, 62, + 62, 62, 63, 63, 63, 63, 64, 64, 64, 64, + 65, 65, 66, 67, 68, 69, 68, 70, 70, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 72, 71, + 73, 71, 71, 71, 71, 71, 74, 71, 71, 75, + 71, 76, 71, 77, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 78, 71, 71, 79, 80, 80, 81, + 81, 82, 82, 82, 82, 83, 83, 83, 84, 85, + 85, 85, 86, 87, 87, 87, 87, 87, 88, 89, + 88, 88, 90, 88, 88, 91, 91, 92, 92, 93, + 93, 94, 94, 95, 95, 96, 96, 96, 97, 97, + 97, 97, 98, 98, 99, 99, 99, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 101, 102, 102, 102, + 103, 103, 103, 103, 104, 104, 104, 105, 105, 106, + 106, 107, 107, 107, 108, 108, 108, 109, 109, 110, + 110, 111, 111, 112, 112, 112, 113 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 4, 0, 0, 4, 3, 3, 2, + 1, 1, 1, 2, 2, 2, 3, 2, 0, 3, + 0, 3, 2, 2, 2, 2, 0, 5, 2, 0, + 3, 0, 3, 0, 4, 2, 2, 2, 2, 2, + 1, 1, 2, 0, 4, 1, 1, 1, 1, 0, + 1, 1, 2, 3, 1, 0, 1, 1, 1, 0, + 1, 3, 1, 0, 1, 1, 3, 3, 0, 0, + 3, 1, 0, 5, 3, 0, 1, 0, 1, 0, + 1, 0, 1, 1, 2, 1, 2, 3, 1, 2, + 3, 1, 1, 1, 1, 3, 1, 0, 1, 1, + 1, 1, 1, 3, 3, 3, 3, 0, 1, 1, + 1, 1, 2, 2, 1, 3, 1, 3, 3, 1, + 2, 1, 2, 2, 1, 2, 2, 0, 1, 0, + 1, 1, 2, 1, 2, 2, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 0, 18, 20, 83, 7, 15, 14, + 17, 0, 32, 19, 101, 0, 0, 117, 8, 9, + 38, 40, 30, 49, 31, 46, 10, 11, 21, 16, + 83, 51, 12, 53, 13, 97, 0, 79, 0, 60, + 61, 0, 0, 22, 0, 156, 3, 147, 0, 149, + 88, 24, 65, 0, 4, 6, 151, 82, 0, 85, + 44, 84, 129, 0, 37, 131, 103, 128, 130, 102, + 29, 0, 35, 82, 118, 119, 121, 42, 122, 120, + 0, 0, 99, 0, 43, 95, 0, 98, 56, 62, + 80, 48, 68, 59, 67, 148, 57, 58, 0, 63, + 33, 55, 153, 0, 0, 34, 150, 82, 91, 45, + 89, 0, 5, 0, 152, 104, 133, 132, 0, 36, + 0, 111, 141, 0, 0, 108, 39, 105, 116, 112, + 114, 41, 113, 144, 0, 0, 50, 100, 0, 52, + 96, 0, 0, 74, 78, 71, 0, 70, 28, 0, + 154, 155, 0, 0, 27, 25, 82, 87, 86, 126, + 124, 125, 123, 0, 139, 143, 106, 142, 0, 109, + 0, 145, 146, 0, 77, 54, 66, 76, 81, 23, + 72, 0, 64, 94, 92, 90, 0, 136, 0, 134, + 140, 107, 110, 115, 47, 73, 0, 26, 138, 0, + 137, 93, 135 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 46, 47, 48, 49, 50, 98, 51, 111, + 186, 52, 53, 80, 81, 83, 82, 85, 86, 149, + 175, 93, 146, 147, 176, 177, 91, 59, 60, 109, + 153, 196, 139, 88, 136, 70, 64, 125, 126, 130, + 131, 77, 65, 66, 67, 188, 164, 165, 127, 137, + 94, 105, 68, 106, 54 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -151 +static const yytype_int16 yypact[] = +{ + -151, 145, -151, -34, -151, -151, 50, -151, -151, -151, + -151, 10, -151, -151, -10, 59, -9, 43, -151, -151, + -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, + 50, -151, -151, -151, -151, -8, -6, 14, 12, -151, + -151, 22, 23, -151, 59, -151, -151, 59, 13, 36, + 64, -151, -151, -34, -151, -151, -151, 24, 47, -151, + -151, -151, -151, 13, -151, -151, -151, 59, 48, -151, + -151, 80, -151, 67, 47, -151, -151, -151, -151, 48, + 4, 19, 69, -20, -151, -20, -20, -151, -151, -151, + 70, -151, -151, -151, -151, -151, -151, -151, 16, -151, + -151, -151, -151, 84, 85, -151, -151, 73, -151, -151, + -151, 40, -151, 74, -151, -151, -151, 48, 59, -151, + 74, -151, 71, 89, 91, -151, 42, -151, -151, -151, + -151, 81, -151, -151, 92, 94, -151, -151, 86, -151, + -151, 6, 96, -151, -151, -151, -34, 75, -151, 6, + -151, -151, 74, 6, -151, -151, -151, -151, -151, -151, + -151, -151, 48, 31, -151, 71, 71, -151, 52, -151, + -17, -151, -151, 69, -151, -151, -151, -151, -151, -151, + -151, 95, -151, -151, -151, -151, -34, -151, 17, -151, + -151, 71, -151, -151, -151, -151, 6, -151, -151, 69, + -151, -151, -151 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, + -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, + -119, -151, -151, -151, -151, 38, -151, -15, 108, -151, + -151, -151, -151, -151, -151, -151, -151, -90, -151, -31, + -151, -151, -14, -25, -151, -151, -150, -26, -77, -147, + 97, -151, -5, -151, -3 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -148 +static const yytype_int16 yytable[] = +{ + 55, 61, 76, 78, 132, 121, 138, 174, 140, 141, + 71, 62, 79, 92, 62, 190, 189, 143, 198, 122, + 128, 129, 122, 101, 45, 61, 194, 69, 72, 87, + 182, 89, 187, 95, 185, 108, 169, 124, 115, 99, + 124, 190, 95, 122, 144, 110, 56, 63, 56, 56, + 112, 90, 202, 116, 144, 145, 123, 129, 122, 96, + 97, 124, 117, 58, -75, 58, 58, 199, -127, 133, + -147, -127, 102, 200, -69, 113, 124, 201, 192, 56, + 73, 122, 154, 114, 134, 135, 56, 57, 155, 103, + 104, 122, 168, 132, 123, 56, 74, 75, 157, 124, + 56, 107, 118, 58, 123, 160, 161, 133, 158, 124, + 56, 156, 58, 159, 180, 162, 119, 58, 120, 142, + 150, 151, 134, 135, 152, 181, 163, 58, 166, 167, + 171, 170, 172, 178, 195, 173, 148, 183, 84, 193, + 191, 0, 0, 179, 100, 2, 3, 184, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 0, 0, 197, 0, 37, 38, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 45 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-151)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_int16 yycheck[] = +{ + 3, 6, 17, 17, 81, 1, 83, 1, 85, 86, + 15, 1, 17, 1, 1, 165, 163, 1, 1, 39, + 1, 38, 39, 48, 58, 30, 173, 37, 37, 37, + 149, 37, 1, 38, 153, 50, 126, 57, 63, 44, + 57, 191, 47, 39, 38, 50, 36, 37, 36, 36, + 53, 37, 199, 67, 38, 39, 52, 38, 39, 37, + 37, 57, 67, 53, 58, 53, 53, 50, 58, 38, + 58, 58, 36, 56, 58, 51, 57, 196, 168, 36, + 37, 39, 42, 36, 53, 54, 36, 37, 48, 53, + 54, 39, 50, 170, 52, 36, 53, 54, 113, 57, + 36, 37, 54, 53, 52, 120, 120, 38, 113, 57, + 36, 37, 53, 118, 39, 120, 36, 53, 51, 49, + 36, 36, 53, 54, 51, 50, 55, 53, 39, 38, + 38, 50, 38, 37, 39, 49, 98, 152, 30, 170, + 166, -1, -1, 146, 47, 0, 1, 152, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, -1, -1, 186, -1, 40, 41, 42, 43, 44, + 45, 46, 47, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 58 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 60, 0, 1, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 40, 41, 42, + 43, 44, 45, 46, 47, 58, 61, 62, 63, 64, + 65, 67, 70, 71, 113, 113, 36, 37, 53, 86, + 87, 111, 1, 37, 95, 101, 102, 103, 111, 37, + 94, 111, 37, 37, 53, 54, 86, 100, 101, 111, + 72, 73, 75, 74, 87, 76, 77, 37, 92, 37, + 37, 85, 1, 80, 109, 111, 37, 37, 66, 111, + 109, 102, 36, 53, 54, 110, 112, 37, 86, 88, + 111, 68, 113, 51, 36, 102, 101, 111, 54, 36, + 51, 1, 39, 52, 57, 96, 97, 107, 1, 38, + 98, 99, 107, 38, 53, 54, 93, 108, 107, 91, + 107, 107, 49, 1, 38, 39, 81, 82, 84, 78, + 36, 36, 51, 89, 42, 48, 37, 86, 111, 111, + 86, 101, 111, 55, 105, 106, 39, 38, 50, 96, + 50, 38, 38, 49, 1, 79, 83, 84, 37, 113, + 39, 50, 79, 86, 111, 79, 69, 1, 104, 108, + 105, 106, 96, 98, 108, 39, 90, 113, 1, 50, + 56, 79, 108 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* This macro is provided for backward compatibility. */ + +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 3: + +/* Line 1806 of yacc.c */ +#line 109 "command.y" + { + cmd_idx = -1; + want_nodeval = FALSE; + if (lexptr_begin != NULL) { + if (input_from_tty && lexptr_begin[0] != '\0') + add_history(lexptr_begin); + efree(lexptr_begin); + lexptr_begin = NULL; + } + if (arg_list != NULL) { + free_cmdarg(arg_list); + arg_list = NULL; + } + } + break; + + case 5: + +/* Line 1806 of yacc.c */ +#line 128 "command.y" + { + if (errcount == 0 && cmd_idx >= 0) { + Func_cmd cmdfunc; + int terminate = FALSE; + CMDARG *args; + int ctype = 0; + + ctype = cmdtab[cmd_idx].type; + + /* a blank line repeats previous command + * (list, next, nexti, step, stepi and continue without arguments). + * save the index in the command table; used in yylex + */ + if ((ctype == D_list + || ctype == D_next + || ctype == D_step + || ctype == D_nexti + || ctype == D_stepi + || ctype == D_continue) + && arg_list == NULL + && ! in_commands + && input_from_tty + ) + repeat_idx = cmd_idx; + else + repeat_idx = -1; + + /* call the command handler; reset the globals arg_list, cmd_idx, + * since this handler could invoke yyparse again. + * call do_commands for the list of commands in `commands'; + * arg_list isn't freed on return. + */ + + cmdfunc = cmdtab[cmd_idx].cf_ptr; + if (in_commands) + cmdfunc = do_commands; + cmd_idx = -1; + want_nodeval = FALSE; + + args = arg_list; + arg_list = NULL; + + terminate = (*cmdfunc)(args, ctype); + if (! in_commands || ctype == D_commands) + free_cmdarg(args); + if (terminate) + YYACCEPT; + } + } + break; + + case 6: + +/* Line 1806 of yacc.c */ +#line 178 "command.y" + { + yyerrok; + } + break; + + case 22: + +/* Line 1806 of yacc.c */ +#line 212 "command.y" + { want_nodeval = TRUE; } + break; + + case 23: + +/* Line 1806 of yacc.c */ +#line 217 "command.y" + { + if (errcount == 0) { + /* don't free arg_list; passed on to statement_list + * non-terminal (empty rule action). See below. + */ + if (input_from_tty) { + dPrompt = eval_Prompt; + fprintf(out_fp, _("Type (g)awk statement(s). End with the command \"end\"\n")); + rl_inhibit_completion = 1; + } + cmd_idx = -1; + in_eval = TRUE; + } + } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 235 "command.y" + { + (yyval) = append_statement(arg_list, (char *) start_EVAL); + if (read_a_line == read_commands_string) /* unserializing 'eval' in 'commands' */ + (yyval)->a_string[0] = '\0'; + free_cmdarg(arg_list); + arg_list = NULL; + } + break; + + case 25: + +/* Line 1806 of yacc.c */ +#line 242 "command.y" + { (yyval) = append_statement((yyvsp[(1) - (2)]), lexptr_begin); } + break; + + case 26: + +/* Line 1806 of yacc.c */ +#line 243 "command.y" + { + (yyval) = (yyvsp[(3) - (4)]); + } + break; + + case 27: + +/* Line 1806 of yacc.c */ +#line 250 "command.y" + { + arg_list = append_statement((yyvsp[(2) - (3)]), (char *) end_EVAL); + if (read_a_line == read_commands_string) { /* unserializing 'eval' in 'commands' */ + char *str = arg_list->a_string; + size_t len = strlen(str); + assert(len > 2 && str[len - 2] == '}'); + str[len - 2] = '\0'; + } + if (input_from_tty) { + dPrompt = in_commands ? commands_Prompt : dgawk_Prompt; + rl_inhibit_completion = 0; + } + cmd_idx = find_command("eval", 4); + in_eval = FALSE; + } + break; + + case 28: + +/* Line 1806 of yacc.c */ +#line 266 "command.y" + { + NODE *n; + CMDARG *arg; + n = (yyvsp[(3) - (3)])->a_node; + arg = append_statement(NULL, (char *) start_EVAL); + (void) append_statement(arg, n->stptr); + (void) append_statement(arg, (char *) end_EVAL); + free_cmdarg(arg_list); + arg_list = arg; + } + break; + + case 34: + +/* Line 1806 of yacc.c */ +#line 285 "command.y" + { + if (cmdtab[cmd_idx].class == D_FRAME + && (yyvsp[(2) - (2)]) != NULL && (yyvsp[(2) - (2)])->a_int < 0) + yyerror(_("invalid frame number: %d"), (yyvsp[(2) - (2)])->a_int); + } + break; + + case 35: + +/* Line 1806 of yacc.c */ +#line 291 "command.y" + { + int idx = find_argument((yyvsp[(2) - (2)])); + if (idx < 0) + yyerror(_("info: invalid option - \"%s\""), (yyvsp[(2) - (2)])->a_string); + else { + efree((yyvsp[(2) - (2)])->a_string); + (yyvsp[(2) - (2)])->a_string = NULL; + (yyvsp[(2) - (2)])->type = D_argument; + (yyvsp[(2) - (2)])->a_argument = argtab[idx].value; + } + } + break; + + case 38: + +/* Line 1806 of yacc.c */ +#line 304 "command.y" + { want_nodeval = TRUE; } + break; + + case 40: + +/* Line 1806 of yacc.c */ +#line 305 "command.y" + { want_nodeval = TRUE; } + break; + + case 46: + +/* Line 1806 of yacc.c */ +#line 310 "command.y" + { want_nodeval = TRUE; } + break; + + case 49: + +/* Line 1806 of yacc.c */ +#line 312 "command.y" + { want_nodeval = TRUE; } + break; + + case 51: + +/* Line 1806 of yacc.c */ +#line 313 "command.y" + { want_nodeval = TRUE; } + break; + + case 53: + +/* Line 1806 of yacc.c */ +#line 314 "command.y" + { want_nodeval = TRUE; } + break; + + case 57: + +/* Line 1806 of yacc.c */ +#line 318 "command.y" + { + if (in_cmd_src((yyvsp[(2) - (2)])->a_string)) + yyerror(_("source \"%s\": already sourced."), (yyvsp[(2) - (2)])->a_string); + } + break; + + case 58: + +/* Line 1806 of yacc.c */ +#line 323 "command.y" + { + if (! input_from_tty) + yyerror(_("save \"%s\": command not permitted."), (yyvsp[(2) - (2)])->a_string); + } + break; + + case 59: + +/* Line 1806 of yacc.c */ +#line 328 "command.y" + { + int type = 0; + int num; + + if ((yyvsp[(2) - (2)]) != NULL) + num = (yyvsp[(2) - (2)])->a_int; + + if (errcount != 0) + ; + else if (in_commands) + yyerror(_("Can't use command `commands' for breakpoint/watchpoint commands")); + else if ((yyvsp[(2) - (2)]) == NULL && ! (type = has_break_or_watch_point(&num, TRUE))) + yyerror(_("no breakpoint/watchpoint has been set yet")); + else if ((yyvsp[(2) - (2)]) != NULL && ! (type = has_break_or_watch_point(&num, FALSE))) + yyerror(_("invalid breakpoint/watchpoint number")); + if (type) { + in_commands = TRUE; + if (input_from_tty) { + dPrompt = commands_Prompt; + fprintf(out_fp, _("Type commands for when %s %d is hit, one per line.\n"), + (type == D_break) ? "breakpoint" : "watchpoint", num); + fprintf(out_fp, _("End with the command \"end\"\n")); + } + } + } + break; + + case 60: + +/* Line 1806 of yacc.c */ +#line 354 "command.y" + { + if (! in_commands) + yyerror(_("`end' valid only in command `commands' or `eval'")); + else { + if (input_from_tty) + dPrompt = dgawk_Prompt; + in_commands = FALSE; + } + } + break; + + case 61: + +/* Line 1806 of yacc.c */ +#line 364 "command.y" + { + if (! in_commands) + yyerror(_("`silent' valid only in command `commands'")); + } + break; + + case 62: + +/* Line 1806 of yacc.c */ +#line 369 "command.y" + { + int idx = find_argument((yyvsp[(2) - (2)])); + if (idx < 0) + yyerror(_("trace: invalid option - \"%s\""), (yyvsp[(2) - (2)])->a_string); + else { + efree((yyvsp[(2) - (2)])->a_string); + (yyvsp[(2) - (2)])->a_string = NULL; + (yyvsp[(2) - (2)])->type = D_argument; + (yyvsp[(2) - (2)])->a_argument = argtab[idx].value; + } + } + break; + + case 63: + +/* Line 1806 of yacc.c */ +#line 380 "command.y" + { want_nodeval = TRUE; } + break; + + case 64: + +/* Line 1806 of yacc.c */ +#line 381 "command.y" + { + int type; + int num = (yyvsp[(2) - (4)])->a_int; + type = has_break_or_watch_point(&num, FALSE); + if (! type) + yyerror(_("condition: invalid breakpoint/watchpoint number")); + } + break; + + case 65: + +/* Line 1806 of yacc.c */ +#line 389 "command.y" + { + if (in_commands) { + /* Prepend command 'eval' to argument list */ + CMDARG *arg; + arg = mk_cmdarg(D_string); + arg->a_string = estrdup("eval", 4); + arg->next = arg_list; + arg_list = arg; + } + } + break; + + case 66: + +/* Line 1806 of yacc.c */ +#line 403 "command.y" + { + if ((yyvsp[(1) - (1)]) != NULL) { + NODE *n = (yyvsp[(1) - (1)])->a_node; + (yyvsp[(1) - (1)])->type = D_string; + (yyvsp[(1) - (1)])->a_string = n->stptr; + freenode(n); + } + (yyval) = (yyvsp[(1) - (1)]); + } + break; + + case 68: + +/* Line 1806 of yacc.c */ +#line 417 "command.y" + { (yyval) = NULL; } + break; + + case 69: + +/* Line 1806 of yacc.c */ +#line 422 "command.y" + { (yyval) = NULL; } + break; + + case 74: + +/* Line 1806 of yacc.c */ +#line 431 "command.y" + { (yyval) = NULL; } + break; + + case 75: + +/* Line 1806 of yacc.c */ +#line 436 "command.y" + { (yyval) = NULL; } + break; + + case 77: + +/* Line 1806 of yacc.c */ +#line 439 "command.y" + { (yyval) = NULL; } + break; + + case 78: + +/* Line 1806 of yacc.c */ +#line 444 "command.y" + { + NODE *n; + n = (yyvsp[(1) - (1)])->a_node; + if ((n->flags & STRING) == 0) + yyerror(_("argument not a string")); + } + break; + + case 79: + +/* Line 1806 of yacc.c */ +#line 454 "command.y" + { (yyval) = NULL; } + break; + + case 80: + +/* Line 1806 of yacc.c */ +#line 456 "command.y" + { + if (find_option((yyvsp[(1) - (1)])->a_string) < 0) + yyerror(_("option: invalid parameter - \"%s\""), (yyvsp[(1) - (1)])->a_string); + } + break; + + case 81: + +/* Line 1806 of yacc.c */ +#line 461 "command.y" + { + if (find_option((yyvsp[(1) - (3)])->a_string) < 0) + yyerror(_("option: invalid parameter - \"%s\""), (yyvsp[(1) - (3)])->a_string); + } + break; + + case 82: + +/* Line 1806 of yacc.c */ +#line 469 "command.y" + { + NODE *n; + n = lookup((yyvsp[(1) - (1)])->a_string); + if (n == NULL || n->type != Node_func) + yyerror(_("no such function - \"%s\""), (yyvsp[(1) - (1)])->a_string); + else { + (yyvsp[(1) - (1)])->type = D_func; + efree((yyvsp[(1) - (1)])->a_string); + (yyvsp[(1) - (1)])->a_string = NULL; + (yyvsp[(1) - (1)])->a_node = n; + } + } + break; + + case 83: + +/* Line 1806 of yacc.c */ +#line 485 "command.y" + { (yyval) = NULL; } + break; + + case 88: + +/* Line 1806 of yacc.c */ +#line 494 "command.y" + { (yyval) = NULL; } + break; + + case 89: + +/* Line 1806 of yacc.c */ +#line 495 "command.y" + { want_nodeval = TRUE; } + break; + + case 92: + +/* Line 1806 of yacc.c */ +#line 497 "command.y" + { want_nodeval = TRUE; } + break; + + case 95: + +/* Line 1806 of yacc.c */ +#line 503 "command.y" + { (yyval) = NULL; } + break; + + case 97: + +/* Line 1806 of yacc.c */ +#line 509 "command.y" + { (yyval) = NULL; } + break; + + case 99: + +/* Line 1806 of yacc.c */ +#line 515 "command.y" + { (yyval) = NULL; } + break; + + case 104: + +/* Line 1806 of yacc.c */ +#line 527 "command.y" + { + int idx = find_argument((yyvsp[(1) - (2)])); + if (idx < 0) + yyerror(_("enable: invalid option - \"%s\""), (yyvsp[(1) - (2)])->a_string); + else { + efree((yyvsp[(1) - (2)])->a_string); + (yyvsp[(1) - (2)])->a_string = NULL; + (yyvsp[(1) - (2)])->type = D_argument; + (yyvsp[(1) - (2)])->a_argument = argtab[idx].value; + } + } + break; + + case 106: + +/* Line 1806 of yacc.c */ +#line 543 "command.y" + { + (yyvsp[(2) - (2)])->type = D_array; /* dump all items */ + (yyvsp[(2) - (2)])->a_count = 0; + } + break; + + case 107: + +/* Line 1806 of yacc.c */ +#line 548 "command.y" + { + (yyvsp[(2) - (3)])->type = D_array; + (yyvsp[(2) - (3)])->a_count = num_dim; + } + break; + + case 117: + +/* Line 1806 of yacc.c */ +#line 574 "command.y" + { (yyval) = NULL; } + break; + + case 118: + +/* Line 1806 of yacc.c */ +#line 576 "command.y" + { (yyval) = NULL; } + break; + + case 119: + +/* Line 1806 of yacc.c */ +#line 578 "command.y" + { + CMDARG *a; + a = mk_cmdarg(D_int); + a->a_int = -1; + append_cmdarg(a); + } + break; + + case 126: + +/* Line 1806 of yacc.c */ +#line 594 "command.y" + { + if ((yyvsp[(1) - (3)])->a_int > (yyvsp[(3) - (3)])->a_int) + yyerror(_("invalid range specification: %d - %d"), + (yyvsp[(1) - (3)])->a_int, (yyvsp[(3) - (3)])->a_int); + else + (yyvsp[(1) - (3)])->type = D_range; + (yyval) = (yyvsp[(1) - (3)]); + } + break; + + case 127: + +/* Line 1806 of yacc.c */ +#line 606 "command.y" + { (yyval) = NULL; } + break; + + case 134: + +/* Line 1806 of yacc.c */ +#line 620 "command.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 135: + +/* Line 1806 of yacc.c */ +#line 622 "command.y" + { (yyval) = (yyvsp[(1) - (3)]); } + break; + + case 137: + +/* Line 1806 of yacc.c */ +#line 628 "command.y" + { + CMDARG *a; + NODE *subs; + int count = 0; + + for (a = (yyvsp[(2) - (3)]); a != NULL; a = a->next) + count++; + subs = concat_args((yyvsp[(2) - (3)]), count); + free_cmdarg((yyvsp[(2) - (3)])->next); + (yyvsp[(2) - (3)])->next = NULL; + (yyvsp[(2) - (3)])->type = D_node; + (yyvsp[(2) - (3)])->a_node = subs; + (yyval) = (yyvsp[(2) - (3)]); + } + break; + + case 139: + +/* Line 1806 of yacc.c */ +#line 647 "command.y" + { (yyval) = (yyvsp[(1) - (1)]); num_dim = 1; } + break; + + case 140: + +/* Line 1806 of yacc.c */ +#line 649 "command.y" + { (yyval) = (yyvsp[(1) - (2)]); num_dim++; } + break; + + case 142: + +/* Line 1806 of yacc.c */ +#line 655 "command.y" + { + NODE *n = (yyvsp[(2) - (2)])->a_node; + if ((n->flags & NUMBER) == 0) + yyerror(_("non-numeric value for field number")); + else + (yyvsp[(2) - (2)])->type = D_field; + (yyval) = (yyvsp[(2) - (2)]); + } + break; + + case 143: + +/* Line 1806 of yacc.c */ +#line 664 "command.y" + { + /* a_string is array name, a_count is dimension count */ + (yyvsp[(1) - (2)])->type = D_subscript; + (yyvsp[(1) - (2)])->a_count = num_dim; + (yyval) = (yyvsp[(1) - (2)]); + } + break; + + case 144: + +/* Line 1806 of yacc.c */ +#line 674 "command.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 145: + +/* Line 1806 of yacc.c */ +#line 676 "command.y" + { + NODE *n = (yyvsp[(2) - (2)])->a_node; + if ((n->flags & NUMBER) == 0) + yyerror(_("non-numeric value found, numeric expected")); + (yyval) = (yyvsp[(2) - (2)]); + } + break; + + case 146: + +/* Line 1806 of yacc.c */ +#line 683 "command.y" + { + NODE *n = (yyvsp[(2) - (2)])->a_node; + if ((n->flags & NUMBER) == 0) + yyerror(_("non-numeric value found, numeric expected")); + else + (yyvsp[(2) - (2)])->a_node->numbr = - n->numbr; + (yyval) = (yyvsp[(2) - (2)]); + } + break; + + case 147: + +/* Line 1806 of yacc.c */ +#line 695 "command.y" + { (yyval) = NULL; } + break; + + case 148: + +/* Line 1806 of yacc.c */ +#line 697 "command.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 149: + +/* Line 1806 of yacc.c */ +#line 702 "command.y" + { (yyval) = NULL; } + break; + + case 150: + +/* Line 1806 of yacc.c */ +#line 704 "command.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 151: + +/* Line 1806 of yacc.c */ +#line 709 "command.y" + { + if ((yyvsp[(1) - (1)])->a_int == 0) + yyerror(_("non-zero integer value")); + (yyval) = (yyvsp[(1) - (1)]); + } + break; + + case 152: + +/* Line 1806 of yacc.c */ +#line 715 "command.y" + { + if ((yyvsp[(2) - (2)])->a_int == 0) + yyerror(_("non-zero integer value")); + (yyval) = (yyvsp[(2) - (2)]); + } + break; + + case 153: + +/* Line 1806 of yacc.c */ +#line 724 "command.y" + { (yyval) = (yyvsp[(1) - (1)]); } + break; + + case 154: + +/* Line 1806 of yacc.c */ +#line 726 "command.y" + { (yyval) = (yyvsp[(2) - (2)]); } + break; + + case 155: + +/* Line 1806 of yacc.c */ +#line 728 "command.y" + { + (yyvsp[(2) - (2)])->a_int = - (yyvsp[(2) - (2)])->a_int; + (yyval) = (yyvsp[(2) - (2)]); + } + break; + + case 156: + +/* Line 1806 of yacc.c */ +#line 736 "command.y" + { + if (lexptr_begin != NULL) { + if (input_from_tty && lexptr_begin[0] != '\0') + add_history(lexptr_begin); + efree(lexptr_begin); + lexptr_begin = NULL; + } + } + break; + + + +/* Line 1806 of yacc.c */ +#line 2541 "command.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 2067 of yacc.c */ +#line 746 "command.y" + + + +/* append_statement --- append 'stmt' to the list of eval awk statements */ + +static CMDARG * +append_statement(CMDARG *alist, char *stmt) +{ + CMDARG *a, *arg; + char *s; + int len, slen, ssize; + +#define EVALSIZE 512 + + if (stmt == start_EVAL) { + len = sizeof(start_EVAL); + for (a = alist; a != NULL; a = a->next) + len += strlen(a->a_string) + 1; /* 1 for ',' */ + len += EVALSIZE; + + emalloc(s, char *, (len + 2) * sizeof(char), "append_statement"); + arg = mk_cmdarg(D_string); + arg->a_string = s; + arg->a_count = len; /* kludge */ + + slen = sizeof("function @eval(") - 1; + memcpy(s, start_EVAL, slen); + + for (a = alist; a != NULL; a = a->next) { + len = strlen(a->a_string); + memcpy(s + slen, a->a_string, len); + slen += len; + if (a->next != NULL) + s[slen++] = ','; + } + s[slen++] = ')'; + s[slen++] = '{'; + s[slen] = '\0'; + return arg; + } + + len = strlen(stmt) + 1; /* 1 for newline */ + s = alist->a_string; + slen = strlen(s); + ssize = alist->a_count; + if (len > ssize - slen) { + ssize = slen + len + EVALSIZE; + erealloc(s, char *, (ssize + 2) * sizeof(char), "append_statement"); + alist->a_string = s; + alist->a_count = ssize; + } + memcpy(s + slen, stmt, len); + slen += len; + if (slen >= 2 && s[slen - 2] != '\n') { + s[slen - 1] = '\n'; + s[slen] = '\0'; + } + + if (stmt == end_EVAL) + erealloc(alist->a_string, char *, slen + 2, "append_statement"); + return alist; + +#undef EVALSIZE +} + + +/* command names sorted in ascending order */ + +struct cmdtoken cmdtab[] = { +{ "backtrace", "bt", D_backtrace, D_BACKTRACE, do_backtrace, + gettext_noop("backtrace [N] - print trace of all or N innermost (outermost if N < 0) frames.") }, +{ "break", "b", D_break, D_BREAK, do_breakpoint, + gettext_noop("break [[filename:]N|function] - set breakpoint at the specified location.") }, +{ "clear", "", D_clear, D_CLEAR, do_clear, + gettext_noop("clear [[filename:]N|function] - delete breakpoints previously set.") }, +{ "commands", "", D_commands, D_COMMANDS, do_commands, + gettext_noop("commands [num] - starts a list of commands to be executed at a breakpoint(watchpoint) hit.") }, +{ "condition", "", D_condition, D_CONDITION, do_condition, + gettext_noop("condition num [expr] - set or clear breakpoint or watchpoint condition.") }, +{ "continue", "c", D_continue, D_CONTINUE, do_continue, + gettext_noop("continue [COUNT] - continue program being debugged.") }, +{ "delete", "d", D_delete, D_DELETE, do_delete_breakpoint, + gettext_noop("delete [breakpoints] [range] - delete specified breakpoints.") }, +{ "disable", "", D_disable, D_DISABLE, do_disable_breakpoint, + gettext_noop("disable [breakpoints] [range] - disable specified breakpoints.") }, +{ "display", "", D_display, D_DISPLAY, do_display, + gettext_noop("display [var] - print value of variable each time the program stops.") }, +{ "down", "", D_down, D_DOWN, do_down, + gettext_noop("down [N] - move N frames down the stack.") }, +{ "dump", "", D_dump, D_DUMP, do_dump_instructions, + gettext_noop("dump [filename] - dump instructions to file or stdout.") }, +{ "enable", "e", D_enable, D_ENABLE, do_enable_breakpoint, + gettext_noop("enable [once|del] [breakpoints] [range] - enable specified breakpoints.") }, +{ "end", "", D_end, D_END, do_commands, + gettext_noop("end - end a list of commands or awk statements.") }, +{ "eval", "", D_eval, D_EVAL, do_eval, + gettext_noop("eval stmt|[p1, p2, ...] - evaluate awk statement(s).") }, +{ "finish", "", D_finish, D_FINISH, do_finish, + gettext_noop("finish - execute until selected stack frame returns.") }, +{ "frame", "f", D_frame, D_FRAME, do_frame, + gettext_noop("frame [N] - select and print stack frame number N.") }, +{ "help", "h", D_help, D_HELP, do_help, + gettext_noop("help [command] - print list of commands or explanation of command.") }, +{ "ignore", "", D_ignore, D_IGNORE, do_ignore_breakpoint, + gettext_noop("ignore N COUNT - set ignore-count of breakpoint number N to COUNT.") }, +{ "info", "i", D_info, D_INFO, do_info, + gettext_noop("info topic - source|sources|variables|functions|break|frame|args|locals|display|watch.") }, +{ "list", "l", D_list, D_LIST, do_list, + gettext_noop("list [-|+|[filename:]lineno|function|range] - list specified line(s).") }, +{ "next", "n", D_next, D_NEXT, do_next, + gettext_noop("next [COUNT] - step program, proceeding through subroutine calls.") }, +{ "nexti", "ni", D_nexti, D_NEXTI, do_nexti, + gettext_noop("nexti [COUNT] - step one instruction, but proceed through subroutine calls.") }, +{ "option", "o", D_option, D_OPTION, do_option, + gettext_noop("option [name[=value]] - set or display debugger option(s).") }, +{ "print", "p", D_print, D_PRINT, do_print_var, + gettext_noop("print var [var] - print value of a variable or array.") }, +{ "printf", "", D_printf, D_PRINTF, do_print_f, + gettext_noop("printf format, [arg], ... - formatted output.") }, +{ "quit", "q", D_quit, D_QUIT, do_quit, + gettext_noop("quit - exit debugger.") }, +{ "return", "", D_return, D_RETURN, do_return, + gettext_noop("return [value] - make selected stack frame return to its caller.") }, +{ "run", "r", D_run, D_RUN, do_run, + gettext_noop("run - start or restart executing program.") }, +#ifdef HAVE_LIBREADLINE +{ "save", "", D_save, D_SAVE, do_save, + gettext_noop("save filename - save commands from the session to file.") }, +#endif +{ "set", "", D_set, D_SET, do_set_var, + gettext_noop("set var = value - assign value to a scalar variable.") }, +{ "silent", "", D_silent, D_SILENT, do_commands, + gettext_noop("silent - suspends usual message when stopped at a breakpoint/watchpoint.") }, +{ "source", "", D_source, D_SOURCE, do_source, + gettext_noop("source file - execute commands from file.") }, +{ "step", "s", D_step, D_STEP, do_step, + gettext_noop("step [COUNT] - step program until it reaches a different source line.") }, +{ "stepi", "si", D_stepi, D_STEPI, do_stepi, + gettext_noop("stepi [COUNT] - step one instruction exactly.") }, +{ "tbreak", "t", D_tbreak, D_TBREAK, do_tmp_breakpoint, + gettext_noop("tbreak [[filename:]N|function] - set a temporary breakpoint.") }, +{ "trace", "", D_trace, D_TRACE, do_trace_instruction, + gettext_noop("trace on|off - print instruction before executing.") }, +{ "undisplay", "", D_undisplay, D_UNDISPLAY, do_undisplay, + gettext_noop("undisplay [N] - remove variable(s) from automatic display list.") }, +{ "until", "u", D_until, D_UNTIL, do_until, + gettext_noop("until [[filename:]N|function] - execute until program reaches a different line or line N within current frame.") }, +{ "unwatch", "", D_unwatch, D_UNWATCH, do_unwatch, + gettext_noop("unwatch [N] - remove variable(s) from watch list.") }, +{ "up", "", D_up, D_UP, do_up, + gettext_noop("up [N] - move N frames up the stack.") }, +{ "watch", "w", D_watch, D_WATCH, do_watch, + gettext_noop("watch var - set a watchpoint for a variable.") }, +{ NULL, NULL, D_illegal, 0, (Func_cmd) 0, + NULL }, +}; + +struct argtoken argtab[] = { + { "args", D_info, A_ARGS }, + { "break", D_info, A_BREAK }, + { "del", D_enable, A_DEL }, + { "display", D_info, A_DISPLAY }, + { "frame", D_info, A_FRAME }, + { "functions", D_info, A_FUNCTIONS }, + { "locals", D_info, A_LOCALS }, + { "off", D_trace, A_TRACE_OFF }, + { "on", D_trace, A_TRACE_ON }, + { "once", D_enable, A_ONCE }, + { "source", D_info, A_SOURCE }, + { "sources", D_info, A_SOURCES }, + { "variables", D_info, A_VARIABLES }, + { "watch", D_info, A_WATCH }, + { NULL, D_illegal, 0 }, +}; + + +/* get_command --- return command handler function */ + +Func_cmd +get_command(int ctype) +{ + int i; + for (i = 0; cmdtab[i].name != NULL; i++) { + if (cmdtab[i].type == ctype) + return cmdtab[i].cf_ptr; + } + return (Func_cmd) 0; +} + +/* get_command_name --- return command name given it's type */ + +const char * +get_command_name(int ctype) +{ + int i; + for (i = 0; cmdtab[i].name != NULL; i++) { + if (cmdtab[i].type == ctype) + return cmdtab[i].name; + } + return NULL; +} + +/* mk_cmdarg --- make an argument for command */ + +static CMDARG * +mk_cmdarg(enum argtype type) +{ + CMDARG *arg; + emalloc(arg, CMDARG *, sizeof(CMDARG), "mk_cmdarg"); + memset(arg, 0, sizeof(CMDARG)); + arg->type = type; + return arg; +} + +/* append_cmdarg --- append ARG to the list of arguments for the current command */ + +static void +append_cmdarg(CMDARG *arg) +{ + static CMDARG *savetail; + + if (arg_list == NULL) + arg_list = arg; + else + savetail->next = arg; + savetail = arg; +} + +/* free_cmdarg --- free all arguments in LIST */ + +void +free_cmdarg(CMDARG *list) +{ + CMDARG *arg, *nexta; + + for (arg = list; arg != NULL; arg = nexta) { + nexta = arg->next; + + switch (arg->type) { + case D_variable: + case D_subscript: + case D_array: + case D_string: + if (arg->a_string != NULL) + efree(arg->a_string); + break; + case D_node: + case D_field: + unref(arg->a_node); + break; + default: + break; + } + efree(arg); + } +} + +/* yyerror --- print a syntax error message */ + +static void +yyerror(const char *mesg, ...) +{ + va_list args; + va_start(args, mesg); + fprintf(out_fp, _("error: ")); + vfprintf(out_fp, mesg, args); + fprintf(out_fp, "\n"); + va_end(args); + errcount++; + repeat_idx = -1; +} + + +/* yylex --- read a command and turn it into tokens */ + +static int +yylex(void) +{ + static char *lexptr = NULL; + static char *lexend; + int c; + char *tokstart; + size_t toklen; + + yylval = (CMDARG *) NULL; + + if (errcount > 0 && lexptr_begin == NULL) { + /* fake a new line */ + errcount = 0; + return '\n'; + } + + if (lexptr_begin == NULL) { +again: + lexptr_begin = read_a_line(dPrompt); + if (lexptr_begin == NULL) { /* EOF or error */ + if (get_eof_status() == EXIT_FATAL) + exit(EXIT_FATAL); + if (get_eof_status() == EXIT_FAILURE) { + static int seen_eof = 0; + + /* force a quit, and let do_quit (in debug.c) exit */ + if (! seen_eof) { + if (errno != 0) { + fprintf(stderr, _("can't read command (%s)\n"), strerror(errno)); + exit_val = EXIT_FAILURE; + } /* else + exit_val = EXIT_SUCCESS; */ + + seen_eof = 1; + return '\n'; /* end current command if any */ + } else if (seen_eof++ == 1) { + cmd_idx = find_command("quit", 4); + return D_QUIT; /* 'quit' token */ + } else + return '\n'; /* end command 'quit' */ + } + if (errno != 0) + d_error(_("can't read command (%s)"), strerror(errno)); + if (pop_cmd_src() == 0) + goto again; + exit(EXIT_FATAL); /* shouldn't happen */ + } + + if (! in_commands && ! in_eval /* history expansion off in 'commands' and 'eval' */ + && input_from_tty + ) + history_expand_line(&lexptr_begin); + + lexptr = lexptr_begin; + lexend = lexptr + strlen(lexptr); + if (*lexptr == '\0' /* blank line */ + && repeat_idx >= 0 + && input_from_tty + && ! in_eval + ) { +#ifdef HAVE_LIBREADLINE + HIST_ENTRY *h; + h = previous_history(); + if (h != NULL) + add_history(h->line); +#endif + cmd_idx = repeat_idx; + return cmdtab[cmd_idx].class; /* repeat last command */ + } + repeat_idx = -1; + } + + c = *lexptr; + + while (c == ' ' || c == '\t') + c = *++lexptr; + + if (! input_from_tty && c == '#') + return '\n'; + + tokstart = lexptr; + if (lexptr >= lexend) + return '\n'; + + if (cmd_idx < 0) { /* need a command */ + if (c == '?' && tokstart[1] == '\0' && ! in_eval) { + lexptr++; + cmd_idx = find_command("help", 4); + return D_HELP; + } + + while (c != '\0' && c != ' ' && c != '\t') { + if (! isalpha(c) && ! in_eval) { + yyerror(_("invalid character in command")); + return '\n'; + } + c = *++lexptr; + } + + toklen = lexptr - tokstart; + + if (in_eval) { + if (toklen == 3 + && tokstart[3] == '\0' + && tokstart[0] == 'e' + && tokstart[1] == 'n' + && tokstart[2] == 'd' + ) { + cmd_idx = find_command(tokstart, toklen); + return D_END; + } + lexptr = lexend; + return D_STATEMENT; + } + + cmd_idx = find_command(tokstart, toklen); + if (cmd_idx >= 0) { + if (in_commands && cmdtab[cmd_idx].type != D_eval) { + /* add the actual command string (lexptr_begin) to + * arg_list; command string for 'eval' prepended to the arg_list + * in the grammer above (see eval_cmd non-terminal). + */ + CMDARG *arg; + arg = mk_cmdarg(D_string); + arg->a_string = estrdup(lexptr_begin, lexend - lexptr_begin); + append_cmdarg(arg); + } + return cmdtab[cmd_idx].class; + } else { + yyerror(_("unknown command - \"%.*s\", try help"), toklen, tokstart); + return '\n'; + } + } + + c = *lexptr; + + if (cmdtab[cmd_idx].type == D_option) { + if (c == '=') + return *lexptr++; + } else if (c == '-' || c == '+' || c == ':' || c == '|') + return *lexptr++; + + if (c == '"') { + char *str, *p; + int flags = ALREADY_MALLOCED; + int esc_seen = FALSE; + + toklen = lexend - lexptr; + emalloc(str, char *, toklen + 2, "yylex"); + p = str; + + while ((c = *++lexptr) != '"') { + if (lexptr == lexend) { +err: + efree(str); + yyerror(_("unterminated string")); + return '\n'; + } + if (c == '\\') { + c = *++lexptr; + esc_seen = TRUE; + if (want_nodeval || c != '"') + *p++ = '\\'; + } + if (lexptr == lexend) + goto err; + *p++ = c; + } + lexptr++; + *p = '\0'; + + if (! want_nodeval) { + yylval = mk_cmdarg(D_string); + yylval->a_string = estrdup(str, p - str); + append_cmdarg(yylval); + return D_STRING; + } else { /* awk string */ + if (esc_seen) + flags |= SCAN; + yylval = mk_cmdarg(D_node); + yylval->a_node = make_str_node(str, p - str, flags); + append_cmdarg(yylval); + return D_NODE; + } + } + + if (! want_nodeval) { + while ((c = *++lexptr) != '\0' && c != ':' && c != '-' + && c != ' ' && c != '\t' && c != '=') + ; + + /* Is it an integer? */ + if (isdigit((unsigned char) tokstart[0]) && cmdtab[cmd_idx].type != D_option) { + char *end; + long l; + + errno = 0; + l = strtol(tokstart, &end, 0); + if (errno != 0) { + yyerror(_("%s"), strerror(errno)); + errno = 0; + return '\n'; + } + + if (lexptr == end) { + yylval = mk_cmdarg(D_int); + yylval->a_int = l; + append_cmdarg(yylval); + return D_INT; + } + } + + /* Must be string */ + yylval = mk_cmdarg(D_string); + yylval->a_string = estrdup(tokstart, lexptr - tokstart); + append_cmdarg(yylval); + return D_STRING; + } + + /* assert(want_nodval == TRUE); */ + + /* look for awk number */ + + if (isdigit((unsigned char) tokstart[0])) { + double d; + + errno = 0; + d = strtod(tokstart, &lexptr); + if (errno != 0) { + yyerror(strerror(errno)); + errno = 0; + return '\n'; + } + yylval = mk_cmdarg(D_node); + yylval->a_node = make_number(d); + append_cmdarg(yylval); + return D_NODE; + } + + c = *lexptr; + if (c == '$' || c == '@' + || c == '[' || c == ']' + || c == ',' || c == '=') + return *lexptr++; + + if (c != '_' && ! isalpha(c)) { + yyerror(_("invalid character")); + return '\n'; + } + + while (isalnum(c) || c == '_') + c = *++lexptr; + toklen = lexptr - tokstart; + + /* awk variable */ + yylval = mk_cmdarg(D_variable); + yylval->a_string = estrdup(tokstart, toklen); + append_cmdarg(yylval); + return D_VARIABLE; +} + +/* find_argument --- find index in 'argtab' for a command option */ + +static int +find_argument(CMDARG *arg) +{ + /* non-number argument */ + int idx; + char *name, *p; + size_t len; + assert(cmd_idx >= 0); + name = arg->a_string; + len = strlen(name); + for (idx = 0; (p = (char *) argtab[idx].name) != NULL; idx++) { + if (cmdtab[cmd_idx].type == argtab[idx].cmd + && *p == *name + && strlen(p) == len + && strncmp(p, name, len) == 0 + ) + return idx; + } + return -1; /* invalid option */ +} + +/* concat_args --- concatenate argument strings into a single string NODE */ + +static NODE * +concat_args(CMDARG *arg, int count) +{ + NODE *n; + NODE **tmp; + char *str, *subsep, *p; + long len, subseplen; + int i; + + if (count == 1) { + n = force_string(arg->a_node); + return dupnode(n); + } + + emalloc(tmp, NODE **, count * sizeof(NODE *), "concat_args"); + subseplen = SUBSEP_node->var_value->stlen; + subsep = SUBSEP_node->var_value->stptr; + len = -subseplen; + + for (i = 0; i < count; i++) { + n = force_string(arg->a_node); + len += n->stlen + subseplen; + tmp[i] = n; + arg = arg->next; + } + + emalloc(str, char *, len + 2, "concat_args"); + n = tmp[0]; + memcpy(str, n->stptr, n->stlen); + p = str + n->stlen; + for (i = 1; i < count; i++) { + if (subseplen == 1) + *p++ = *subsep; + else if (subseplen > 0) { + memcpy(p, subsep, subseplen); + p += subseplen; + } + + n = tmp[i]; + memcpy(p, n->stptr, n->stlen); + p += n->stlen; + } + str[len] = '\0'; + efree(tmp); + return make_str_node(str, len, ALREADY_MALLOCED); +} + +/* find_command --- find the index in 'cmdtab' using exact, + * abbreviation or unique partial match + */ + +static int +find_command(const char *token, size_t toklen) +{ + char *name, *abrv; + int i, k; + int try_exact = TRUE; + int abrv_match = -1; + int partial_match = -1; + +#if 'a' == 0x81 /* it's EBCDIC */ + /* make sure all lower case characters in token (sorting + * isn't the solution in this case) + */ + for (i = 0; i < toklen; i++) { + if (token[i] != tolower(token[i])) + return -1; + } +#endif + + k = sizeof(cmdtab)/sizeof(cmdtab[0]) - 1; + for (i = 0; i < k; i++) { + name = (char *) cmdtab[i].name; + if (try_exact && *token == *name + && toklen == strlen(name) + && strncmp(name, token, toklen) == 0 + ) + return i; + if (*name > *token) + try_exact = FALSE; + if (abrv_match < 0) { + abrv = cmdtab[i].abbrvn; + if (abrv[0] == token[0]) { + if (toklen == 1 && ! abrv[1]) + abrv_match = i; + else if (toklen == 2 && abrv[1] == token[1]) + abrv_match = i; + } + } + if (! try_exact && abrv_match >= 0) + return abrv_match; + if (partial_match < 0) { + if (*token == *name + && toklen < strlen(name) + && strncmp(name, token, toklen) == 0 + ) { + if ((i == k - 1 || strncmp(cmdtab[i + 1].name, token, toklen) != 0) + && (i == 0 || strncmp(cmdtab[i - 1].name, token, toklen) != 0) + ) + partial_match = i; + } + } + } + return partial_match; +} + +/* do_help -- help command */ + +int +do_help(CMDARG *arg, int cmd) +{ + int i; + if (arg == NULL) { + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + for (i = 0; cmdtab[i].name != NULL; i++) { + gprintf(out_fp, "%s:\n", cmdtab[i].name); + gprintf(out_fp, "\t%s\n", _(cmdtab[i].help_txt)); + } + } + } else if (arg->type == D_string) { + char *name; + name = arg->a_string; + i = find_command(name, strlen(name)); + if (i >= 0) { + fprintf(out_fp, "%s\n", cmdtab[i].help_txt); + if (strcmp(cmdtab[i].name, "option") == 0) + option_help(); + } else + fprintf(out_fp, _("undefined command: %s\n"), name); + } + + return FALSE; +} + + +/* next_word --- find the next word in a line to complete + * (word seperation characters are space and tab). + */ + +static char * +next_word(char *p, int len, char **endp) +{ + char *q; + int i; + + if (p == NULL || len <= 0) + return NULL; + for (i = 0; i < len; i++, p++) + if (*p != ' ' && *p != '\t') + break; + if (i == len) + return NULL; + if (endp != NULL) { + for (i++, q = p + 1; i < len; i++, q++) + if (*q == ' ' || *q == '\t') + break; + *endp = q; + } + return p; +} + +#ifdef HAVE_LIBREADLINE + +/* command_completion --- attempt to complete based on the word number in line; + * try to complete on command names if this is the first word; for the next + * word(s), the type of completion depends on the command name (first word). + */ + +#ifndef RL_READLINE_VERSION /* < 4.2a */ +#define rl_completion_matches(x, y) completion_matches((char *) (x), (y)) +#endif + + +char ** +command_completion(const char *text, int start, int end) +{ + char *cmdtok, *e; + int idx; + int len; + + rl_attempted_completion_over = TRUE; /* no default filename completion please */ + + this_cmd = D_illegal; + len = start; + if ((cmdtok = next_word(rl_line_buffer, len, &e)) == NULL) /* no first word yet */ + return rl_completion_matches(text, command_generator); + len -= (e - rl_line_buffer); + + idx = find_command(cmdtok, e - cmdtok); + if (idx < 0) + return NULL; + this_cmd = cmdtab[idx].type; + + if (! next_word(e, len, NULL)) { + switch (this_cmd) { + case D_break: + case D_list: + case D_until: + case D_tbreak: + case D_clear: + return rl_completion_matches(text, srcfile_generator); + case D_info: + case D_enable: + case D_trace: + case D_help: + return rl_completion_matches(text, argument_generator); + case D_option: + return rl_completion_matches(text, option_generator); + case D_print: + case D_printf: + case D_set: + case D_display: + case D_watch: + return rl_completion_matches(text, variable_generator); + default: + return NULL; + } + } + if (this_cmd == D_print || this_cmd == D_printf) + return rl_completion_matches(text, variable_generator); + return NULL; +} + +/* command_generator --- generator function for command completion */ + +static char * +command_generator(const char *text, int state) +{ + static size_t textlen; + static int idx = 0; + char *name; + + if (! state) { /* first time */ + textlen = strlen(text); + idx = 0; + } + while ((name = (char *) cmdtab[idx].name) != NULL) { + idx++; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + return NULL; +} + +/* srcfile_generator --- generator function for source file completion */ + +static char * +srcfile_generator(const char *text, int state) +{ + static size_t textlen; + static SRCFILE *s; + char *name; + extern SRCFILE *srcfiles; + + if (! state) { /* first time */ + textlen = strlen(text); + s = srcfiles->next; + } + while (s != srcfiles) { + if (s->stype != SRC_FILE && s->stype != SRC_INC) { + s = s->next; + continue; + } + name = s->src; + s = s->next; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + return NULL; +} + +/* argument_generator --- generator function for non-number argument completion */ + +static char * +argument_generator(const char *text, int state) +{ + static size_t textlen; + static int idx; + char *name; + + if (! state) { /* first time */ + textlen = strlen(text); + idx = 0; + } + + if (this_cmd == D_help) { + while ((name = (char *) cmdtab[idx++].name) != NULL) { + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + } else { + while ((name = (char *) argtab[idx].name) != NULL) { + if (this_cmd != argtab[idx++].cmd) + continue; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + } + return NULL; +} + +/* variable_generator --- generator function for variable name completion */ + +static char * +variable_generator(const char *text, int state) +{ + static size_t textlen; + static int idx = 0; + static char **pnames = NULL; + static NODE **var_table = NULL; + char *name; + NODE *hp; + + if (! state) { /* first time */ + textlen = strlen(text); + if (var_table != NULL) + efree(var_table); + var_table = get_varlist(); + idx = 0; + pnames = get_parmlist(); /* names of function params in + * current context; the array + * is NULL terminated in + * awkgram.y (func_install). + */ + } + + /* function params */ + while (pnames != NULL) { + name = pnames[idx]; + if (name == NULL) { + pnames = NULL; /* don't try to match params again */ + idx = 0; + break; + } + idx++; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + + /* globals */ + while ((hp = var_table[idx]) != NULL) { + idx++; + if (hp->hvalue->type == Node_func) + continue; + if (strncmp(hp->hname, text, textlen) == 0) + return estrdup(hp->hname, hp->hlength); + } + return NULL; +} + +/* history_expand_line --- history expand the LINE */ + +static void +history_expand_line(char **line) +{ + int ret; + char *expansion; + + if (! *line || input_fd != 0 || ! input_from_tty) + return; + using_history(); + ret = history_expand(*line, &expansion); + if (ret < 0 || ret == 2) + efree(expansion); + else { + efree(*line); + *line = expansion; + } +} + +#endif + + diff -Nru gawk-3.1.8+dfsg/command.y gawk-4.0.1+dfsg/command.y --- gawk-3.1.8+dfsg/command.y 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/command.y 2012-03-28 19:53:55.000000000 +0000 @@ -0,0 +1,1680 @@ +/* + * command.y - yacc/bison parser for debugger command + */ + +/* + * Copyright (C) 2004, 2010, 2011 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 + */ + +%{ +#include "awk.h" +#include "cmd.h" + +#if 0 +#define YYDEBUG 12 +int yydebug = 2; +#endif + +static int yylex(void); +static void yyerror(const char *mesg, ...); + +static int find_command(const char *token, size_t toklen); + +static int want_nodeval = FALSE; + +static int cmd_idx = -1; /* index of current command in cmd table */ +static int repeat_idx = -1; /* index of last repeatable command in command table */ +static CMDARG *arg_list = NULL; /* list of arguments */ +static long errcount = 0; +static char *lexptr_begin = NULL; +static int in_commands = FALSE; +static int num_dim; + +static int in_eval = FALSE; +static const char start_EVAL[] = "function @eval(){"; +static const char end_EVAL[] = "}"; +static CMDARG *append_statement(CMDARG *alist, char *stmt); +static char *next_word(char *p, int len, char **endp); +static NODE *concat_args(CMDARG *a, int count); + +#ifdef HAVE_LIBREADLINE +static void history_expand_line(char **line); +static char *command_generator(const char *text, int state); +static char *srcfile_generator(const char *text, int state); +static char *argument_generator(const char *text, int state); +static char *variable_generator(const char *text, int state); +extern char *option_generator(const char *text, int state); +static int this_cmd = D_illegal; +#else +#define history_expand_line(p) /* nothing */ +static int rl_inhibit_completion; /* dummy variable */ +#endif + +struct argtoken { + const char *name; + enum argtype cmd; + enum nametypeval value; +}; + +/* + * These two should be static, but there are some compilers that + * don't like the static keyword with an empty size. Therefore give + * them names that are less likely to conflict with the rest of gawk. + */ +#define argtab zz_debug_argtab +#define cmdtab zz_debug_cmdtab + +extern struct argtoken argtab[]; +extern struct cmdtoken cmdtab[]; + +static CMDARG *mk_cmdarg(enum argtype type); +static void append_cmdarg(CMDARG *arg); +static int find_argument(CMDARG *arg); +#define YYSTYPE CMDARG * +%} + +%token D_BACKTRACE D_BREAK D_CLEAR D_CONTINUE D_DELETE D_DISABLE D_DOWN +%token D_ENABLE D_FINISH D_FRAME D_HELP D_IGNORE D_INFO D_LIST +%token D_NEXT D_NEXTI D_PRINT D_PRINTF D_QUIT D_RETURN D_RUN D_SET +%token D_STEP D_STEPI D_TBREAK D_UP D_UNTIL +%token D_DISPLAY D_UNDISPLAY D_WATCH D_UNWATCH +%token D_DUMP D_TRACE +%token D_INT D_STRING D_NODE D_VARIABLE +%token D_OPTION D_COMMANDS D_END D_SILENT D_SOURCE +%token D_SAVE D_EVAL D_CONDITION +%token D_STATEMENT + +%% + +input + : /* empty */ + | input line + { + cmd_idx = -1; + want_nodeval = FALSE; + if (lexptr_begin != NULL) { + if (input_from_tty && lexptr_begin[0] != '\0') + add_history(lexptr_begin); + efree(lexptr_begin); + lexptr_begin = NULL; + } + if (arg_list != NULL) { + free_cmdarg(arg_list); + arg_list = NULL; + } + } + ; + +line + : nls + | command nls + { + if (errcount == 0 && cmd_idx >= 0) { + Func_cmd cmdfunc; + int terminate = FALSE; + CMDARG *args; + int ctype = 0; + + ctype = cmdtab[cmd_idx].type; + + /* a blank line repeats previous command + * (list, next, nexti, step, stepi and continue without arguments). + * save the index in the command table; used in yylex + */ + if ((ctype == D_list + || ctype == D_next + || ctype == D_step + || ctype == D_nexti + || ctype == D_stepi + || ctype == D_continue) + && arg_list == NULL + && ! in_commands + && input_from_tty + ) + repeat_idx = cmd_idx; + else + repeat_idx = -1; + + /* call the command handler; reset the globals arg_list, cmd_idx, + * since this handler could invoke yyparse again. + * call do_commands for the list of commands in `commands'; + * arg_list isn't freed on return. + */ + + cmdfunc = cmdtab[cmd_idx].cf_ptr; + if (in_commands) + cmdfunc = do_commands; + cmd_idx = -1; + want_nodeval = FALSE; + + args = arg_list; + arg_list = NULL; + + terminate = (*cmdfunc)(args, ctype); + if (! in_commands || ctype == D_commands) + free_cmdarg(args); + if (terminate) + YYACCEPT; + } + } + | error nls + { + yyerrok; + } + ; + +control_cmd + : D_CONTINUE + | D_NEXT + | D_NEXTI + | D_STEP + | D_STEPI + ; + +d_cmd + : D_UNDISPLAY + | D_UNWATCH + | D_DISABLE + | D_DELETE + ; + +frame_cmd + : D_UP + | D_DOWN + | D_BACKTRACE + | D_FRAME + ; + +break_cmd + : D_BREAK + | D_TBREAK + ; + +/* mid-rule action buried in non-terminal to avoid conflict */ +set_want_nodeval + : { want_nodeval = TRUE; } + ; + +eval_prologue + : D_EVAL set_want_nodeval opt_param_list nls + { + if (errcount == 0) { + /* don't free arg_list; passed on to statement_list + * non-terminal (empty rule action). See below. + */ + if (input_from_tty) { + dPrompt = eval_Prompt; + fprintf(out_fp, _("Type (g)awk statement(s). End with the command \"end\"\n")); + rl_inhibit_completion = 1; + } + cmd_idx = -1; + in_eval = TRUE; + } + } + ; + +statement_list + : /* empty */ + { + $$ = append_statement(arg_list, (char *) start_EVAL); + if (read_a_line == read_commands_string) /* unserializing 'eval' in 'commands' */ + $$->a_string[0] = '\0'; + free_cmdarg(arg_list); + arg_list = NULL; + } + | statement_list D_STATEMENT { $$ = append_statement($1, lexptr_begin); } nls + { + $$ = $3; + } + ; + +eval_cmd + : eval_prologue statement_list D_END + { + arg_list = append_statement($2, (char *) end_EVAL); + if (read_a_line == read_commands_string) { /* unserializing 'eval' in 'commands' */ + char *str = arg_list->a_string; + size_t len = strlen(str); + assert(len > 2 && str[len - 2] == '}'); + str[len - 2] = '\0'; + } + if (input_from_tty) { + dPrompt = in_commands ? commands_Prompt : dgawk_Prompt; + rl_inhibit_completion = 0; + } + cmd_idx = find_command("eval", 4); + in_eval = FALSE; + } + | D_EVAL set_want_nodeval string_node + { + NODE *n; + CMDARG *arg; + n = $3->a_node; + arg = append_statement(NULL, (char *) start_EVAL); + (void) append_statement(arg, n->stptr); + (void) append_statement(arg, (char *) end_EVAL); + free_cmdarg(arg_list); + arg_list = arg; + } + ; + +command + : D_HELP help_args + | D_QUIT + | D_RUN + | D_FINISH + | control_cmd opt_plus_integer + | frame_cmd opt_integer + { + if (cmdtab[cmd_idx].class == D_FRAME + && $2 != NULL && $2->a_int < 0) + yyerror(_("invalid frame number: %d"), $2->a_int); + } + | D_INFO D_STRING + { + int idx = find_argument($2); + if (idx < 0) + yyerror(_("info: invalid option - \"%s\""), $2->a_string); + else { + efree($2->a_string); + $2->a_string = NULL; + $2->type = D_argument; + $2->a_argument = argtab[idx].value; + } + } + | D_IGNORE plus_integer D_INT + | D_ENABLE enable_args + | D_PRINT { want_nodeval = TRUE; } print_args + | D_PRINTF { want_nodeval = TRUE; } printf_args + | D_LIST list_args + | D_UNTIL location + | D_CLEAR location + | break_cmd break_args + | D_SET { want_nodeval = TRUE; } variable '=' node + | D_OPTION option_args + | D_RETURN { want_nodeval = TRUE; } opt_node + | D_DISPLAY { want_nodeval = TRUE; } opt_variable + | D_WATCH { want_nodeval = TRUE; } variable condition_exp + | d_cmd opt_integer_list + | D_DUMP opt_string + | D_SOURCE D_STRING + { + if (in_cmd_src($2->a_string)) + yyerror(_("source \"%s\": already sourced."), $2->a_string); + } + | D_SAVE D_STRING + { + if (! input_from_tty) + yyerror(_("save \"%s\": command not permitted."), $2->a_string); + } + | D_COMMANDS commands_arg + { + int type = 0; + int num; + + if ($2 != NULL) + num = $2->a_int; + + if (errcount != 0) + ; + else if (in_commands) + yyerror(_("Can't use command `commands' for breakpoint/watchpoint commands")); + else if ($2 == NULL && ! (type = has_break_or_watch_point(&num, TRUE))) + yyerror(_("no breakpoint/watchpoint has been set yet")); + else if ($2 != NULL && ! (type = has_break_or_watch_point(&num, FALSE))) + yyerror(_("invalid breakpoint/watchpoint number")); + if (type) { + in_commands = TRUE; + if (input_from_tty) { + dPrompt = commands_Prompt; + fprintf(out_fp, _("Type commands for when %s %d is hit, one per line.\n"), + (type == D_break) ? "breakpoint" : "watchpoint", num); + fprintf(out_fp, _("End with the command \"end\"\n")); + } + } + } + | D_END + { + if (! in_commands) + yyerror(_("`end' valid only in command `commands' or `eval'")); + else { + if (input_from_tty) + dPrompt = dgawk_Prompt; + in_commands = FALSE; + } + } + | D_SILENT + { + if (! in_commands) + yyerror(_("`silent' valid only in command `commands'")); + } + | D_TRACE D_STRING + { + int idx = find_argument($2); + if (idx < 0) + yyerror(_("trace: invalid option - \"%s\""), $2->a_string); + else { + efree($2->a_string); + $2->a_string = NULL; + $2->type = D_argument; + $2->a_argument = argtab[idx].value; + } + } + | D_CONDITION plus_integer { want_nodeval = TRUE; } condition_exp + { + int type; + int num = $2->a_int; + type = has_break_or_watch_point(&num, FALSE); + if (! type) + yyerror(_("condition: invalid breakpoint/watchpoint number")); + } + | eval_cmd + { + if (in_commands) { + /* Prepend command 'eval' to argument list */ + CMDARG *arg; + arg = mk_cmdarg(D_string); + arg->a_string = estrdup("eval", 4); + arg->next = arg_list; + arg_list = arg; + } + } + ; + +condition_exp + : opt_string_node + { + if ($1 != NULL) { + NODE *n = $1->a_node; + $1->type = D_string; + $1->a_string = n->stptr; + freenode(n); + } + $$ = $1; + } + ; + +commands_arg + : opt_plus_integer + | error + { $$ = NULL; } + ; + +opt_param_list + : /* empty */ + { $$ = NULL; } + | param_list + ; + +param_list + : D_VARIABLE + | param_list D_VARIABLE + | param_list ',' D_VARIABLE + | error + { $$ = NULL; } + ; + +opt_string_node + : /* empty */ + { $$ = NULL; } + | string_node + | error + { $$ = NULL; } + ; + +string_node + : D_NODE + { + NODE *n; + n = $1->a_node; + if ((n->flags & STRING) == 0) + yyerror(_("argument not a string")); + } + ; + +option_args + : /* empty */ + { $$ = NULL; } + | D_STRING + { + if (find_option($1->a_string) < 0) + yyerror(_("option: invalid parameter - \"%s\""), $1->a_string); + } + | D_STRING '=' D_STRING + { + if (find_option($1->a_string) < 0) + yyerror(_("option: invalid parameter - \"%s\""), $1->a_string); + } + ; + +func_name + : D_STRING + { + NODE *n; + n = lookup($1->a_string); + if (n == NULL || n->type != Node_func) + yyerror(_("no such function - \"%s\""), $1->a_string); + else { + $1->type = D_func; + efree($1->a_string); + $1->a_string = NULL; + $1->a_node = n; + } + } + ; + +location + : /* empty */ + { $$ = NULL; } + | plus_integer + | func_name + | D_STRING ':' plus_integer + | D_STRING ':' func_name + ; + +break_args + : /* empty */ + { $$ = NULL; } + | plus_integer { want_nodeval = TRUE; } condition_exp + | func_name + | D_STRING ':' plus_integer { want_nodeval = TRUE; } condition_exp + | D_STRING ':' func_name + ; + +opt_variable + : /* empty */ + { $$ = NULL; } + | variable + ; + +opt_string + : /* empty */ + { $$ = NULL; } + | D_STRING + ; + +opt_node + : /* empty */ + { $$ = NULL; } + | node + ; + +help_args + : /* empty */ + | D_STRING + ; + +enable_args + : opt_integer_list + | D_STRING opt_integer_list + { + int idx = find_argument($1); + if (idx < 0) + yyerror(_("enable: invalid option - \"%s\""), $1->a_string); + else { + efree($1->a_string); + $1->a_string = NULL; + $1->type = D_argument; + $1->a_argument = argtab[idx].value; + } + } + ; + +print_exp + : variable + | '@' D_VARIABLE + { + $2->type = D_array; /* dump all items */ + $2->a_count = 0; + } + | '@' D_VARIABLE subscript_list /* dump sub-array items*/ + { + $2->type = D_array; + $2->a_count = num_dim; + } + ; + +print_args + : print_exp + | print_args print_exp + | print_args ',' print_exp + | error + ; + +printf_exp + : D_NODE + | variable + ; + +printf_args + : printf_exp + | printf_args ',' printf_exp + | error + ; + +list_args + : /* empty */ + { $$ = NULL; } + | '+' + { $$ = NULL; } + | '-' + { + CMDARG *a; + a = mk_cmdarg(D_int); + a->a_int = -1; + append_cmdarg(a); + } + | plus_integer + | func_name + | integer_range + | D_STRING ':' plus_integer + | D_STRING ':' func_name + | D_STRING ':' integer_range + ; + +integer_range + : plus_integer '-' plus_integer + { + if ($1->a_int > $3->a_int) + yyerror(_("invalid range specification: %d - %d"), + $1->a_int, $3->a_int); + else + $1->type = D_range; + $$ = $1; + } + ; + +opt_integer_list + : /* empty */ + { $$ = NULL; } + | integer_list + | error + ; + +integer_list + : plus_integer + | integer_range + | integer_list plus_integer + | integer_list integer_range + ; + +exp_list + : node + { $$ = $1; } + | exp_list ',' node + { $$ = $1; } + | error + ; + +subscript + : '[' exp_list ']' + { + CMDARG *a; + NODE *subs; + int count = 0; + + for (a = $2; a != NULL; a = a->next) + count++; + subs = concat_args($2, count); + free_cmdarg($2->next); + $2->next = NULL; + $2->type = D_node; + $2->a_node = subs; + $$ = $2; + } + | '[' exp_list error + ; + +subscript_list + : subscript + { $$ = $1; num_dim = 1; } + | subscript_list subscript + { $$ = $1; num_dim++; } + ; + +variable + : D_VARIABLE + | '$' D_NODE + { + NODE *n = $2->a_node; + if ((n->flags & NUMBER) == 0) + yyerror(_("non-numeric value for field number")); + else + $2->type = D_field; + $$ = $2; + } + | D_VARIABLE subscript_list + { + /* a_string is array name, a_count is dimension count */ + $1->type = D_subscript; + $1->a_count = num_dim; + $$ = $1; + } + ; + +node + : D_NODE + { $$ = $1; } + | '+' D_NODE + { + NODE *n = $2->a_node; + if ((n->flags & NUMBER) == 0) + yyerror(_("non-numeric value found, numeric expected")); + $$ = $2; + } + | '-' D_NODE + { + NODE *n = $2->a_node; + if ((n->flags & NUMBER) == 0) + yyerror(_("non-numeric value found, numeric expected")); + else + $2->a_node->numbr = - n->numbr; + $$ = $2; + } + ; + +opt_plus_integer + : /* empty */ + { $$ = NULL; } + | plus_integer + { $$ = $1; } + ; + +opt_integer + : /* empty */ + { $$ = NULL; } + | integer + { $$ = $1; } + ; + +plus_integer + : D_INT + { + if ($1->a_int == 0) + yyerror(_("non-zero integer value")); + $$ = $1; + } + | '+' D_INT + { + if ($2->a_int == 0) + yyerror(_("non-zero integer value")); + $$ = $2; + } + ; + +integer + : D_INT + { $$ = $1; } + | '+' D_INT + { $$ = $2; } + | '-' D_INT + { + $2->a_int = - $2->a_int; + $$ = $2; + } + ; + +nls + : '\n' + { + if (lexptr_begin != NULL) { + if (input_from_tty && lexptr_begin[0] != '\0') + add_history(lexptr_begin); + efree(lexptr_begin); + lexptr_begin = NULL; + } + } + ; + +%% + + +/* append_statement --- append 'stmt' to the list of eval awk statements */ + +static CMDARG * +append_statement(CMDARG *alist, char *stmt) +{ + CMDARG *a, *arg; + char *s; + int len, slen, ssize; + +#define EVALSIZE 512 + + if (stmt == start_EVAL) { + len = sizeof(start_EVAL); + for (a = alist; a != NULL; a = a->next) + len += strlen(a->a_string) + 1; /* 1 for ',' */ + len += EVALSIZE; + + emalloc(s, char *, (len + 2) * sizeof(char), "append_statement"); + arg = mk_cmdarg(D_string); + arg->a_string = s; + arg->a_count = len; /* kludge */ + + slen = sizeof("function @eval(") - 1; + memcpy(s, start_EVAL, slen); + + for (a = alist; a != NULL; a = a->next) { + len = strlen(a->a_string); + memcpy(s + slen, a->a_string, len); + slen += len; + if (a->next != NULL) + s[slen++] = ','; + } + s[slen++] = ')'; + s[slen++] = '{'; + s[slen] = '\0'; + return arg; + } + + len = strlen(stmt) + 1; /* 1 for newline */ + s = alist->a_string; + slen = strlen(s); + ssize = alist->a_count; + if (len > ssize - slen) { + ssize = slen + len + EVALSIZE; + erealloc(s, char *, (ssize + 2) * sizeof(char), "append_statement"); + alist->a_string = s; + alist->a_count = ssize; + } + memcpy(s + slen, stmt, len); + slen += len; + if (slen >= 2 && s[slen - 2] != '\n') { + s[slen - 1] = '\n'; + s[slen] = '\0'; + } + + if (stmt == end_EVAL) + erealloc(alist->a_string, char *, slen + 2, "append_statement"); + return alist; + +#undef EVALSIZE +} + + +/* command names sorted in ascending order */ + +struct cmdtoken cmdtab[] = { +{ "backtrace", "bt", D_backtrace, D_BACKTRACE, do_backtrace, + gettext_noop("backtrace [N] - print trace of all or N innermost (outermost if N < 0) frames.") }, +{ "break", "b", D_break, D_BREAK, do_breakpoint, + gettext_noop("break [[filename:]N|function] - set breakpoint at the specified location.") }, +{ "clear", "", D_clear, D_CLEAR, do_clear, + gettext_noop("clear [[filename:]N|function] - delete breakpoints previously set.") }, +{ "commands", "", D_commands, D_COMMANDS, do_commands, + gettext_noop("commands [num] - starts a list of commands to be executed at a breakpoint(watchpoint) hit.") }, +{ "condition", "", D_condition, D_CONDITION, do_condition, + gettext_noop("condition num [expr] - set or clear breakpoint or watchpoint condition.") }, +{ "continue", "c", D_continue, D_CONTINUE, do_continue, + gettext_noop("continue [COUNT] - continue program being debugged.") }, +{ "delete", "d", D_delete, D_DELETE, do_delete_breakpoint, + gettext_noop("delete [breakpoints] [range] - delete specified breakpoints.") }, +{ "disable", "", D_disable, D_DISABLE, do_disable_breakpoint, + gettext_noop("disable [breakpoints] [range] - disable specified breakpoints.") }, +{ "display", "", D_display, D_DISPLAY, do_display, + gettext_noop("display [var] - print value of variable each time the program stops.") }, +{ "down", "", D_down, D_DOWN, do_down, + gettext_noop("down [N] - move N frames down the stack.") }, +{ "dump", "", D_dump, D_DUMP, do_dump_instructions, + gettext_noop("dump [filename] - dump instructions to file or stdout.") }, +{ "enable", "e", D_enable, D_ENABLE, do_enable_breakpoint, + gettext_noop("enable [once|del] [breakpoints] [range] - enable specified breakpoints.") }, +{ "end", "", D_end, D_END, do_commands, + gettext_noop("end - end a list of commands or awk statements.") }, +{ "eval", "", D_eval, D_EVAL, do_eval, + gettext_noop("eval stmt|[p1, p2, ...] - evaluate awk statement(s).") }, +{ "finish", "", D_finish, D_FINISH, do_finish, + gettext_noop("finish - execute until selected stack frame returns.") }, +{ "frame", "f", D_frame, D_FRAME, do_frame, + gettext_noop("frame [N] - select and print stack frame number N.") }, +{ "help", "h", D_help, D_HELP, do_help, + gettext_noop("help [command] - print list of commands or explanation of command.") }, +{ "ignore", "", D_ignore, D_IGNORE, do_ignore_breakpoint, + gettext_noop("ignore N COUNT - set ignore-count of breakpoint number N to COUNT.") }, +{ "info", "i", D_info, D_INFO, do_info, + gettext_noop("info topic - source|sources|variables|functions|break|frame|args|locals|display|watch.") }, +{ "list", "l", D_list, D_LIST, do_list, + gettext_noop("list [-|+|[filename:]lineno|function|range] - list specified line(s).") }, +{ "next", "n", D_next, D_NEXT, do_next, + gettext_noop("next [COUNT] - step program, proceeding through subroutine calls.") }, +{ "nexti", "ni", D_nexti, D_NEXTI, do_nexti, + gettext_noop("nexti [COUNT] - step one instruction, but proceed through subroutine calls.") }, +{ "option", "o", D_option, D_OPTION, do_option, + gettext_noop("option [name[=value]] - set or display debugger option(s).") }, +{ "print", "p", D_print, D_PRINT, do_print_var, + gettext_noop("print var [var] - print value of a variable or array.") }, +{ "printf", "", D_printf, D_PRINTF, do_print_f, + gettext_noop("printf format, [arg], ... - formatted output.") }, +{ "quit", "q", D_quit, D_QUIT, do_quit, + gettext_noop("quit - exit debugger.") }, +{ "return", "", D_return, D_RETURN, do_return, + gettext_noop("return [value] - make selected stack frame return to its caller.") }, +{ "run", "r", D_run, D_RUN, do_run, + gettext_noop("run - start or restart executing program.") }, +#ifdef HAVE_LIBREADLINE +{ "save", "", D_save, D_SAVE, do_save, + gettext_noop("save filename - save commands from the session to file.") }, +#endif +{ "set", "", D_set, D_SET, do_set_var, + gettext_noop("set var = value - assign value to a scalar variable.") }, +{ "silent", "", D_silent, D_SILENT, do_commands, + gettext_noop("silent - suspends usual message when stopped at a breakpoint/watchpoint.") }, +{ "source", "", D_source, D_SOURCE, do_source, + gettext_noop("source file - execute commands from file.") }, +{ "step", "s", D_step, D_STEP, do_step, + gettext_noop("step [COUNT] - step program until it reaches a different source line.") }, +{ "stepi", "si", D_stepi, D_STEPI, do_stepi, + gettext_noop("stepi [COUNT] - step one instruction exactly.") }, +{ "tbreak", "t", D_tbreak, D_TBREAK, do_tmp_breakpoint, + gettext_noop("tbreak [[filename:]N|function] - set a temporary breakpoint.") }, +{ "trace", "", D_trace, D_TRACE, do_trace_instruction, + gettext_noop("trace on|off - print instruction before executing.") }, +{ "undisplay", "", D_undisplay, D_UNDISPLAY, do_undisplay, + gettext_noop("undisplay [N] - remove variable(s) from automatic display list.") }, +{ "until", "u", D_until, D_UNTIL, do_until, + gettext_noop("until [[filename:]N|function] - execute until program reaches a different line or line N within current frame.") }, +{ "unwatch", "", D_unwatch, D_UNWATCH, do_unwatch, + gettext_noop("unwatch [N] - remove variable(s) from watch list.") }, +{ "up", "", D_up, D_UP, do_up, + gettext_noop("up [N] - move N frames up the stack.") }, +{ "watch", "w", D_watch, D_WATCH, do_watch, + gettext_noop("watch var - set a watchpoint for a variable.") }, +{ NULL, NULL, D_illegal, 0, (Func_cmd) 0, + NULL }, +}; + +struct argtoken argtab[] = { + { "args", D_info, A_ARGS }, + { "break", D_info, A_BREAK }, + { "del", D_enable, A_DEL }, + { "display", D_info, A_DISPLAY }, + { "frame", D_info, A_FRAME }, + { "functions", D_info, A_FUNCTIONS }, + { "locals", D_info, A_LOCALS }, + { "off", D_trace, A_TRACE_OFF }, + { "on", D_trace, A_TRACE_ON }, + { "once", D_enable, A_ONCE }, + { "source", D_info, A_SOURCE }, + { "sources", D_info, A_SOURCES }, + { "variables", D_info, A_VARIABLES }, + { "watch", D_info, A_WATCH }, + { NULL, D_illegal, 0 }, +}; + + +/* get_command --- return command handler function */ + +Func_cmd +get_command(int ctype) +{ + int i; + for (i = 0; cmdtab[i].name != NULL; i++) { + if (cmdtab[i].type == ctype) + return cmdtab[i].cf_ptr; + } + return (Func_cmd) 0; +} + +/* get_command_name --- return command name given it's type */ + +const char * +get_command_name(int ctype) +{ + int i; + for (i = 0; cmdtab[i].name != NULL; i++) { + if (cmdtab[i].type == ctype) + return cmdtab[i].name; + } + return NULL; +} + +/* mk_cmdarg --- make an argument for command */ + +static CMDARG * +mk_cmdarg(enum argtype type) +{ + CMDARG *arg; + emalloc(arg, CMDARG *, sizeof(CMDARG), "mk_cmdarg"); + memset(arg, 0, sizeof(CMDARG)); + arg->type = type; + return arg; +} + +/* append_cmdarg --- append ARG to the list of arguments for the current command */ + +static void +append_cmdarg(CMDARG *arg) +{ + static CMDARG *savetail; + + if (arg_list == NULL) + arg_list = arg; + else + savetail->next = arg; + savetail = arg; +} + +/* free_cmdarg --- free all arguments in LIST */ + +void +free_cmdarg(CMDARG *list) +{ + CMDARG *arg, *nexta; + + for (arg = list; arg != NULL; arg = nexta) { + nexta = arg->next; + + switch (arg->type) { + case D_variable: + case D_subscript: + case D_array: + case D_string: + if (arg->a_string != NULL) + efree(arg->a_string); + break; + case D_node: + case D_field: + unref(arg->a_node); + break; + default: + break; + } + efree(arg); + } +} + +/* yyerror --- print a syntax error message */ + +static void +yyerror(const char *mesg, ...) +{ + va_list args; + va_start(args, mesg); + fprintf(out_fp, _("error: ")); + vfprintf(out_fp, mesg, args); + fprintf(out_fp, "\n"); + va_end(args); + errcount++; + repeat_idx = -1; +} + + +/* yylex --- read a command and turn it into tokens */ + +static int +yylex(void) +{ + static char *lexptr = NULL; + static char *lexend; + int c; + char *tokstart; + size_t toklen; + + yylval = (CMDARG *) NULL; + + if (errcount > 0 && lexptr_begin == NULL) { + /* fake a new line */ + errcount = 0; + return '\n'; + } + + if (lexptr_begin == NULL) { +again: + lexptr_begin = read_a_line(dPrompt); + if (lexptr_begin == NULL) { /* EOF or error */ + if (get_eof_status() == EXIT_FATAL) + exit(EXIT_FATAL); + if (get_eof_status() == EXIT_FAILURE) { + static int seen_eof = 0; + + /* force a quit, and let do_quit (in debug.c) exit */ + if (! seen_eof) { + if (errno != 0) { + fprintf(stderr, _("can't read command (%s)\n"), strerror(errno)); + exit_val = EXIT_FAILURE; + } /* else + exit_val = EXIT_SUCCESS; */ + + seen_eof = 1; + return '\n'; /* end current command if any */ + } else if (seen_eof++ == 1) { + cmd_idx = find_command("quit", 4); + return D_QUIT; /* 'quit' token */ + } else + return '\n'; /* end command 'quit' */ + } + if (errno != 0) + d_error(_("can't read command (%s)"), strerror(errno)); + if (pop_cmd_src() == 0) + goto again; + exit(EXIT_FATAL); /* shouldn't happen */ + } + + if (! in_commands && ! in_eval /* history expansion off in 'commands' and 'eval' */ + && input_from_tty + ) + history_expand_line(&lexptr_begin); + + lexptr = lexptr_begin; + lexend = lexptr + strlen(lexptr); + if (*lexptr == '\0' /* blank line */ + && repeat_idx >= 0 + && input_from_tty + && ! in_eval + ) { +#ifdef HAVE_LIBREADLINE + HIST_ENTRY *h; + h = previous_history(); + if (h != NULL) + add_history(h->line); +#endif + cmd_idx = repeat_idx; + return cmdtab[cmd_idx].class; /* repeat last command */ + } + repeat_idx = -1; + } + + c = *lexptr; + + while (c == ' ' || c == '\t') + c = *++lexptr; + + if (! input_from_tty && c == '#') + return '\n'; + + tokstart = lexptr; + if (lexptr >= lexend) + return '\n'; + + if (cmd_idx < 0) { /* need a command */ + if (c == '?' && tokstart[1] == '\0' && ! in_eval) { + lexptr++; + cmd_idx = find_command("help", 4); + return D_HELP; + } + + while (c != '\0' && c != ' ' && c != '\t') { + if (! isalpha(c) && ! in_eval) { + yyerror(_("invalid character in command")); + return '\n'; + } + c = *++lexptr; + } + + toklen = lexptr - tokstart; + + if (in_eval) { + if (toklen == 3 + && tokstart[3] == '\0' + && tokstart[0] == 'e' + && tokstart[1] == 'n' + && tokstart[2] == 'd' + ) { + cmd_idx = find_command(tokstart, toklen); + return D_END; + } + lexptr = lexend; + return D_STATEMENT; + } + + cmd_idx = find_command(tokstart, toklen); + if (cmd_idx >= 0) { + if (in_commands && cmdtab[cmd_idx].type != D_eval) { + /* add the actual command string (lexptr_begin) to + * arg_list; command string for 'eval' prepended to the arg_list + * in the grammer above (see eval_cmd non-terminal). + */ + CMDARG *arg; + arg = mk_cmdarg(D_string); + arg->a_string = estrdup(lexptr_begin, lexend - lexptr_begin); + append_cmdarg(arg); + } + return cmdtab[cmd_idx].class; + } else { + yyerror(_("unknown command - \"%.*s\", try help"), toklen, tokstart); + return '\n'; + } + } + + c = *lexptr; + + if (cmdtab[cmd_idx].type == D_option) { + if (c == '=') + return *lexptr++; + } else if (c == '-' || c == '+' || c == ':' || c == '|') + return *lexptr++; + + if (c == '"') { + char *str, *p; + int flags = ALREADY_MALLOCED; + int esc_seen = FALSE; + + toklen = lexend - lexptr; + emalloc(str, char *, toklen + 2, "yylex"); + p = str; + + while ((c = *++lexptr) != '"') { + if (lexptr == lexend) { +err: + efree(str); + yyerror(_("unterminated string")); + return '\n'; + } + if (c == '\\') { + c = *++lexptr; + esc_seen = TRUE; + if (want_nodeval || c != '"') + *p++ = '\\'; + } + if (lexptr == lexend) + goto err; + *p++ = c; + } + lexptr++; + *p = '\0'; + + if (! want_nodeval) { + yylval = mk_cmdarg(D_string); + yylval->a_string = estrdup(str, p - str); + append_cmdarg(yylval); + return D_STRING; + } else { /* awk string */ + if (esc_seen) + flags |= SCAN; + yylval = mk_cmdarg(D_node); + yylval->a_node = make_str_node(str, p - str, flags); + append_cmdarg(yylval); + return D_NODE; + } + } + + if (! want_nodeval) { + while ((c = *++lexptr) != '\0' && c != ':' && c != '-' + && c != ' ' && c != '\t' && c != '=') + ; + + /* Is it an integer? */ + if (isdigit((unsigned char) tokstart[0]) && cmdtab[cmd_idx].type != D_option) { + char *end; + long l; + + errno = 0; + l = strtol(tokstart, &end, 0); + if (errno != 0) { + yyerror(_("%s"), strerror(errno)); + errno = 0; + return '\n'; + } + + if (lexptr == end) { + yylval = mk_cmdarg(D_int); + yylval->a_int = l; + append_cmdarg(yylval); + return D_INT; + } + } + + /* Must be string */ + yylval = mk_cmdarg(D_string); + yylval->a_string = estrdup(tokstart, lexptr - tokstart); + append_cmdarg(yylval); + return D_STRING; + } + + /* assert(want_nodval == TRUE); */ + + /* look for awk number */ + + if (isdigit((unsigned char) tokstart[0])) { + double d; + + errno = 0; + d = strtod(tokstart, &lexptr); + if (errno != 0) { + yyerror(strerror(errno)); + errno = 0; + return '\n'; + } + yylval = mk_cmdarg(D_node); + yylval->a_node = make_number(d); + append_cmdarg(yylval); + return D_NODE; + } + + c = *lexptr; + if (c == '$' || c == '@' + || c == '[' || c == ']' + || c == ',' || c == '=') + return *lexptr++; + + if (c != '_' && ! isalpha(c)) { + yyerror(_("invalid character")); + return '\n'; + } + + while (isalnum(c) || c == '_') + c = *++lexptr; + toklen = lexptr - tokstart; + + /* awk variable */ + yylval = mk_cmdarg(D_variable); + yylval->a_string = estrdup(tokstart, toklen); + append_cmdarg(yylval); + return D_VARIABLE; +} + +/* find_argument --- find index in 'argtab' for a command option */ + +static int +find_argument(CMDARG *arg) +{ + /* non-number argument */ + int idx; + char *name, *p; + size_t len; + assert(cmd_idx >= 0); + name = arg->a_string; + len = strlen(name); + for (idx = 0; (p = (char *) argtab[idx].name) != NULL; idx++) { + if (cmdtab[cmd_idx].type == argtab[idx].cmd + && *p == *name + && strlen(p) == len + && strncmp(p, name, len) == 0 + ) + return idx; + } + return -1; /* invalid option */ +} + +/* concat_args --- concatenate argument strings into a single string NODE */ + +static NODE * +concat_args(CMDARG *arg, int count) +{ + NODE *n; + NODE **tmp; + char *str, *subsep, *p; + long len, subseplen; + int i; + + if (count == 1) { + n = force_string(arg->a_node); + return dupnode(n); + } + + emalloc(tmp, NODE **, count * sizeof(NODE *), "concat_args"); + subseplen = SUBSEP_node->var_value->stlen; + subsep = SUBSEP_node->var_value->stptr; + len = -subseplen; + + for (i = 0; i < count; i++) { + n = force_string(arg->a_node); + len += n->stlen + subseplen; + tmp[i] = n; + arg = arg->next; + } + + emalloc(str, char *, len + 2, "concat_args"); + n = tmp[0]; + memcpy(str, n->stptr, n->stlen); + p = str + n->stlen; + for (i = 1; i < count; i++) { + if (subseplen == 1) + *p++ = *subsep; + else if (subseplen > 0) { + memcpy(p, subsep, subseplen); + p += subseplen; + } + + n = tmp[i]; + memcpy(p, n->stptr, n->stlen); + p += n->stlen; + } + str[len] = '\0'; + efree(tmp); + return make_str_node(str, len, ALREADY_MALLOCED); +} + +/* find_command --- find the index in 'cmdtab' using exact, + * abbreviation or unique partial match + */ + +static int +find_command(const char *token, size_t toklen) +{ + char *name, *abrv; + int i, k; + int try_exact = TRUE; + int abrv_match = -1; + int partial_match = -1; + +#if 'a' == 0x81 /* it's EBCDIC */ + /* make sure all lower case characters in token (sorting + * isn't the solution in this case) + */ + for (i = 0; i < toklen; i++) { + if (token[i] != tolower(token[i])) + return -1; + } +#endif + + k = sizeof(cmdtab)/sizeof(cmdtab[0]) - 1; + for (i = 0; i < k; i++) { + name = (char *) cmdtab[i].name; + if (try_exact && *token == *name + && toklen == strlen(name) + && strncmp(name, token, toklen) == 0 + ) + return i; + if (*name > *token) + try_exact = FALSE; + if (abrv_match < 0) { + abrv = cmdtab[i].abbrvn; + if (abrv[0] == token[0]) { + if (toklen == 1 && ! abrv[1]) + abrv_match = i; + else if (toklen == 2 && abrv[1] == token[1]) + abrv_match = i; + } + } + if (! try_exact && abrv_match >= 0) + return abrv_match; + if (partial_match < 0) { + if (*token == *name + && toklen < strlen(name) + && strncmp(name, token, toklen) == 0 + ) { + if ((i == k - 1 || strncmp(cmdtab[i + 1].name, token, toklen) != 0) + && (i == 0 || strncmp(cmdtab[i - 1].name, token, toklen) != 0) + ) + partial_match = i; + } + } + } + return partial_match; +} + +/* do_help -- help command */ + +int +do_help(CMDARG *arg, int cmd) +{ + int i; + if (arg == NULL) { + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + for (i = 0; cmdtab[i].name != NULL; i++) { + gprintf(out_fp, "%s:\n", cmdtab[i].name); + gprintf(out_fp, "\t%s\n", _(cmdtab[i].help_txt)); + } + } + } else if (arg->type == D_string) { + char *name; + name = arg->a_string; + i = find_command(name, strlen(name)); + if (i >= 0) { + fprintf(out_fp, "%s\n", cmdtab[i].help_txt); + if (strcmp(cmdtab[i].name, "option") == 0) + option_help(); + } else + fprintf(out_fp, _("undefined command: %s\n"), name); + } + + return FALSE; +} + + +/* next_word --- find the next word in a line to complete + * (word seperation characters are space and tab). + */ + +static char * +next_word(char *p, int len, char **endp) +{ + char *q; + int i; + + if (p == NULL || len <= 0) + return NULL; + for (i = 0; i < len; i++, p++) + if (*p != ' ' && *p != '\t') + break; + if (i == len) + return NULL; + if (endp != NULL) { + for (i++, q = p + 1; i < len; i++, q++) + if (*q == ' ' || *q == '\t') + break; + *endp = q; + } + return p; +} + +#ifdef HAVE_LIBREADLINE + +/* command_completion --- attempt to complete based on the word number in line; + * try to complete on command names if this is the first word; for the next + * word(s), the type of completion depends on the command name (first word). + */ + +#ifndef RL_READLINE_VERSION /* < 4.2a */ +#define rl_completion_matches(x, y) completion_matches((char *) (x), (y)) +#endif + + +char ** +command_completion(const char *text, int start, int end) +{ + char *cmdtok, *e; + int idx; + int len; + + rl_attempted_completion_over = TRUE; /* no default filename completion please */ + + this_cmd = D_illegal; + len = start; + if ((cmdtok = next_word(rl_line_buffer, len, &e)) == NULL) /* no first word yet */ + return rl_completion_matches(text, command_generator); + len -= (e - rl_line_buffer); + + idx = find_command(cmdtok, e - cmdtok); + if (idx < 0) + return NULL; + this_cmd = cmdtab[idx].type; + + if (! next_word(e, len, NULL)) { + switch (this_cmd) { + case D_break: + case D_list: + case D_until: + case D_tbreak: + case D_clear: + return rl_completion_matches(text, srcfile_generator); + case D_info: + case D_enable: + case D_trace: + case D_help: + return rl_completion_matches(text, argument_generator); + case D_option: + return rl_completion_matches(text, option_generator); + case D_print: + case D_printf: + case D_set: + case D_display: + case D_watch: + return rl_completion_matches(text, variable_generator); + default: + return NULL; + } + } + if (this_cmd == D_print || this_cmd == D_printf) + return rl_completion_matches(text, variable_generator); + return NULL; +} + +/* command_generator --- generator function for command completion */ + +static char * +command_generator(const char *text, int state) +{ + static size_t textlen; + static int idx = 0; + char *name; + + if (! state) { /* first time */ + textlen = strlen(text); + idx = 0; + } + while ((name = (char *) cmdtab[idx].name) != NULL) { + idx++; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + return NULL; +} + +/* srcfile_generator --- generator function for source file completion */ + +static char * +srcfile_generator(const char *text, int state) +{ + static size_t textlen; + static SRCFILE *s; + char *name; + extern SRCFILE *srcfiles; + + if (! state) { /* first time */ + textlen = strlen(text); + s = srcfiles->next; + } + while (s != srcfiles) { + if (s->stype != SRC_FILE && s->stype != SRC_INC) { + s = s->next; + continue; + } + name = s->src; + s = s->next; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + return NULL; +} + +/* argument_generator --- generator function for non-number argument completion */ + +static char * +argument_generator(const char *text, int state) +{ + static size_t textlen; + static int idx; + char *name; + + if (! state) { /* first time */ + textlen = strlen(text); + idx = 0; + } + + if (this_cmd == D_help) { + while ((name = (char *) cmdtab[idx++].name) != NULL) { + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + } else { + while ((name = (char *) argtab[idx].name) != NULL) { + if (this_cmd != argtab[idx++].cmd) + continue; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + } + return NULL; +} + +/* variable_generator --- generator function for variable name completion */ + +static char * +variable_generator(const char *text, int state) +{ + static size_t textlen; + static int idx = 0; + static char **pnames = NULL; + static NODE **var_table = NULL; + char *name; + NODE *hp; + + if (! state) { /* first time */ + textlen = strlen(text); + if (var_table != NULL) + efree(var_table); + var_table = get_varlist(); + idx = 0; + pnames = get_parmlist(); /* names of function params in + * current context; the array + * is NULL terminated in + * awkgram.y (func_install). + */ + } + + /* function params */ + while (pnames != NULL) { + name = pnames[idx]; + if (name == NULL) { + pnames = NULL; /* don't try to match params again */ + idx = 0; + break; + } + idx++; + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + + /* globals */ + while ((hp = var_table[idx]) != NULL) { + idx++; + if (hp->hvalue->type == Node_func) + continue; + if (strncmp(hp->hname, text, textlen) == 0) + return estrdup(hp->hname, hp->hlength); + } + return NULL; +} + +/* history_expand_line --- history expand the LINE */ + +static void +history_expand_line(char **line) +{ + int ret; + char *expansion; + + if (! *line || input_fd != 0 || ! input_from_tty) + return; + using_history(); + ret = history_expand(*line, &expansion); + if (ret < 0 || ret == 2) + efree(expansion); + else { + efree(*line); + *line = expansion; + } +} + +#endif + diff -Nru gawk-3.1.8+dfsg/config.rpath gawk-4.0.1+dfsg/config.rpath --- gawk-3.1.8+dfsg/config.rpath 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/config.rpath 2010-12-22 19:09:06.000000000 +0000 @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2007 Free Software Foundation, Inc. +# Copyright 1996-2010 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # @@ -47,7 +47,7 @@ done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` -# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. +# Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then @@ -64,7 +64,7 @@ ;; esac ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' @@ -76,7 +76,13 @@ ;; linux* | k*bsd*-gnu) case $cc_basename in - icc* | ecc*) + ecc*) + wl='-Wl,' + ;; + icc* | ifort*) + wl='-Wl,' + ;; + lf95*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) @@ -124,7 +130,7 @@ esac fi -# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. +# Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= @@ -132,7 +138,7 @@ hardcode_minus_L=no case "$host_os" in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -158,7 +164,7 @@ # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no @@ -182,7 +188,7 @@ ld_shlibs=no fi ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -254,7 +260,7 @@ hardcode_direct=unsupported fi ;; - aix4* | aix5*) + aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -264,7 +270,7 @@ # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes @@ -326,7 +332,7 @@ ;; bsdi[45]*) ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -494,7 +500,7 @@ fi # Check dynamic linker characteristics -# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the @@ -505,7 +511,7 @@ aix3*) library_names_spec='$libname.a' ;; - aix4* | aix5*) + aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) @@ -517,7 +523,7 @@ bsdi[45]*) library_names_spec='$libname$shrext' ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; diff -Nru gawk-3.1.8+dfsg/configh.in gawk-4.0.1+dfsg/configh.in --- gawk-3.1.8+dfsg/configh.in 2010-05-06 17:56:02.000000000 +0000 +++ gawk-4.0.1+dfsg/configh.in 2012-03-28 20:03:33.000000000 +0000 @@ -1,8 +1,5 @@ /* configh.in. Generated from configure.ac by autoheader. */ -/* switch statements are enabled in awk programs */ -#undef ALLOW_SWITCH - /* dynamic loading is possible */ #undef DYNAMIC @@ -106,7 +103,10 @@ /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM -/* Define if you have the sigsegv library. */ +/* Define to 1 if you have a fully functional readline library. */ +#undef HAVE_LIBREADLINE + +/* Define if you have the libsigsegv library. */ #undef HAVE_LIBSIGSEGV /* Define to 1 if you have the header file. */ @@ -163,12 +163,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H -/* we have portals on /p on this system */ -#undef HAVE_PORTALS +/* 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 `setsid' function. */ +#undef HAVE_SETSID + /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF @@ -197,6 +200,9 @@ /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR +/* Define to 1 if you have the `strcoll' function. */ +#undef HAVE_STRCOLL + /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR @@ -237,6 +243,9 @@ /* Define to 1 if you have the `system' function. */ #undef HAVE_SYSTEM +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -317,9 +326,6 @@ /* systems should define this type here */ #undef HAVE_WINT_T -/* disable fatal errors on directories */ -#undef NO_DIRECTORY_FATAL - /* disable lint checks */ #undef NO_LINT @@ -347,9 +353,6 @@ /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT -/* Define to 1 if the C compiler supports function prototypes. */ -#undef PROTOTYPES - /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE @@ -359,9 +362,6 @@ /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG -/* return type of sprintf */ -#undef SPRINTF_RET - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -423,9 +423,6 @@ # undef __CHAR_UNSIGNED__ #endif -/* Define like PROTOTYPES; this can be used by system headers. */ -#undef __PROTOTYPES - /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff -Nru gawk-3.1.8+dfsg/configure gawk-4.0.1+dfsg/configure --- gawk-3.1.8+dfsg/configure 2010-05-06 17:55:45.000000000 +0000 +++ gawk-4.0.1+dfsg/configure 2012-03-28 20:03:22.000000000 +0000 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for GNU Awk 3.1.8. +# Generated by GNU Autoconf 2.68 for GNU Awk 4.0.1. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -91,6 +91,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -216,11 +217,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -319,7 +327,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -359,19 +367,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -533,7 +541,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -552,8 +560,8 @@ # Identity of this package. PACKAGE_NAME='GNU Awk' PACKAGE_TARNAME='gawk' -PACKAGE_VERSION='3.1.8' -PACKAGE_STRING='GNU Awk 3.1.8' +PACKAGE_VERSION='4.0.1' +PACKAGE_STRING='GNU Awk 4.0.1' PACKAGE_BUGREPORT='bug-gawk@gnu.org' PACKAGE_URL='http://www.gnu.org/software/gawk/' @@ -599,6 +607,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +LIBREADLINE SOCKET_LIBS LIBSIGSEGV_PREFIX LTLIBSIGSEGV @@ -630,8 +639,6 @@ MSGFMT GETTEXT_MACRO_VERSION USE_NLS -ANSI2KNR -U LN_S YFLAGS YACC @@ -718,11 +725,8 @@ ac_subst_files='' ac_user_opts=' enable_option_checking -enable_portals with_whiny_user_strftime enable_lint -enable_switch -enable_directories_fatal enable_dependency_tracking enable_largefile enable_nls @@ -731,6 +735,7 @@ with_libiconv_prefix with_libintl_prefix with_libsigsegv_prefix +with_readline ' ac_precious_vars='build_alias host_alias @@ -805,8 +810,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -851,7 +857,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -877,7 +883,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1081,7 +1087,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1097,7 +1103,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1127,8 +1133,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1136,7 +1142,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1146,7 +1152,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1154,13 +1160,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1183,7 +1189,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1197,8 +1203,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_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 + $as_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 @@ -1213,9 +1219,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1254,11 +1260,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1284,7 +1290,7 @@ # 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.8 to adapt to many kinds of systems. +\`configure' configures GNU Awk 4.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1298,7 +1304,7 @@ --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 + -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 @@ -1354,7 +1360,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Awk 3.1.8:";; + short | recursive ) echo "Configuration of GNU Awk 4.0.1:";; esac cat <<\_ACEOF @@ -1362,10 +1368,7 @@ --disable-option-checking ignore unrecognized --enable/--with options --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 - --enable-switch Enable switch statements for awk programs - --disable-directories-fatal Disable fatal errors on directories --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files @@ -1383,6 +1386,7 @@ --without-libintl-prefix don't search for libintl in includedir and libdir --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir + --with-readline=DIR look for the readline library in DIR Some influential environment variables: CC C compiler command @@ -1393,8 +1397,9 @@ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. @@ -1467,10 +1472,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Awk configure 3.1.8 -generated by GNU Autoconf 2.65 +GNU Awk configure 4.0.1 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1514,7 +1519,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1540,7 +1545,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1551,7 +1556,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1564,10 +1569,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1603,7 +1608,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1626,17 +1631,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ------------------------------- ## +( $as_echo "## ------------------------------- ## ## Report this to bug-gawk@gnu.org ## -## ------------------------------- ## -_ASBOX +## ------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1645,7 +1648,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1686,7 +1689,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1700,7 +1703,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1718,7 +1721,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1763,7 +1766,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1777,7 +1780,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1818,7 +1821,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1995,7 +1998,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2008,7 +2011,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2063,7 +2066,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2076,7 +2079,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2120,19 +2123,22 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2141,8 +2147,12 @@ int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -2159,15 +2169,15 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_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.8, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by GNU Awk $as_me 4.0.1, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2277,11 +2287,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2315,11 +2323,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2332,11 +2338,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2350,11 +2354,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2409,7 +2411,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2424,7 +2431,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2504,7 +2515,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2537,16 +2548,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + 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 - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2575,7 +2592,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2662,11 +2679,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2688,7 +2705,7 @@ # 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". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2698,7 +2715,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2752,7 +2769,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2792,7 +2809,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2845,7 +2862,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2896,7 +2913,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2936,7 +2953,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2944,7 +2961,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2978,7 +2995,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2994,7 +3011,7 @@ # Define the identity of the package. PACKAGE='gawk' - VERSION='3.1.8' + VERSION='4.0.1' cat >>confdefs.h <<_ACEOF @@ -3037,17 +3054,6 @@ -# Check whether --enable-portals was given. -if test "${enable_portals+set}" = set; then : - enableval=$enable_portals; if test "$enableval" = yes - then - -$as_echo "#define HAVE_PORTALS 1" >>confdefs.h - - fi - -fi - # Check whether --with-whiny-user-strftime was given. if test "${with_whiny_user_strftime+set}" = set; then : @@ -3071,28 +3077,6 @@ fi -# Check whether --enable-switch was given. -if test "${enable_switch+set}" = set; then : - enableval=$enable_switch; if test "$enableval" = yes - then - -$as_echo "#define ALLOW_SWITCH 1" >>confdefs.h - - fi - -fi - -# Check whether --enable-directories-fatal was given. -if test "${enable_directories_fatal+set}" = set; then : - enableval=$enable_directories_fatal; if test "$enableval" = no - then - -$as_echo "#define NO_DIRECTORY_FATAL 1" >>confdefs.h - - fi - -fi - DEPDIR="${am__leading_dot}deps" @@ -3166,7 +3150,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3206,7 +3190,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3259,7 +3243,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3299,7 +3283,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3358,7 +3342,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3402,7 +3386,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3456,8 +3440,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3571,9 +3555,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3615,8 +3598,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3673,9 +3656,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3686,7 +3669,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3726,8 +3709,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3737,7 +3720,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3774,7 +3757,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3852,7 +3835,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3951,7 +3934,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4087,7 +4070,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4117,7 +4100,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4133,11 +4116,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4176,7 +4159,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4192,18 +4175,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4215,7 +4198,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4264,7 +4247,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4278,7 +4261,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4330,7 +4313,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4345,7 +4328,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4462,8 +4445,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4475,7 +4457,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -4497,7 +4479,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4537,7 +4519,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4589,7 +4571,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4608,7 +4590,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then @@ -4666,7 +4648,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4706,7 +4688,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4759,7 +4741,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4799,7 +4781,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4858,7 +4840,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4902,7 +4884,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4956,8 +4938,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4986,7 +4968,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5023,7 +5005,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -5101,7 +5083,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -5200,7 +5182,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5335,7 +5317,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5365,7 +5347,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5381,11 +5363,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5424,7 +5406,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5440,18 +5422,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5469,7 +5451,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -5477,7 +5459,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -5531,8 +5513,8 @@ if test "OS/390" = "`uname`" then CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" - # Must rebuild awkgram.c from Bison for EBCDIC - rm -f awkgram.c + # Must rebuild awkgram.c and command.c from Bison for EBCDIC + rm -f awkgram.c command.c ac_cv_zos_uss=yes else ac_cv_zos_uss=no @@ -5543,7 +5525,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 $as_echo_n "checking for strerror in -lcposix... " >&6; } -if test "${ac_cv_lib_cposix_strerror+set}" = set; then : +if ${ac_cv_lib_cposix_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5577,7 +5559,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5 $as_echo "$ac_cv_lib_cposix_strerror" >&6; } -if test "x$ac_cv_lib_cposix_strerror" = x""yes; then : +if test "x$ac_cv_lib_cposix_strerror" = xyes; then : LIBS="$LIBS -lcposix" fi @@ -5592,7 +5574,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -5643,7 +5625,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -5712,7 +5694,7 @@ if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -5784,7 +5766,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX compilation hacks" >&5 $as_echo_n "checking for AIX compilation hacks... " >&6; } -if test "${gawk_cv_aix_hack+set}" = set; then : +if ${gawk_cv_aix_hack+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5803,7 +5785,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux/Alpha compilation hacks" >&5 $as_echo_n "checking for Linux/Alpha compilation hacks... " >&6; } -if test "${gawk_cv_linux_alpha_hack+set}" = set; then : +if ${gawk_cv_linux_alpha_hack+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5832,42 +5814,11 @@ CFLAGS="$CFLAGS -D_SYSV3" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 -$as_echo_n "checking for function prototypes... " >&6; } -if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define PROTOTYPES 1" >>confdefs.h - - -$as_echo "#define __PROTOTYPES 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$ac_cv_prog_cc_stdc" != no; then - U= ANSI2KNR= -else - U=_ ANSI2KNR=./ansi2knr -fi -# Ensure some checks needed by ansi2knr itself. - -for ac_header in string.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRING_H 1 -_ACEOF - -fi - -done - +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 case `(uname) 2> /dev/null` in @@ -5895,7 +5846,7 @@ - GETTEXT_MACRO_VERSION=0.17 + GETTEXT_MACRO_VERSION=0.18 @@ -5932,7 +5883,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -5973,7 +5924,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -6055,7 +6006,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -6133,7 +6084,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -6197,27 +6148,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -6235,14 +6186,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -6250,7 +6201,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -6306,7 +6257,7 @@ # 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%/%"` + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; @@ -6326,7 +6277,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -6340,9 +6291,9 @@ # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; + test "$with_gnu_ld" != no && break ;; *) - test "$with_gnu_ld" != yes && break ;; + test "$with_gnu_ld" != yes && break ;; esac fi done @@ -6360,10 +6311,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -6383,7 +6334,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -6414,23 +6365,70 @@ - acl_libdirstem=lib - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; + + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _LP64 +sixtyfour bits +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + gl_cv_solaris_64bit=yes +else + gl_cv_solaris_64bit=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +$as_echo "$gl_cv_solaris_64bit" >&6; } + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi - done - IFS="$acl_save_IFS" - fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + + + @@ -6476,6 +6474,10 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi fi fi @@ -6485,6 +6487,7 @@ LTLIBICONV= INCICONV= LIBICONV_PREFIX= + HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= @@ -6627,7 +6630,9 @@ 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/$acl_libdirstem"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= @@ -6694,7 +6699,16 @@ case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIBICONV_PREFIX="$basedir" + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; esac @@ -6743,9 +6757,11 @@ case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -6895,9 +6911,15 @@ + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -6931,7 +6953,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -7007,7 +7029,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7070,7 +7092,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7127,7 +7149,7 @@ if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } -if test "${am_cv_func_iconv_works+set}" = set; then : +if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7167,6 +7189,25 @@ return 1; } } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { @@ -7245,6 +7286,9 @@ + + + use_additional=yes acl_save_prefix="$prefix" @@ -7281,6 +7325,10 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi fi fi @@ -7290,6 +7338,7 @@ LTLIBINTL= INCINTL= LIBINTL_PREFIX= + HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= @@ -7432,7 +7481,9 @@ 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/$acl_libdirstem"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= @@ -7499,7 +7550,16 @@ case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIBINTL_PREFIX="$basedir" + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; esac @@ -7548,9 +7608,11 @@ case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -7676,9 +7738,14 @@ done fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -7857,7 +7924,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7891,7 +7958,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${gt_cv_val_LC_MESSAGES+set}" = set; then : +if ${gt_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7924,7 +7991,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8036,7 +8103,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8077,7 +8144,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8112,13 +8179,12 @@ for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ netdb.h netinet/in.h stdarg.h stddef.h string.h \ - sys/param.h sys/socket.h sys/time.h unistd.h \ + sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \ termios.h stropts.h wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8133,7 +8199,7 @@ for ac_header in memory.h do : ac_fn_c_check_header_mongrel "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" -if test "x$ac_cv_header_memory_h" = x""yes; then : +if test "x$ac_cv_header_memory_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMORY_H 1 _ACEOF @@ -8146,7 +8212,7 @@ for ac_header in strings.h do : ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" -if test "x$ac_cv_header_strings_h" = x""yes; then : +if test "x$ac_cv_header_strings_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRINGS_H 1 _ACEOF @@ -8158,7 +8224,7 @@ fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -8170,7 +8236,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8202,7 +8268,7 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -8214,7 +8280,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : +if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8244,7 +8310,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 $as_echo_n "checking type of array argument to getgroups... " >&6; } -if test "${ac_cv_type_getgroups+set}" = set; then : +if ${ac_cv_type_getgroups+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -8312,7 +8378,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : +if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8361,7 +8427,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : +if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8412,7 +8478,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } -if test "${gl_cv_header_inttypes_h+set}" = set; then : +if ${gl_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8452,7 +8518,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } -if test "${gl_cv_header_stdint_h+set}" = set; then : +if ${gl_cv_header_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8524,7 +8590,7 @@ fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = x""yes; then : +if test "x$ac_cv_type_ssize_t" = xyes; then : else @@ -8540,7 +8606,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5 $as_echo_n "checking size of unsigned int... " >&6; } -if test "${ac_cv_sizeof_unsigned_int+set}" = set; then : +if ${ac_cv_sizeof_unsigned_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int" "$ac_includes_default"; then : @@ -8549,9 +8615,8 @@ if test "$ac_cv_type_unsigned_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_int=0 fi @@ -8574,7 +8639,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : @@ -8583,9 +8648,8 @@ if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi @@ -8604,22 +8668,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "int.*sprintf" >/dev/null 2>&1; then : - -$as_echo "#define SPRINTF_RET int" >>confdefs.h - -else - $as_echo "#define SPRINTF_RET char *" >>confdefs.h - -fi -rm -f conftest* - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ #include int main () @@ -8707,13 +8755,13 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include #include " -if test "x$ac_cv_type_socklen_t" = x""yes; then : +if test "x$ac_cv_type_socklen_t" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 $as_echo_n "checking for socklen_t equivalent... " >&6; } - if test "${rsync_cv_socklen_t_equiv+set}" = set; then : + if ${rsync_cv_socklen_t_equiv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8771,13 +8819,13 @@ for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : +if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h @@ -8795,8 +8843,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8816,8 +8863,7 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -8831,7 +8877,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } -if test "${ac_cv_func_working_mktime+set}" = set; then : +if ${ac_cv_func_working_mktime+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -8869,8 +8915,8 @@ static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", +static const char *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])) @@ -8887,7 +8933,7 @@ 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"); + putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; @@ -8900,16 +8946,14 @@ } static int -mktime_test1 (now) - time_t now; +mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int -mktime_test (now) - time_t now; +mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) @@ -8933,8 +8977,7 @@ } static int -bigtime_test (j) - int j; +bigtime_test (int j) { struct tm tm; time_t now; @@ -8978,7 +9021,7 @@ 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"); + putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); @@ -9013,7 +9056,7 @@ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) - putenv (tz_strings[i]); + putenv ((char*) tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) @@ -9063,14 +9106,14 @@ esac ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = x""yes; then : +if test "x$ac_cv_func_getaddrinfo" = xyes; then : $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then : +if ${ac_cv_lib_socket_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9104,7 +9147,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; } -if test "x$ac_cv_lib_socket_getaddrinfo" = x""yes; then : +if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then : $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h @@ -9115,7 +9158,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmod in -lm" >&5 $as_echo_n "checking for fmod in -lm... " >&6; } -if test "${ac_cv_lib_m_fmod+set}" = set; then : +if ${ac_cv_lib_m_fmod+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9149,7 +9192,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fmod" >&5 $as_echo "$ac_cv_lib_m_fmod" >&6; } -if test "x$ac_cv_lib_m_fmod" = x""yes; then : +if test "x$ac_cv_lib_m_fmod" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -9160,7 +9203,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in -lm" >&5 $as_echo_n "checking for isinf in -lm... " >&6; } -if test "${ac_cv_lib_m_isinf+set}" = set; then : +if ${ac_cv_lib_m_isinf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9194,7 +9237,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_isinf" >&5 $as_echo "$ac_cv_lib_m_isinf" >&6; } -if test "x$ac_cv_lib_m_isinf" = x""yes; then : +if test "x$ac_cv_lib_m_isinf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -9205,7 +9248,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ismod in -lm" >&5 $as_echo_n "checking for ismod in -lm... " >&6; } -if test "${ac_cv_lib_m_ismod+set}" = set; then : +if ${ac_cv_lib_m_ismod+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9239,7 +9282,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_ismod" >&5 $as_echo "$ac_cv_lib_m_ismod" >&6; } -if test "x$ac_cv_lib_m_ismod" = x""yes; then : +if test "x$ac_cv_lib_m_ismod" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -9262,6 +9305,9 @@ + + + use_additional=yes acl_save_prefix="$prefix" @@ -9298,6 +9344,10 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi fi fi @@ -9307,6 +9357,7 @@ LTLIBSIGSEGV= INCSIGSEGV= LIBSIGSEGV_PREFIX= + HAVE_LIBSIGSEGV= rpathdirs= ltrpathdirs= names_already_handled= @@ -9449,7 +9500,9 @@ if test "X$found_dir" != "X"; then LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so" else haveit= @@ -9516,7 +9569,16 @@ case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIBSIGSEGV_PREFIX="$basedir" + if test "$name" = 'sigsegv'; then + LIBSIGSEGV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'sigsegv'; then + LIBSIGSEGV_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; esac @@ -9565,9 +9627,11 @@ case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -9694,6 +9758,11 @@ fi + + + + + ac_save_CPPFLAGS="$CPPFLAGS" for element in $INCSIGSEGV; do @@ -9721,12 +9790,15 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5 $as_echo_n "checking for libsigsegv... " >&6; } -if test "${ac_cv_libsigsegv+set}" = set; then : +if ${ac_cv_libsigsegv+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIBSIGSEGV" + case " $LIBSIGSEGV" in + *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;; + *) LIBS="$LIBSIGSEGV $LIBS" ;; + esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9741,7 +9813,7 @@ if ac_fn_c_try_link "$LINENO"; then : ac_cv_libsigsegv=yes else - ac_cv_libsigsegv=no + ac_cv_libsigsegv='no, consider installing GNU libsigsegv' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -9782,15 +9854,14 @@ for ac_func in atexit btowc fmod getgrent getgroups grantpt \ isascii iswctype iswlower iswupper mbrlen \ memcmp memcpy memcpy_ulong memmove memset \ - memset_ulong mkstemp setlocale snprintf strchr \ - strerror strftime strncasecmp strtod strtoul \ + memset_ulong mkstemp setenv setlocale setsid snprintf strchr \ + strerror strftime strncasecmp strcoll strtod strtoul \ system tmpfile towlower towupper tzset usleep wcrtomb \ - wcscoll wcscoll wctype + wcscoll wctype do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -9801,7 +9872,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 $as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } -if test "${ac_cv_func_mbrtowc+set}" = set; then : +if ${ac_cv_func_mbrtowc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9837,7 +9908,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : $as_echo "#define DYNAMIC 1" >>confdefs.h @@ -9858,7 +9929,7 @@ # HP-NSK has it in zrldsrl { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -9892,11 +9963,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then : + if ${ac_cv_search_dlopen+:} false; then : break fi done -if test "${ac_cv_search_dlopen+set}" = set; then : +if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no @@ -9925,7 +9996,7 @@ ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if test "${ac_cv_func_getpgrp_void+set}" = set; then : +if ${ac_cv_func_getpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else # Use it with a single arg. @@ -9967,6 +10038,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include int main() @@ -10025,14 +10097,14 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : +if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : +if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10066,7 +10138,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : SOCKET_LIBS="$SOCKET_LIBS -lnsl" fi @@ -10080,14 +10152,14 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : +if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then : +if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10121,7 +10193,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then : +if test "x$ac_cv_lib_socket_connect" = xyes; then : SOCKET_LIBS="-lsocket $SOCKET_LIBS" gawk_have_sockets=yes fi @@ -10148,8 +10220,85 @@ fi + + +# Check whether --with-readline was given. +if test "${with_readline+set}" = set; then : + withval=$with_readline; _do_readline=$withval +else + _do_readline=yes +fi + + + if test "$_do_readline" != "no" ; then + if test -d "$withval" ; then + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LDFLAGS="${LDFLAGS} -L$withval/lib" + fi + + for _termcap in "" "-ltermcap" "-lcurses" "-lncurses" ; do + _readline_save_libs=$LIBS + _combo="-lreadline${_termcap:+ $_termcap}" + LIBS="$LIBS $_combo" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline via \"$_combo\" is present and sane" >&5 +$as_echo_n "checking whether readline via \"$_combo\" is present and sane... " >&6; } + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +#include +#include + +int +main () +{ + +rl_completion_func_t *completer; +add_history("foobar"); +rl_catch_signals=0; +rl_inhibit_completion=0; +rl_attempted_completion_function=NULL; +rl_completion_matches(NULL,NULL); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + _found_readline=yes +else + _found_readline=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_found_readline" >&5 +$as_echo "$_found_readline" >&6; } + + LIBS=$_readline_save_libs + + if test $_found_readline = yes ; then + +$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h + + LIBREADLINE=$_combo + + break + fi + done + + unset _termcap + unset _readline_save_libs + unset _combo + unset _found_readline + fi + + ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -10163,7 +10312,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10198,7 +10347,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10235,7 +10384,7 @@ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -10251,7 +10400,7 @@ else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -10263,7 +10412,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10301,7 +10450,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 $as_echo_n "checking whether char is unsigned... " >&6; } -if test "${ac_cv_c_char_unsigned+set}" = set; then : +if ${ac_cv_c_char_unsigned+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10333,7 +10482,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10413,7 +10562,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : +if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -10459,7 +10608,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -10501,7 +10650,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 $as_echo_n "checking for preprocessor stringizing operator... " >&6; } -if test "${ac_cv_c_stringize+set}" = set; then : +if ${ac_cv_c_stringize+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10598,10 +10747,21 @@ :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" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -10617,6 +10777,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -10640,19 +10801,19 @@ fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -10753,6 +10914,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10798,19 +10960,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11006,7 +11168,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11059,8 +11221,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Awk $as_me 3.1.8, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by GNU Awk $as_me 4.0.1, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11127,11 +11289,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU Awk config.status 3.1.8 -configured by $0, generated by GNU Autoconf 2.65, +GNU Awk config.status 4.0.1 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11149,11 +11311,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11175,6 +11342,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11187,7 +11355,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -11196,7 +11364,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11266,7 +11434,7 @@ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11289,9 +11457,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -11299,12 +11468,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11321,12 +11491,12 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -11335,18 +11505,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -11354,7 +11524,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -11402,7 +11572,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -11434,21 +11604,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -11460,7 +11638,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -11472,11 +11650,11 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -11561,7 +11739,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -11574,7 +11752,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11593,7 +11771,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -11602,7 +11780,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -11628,8 +11806,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -11765,23 +11943,24 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -11790,21 +11969,21 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -12067,7 +12246,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -12088,7 +12267,7 @@ 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 || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru gawk-3.1.8+dfsg/configure.ac gawk-4.0.1+dfsg/configure.ac --- gawk-3.1.8+dfsg/configure.ac 2010-05-06 17:55:35.000000000 +0000 +++ gawk-4.0.1+dfsg/configure.ac 2012-03-28 20:01:23.000000000 +0000 @@ -1,7 +1,7 @@ dnl dnl configure.ac --- autoconf input file for gawk dnl -dnl Copyright (C) 1995-2010 the Free Software Foundation, Inc. +dnl Copyright (C) 1995-2012 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Programming Language. @@ -23,7 +23,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([GNU Awk], 3.1.8, bug-gawk@gnu.org, gawk) +AC_INIT([GNU Awk], 4.0.1, 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. @@ -39,18 +39,12 @@ export INSTALL fi -AC_PREREQ(2.63) -AM_INIT_AUTOMAKE([1.11]) +AC_PREREQ(2.68) +AM_INIT_AUTOMAKE([1.11 dist-xz]) AC_CONFIG_MACRO_DIR([m4]) dnl Additional argument stuff -AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals], - if test "$enableval" = yes - then - AC_DEFINE(HAVE_PORTALS, 1, [we have portals on /p on this system]) - fi -) 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 @@ -64,18 +58,6 @@ AC_DEFINE(NO_LINT, 1, [disable lint checks]) fi ) -AC_ARG_ENABLE(switch, [ --enable-switch Enable switch statements for awk programs], - if test "$enableval" = yes - then - AC_DEFINE(ALLOW_SWITCH, 1, [switch statements are enabled in awk programs]) - fi -) -AC_ARG_ENABLE([directories-fatal], [ --disable-directories-fatal Disable fatal errors on directories], - if test "$enableval" = no - then - AC_DEFINE(NO_DIRECTORY_FATAL, 1, [disable fatal errors on directories]) - fi -) AC_USE_SYSTEM_EXTENSIONS @@ -130,8 +112,9 @@ CFLAGS="$CFLAGS -D_SYSV3" fi -dnl check for C compiler for automake. Needed for dfa.h. -AM_C_PROTOTYPES +dnl Set the programming language for checks. Fortunately, +dnl this only needs to be set once, since everything is in C. +AC_LANG([C]) dnl Cygwin doesn't like to get libs with full paths dnl since that overrides linking against DLLs. @@ -146,7 +129,7 @@ dnl initialize GNU gettext AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.17]) +AM_GNU_GETTEXT_VERSION([0.18.1]) AM_LANGINFO_CODESET gt_LC_MESSAGES @@ -156,7 +139,7 @@ AC_HEADER_TIME AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ netdb.h netinet/in.h stdarg.h stddef.h string.h \ - sys/param.h sys/socket.h sys/time.h unistd.h \ + sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \ termios.h stropts.h wchar.h wctype.h) if test "$ac_cv_header_string_h" = yes @@ -178,9 +161,6 @@ AC_CHECK_TYPE(ssize_t, int) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long) -AC_EGREP_HEADER([int.*sprintf], stdio.h, - 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; @@ -285,10 +265,10 @@ AC_CHECK_FUNCS(atexit btowc fmod getgrent getgroups grantpt \ isascii iswctype iswlower iswupper mbrlen \ memcmp memcpy memcpy_ulong memmove memset \ - memset_ulong mkstemp setlocale snprintf strchr \ - strerror strftime strncasecmp strtod strtoul \ + memset_ulong mkstemp setenv setlocale setsid snprintf strchr \ + strerror strftime strncasecmp strcoll strtod strtoul \ system tmpfile towlower towupper tzset usleep wcrtomb \ - wcscoll wcscoll wctype) + wcscoll wctype) dnl this check is for both mbrtowc and the mbstate_t type, which is good AC_FUNC_MBRTOWC @@ -329,6 +309,7 @@ dnl check for printf %F format AC_MSG_CHECKING([for printf %F format]) AC_RUN_IFELSE([ +AC_LANG_SOURCE([ #include int main() @@ -342,7 +323,7 @@ else return 1; } -], +])], has_f_format=yes, has_f_format=no, has_f_format=no dnl Cross-compiling, assuming the worst. @@ -355,6 +336,9 @@ dnl check for sockets GAWK_AC_LIB_SOCKETS +dnl check for readline support +GNUPG_CHECK_READLINE + dnl checks for structure members AC_STRUCT_ST_BLKSIZE AC_HEADER_TIME diff -Nru gawk-3.1.8+dfsg/custom.h gawk-4.0.1+dfsg/custom.h --- gawk-3.1.8+dfsg/custom.h 2010-03-29 03:00:03.000000000 +0000 +++ gawk-4.0.1+dfsg/custom.h 2011-11-01 20:09:45.000000000 +0000 @@ -11,7 +11,7 @@ */ /* - * Copyright (C) 1995-2004, 2008, 2009 the Free Software Foundation, Inc. + * Copyright (C) 1995-2004, 2008, 2009, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -31,13 +31,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/* for MIPS RiscOS, from Nelson H. F. Beebe, beebe@math.utah.edu */ -#if defined(__host_mips) && defined(SYSTYPE_BSD43) -#undef HAVE_STRTOD -#undef HAVE_STRERROR -#endif - -/* for VMS POSIX, from Pat Rankin, rankin@pactechdata.com */ +/* for VMS POSIX, from Pat Rankin, r.pat.rankin@gmail.com */ #ifdef VMS_POSIX #undef VMS #include "vms/redirect.h" @@ -48,43 +42,11 @@ #define GETPGRP_VOID 1 #endif -/* For Amigas, from Fred Fish, fnf@ninemoons.com */ -#ifdef __amigaos__ -#define fork vfork -#endif - -/* For BeOS, from mc@whoever.com */ -#if defined(__dest_os) && __dest_os == __be_os -#define BROKEN_STRNCASECMP -#define ELIDE_CODE -#include -#endif - -/* For Tandems, based on code from scldad@sdc.com.au */ -#ifdef TANDEM -#define tempnam(a,b) tmpnam(NULL) -#define variable(a,b,c) variabl(a,b,c) -#define srandom srand -#define random rand - -#include -#endif - -/* For 16-bit DOS */ -#if defined(MSC_VER) && defined(MSDOS) -#define NO_PROFILING 1 -#endif - /* For MacOS X, which is almost BSD Unix */ #ifdef __APPLE__ #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 @@ -106,4 +68,11 @@ /* For z/OS, from Dave Pitts */ #ifdef ZOS_USS #undef HAVE_DLFCN_H +#undef HAVE_SYS_PARAM_H +#undef HAVE_MCHECK_H +#undef HAVE_SETENV +#define setenv zos_setenv +#define unsetenv zos_unsetenv +extern int setenv(const char *name, const char *value, int rewrite); +extern int unsetenv(const char *name); #endif diff -Nru gawk-3.1.8+dfsg/debian/README.source gawk-4.0.1+dfsg/debian/README.source --- gawk-3.1.8+dfsg/debian/README.source 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/README.source 2013-03-16 15:08:23.000000000 +0000 @@ -7,6 +7,4 @@ Those are packaged in the gawk-doc package. -The two patches are simply typo fixes, they should be sent upstream. - -- Arthur Loiret , Fri, 6 Nov 2009 12:55:03 +0200 diff -Nru gawk-3.1.8+dfsg/debian/changelog gawk-4.0.1+dfsg/debian/changelog --- gawk-3.1.8+dfsg/debian/changelog 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/changelog 2013-08-14 05:00:40.000000000 +0000 @@ -1,14 +1,93 @@ -gawk (1:3.1.8+dfsg-0.1ubuntu1) precise; urgency=low +gawk (1:4.0.1+dfsg-2.1ubuntu2~ubuntu12.04.1~ppa1) precise; urgency=low - * Add multiarch metadata to ensure build-dep satisfaction (LP: #967301) + * No-change backport to precise - -- Wookey Wed, 28 Mar 2012 16:35:04 +0000 + -- Chris Johnston Wed, 14 Aug 2013 01:00:40 -0400 -gawk (1:3.1.8+dfsg-0.1build1) oneiric; urgency=low +gawk (1:4.0.1+dfsg-2.1ubuntu2) saucy; urgency=low - * No-change rebuild to pick up libsigsegv2 symbols fix. + * Update config.{guess,sub} for arm64. - -- Adam Conrad Tue, 09 Aug 2011 14:01:32 -0600 + -- Matthias Klose Tue, 02 Jul 2013 22:32:14 +0200 + +gawk (1:4.0.1+dfsg-2.1ubuntu1) saucy; urgency=low + + * Merge from Debian unstable. Remaining changes: + - Avoid running the testsuite if DEB_BUILD_OPTIONS contains nocheck. + + -- Adam Conrad Sat, 27 Apr 2013 11:57:37 -0600 + +gawk (1:4.0.1+dfsg-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Change Depends back to Pre-Depends (closes: #702524). + + -- Thijs Kinkhorst Sat, 16 Mar 2013 12:31:51 +0100 + +gawk (1:4.0.1+dfsg-2ubuntu1) raring; urgency=low + + * Avoid running the testsuite if DEB_BUILD_OPTIONS contains nocheck. + + -- Adam Conrad Tue, 04 Dec 2012 12:39:45 -0700 + +gawk (1:4.0.1+dfsg-2) unstable; urgency=low + + * debian/control: + - Build-Depends on libreadline-dev for readline support in dgawk. + - Change Pre-Depends to Depends (OK now that base-files Pre-Depends: awk). + * debian/patches: New PO files for Italian and Vietnamese from upstream. + * debian/rules: Rebuild GMO files during build. + + -- Jeroen Schot Thu, 17 May 2012 11:23:46 +0200 + +gawk (1:4.0.1+dfsg-1) unstable; urgency=low + + * Upload to unstable. + * New upstream release. + * debian/compat: Update to debhelper compat level 9. + * debian/control: + - Bump Standards-Version to 3.9.3. + - Mark as Multi-Arch: foreign. Closes: #666094. + * debian/copyright: Update and use machine-readable format. + * debian/rules: + - Restore display of failed tests. + - Don't compress example awk code. + + -- Jeroen Schot Thu, 29 Mar 2012 12:30:26 +0200 + +gawk (1:4.0.0.h+dfsg-1) experimental; urgency=low + + * New upstream beta release: + - Fix the cases where terminators are incomplete when RS == "". + Closes: #619738. + * debian/rules: + - Enable security hardening build flags via dpkg-buildflags. + - Simplify using debhelper dh overrides. + - Generate locales used in test suite. + * debian-control: + - Build-Depends on dpkg-dev for dpkg-buildflags and locales for test suite. + - Suggests gawk-doc package. + * 18_de.po-typos.diff: Remove, applied upstream. + * 19_gawk.1-hyphen.diff: Remove, applied upstream. + + -- Jeroen Schot Thu, 02 Feb 2012 17:40:51 +0100 + +gawk (1:4.0.0+dfsg-1) experimental; urgency=low + + * Upload to experimental. + * New upstream release. Closes: #638428. + - Interval expressions are now default for GNU Awk. Closes: #376851. + * debian/copyright: Update year and version. + * debian/rules: Drop unneeded --enable-switch, this is now the default. + * debian/control + - Add myself to Uploaders. + - Bump Standards-Version to 3.9.2. + * debian/source/format: Add, source format '3.0 (quilt)'. + * debian/{prerm,postinst}: Add 'set -e' and debhelper token. + * 18_de.po-typos.diff: Refresh. + * 19_gawk.1-hyphen.diff: Add, fix hyphens used as minus sign. + + -- Jeroen Schot Thu, 25 Aug 2011 15:07:15 +0200 gawk (1:3.1.8+dfsg-0.1) unstable; urgency=low @@ -640,3 +719,4 @@ * ELF package -- Chris Fearnley Sun, 3 Dec 1995 01:04:13 -0400 + diff -Nru gawk-3.1.8+dfsg/debian/clean gawk-4.0.1+dfsg/debian/clean --- gawk-3.1.8+dfsg/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/clean 2013-03-16 15:08:23.000000000 +0000 @@ -0,0 +1,7 @@ +config.log +doc/gawk.info +doc/gawk.texi +doc/gawkinet.info +doc/gawkinet.texi +po/*.gmo +test/_* diff -Nru gawk-3.1.8+dfsg/debian/compat gawk-4.0.1+dfsg/debian/compat --- gawk-3.1.8+dfsg/debian/compat 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/compat 2013-03-16 15:08:23.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru gawk-3.1.8+dfsg/debian/control gawk-4.0.1+dfsg/debian/control --- gawk-3.1.8+dfsg/debian/control 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/control 2013-03-16 15:08:23.000000000 +0000 @@ -1,17 +1,25 @@ Source: gawk Section: interpreters Priority: optional -Build-Depends: debhelper (>= 7), quilt (>= 0.40), gettext, bison, libsigsegv-dev -Maintainer: Arthur Loiret -Standards-Version: 3.8.4 +Build-Depends: bison, + debhelper (>= 9), + gettext, + libreadline-dev, + libsigsegv-dev, + locales (>= 0) +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Arthur Loiret +Uploaders: Jeroen Schot +Standards-Version: 3.9.3 Homepage: http://www.gnu.org/software/gawk/ Package: gawk Architecture: any +Multi-Arch: foreign Provides: awk Pre-Depends: ${shlibs:Depends} Depends: ${misc:Depends} -Multi-Arch: foreign +Suggests: gawk-doc Description: GNU awk, a pattern scanning and processing language `awk', a program that you can use to select particular records in a file and perform operations upon them. @@ -23,4 +31,3 @@ Weinberger, with the additional features defined in the System V Release 4 version of UNIX awk. Gawk also provides more recent Bell Labs awk extensions, and some GNU-specific extensions. - diff -Nru gawk-3.1.8+dfsg/debian/copyright gawk-4.0.1+dfsg/debian/copyright --- gawk-3.1.8+dfsg/debian/copyright 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/copyright 2013-03-16 15:08:23.000000000 +0000 @@ -1,33 +1,31 @@ -This is the Debian GNU prepackaged version of Gawk, a pattern -scanning and processing language. Gawk was written by Diane Barlow -Close, Arnold D. Robbins, Paul H. Rubin and Richard Stallman. - -This package was put together by Chris Fearnley (debian.* -files were originally prepared by Ian Murdock ), -from sources obtained from: - -ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.6.tar.gz - -Until version 3.1.6 it was maintained by James Troup . -It is now maintained by Arthur Loiret . - -Gawk is Copyright (C) 1989-2010 Free Software Foundation. -Modifications for Debian GNU Copyright (C) 1995-1997 Chris Fearnley. -Modifications for Debian GNU Copyright (C) 1998-2006 James Troup. - - 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -On Debian GNU systems, the complete text of the GNU General -Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'. +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: bug-gawk@gnu.org +Source: http://ftp.gnu.org/gnu/gawk/ + +Files: * +Copyright: 1986-2012, Free Software Foundation, Inc. +License: GPL-3+ + +Files: debian/* +Copyright: 1995-1997, Chris Fearnley + 1998-2006, James Troup + 2008-2010, Arthur Loiret + 2011-2012, Jeroen Schot +License: GPL-3+ + +License: GPL-3+ + 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 3 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, see . + . + On Debian systems, the full text of the GNU General Public License + version 3 can be found in the file `/usr/share/common-licenses/GPL-3'. diff -Nru gawk-3.1.8+dfsg/debian/docs gawk-4.0.1+dfsg/debian/docs --- gawk-3.1.8+dfsg/debian/docs 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/docs 2013-03-16 15:08:23.000000000 +0000 @@ -0,0 +1,7 @@ +AUTHORS +FUTURES +LIMITATIONS +NEWS +POSIX.STD +PROBLEMS +README diff -Nru gawk-3.1.8+dfsg/debian/examples gawk-4.0.1+dfsg/debian/examples --- gawk-3.1.8+dfsg/debian/examples 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/examples 2013-03-16 15:08:23.000000000 +0000 @@ -0,0 +1,4 @@ +awklib/eg/data +awklib/eg/misc +awklib/eg/network +awklib/eg/prog diff -Nru gawk-3.1.8+dfsg/debian/links gawk-4.0.1+dfsg/debian/links --- gawk-3.1.8+dfsg/debian/links 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/links 2013-03-16 15:08:23.000000000 +0000 @@ -0,0 +1,2 @@ +usr/share/man/man1/gawk.1 usr/share/man/man1/pgawk.1 +usr/share/man/man1/gawk.1 usr/share/man/man1/dgawk.1 diff -Nru gawk-3.1.8+dfsg/debian/patches/01_po-vi.patch gawk-4.0.1+dfsg/debian/patches/01_po-vi.patch --- gawk-3.1.8+dfsg/debian/patches/01_po-vi.patch 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/patches/01_po-vi.patch 2013-03-16 15:08:23.000000000 +0000 @@ -0,0 +1,2316 @@ +Subject: New Vietnamese PO file +Origin: upstream, http://git.savannah.gnu.org/cgit/gawk.git/tree/po/vi.po?h=gawk-4.0-stable&id=7f07ca78 +--- gawk-4.0.1+dfsg.orig/po/LINGUAS ++++ gawk-4.0.1+dfsg/po/LINGUAS +@@ -8,3 +8,4 @@ ja + nl + pl + sv ++vi +--- /dev/null ++++ gawk-4.0.1+dfsg/po/vi.po +@@ -0,0 +1,2304 @@ ++# Vietnamese translation for Gawk. ++# Copyright © 2012 Free Software Foundation, Inc. ++# This file is distributed under the same license as the gawk package. ++# Clytie Siddall , 2005-2010. ++# Trần Ngá»c Quân , 2012. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: gawk-4.0.0h\n" ++"Report-Msgid-Bugs-To: arnold@skeeve.com\n" ++"POT-Creation-Date: 2012-03-28 22:03+0200\n" ++"PO-Revision-Date: 2012-04-04 08:01+0700\n" ++"Last-Translator: Trần Ngá»c Quân \n" ++"Language-Team: Vietnamese \n" ++"Language: vi\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=1; plural=0;\n" ++"X-Generator: LocFactoryEditor 1.8\n" ++"X-Poedit-Language: Vietnamese\n" ++"X-Poedit-Country: VIET NAM\n" ++"X-Poedit-SourceCharset: utf-8\n" ++ ++#: array.c:140 ++#, c-format ++msgid "from %s" ++msgstr "từ %s" ++ ++#: array.c:248 ++msgid "attempt to use a scalar value as array" ++msgstr "cố sá»­ dụng giá trị vô hÆ°á»›ng nhÆ° là má»™t mảng" ++ ++#: array.c:251 ++#, c-format ++msgid "attempt to use function `%s' as an array" ++msgstr "cố gắng dùng hàm « %s » nhÆ° mảng" ++ ++#: array.c:254 ++#, c-format ++msgid "attempt to use scalar parameter `%s' as an array" ++msgstr "cố gắng dùng tham số vô hÆ°á»›ng « %s » nhÆ° là mảng" ++ ++#: array.c:257 ++#, c-format ++msgid "attempt to use scalar `%s' as an array" ++msgstr "cố dùng «%s» vô hÆ°á»›ng nhÆ° là mảng" ++ ++#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 ++#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 ++#: eval.c:1495 eval.c:1812 ++#, c-format ++msgid "attempt to use array `%s' in a scalar context" ++msgstr "cố gắng dùng mảng « %s » trong má»™t ngữ cảnh vô hÆ°á»›ng" ++ ++#: array.c:513 ++#, c-format ++msgid "reference to uninitialized element `%s[\"%.*s\"]'" ++msgstr "tham chiếu đến phần tá»­ chÆ°a sở khởi « %s[\"%.*s\"] »" ++ ++#: array.c:519 ++#, c-format ++msgid "subscript of array `%s' is null string" ++msgstr "chữ in dÆ°á»›i mảng « %s » là chuá»—i rá»—ng" ++ ++#: array.c:723 ++#, c-format ++msgid "delete: index `%s' not in array `%s'" ++msgstr "delete: (xoá) số mÅ© « %s » không phải nằm trong mảng « %s »" ++ ++#: array.c:734 eval.c:1865 ++#, c-format ++msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" ++msgstr "cố dùng «%s[\"%.*s\"]» vô hÆ°á»›ng nhÆ° là mảng" ++ ++#: array.c:910 ++#, c-format ++msgid "%s: empty (null)\n" ++msgstr "%s: rá»—ng (vô giá trị)\n" ++ ++#: array.c:915 ++#, c-format ++msgid "%s: empty (zero)\n" ++msgstr "%s: rá»—ng (số không)\n" ++ ++#: array.c:919 ++#, c-format ++msgid "%s: table_size = %d, array_size = %d\n" ++msgstr "%s: cỡ_bảng = %d, cỡ_mảng = %d\n" ++ ++#: array.c:954 ++#, c-format ++msgid "%s: is parameter\n" ++msgstr "%s: là tham số\n" ++ ++#: array.c:958 ++#, c-format ++msgid "%s: array_ref to %s\n" ++msgstr "%s: « array_ref » (mảng tham chiếu) đến « %s »\n" ++ ++#: array.c:963 ++msgid "adump: argument not an array" ++msgstr "adump: đối số không phải là má»™t mảng" ++ ++#: array.c:1086 ++msgid "asort: second argument not an array" ++msgstr "asort: đối số thứ hai không phải là má»™t mảng" ++ ++#: array.c:1087 ++msgid "asorti: second argument not an array" ++msgstr "asorti: đối số thứ hai không phải là má»™t mảng" ++ ++#: array.c:1094 ++msgid "asort: first argument not an array" ++msgstr "asort: đối số thứ nhất không phải là má»™t mảng" ++ ++#: array.c:1095 ++msgid "asorti: first argument not an array" ++msgstr "asorti: đối số thứ nhất không phải là má»™t mảng" ++ ++#: array.c:1102 ++msgid "asort: cannot use a subarray of first arg for second arg" ++msgstr "" ++"asort (má»™t chÆ°Æ¡ng trính xắp xếp thứ tá»±): không thể sá»­ dụng mảng con của tham " ++"số thứ nhất cho tham số thứ hai" ++ ++#: array.c:1103 ++msgid "asorti: cannot use a subarray of first arg for second arg" ++msgstr "" ++"asorti (má»™t chÆ°Æ¡ng trính xắp xếp thứ tá»±): không thể sá»­ dụng mảng con của " ++"tham số thứ nhất cho tham số thứ hai" ++ ++#: array.c:1108 ++msgid "asort: cannot use a subarray of second arg for first arg" ++msgstr "" ++"asort (má»™t chÆ°Æ¡ng trính xắp xếp thứ tá»±): không thể sá»­ dụng mảng con của tham " ++"số thứ hai cho tham số thứ nhất" ++ ++#: array.c:1109 ++msgid "asorti: cannot use a subarray of second arg for first arg" ++msgstr "" ++"asorti (má»™t chÆ°Æ¡ng trính xắp xếp thứ tá»±): không thể sá»­ dụng mảng con của " ++"tham số thứ hai cho tham số thứ nhất" ++ ++#: array.c:1655 ++#, c-format ++msgid "`%s' is invalid as a function name" ++msgstr "`%s' không phải là tên hàm hợp lệ" ++ ++#: array.c:1659 ++#, c-format ++msgid "sort comparison function `%s' is not defined" ++msgstr "chÆ°a định nghÄ©a hàm so sánh xắp xếp « %s »" ++ ++#: awkgram.y:249 ++#, c-format ++msgid "%s blocks must have an action part" ++msgstr "Má»i khối %s phải có má»™t phần kiểu hành Ä‘á»™ng" ++ ++#: awkgram.y:252 ++msgid "each rule must have a pattern or an action part" ++msgstr "Má»i quy tắc phải có má»™t mẫu hay phần kiểu hành Ä‘á»™ng" ++ ++#: awkgram.y:323 awkgram.y:334 ++msgid "old awk does not support multiple `BEGIN' or `END' rules" ++msgstr "" ++"awk cÅ© không há»— trợ nhiá»u quy tắc kiểu « BEGIN » (bắt đầu) hay « END » (kết " ++"thúc)" ++ ++#: awkgram.y:371 ++#, c-format ++msgid "`%s' is a built-in function, it cannot be redefined" ++msgstr "« %s » là má»™t hàm có sẵn nên nó không thể được định nghÄ©a lái." ++ ++#: awkgram.y:432 ++msgid "regexp constant `//' looks like a C++ comment, but is not" ++msgstr "" ++"hằng biểu thức chính quy « // » hình nhÆ° má»™t chú thích C, nhÆ°ng mà không phải" ++ ++#: awkgram.y:436 ++#, c-format ++msgid "regexp constant `/%s/' looks like a C comment, but is not" ++msgstr "" ++"hằng biểu thức chính quy « /%s/ » hình nhÆ° má»™t chú thích C, nhÆ°ng mà không " ++"phải" ++ ++#: awkgram.y:528 ++#, c-format ++msgid "duplicate case values in switch body: %s" ++msgstr "gặp giá trị case trùng trong thân chuyển đổi (switch body): %s" ++ ++#: awkgram.y:549 ++msgid "duplicate `default' detected in switch body" ++msgstr "" ++"đã phát hiện trùng `default' trong thân cấu trúc Ä‘iá»u khiển chá»n lá»±a (switch)" ++ ++#: awkgram.y:809 ++msgid "`break' is not allowed outside a loop or switch" ++msgstr "" ++"không cho phép « break » (ngắt) nằm ở ngoại vòng lặp hay cấu trúc chá»n lá»±a" ++ ++#: awkgram.y:818 ++msgid "`continue' is not allowed outside a loop" ++msgstr "không cho phép «continue» (tiếp tục) ở ngoài má»™t vòng lặp" ++ ++#: awkgram.y:828 ++#, c-format ++msgid "`next' used in %s action" ++msgstr "« next » (kế tiếp) được dùng trong hành Ä‘á»™ng %s" ++ ++#: awkgram.y:836 ++msgid "`nextfile' is a gawk extension" ++msgstr "« nextfile » (tập tin kế tiếp) là má»™t phần mở rá»™ng gawk" ++ ++#: awkgram.y:841 ++#, c-format ++msgid "`nextfile' used in %s action" ++msgstr "« nextfile » (tệp tin kế tiếp) được dùng trong hành Ä‘á»™ng %s" ++ ++#: awkgram.y:865 ++msgid "`return' used outside function context" ++msgstr "« return » (trở vá») được dùng ở ngoại ngữ cảnh hàm" ++ ++#: awkgram.y:925 ++msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" ++msgstr "" ++"« print » (in) thÆ°á»ng trong quy tắc « BEGIN » (bắt đầu) hay « END » (kết " ++"thúc) hầu nhÆ° chắc chắn nên là « print\"\" »" ++ ++#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 ++msgid "`delete array' is a gawk extension" ++msgstr "« delete array » (xoá mảng) là má»™t phần mở rá»™ng gawk" ++ ++#: awkgram.y:1019 ++msgid "`delete(array)' is a non-portable tawk extension" ++msgstr "« delete array » (xoá mảng) là phần mở rá»™ng gawk không khả chuyển" ++ ++#: awkgram.y:1135 ++msgid "multistage two-way pipelines don't work" ++msgstr "Ä‘Æ°á»ng ống dẫn hai chiếu Ä‘a giai Ä‘oạn không phải hoạt Ä‘á»™ng được" ++ ++#: awkgram.y:1238 ++msgid "regular expression on right of assignment" ++msgstr "biểu thức chính quy nằm bên phải Ä‘iá»u gán" ++ ++#: awkgram.y:1249 ++msgid "regular expression on left of `~' or `!~' operator" ++msgstr "biểu thức chính quy nằm bên trái toán tá»­ « ~ » hay « !~ »" ++ ++#: awkgram.y:1265 awkgram.y:1419 ++msgid "old awk does not support the keyword `in' except after `for'" ++msgstr "awk cÅ© không há»— trợ từ khoá « in », trừ khi nằm sau « for »" ++ ++#: awkgram.y:1275 ++msgid "regular expression on right of comparison" ++msgstr "biểu thức chính quy nằm bên phải sá»± so sánh" ++ ++#: awkgram.y:1394 ++#, c-format ++msgid "`getline var' invalid inside `%s' rule" ++msgstr "`getline var' không hợp lệ bên trong quy tắc `%s'" ++ ++#: awkgram.y:1397 eval.c:2504 ++#, c-format ++msgid "`getline' invalid inside `%s' rule" ++msgstr "`getline' không hợp lệ trong quy tắc `%s'" ++ ++#: awkgram.y:1402 ++msgid "non-redirected `getline' undefined inside END action" ++msgstr "" ++"trong hành Ä‘á»™ng « END » (kết thúc) có « getline » (lấy dòng) không được " ++"chuyển hÆ°á»›ng lại và chÆ°a được xác định." ++ ++#: awkgram.y:1421 ++msgid "old awk does not support multidimensional arrays" ++msgstr "awk cÅ© không há»— trợ mảng Ä‘a chiá»u" ++ ++#: awkgram.y:1517 ++msgid "call of `length' without parentheses is not portable" ++msgstr "không thể mang lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc" ++ ++#: awkgram.y:1580 ++msgid "indirect function calls are a gawk extension" ++msgstr "cuá»™c gá»i hàm gián tiếp là má»™t phần mở rá»™ng gawk" ++ ++#: awkgram.y:1593 ++#, c-format ++msgid "can not use special variable `%s' for indirect function call" ++msgstr "không thể dùng biến đặc biệt « %s » cho cú gá»i hàm gián tiếp" ++ ++#: awkgram.y:1671 ++msgid "invalid subscript expression" ++msgstr "biểu thức in thấp không hợp lệ" ++ ++#: awkgram.y:1711 ++msgid "use of non-array as array" ++msgstr "việc dùng cái khác mảng nhÆ° là mảng" ++ ++#: awkgram.y:1975 awkgram.y:1995 msg.c:98 ++msgid "warning: " ++msgstr "cảnh báo : " ++ ++#: awkgram.y:1993 msg.c:130 ++msgid "fatal: " ++msgstr "nghiêm trá»ng: " ++ ++#: awkgram.y:2043 ++msgid "unexpected newline or end of string" ++msgstr "gặp dòng má»›i bất ngá» hay kết thúc của chuá»—i" ++ ++#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 ++#, c-format ++msgid "can't open source file `%s' for reading (%s)" ++msgstr "không thể mở tập tin nguồn « %s » để Ä‘á»c (%s)" ++ ++#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 ++msgid "reason unknown" ++msgstr "không biết sao" ++ ++#: awkgram.y:2317 ++#, c-format ++msgid "already included source file `%s'" ++msgstr "đã sẵn bao gồm tập tin nguồn `%s'" ++ ++#: awkgram.y:2343 ++msgid "@include is a gawk extension" ++msgstr "@include là phần mở rá»™ng của gawk" ++ ++#: awkgram.y:2349 ++msgid "empty filename after @include" ++msgstr "tệp tin rống sau @include" ++ ++#: awkgram.y:2494 ++msgid "empty program text on command line" ++msgstr "gặp Ä‘oạn chữ chÆ°Æ¡ng trình rá»—ng nằm trên dòng lệnh" ++ ++#: awkgram.y:2609 ++#, c-format ++msgid "can't read sourcefile `%s' (%s)" ++msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)" ++ ++#: awkgram.y:2620 ++#, c-format ++msgid "source file `%s' is empty" ++msgstr "tập tin nguồn « %s » là rá»—ng" ++ ++#: awkgram.y:2797 ++msgid "source file does not end in newline" ++msgstr "tập tin nguồn không kết thúc vá»›i má»™t dòng má»›i" ++ ++#: awkgram.y:2900 ++msgid "unterminated regexp ends with `\\' at end of file" ++msgstr "" ++"biểu thức chính quy chÆ°a được chấm dứt kết thúc vá»›i « \\ » tại kết thúc của " ++"tập tin" ++ ++#: awkgram.y:2924 ++#, c-format ++msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" ++msgstr "" ++"%s: %d: bá»™ sá»­a đổi biểu thức chính quy tawk « /.../%c » không hoạt Ä‘á»™ng được " ++"trong gawk" ++ ++#: awkgram.y:2928 ++#, c-format ++msgid "tawk regex modifier `/.../%c' doesn't work in gawk" ++msgstr "" ++"bá»™ sá»­a đổi biểu thức chính quy tawk « /.../%c » không hoạt Ä‘á»™ng được trong " ++"gawk" ++ ++#: awkgram.y:2935 ++msgid "unterminated regexp" ++msgstr "biểu thức chính quy chÆ°a được chấm dứt" ++ ++#: awkgram.y:2939 ++msgid "unterminated regexp at end of file" ++msgstr "biểu thức chính quy chÆ°a được chấm dứt nằm tại kết thúc của tập tin" ++ ++#: awkgram.y:2998 ++msgid "use of `\\ #...' line continuation is not portable" ++msgstr "không thể mang khả năng dùng « \\#... » để tiếp tục dòng" ++ ++#: awkgram.y:3014 ++msgid "backslash not last character on line" ++msgstr "xuyệc ngược không phải là ký tá»± cuối cùng nằm trên dòng" ++ ++#: awkgram.y:3075 ++msgid "POSIX does not allow operator `**='" ++msgstr "POSIX không cho phép toán tá»­ « **= »" ++ ++#: awkgram.y:3077 ++msgid "old awk does not support operator `**='" ++msgstr "awk cÅ© không há»— trợ toán tá»­ « **= »" ++ ++#: awkgram.y:3086 ++msgid "POSIX does not allow operator `**'" ++msgstr "POSIX không cho phép toán tá»­ « ** »" ++ ++#: awkgram.y:3088 ++msgid "old awk does not support operator `**'" ++msgstr "awk cÅ© không há»— trợ toán tá»­ « ** »" ++ ++#: awkgram.y:3123 ++msgid "operator `^=' is not supported in old awk" ++msgstr "awk cÅ© không há»— trợ toán tá»­ « ^= »" ++ ++#: awkgram.y:3131 ++msgid "operator `^' is not supported in old awk" ++msgstr "awk cÅ© không há»— trợ toán tá»­ « ^ »" ++ ++#: awkgram.y:3224 awkgram.y:3240 ++msgid "unterminated string" ++msgstr "chuá»—i không được chấm dứt" ++ ++#: awkgram.y:3436 ++#, c-format ++msgid "invalid char '%c' in expression" ++msgstr "biểu thức má»™t ký tá»± không hợp lệ « %c » nằm trong biểu thức" ++ ++#: awkgram.y:3483 ++#, c-format ++msgid "`%s' is a gawk extension" ++msgstr "« %s » là má»™t phần mở rá»™ng gawk" ++ ++#: awkgram.y:3488 ++#, c-format ++msgid "`%s' is a Bell Labs extension" ++msgstr "« %s » là má»™t phần mở rá»™ng của Bell Labs (Phòng thí nghiệm Bell)" ++ ++#: awkgram.y:3493 ++#, c-format ++msgid "POSIX does not allow `%s'" ++msgstr "POSIX không cho phép « %s »" ++ ++#: awkgram.y:3501 ++#, c-format ++msgid "`%s' is not supported in old awk" ++msgstr "awk kiểu cÅ© không há»— trợ « %s »" ++ ++#: awkgram.y:3568 ++msgid "`goto' considered harmful!\n" ++msgstr "« goto » được xem là gây tai hại!\n" ++ ++#: awkgram.y:3619 ++#, c-format ++msgid "%d is invalid as number of arguments for %s" ++msgstr "« %d » không hợp lệ khi là số đối số cho « %s »" ++ ++#: awkgram.y:3654 ++#, c-format ++msgid "%s: string literal as last arg of substitute has no effect" ++msgstr "" ++"%s: khi đối số cuối cùng của sá»± thay thế, hằng mã nguồn chuá»—i không có tác " ++"dụng" ++ ++#: awkgram.y:3659 ++#, c-format ++msgid "%s third parameter is not a changeable object" ++msgstr "tham số thứ ba %s không phải là má»™t đối tượng có thể thay đổi" ++ ++#: awkgram.y:3732 awkgram.y:3735 ++msgid "match: third argument is a gawk extension" ++msgstr "match: (khá»›p) đối số thứ ba là phần mở rá»™ng gawk" ++ ++#: awkgram.y:3789 awkgram.y:3792 ++msgid "close: second argument is a gawk extension" ++msgstr "close: (đóng) đối số thứ hai là phần mở rá»™ng gawk" ++ ++#: awkgram.y:3804 ++msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" ++msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bá» gạch dÆ°á»›i nằm trÆ°á»›c" ++ ++#: awkgram.y:3819 ++msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" ++msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bá» gạch dÆ°á»›i nằm trÆ°á»›c" ++ ++#: awkgram.y:3911 ++#, c-format ++msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" ++msgstr "hàm « %s »: tham số « #%d », « %s », nhân đôi tham số « #%d »" ++ ++#: awkgram.y:3953 ++#, c-format ++msgid "function `%s': parameter `%s' shadows global variable" ++msgstr "hàm « %s »: tham số « %s » che biến toàn cục" ++ ++#: awkgram.y:4111 ++#, c-format ++msgid "could not open `%s' for writing (%s)" ++msgstr "không mở được « %s » để ghi (%s)" ++ ++#: awkgram.y:4112 ++msgid "sending variable list to standard error" ++msgstr "Ä‘ang gởi danh sách biến tá»›i thiết bị lá»—i chuẩn" ++ ++#: awkgram.y:4118 ++#, c-format ++msgid "%s: close failed (%s)" ++msgstr "%s: lá»—i đóng (%s)" ++ ++#: awkgram.y:4170 ++msgid "shadow_funcs() called twice!" ++msgstr "shadow_funcs() (hàm bóng) được gá»i hai lần !" ++ ++#: awkgram.y:4176 ++msgid "there were shadowed variables." ++msgstr "có biến bị bóng." ++ ++#: awkgram.y:4206 ++#, c-format ++msgid "function `%s': can't use function name as parameter name" ++msgstr "hàm « %s »: không thể dùng tên hàm nhÆ° là tên tham số" ++ ++#: awkgram.y:4210 ++#, c-format ++msgid "function `%s': can't use special variable `%s' as a function parameter" ++msgstr "hàm « %s »: không thể dùng biến đặc biệt « %s » nhÆ° là tham số hàm" ++ ++#: awkgram.y:4226 ++#, c-format ++msgid "function name `%s' previously defined" ++msgstr "tên hàm « %s » trÆ°á»›c đây đã được định nghÄ©a rồi" ++ ++#: awkgram.y:4394 awkgram.y:4400 ++#, c-format ++msgid "function `%s' called but never defined" ++msgstr "hàm « %s » được gá»i nhÆ°ng mà chÆ°a xác định" ++ ++#: awkgram.y:4403 ++#, c-format ++msgid "function `%s' defined but never called directly" ++msgstr "hàm « %s » được định nghÄ©a nhÆ°ng mà chÆ°a được gá»i trá»±c tiếp bao giá»" ++ ++#: awkgram.y:4435 ++#, c-format ++msgid "regexp constant for parameter #%d yields boolean value" ++msgstr "hằng biểu thức chính quy cho tham số « #%d » làm giá trị luận lý (bun)" ++ ++#: awkgram.y:4544 ++#, c-format ++msgid "" ++"function `%s' called with space between name and `(',\n" ++"or used as a variable or an array" ++msgstr "" ++"hàm « %s » được gá»i vá»›i dấu cách nằm giữa tên và « ( »\n" ++"hoặc được dùng nhÆ° là biến hay mảng" ++ ++#: awkgram.y:4791 eval.c:2056 ++msgid "division by zero attempted" ++msgstr "cố gắng chia cho số không" ++ ++#: awkgram.y:4800 eval.c:2072 ++#, c-format ++msgid "division by zero attempted in `%%'" ++msgstr "thá»­ chia cho không trong « %% »" ++ ++#: builtin.c:120 ++#, c-format ++msgid "%s to \"%s\" failed (%s)" ++msgstr "%s tá»›i « %s » bị lá»—i (%s)" ++ ++#: builtin.c:121 ++msgid "standard output" ++msgstr "thiết bị xuất chuẩn" ++ ++#: builtin.c:135 ++msgid "exp: received non-numeric argument" ++msgstr "exp: đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:141 ++#, c-format ++msgid "exp: argument %g is out of range" ++msgstr "exp: đối số « %g » ở ngoại phạm vị" ++ ++#: builtin.c:200 ++#, c-format ++msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" ++msgstr "" ++"fflush: không thể xoá sạch: ống dẫn « %s » được mở để Ä‘á»c, không phải để ghi" ++ ++#: builtin.c:203 ++#, c-format ++msgid "fflush: cannot flush: file `%s' opened for reading, not writing" ++msgstr "" ++"fflush: không thể xoá sạch: tập tin « %s » được mở để Ä‘á»c, không phải để ghi" ++ ++#: builtin.c:215 ++#, c-format ++msgid "fflush: `%s' is not an open file, pipe or co-process" ++msgstr "" ++"fflush: « %s » không phải là tập tin đã mở, ống dẫn hay đồng tiến trình" ++ ++#: builtin.c:333 ++msgid "index: received non-string first argument" ++msgstr "index: (chỉ mục) đã nhận đối số thứ nhất không phải là chuá»—i" ++ ++#: builtin.c:335 ++msgid "index: received non-string second argument" ++msgstr "index: (chỉ mục) đã nhận đối số thứ hai không phải là chuá»—i" ++ ++#: builtin.c:457 ++msgid "int: received non-numeric argument" ++msgstr "int: (số nguyên?) đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:493 ++msgid "length: received array argument" ++msgstr "length: (chiá»u dài) đã nhận mảng đối số" ++ ++#: builtin.c:496 ++msgid "`length(array)' is a gawk extension" ++msgstr "« length(array) » (Ä‘á»™ dài mảng) là má»™t phần mở rá»™ng gawk" ++ ++#: builtin.c:504 ++msgid "length: received non-string argument" ++msgstr "length: (chiá»u dài) đã nhận đối số không phải chuá»—i" ++ ++#: builtin.c:535 ++msgid "log: received non-numeric argument" ++msgstr "log: (bản ghi) đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:538 ++#, c-format ++msgid "log: received negative argument %g" ++msgstr "log: (bản ghi) đã nhận đối số âm « %g »" ++ ++#: builtin.c:694 builtin.c:699 ++msgid "fatal: must use `count$' on all formats or none" ++msgstr "nghiêm trá»ng: phải dùng « count$ » vá»›i má»i dạng thức hay không gì cả" ++ ++#: builtin.c:762 ++#, c-format ++msgid "field width is ignored for `%%' specifier" ++msgstr "chiá»u rá»™ng trÆ°á»ng bị bá» qua đối vá»›i bá»™ chỉ định `%%'" ++ ++#: builtin.c:764 ++#, c-format ++msgid "precision is ignored for `%%' specifier" ++msgstr "Ä‘á»™ chính xác bị bá» qua đối vá»›i bá»™ chỉ định `%%'" ++ ++#: builtin.c:766 ++#, c-format ++msgid "field width and precision are ignored for `%%' specifier" ++msgstr "chiá»u rá»™ng trÆ°á»ng và Ä‘á»™ chính xác bị bá» qua đối vá»›i bá»™ chỉ định `%%'" ++ ++#: builtin.c:817 ++msgid "fatal: `$' is not permitted in awk formats" ++msgstr "nghiêm trá»ng: không cho phép `$' trong định dạng awk" ++ ++#: builtin.c:826 ++msgid "fatal: arg count with `$' must be > 0" ++msgstr "nghiêm trá»ng: số lượng đối số vá»›i « $ » phải >0" ++ ++#: builtin.c:830 ++#, c-format ++msgid "fatal: arg count %ld greater than total number of supplied arguments" ++msgstr "nghiêm trá»ng: số lượng đối số %ld lá»›n hÆ¡n tổng số đối số được cung cấp" ++ ++#: builtin.c:834 ++msgid "fatal: `$' not permitted after period in format" ++msgstr "nghiêm trá»ng: không cho phép « $ » nằm sau dấu chấm trong định dạng" ++ ++#: builtin.c:850 ++msgid "fatal: no `$' supplied for positional field width or precision" ++msgstr "" ++"nghiêm trá»ng: chÆ°a cung cấp « $ » cho Ä‘á»™ rá»™ng trÆ°á»ng thuá»™c vị trí hay cho Ä‘á»™ " ++"chính xác" ++ ++#: builtin.c:921 ++msgid "`l' is meaningless in awk formats; ignored" ++msgstr "chữ « l » không có nghÄ©a trong định dạng awk nên bị bá» qua" ++ ++#: builtin.c:925 ++msgid "fatal: `l' is not permitted in POSIX awk formats" ++msgstr "nghiêm trá»ng: không cho phép chữ « l » nằm trong định dạng awk POSIX" ++ ++#: builtin.c:938 ++msgid "`L' is meaningless in awk formats; ignored" ++msgstr "chữ « L » không có nghÄ©a trong định dạng awk nên bị bá» qua" ++ ++#: builtin.c:942 ++msgid "fatal: `L' is not permitted in POSIX awk formats" ++msgstr "nghiêm trá»ng: không cho phép chữ « L » nằm trong định dạng awk POSIX" ++ ++#: builtin.c:955 ++msgid "`h' is meaningless in awk formats; ignored" ++msgstr "chữ « h » không có nghÄ©a trong định dạng awk nên bị bá» qua" ++ ++#: builtin.c:959 ++msgid "fatal: `h' is not permitted in POSIX awk formats" ++msgstr "nghiêm trá»ng: không cho phép chữ « h » nằm trong định dạng awk POSIX" ++ ++#: builtin.c:1272 ++#, c-format ++msgid "[s]printf: value %g is out of range for `%%%c' format" ++msgstr "[s]printf: giá trị %g ở ngoại phạm vị cho dạng thức « %%%c »" ++ ++#: builtin.c:1332 ++#, c-format ++msgid "ignoring unknown format specifier character `%c': no argument converted" ++msgstr "" ++"Ä‘ang bá» qua ký tá»± ghi rõ định dạng không rõ « %c »: không có đối số được " ++"chuyển đổi" ++ ++#: builtin.c:1337 ++msgid "fatal: not enough arguments to satisfy format string" ++msgstr "nghiêm trá»ng: chÆ°a có đủ đối số để đáp ứng chuá»—i định dạng" ++ ++#: builtin.c:1339 ++msgid "^ ran out for this one" ++msgstr "bị hết « ^ » cho Ä‘iá»u này" ++ ++#: builtin.c:1346 ++msgid "[s]printf: format specifier does not have control letter" ++msgstr "[s]printf: Ä‘iá»u ghi rõ định dạng không có chữ Ä‘iá»u khiển" ++ ++#: builtin.c:1349 ++msgid "too many arguments supplied for format string" ++msgstr "quá nhiá»u đối số được cung cấp cho chuá»—i định dạng" ++ ++#: builtin.c:1423 builtin.c:1434 ++msgid "printf: no arguments" ++msgstr "printf: không có đối số" ++ ++#: builtin.c:1475 ++msgid "sqrt: received non-numeric argument" ++msgstr "sqrt: (căn bậc hai) đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:1479 ++#, c-format ++msgid "sqrt: called with negative argument %g" ++msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" ++ ++#: builtin.c:1503 ++#, c-format ++msgid "substr: length %g is not >= 1" ++msgstr "substr: (chuá»—i phụ) Ä‘á»™ dài %g không phải ≥1" ++ ++#: builtin.c:1505 ++#, c-format ++msgid "substr: length %g is not >= 0" ++msgstr "substr: (chuá»—i phụ) Ä‘á»™ dài %g không phải ≥0" ++ ++#: builtin.c:1512 ++#, c-format ++msgid "substr: non-integer length %g will be truncated" ++msgstr "substr: (chuá»—i phụ) sẽ cắt xén Ä‘á»™ dài không phải số nguyên « %g »" ++ ++#: builtin.c:1517 ++#, c-format ++msgid "substr: length %g too big for string indexing, truncating to %g" ++msgstr "substr: Ä‘á»™ dài %g quá lá»›n để chỉ mục chuá»—i nên xén ngắn thành %g" ++ ++#: builtin.c:1529 ++#, c-format ++msgid "substr: start index %g is invalid, using 1" ++msgstr "substr: (chuá»—i phụ) số chỉ mục đầu « %g » không hợp lệ nên dùng 1" ++ ++#: builtin.c:1534 ++#, c-format ++msgid "substr: non-integer start index %g will be truncated" ++msgstr "" ++"substr: (chuá»—i phụ) số chỉ mục đầu không phải số nguyên « %g » sẽ bị cắt ngắn" ++ ++#: builtin.c:1559 ++msgid "substr: source string is zero length" ++msgstr "substr: (chuá»—i con) chuá»—i nguồn có Ä‘á»™ dài số không" ++ ++#: builtin.c:1575 ++#, c-format ++msgid "substr: start index %g is past end of string" ++msgstr "substr: (chuá»—i phụ) số chỉ mục đầu %g nằm sau kết thúc của chuá»—i" ++ ++#: builtin.c:1583 ++#, c-format ++msgid "" ++"substr: length %g at start index %g exceeds length of first argument (%lu)" ++msgstr "" ++"substr: (chuá»—i phụ) Ä‘á»™ dài %g tại số chỉ mục đầu %g vượt quá Ä‘á»™ dài của đối " ++"số đầu (%lu)" ++ ++#: builtin.c:1657 ++msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" ++msgstr "" ++"strftime: giá trị định dạng trong PROCINFO[\"strftime\"] phải thuá»™c kiểu số" ++ ++#: builtin.c:1680 ++msgid "strftime: received non-numeric second argument" ++msgstr "strftime: đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:1683 ++msgid "strftime: second argument less than 0 or too big for time_t" ++msgstr "strftime: tham số thứ hai nhá» hÆ¡n 0 hay quá lá»›n dành cho time_t" ++ ++#: builtin.c:1690 ++msgid "strftime: received non-string first argument" ++msgstr "strftime: đã nhận đối số thứ nhất khác chuá»—i" ++ ++#: builtin.c:1696 ++msgid "strftime: received empty format string" ++msgstr "strftime: đã nhận chuá»—i định dạng rá»—ng" ++ ++#: builtin.c:1762 ++msgid "mktime: received non-string argument" ++msgstr "mktime: đã nhận đối số khác chuá»—i" ++ ++#: builtin.c:1779 ++msgid "mktime: at least one of the values is out of the default range" ++msgstr "mktime: ít nhất má»™t của những giá trị nằm ở ngoại phạm vi mặc định" ++ ++#: builtin.c:1814 ++msgid "'system' function not allowed in sandbox mode" ++msgstr "hàm 'system' không cho phép ở chế Ä‘á»™ khuôn đúc" ++ ++#: builtin.c:1819 ++msgid "system: received non-string argument" ++msgstr "system: (hệ thống) đã nhận đối số khác chuá»—i" ++ ++#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 ++#, c-format ++msgid "reference to uninitialized variable `%s'" ++msgstr "gặp tham chiếu đến biến chÆ°a được sở khởi « %s »" ++ ++#: builtin.c:1941 ++#, c-format ++msgid "reference to uninitialized field `$%d'" ++msgstr "gặp tham chiếu đến trÆ°á»ng chÆ°a được sở khởi « $%d »" ++ ++#: builtin.c:2028 ++msgid "tolower: received non-string argument" ++msgstr "tolower: (đến thấp hÆ¡n) đã nhận đối số khác chuá»—i" ++ ++#: builtin.c:2062 ++msgid "toupper: received non-string argument" ++msgstr "toupper: (đến cao hÆ¡n) đã nhận đối số khác chuá»—i" ++ ++#: builtin.c:2098 ++msgid "atan2: received non-numeric first argument" ++msgstr "atan2: đã nhận đối số thứ nhất khác thuá»™c số" ++ ++#: builtin.c:2100 ++msgid "atan2: received non-numeric second argument" ++msgstr "atan2: đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:2119 ++msgid "sin: received non-numeric argument" ++msgstr "sin: đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:2135 ++msgid "cos: received non-numeric argument" ++msgstr "cos: đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:2188 ++msgid "srand: received non-numeric argument" ++msgstr "srand: đã nhận đối số không phải thuá»™c số" ++ ++#: builtin.c:2219 ++msgid "match: third argument is not an array" ++msgstr "match: (khá»›p) đối số thứ ba không phải là mảng" ++ ++#: builtin.c:2483 ++msgid "gensub: third argument of 0 treated as 1" ++msgstr "gensub: đối số thứ ba 0 được xá»­ lý nhÆ° 1" ++ ++#: builtin.c:2776 ++msgid "lshift: received non-numeric first argument" ++msgstr "lshift: đã nhận đối số đầu không phải thuá»™c số" ++ ++#: builtin.c:2778 ++msgid "lshift: received non-numeric second argument" ++msgstr "lshift: (dịch bên trái) đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:2784 ++#, c-format ++msgid "lshift(%lf, %lf): negative values will give strange results" ++msgstr "lshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2786 ++#, c-format ++msgid "lshift(%lf, %lf): fractional values will be truncated" ++msgstr "lshift(%lf, %lf): giá trị thuá»™c phân số sẽ bị xén ngắn" ++ ++#: builtin.c:2788 ++#, c-format ++msgid "lshift(%lf, %lf): too large shift value will give strange results" ++msgstr "lshift(%lf, %lf): giá trị dịch quá lá»›n sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2813 ++msgid "rshift: received non-numeric first argument" ++msgstr "rshift: đã nhận đối số thứ nhất khác thuá»™c số" ++ ++#: builtin.c:2815 ++msgid "rshift: received non-numeric second argument" ++msgstr "rshift: (dịch bên phải) đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:2821 ++#, c-format ++msgid "rshift(%lf, %lf): negative values will give strange results" ++msgstr "rshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2823 ++#, c-format ++msgid "rshift(%lf, %lf): fractional values will be truncated" ++msgstr "rshift(%lf, %lf): giá trị thuá»™c phân số sẽ bị xén ngắn" ++ ++#: builtin.c:2825 ++#, c-format ++msgid "rshift(%lf, %lf): too large shift value will give strange results" ++msgstr "rshift(%lf, %lf): giá trị dịch quá lá»›n sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2850 ++msgid "and: received non-numeric first argument" ++msgstr "and: (và) đã nhận đối số đầu không phải thuá»™c số" ++ ++#: builtin.c:2852 ++msgid "and: received non-numeric second argument" ++msgstr "and: (và) đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:2858 ++#, c-format ++msgid "and(%lf, %lf): negative values will give strange results" ++msgstr "and(%lf, %lf): (và) giá trị âm sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2860 ++#, c-format ++msgid "and(%lf, %lf): fractional values will be truncated" ++msgstr "and(%lf, %lf): (và) giá trị thuá»™c phân số sẽ bị xén ngắn" ++ ++#: builtin.c:2885 ++msgid "or: received non-numeric first argument" ++msgstr "or: (hoặc) đã nhận đối số đầu không phải thuá»™c số" ++ ++#: builtin.c:2887 ++msgid "or: received non-numeric second argument" ++msgstr "or: (hoặc) đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:2893 ++#, c-format ++msgid "or(%lf, %lf): negative values will give strange results" ++msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2895 ++#, c-format ++msgid "or(%lf, %lf): fractional values will be truncated" ++msgstr "or(%lf, %lf): (hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" ++ ++#: builtin.c:2923 ++msgid "xor: received non-numeric first argument" ++msgstr "xor: (không hoặc) đã nhận đối số thứ nhất khác thuá»™c số" ++ ++#: builtin.c:2925 ++msgid "xor: received non-numeric second argument" ++msgstr "xor: đã nhận đối số thứ hai khác thuá»™c số" ++ ++#: builtin.c:2931 ++#, c-format ++msgid "xor(%lf, %lf): negative values will give strange results" ++msgstr "xor(%lf, %lf): (không hoặc) giá trị âm sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2933 ++#, c-format ++msgid "xor(%lf, %lf): fractional values will be truncated" ++msgstr "xor(%lf, %lf): (không hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" ++ ++#: builtin.c:2957 builtin.c:2963 ++msgid "compl: received non-numeric argument" ++msgstr "compl: (biên dịch) đã nhận đối số khác thuá»™c số" ++ ++#: builtin.c:2965 ++#, c-format ++msgid "compl(%lf): negative value will give strange results" ++msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ" ++ ++#: builtin.c:2967 ++#, c-format ++msgid "compl(%lf): fractional value will be truncated" ++msgstr "compl(%lf): (biên dịch) giá trị thuá»™c phân số se bị xén ngắn" ++ ++#: builtin.c:3136 ++#, c-format ++msgid "dcgettext: `%s' is not a valid locale category" ++msgstr "dcgettext: « %s » không phải là má»™t phân loại miá»n địa phÆ°Æ¡ng hợp lệ" ++ ++#: eval.c:412 ++#, c-format ++msgid "unknown nodetype %d" ++msgstr "không biết kiểu nút %d" ++ ++#: eval.c:423 eval.c:437 ++#, c-format ++msgid "unknown opcode %d" ++msgstr "gặp opcode (mã thao tác) không rõ %d" ++ ++#: eval.c:434 ++#, c-format ++msgid "opcode %s not an operator or keyword" ++msgstr "mã lệnh %s không phải là má»™t toán tá»­ hoặc từ khoá" ++ ++#: eval.c:488 ++msgid "buffer overflow in genflags2str" ++msgstr "tràn bá»™ đệm trong « genflags2str » (tạo ra cỠđến chuá»—i)" ++ ++#: eval.c:698 ++#, c-format ++msgid "" ++"\n" ++"\t# Function Call Stack:\n" ++"\n" ++msgstr "" ++"\n" ++"\t# Äống gá»i hàm:\n" ++"\n" ++ ++#: eval.c:725 ++msgid "`IGNORECASE' is a gawk extension" ++msgstr "« IGNORECASE » (bá» qua chữ hoa/thÆ°á»ng) là phần mở rá»™ng gawk" ++ ++#: eval.c:754 ++msgid "`BINMODE' is a gawk extension" ++msgstr "« BINMODE » (chế Ä‘á»™ nhị phân) là phần mở rá»™ng gawk" ++ ++#: eval.c:812 ++#, c-format ++msgid "BINMODE value `%s' is invalid, treated as 3" ++msgstr "Giá trị BINMODE (chế Ä‘á»™ nhị phân) « %s » không hợp lệ nên thấy là 3" ++ ++#: eval.c:902 ++#, c-format ++msgid "bad `%sFMT' specification `%s'" ++msgstr "đặc tả « %sFMT » sai « %s »" ++ ++#: eval.c:980 ++msgid "turning off `--lint' due to assignment to `LINT'" ++msgstr "Ä‘ang tắt « --lint » do việc gán cho « LINT »" ++ ++#: eval.c:1127 eval.c:1777 ++#, c-format ++msgid "can't use function name `%s' as variable or array" ++msgstr "không thể dùng tên hàm « %s » nhÆ° là biến hay mảng" ++ ++#: eval.c:1158 eval.c:1789 eval.c:1802 ++#, c-format ++msgid "reference to uninitialized argument `%s'" ++msgstr "gặp tham chiếu đến đối số chÆ°a được sở khởi « %s »" ++ ++#: eval.c:1177 ++msgid "attempt to field reference from non-numeric value" ++msgstr "cố gắng tham chiếu trÆ°á»ng từ giá trị khác thuá»™c số" ++ ++#: eval.c:1179 ++msgid "attempt to field reference from null string" ++msgstr "cố gắng tham chiếu trÆ°á»ng từ chá»—i trống rá»—ng" ++ ++#: eval.c:1185 ++#, c-format ++msgid "attempt to access field %ld" ++msgstr "cố gắng để truy cập trÆ°á»ng %ld" ++ ++#: eval.c:1194 ++#, c-format ++msgid "reference to uninitialized field `$%ld'" ++msgstr "tham chiếu đến trÆ°á»ng chÆ°a được khởi tạo « $%ld »" ++ ++#: eval.c:1256 ++#, c-format ++msgid "function `%s' called with more arguments than declared" ++msgstr "hàm « %s » được gá»i vá»›i số đối số hÆ¡n số được tuyên bố" ++ ++#: eval.c:1437 ++#, c-format ++msgid "unwind_stack: unexpected type `%s'" ++msgstr "unwind_stack: không mong đợi kiểu `%s'" ++ ++#: eval.c:1532 ++msgid "division by zero attempted in `/='" ++msgstr "cố gắng chia cho số không trong « /= »" ++ ++#: eval.c:1539 ++#, c-format ++msgid "division by zero attempted in `%%='" ++msgstr "cố gắng chia cho số không trong « %%= »" ++ ++#: eval.c:1876 eval.c:2122 ++#, c-format ++msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" ++msgstr "cố gắng dùng mảng `%s[\"%.*s\"]' trong má»™t ngữ cảnh vô hÆ°á»›ng" ++ ++#: eval.c:1907 ++msgid "assignment used in conditional context" ++msgstr "Ä‘iá»u gán được dùng trong ngữ cảnh Ä‘iá»u kiện" ++ ++#: eval.c:1911 ++msgid "statement has no effect" ++msgstr "câu không có tác dụng" ++ ++#: eval.c:2343 ++#, c-format ++msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" ++msgstr "" ++"cho loop: (cho vòng lặp) mảng « %s » đã thay đổi kích thÆ°á»›c từ %ld đến %ld " ++"trong khi thá»±c hiện vòng lặp" ++ ++#: eval.c:2458 ++#, c-format ++msgid "function called indirectly through `%s' does not exist" ++msgstr "hàm được gá»i gián tiếp thông qua `%s' không tồn tại" ++ ++#: eval.c:2470 ++#, c-format ++msgid "function `%s' not defined" ++msgstr "chÆ°a xác định hàm « %s »" ++ ++#: eval.c:2511 ++#, c-format ++msgid "non-redirected `getline' invalid inside `%s' rule" ++msgstr "`getline' không-gá»­i-lại không hợp lệ bên trong quy tắc `%s'" ++ ++#: eval.c:2600 ++#, c-format ++msgid "error reading input file `%s': %s" ++msgstr "gặp lá»—i khi Ä‘á»c tập tin nhập « %s »: %s" ++ ++#: eval.c:2614 ++#, c-format ++msgid "`nextfile' cannot be called from a `%s' rule" ++msgstr "«nextfile» (tập tin kế tiếp) không thể được gá»i từ má»™t quy tắc `%s'" ++ ++#: eval.c:2661 ++msgid "`exit' cannot be called in the current context" ++msgstr "`exit' (thoát) không thể được gá»i trong ngữ cảnh hiện hành" ++ ++#: eval.c:2700 ++#, c-format ++msgid "`next' cannot be called from a `%s' rule" ++msgstr "«next» (kế tiếp) không thể được gá»i từ má»™t quy tắc `%s'" ++ ++#: eval.c:2766 ++#, c-format ++msgid "Sorry, don't know how to interpret `%s'" ++msgstr "Rất tiếc, không biết làm cách nào để phiên dịch được `%s'" ++ ++#: ext.c:54 ++msgid "extensions are not allowed in sandbox mode" ++msgstr "phần mở rá»™ng không cho phép ở chế Ä‘á»™ khuôn đúc" ++ ++#: ext.c:60 ext.c:65 ++msgid "`extension' is a gawk extension" ++msgstr "« extension » là má»™t phần mở rá»™ng gawk" ++ ++#: ext.c:75 ++#, c-format ++msgid "fatal: extension: cannot open `%s' (%s)\n" ++msgstr "nghiêm trá»ng: phần mở rá»™ng: không thể mở `%s' (%s)\n" ++ ++#: ext.c:84 ++#, c-format ++msgid "" ++"fatal: extension: library `%s': does not define " ++"`plugin_is_GPL_compatible' (%s)\n" ++msgstr "" ++"nghiêm trá»ng: extension (phần mở rá»™ng): thÆ° viện « %s »: không thể định " ++"nghÄ©a `plugin_is_GPL_compatible' (tÆ°Æ¡ng thích cắm là dùng GPL) (%s)\n" ++ ++#: ext.c:93 ++#, c-format ++msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" ++msgstr "" ++"nghiêm trá»ng: extension (phần mở rá»™ng): thÆ° viện « %s »: không thể gá»i hàm « " ++"%s » (%s)\n" ++ ++#: ext.c:127 ++msgid "extension: missing function name" ++msgstr "extension: (phần mở rá»™ng) tên hàm còn thiếu" ++ ++#: ext.c:132 ++#, c-format ++msgid "extension: illegal character `%c' in function name `%s'" ++msgstr "" ++"extension: (phần mở rá»™ng) gặp ký tá»± cấm « %c » nằm trong tên hàm « %s »" ++ ++#: ext.c:141 ++#, c-format ++msgid "extension: can't redefine function `%s'" ++msgstr "extension: (phần mở rá»™ng) không thể xác định lại hàm « %s »" ++ ++#: ext.c:145 ++#, c-format ++msgid "extension: function `%s' already defined" ++msgstr "extension: (phần mở rá»™ng) hàm « %s » đã được xác định" ++ ++#: ext.c:150 ++#, c-format ++msgid "extension: function name `%s' previously defined" ++msgstr "tên hàm « %s » đã được xác định trÆ°á»›c" ++ ++#: ext.c:152 ++#, c-format ++msgid "extension: can't use gawk built-in `%s' as function name" ++msgstr "" ++"extension: (phần mở rá»™ng) không thể dùng Ä‘iá»u có sẵn của gawk « %s » nhÆ° là " ++"tên hàm" ++ ++#: ext.c:156 ++#, c-format ++msgid "make_builtin: negative argument count for function `%s'" ++msgstr "make_builtin: đối số dành cho số đếm bị âm cho hàm `%s'" ++ ++#: ext.c:259 ++#, c-format ++msgid "function `%s' defined to take no more than %d argument(s)" ++msgstr "hàm « %s » được xác định để chấp nhấn %d đối số tối Ä‘a" ++ ++#: ext.c:262 ++#, c-format ++msgid "function `%s': missing argument #%d" ++msgstr "hàm « %s » còn thiếu đối số thứ %d" ++ ++#: ext.c:279 ++#, c-format ++msgid "function `%s': argument #%d: attempt to use scalar as an array" ++msgstr "hàm « %s »: đối số thứ %d: cố gắng dùng Ä‘iá»u vô hÆ°á»›ng nhÆ° là mảng" ++ ++#: ext.c:283 ++#, c-format ++msgid "function `%s': argument #%d: attempt to use array as a scalar" ++msgstr "hàm « %s »: đối số thứ %d: cố gắng dùng mảng nhÆ° là Ä‘iá»u vô hÆ°á»›ng" ++ ++#: ext.c:296 ++msgid "Operation Not Supported" ++msgstr "Thao tác không được há»— trợ" ++ ++#: field.c:328 ++msgid "NF set to negative value" ++msgstr "« NF » được đặt thành giá trị âm" ++ ++#: field.c:951 field.c:958 field.c:962 ++msgid "split: fourth argument is a gawk extension" ++msgstr "split (chia tách): đối số thứ tÆ° là phần mở rá»™ng gawk" ++ ++#: field.c:955 ++msgid "split: fourth argument is not an array" ++msgstr "split (chia tách): đối số thứ tÆ° không phải là mảng" ++ ++#: field.c:969 ++msgid "split: second argument is not an array" ++msgstr "split: (chia tách) đối số thứ hai không phải là mảng" ++ ++#: field.c:973 ++msgid "split: cannot use the same array for second and fourth args" ++msgstr "" ++"split (chia tách): không thể sá»­ dụng cùng má»™t mảng có cả đối số thứ hai và " ++"thứ tÆ°" ++ ++#: field.c:978 ++msgid "split: cannot use a subarray of second arg for fourth arg" ++msgstr "" ++"split (phân tách): không thể sá»­ dụng mảng con của tham số thứ hai cho tham " ++"số thứ tÆ°" ++ ++#: field.c:981 ++msgid "split: cannot use a subarray of fourth arg for second arg" ++msgstr "" ++"split (phân tách): không thể sá»­ dụng mảng con của tham số thứ tÆ° cho tham số " ++"thứ hai" ++ ++#: field.c:1010 ++msgid "split: null string for third arg is a gawk extension" ++msgstr "" ++"split: (chia tách) chuá»—i vô giá trị cho đối số thứ ba là phần mở rá»™ng gawk" ++ ++#: field.c:1050 ++msgid "patsplit: fourth argument is not an array" ++msgstr "patsplit: đối số thứ tÆ° không phải là mảng" ++ ++#: field.c:1055 ++msgid "patsplit: second argument is not an array" ++msgstr "patsplit: đối số thứ hai không phải là mảng" ++ ++#: field.c:1061 ++msgid "patsplit: third argument must be non-null" ++msgstr "patsplit: đối số thứ ba không phải không rá»—ng" ++ ++#: field.c:1065 ++msgid "patsplit: cannot use the same array for second and fourth args" ++msgstr "" ++"patsplit (chÆ°Æ¡ng trình chia tách): không thể sá»­ dụng cùng má»™t mảng cho cả " ++"hai đối số thứ hai và thứ tÆ°" ++ ++#: field.c:1070 ++msgid "patsplit: cannot use a subarray of second arg for fourth arg" ++msgstr "" ++"patsplit (chÆ°Æ¡ng trình phân tách): không thể sá»­ dụng mảng con của tham số " ++"thứ hai cho tham số thứ tÆ°" ++ ++#: field.c:1073 ++msgid "patsplit: cannot use a subarray of fourth arg for second arg" ++msgstr "" ++"patsplit (chÆ°Æ¡ng trình phân tách): không thể sá»­ dụng mảng con của tham số " ++"thứ tÆ° cho tham số thứ hai" ++ ++#: field.c:1110 ++msgid "`FIELDWIDTHS' is a gawk extension" ++msgstr "« FIELDWIDTHS » (Ä‘á»™ rá»™ng trÆ°á»ng) là phần mở rá»™ng gawk" ++ ++#: field.c:1173 ++#, c-format ++msgid "invalid FIELDWIDTHS value, near `%s'" ++msgstr "giá trị FIELDWIDTHS (Ä‘á»™ rá»™ng trÆ°á»ng) không hợp lệ, gần « %s »" ++ ++#: field.c:1246 ++msgid "null string for `FS' is a gawk extension" ++msgstr "chuá»—i vô giá trị cho « FS » là phần mở rá»™ng gawk" ++ ++#: field.c:1250 ++msgid "old awk does not support regexps as value of `FS'" ++msgstr "awk cÅ© không há»— trợ biểu thức chính quy làm giá trị của « FS »" ++ ++#: field.c:1369 ++msgid "`FPAT' is a gawk extension" ++msgstr "`FPAT' là phần mở rá»™ng của gawk" ++ ++#: getopt.c:604 getopt.c:633 ++#, fuzzy, c-format ++msgid "%s: option '%s' is ambiguous; possibilities:" ++msgstr "%s: tùy chá»n « %s » vẫn mÆ¡ hồ\n" ++ ++#: getopt.c:679 getopt.c:683 ++#, c-format ++msgid "%s: option '--%s' doesn't allow an argument\n" ++msgstr "%s: tùy chá»n « --%s » không cho phép đối số\n" ++ ++#: getopt.c:692 getopt.c:697 ++#, c-format ++msgid "%s: option '%c%s' doesn't allow an argument\n" ++msgstr "%s: tùy chá»n « %c%s » không cho phép đối số\n" ++ ++#: getopt.c:740 getopt.c:759 ++#, c-format ++msgid "%s: option '--%s' requires an argument\n" ++msgstr "%s: tùy chá»n « --%s » yêu cầu má»™t đối số\n" ++ ++#: getopt.c:797 getopt.c:800 ++#, c-format ++msgid "%s: unrecognized option '--%s'\n" ++msgstr "%s: không nhận ra tùy chá»n « --%s »\n" ++ ++#: getopt.c:808 getopt.c:811 ++#, c-format ++msgid "%s: unrecognized option '%c%s'\n" ++msgstr "%s: không nhận ra tùy chá»n « %c%s »\n" ++ ++#: getopt.c:860 getopt.c:863 ++#, c-format ++msgid "%s: invalid option -- '%c'\n" ++msgstr "%s: tùy chá»n không hợp lệ -- « %c »\n" ++ ++#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 ++#, c-format ++msgid "%s: option requires an argument -- '%c'\n" ++msgstr "%s: tùy chá»n yêu cầu má»™t đối số -- « %c »\n" ++ ++#: getopt.c:989 getopt.c:1005 ++#, c-format ++msgid "%s: option '-W %s' is ambiguous\n" ++msgstr "%s: tùy chá»n « -W %s » vẫn mÆ¡ hồ\n" ++ ++#: getopt.c:1029 getopt.c:1047 ++#, c-format ++msgid "%s: option '-W %s' doesn't allow an argument\n" ++msgstr "%s: tùy chá»n « -W %s » không cho phép đối số\n" ++ ++#: getopt.c:1068 getopt.c:1086 ++#, c-format ++msgid "%s: option '-W %s' requires an argument\n" ++msgstr "%s: tùy chá»n « -W %s » yêu cầu má»™t đối số\n" ++ ++#: io.c:280 ++#, c-format ++msgid "command line argument `%s' is a directory: skipped" ++msgstr "tham số dòng lệnh `%s' là má»™t thÆ° mục: đã bị bá» qua" ++ ++#: io.c:283 io.c:385 ++#, c-format ++msgid "cannot open file `%s' for reading (%s)" ++msgstr "không mở được tập tin « %s » để Ä‘á»c (%s)" ++ ++#: io.c:501 ++#, c-format ++msgid "close of fd %d (`%s') failed (%s)" ++msgstr "lá»—i đóng fd %d (« %s ») (%s)" ++ ++#: io.c:578 ++msgid "redirection not allowed in sandbox mode" ++msgstr "chuyển hÆ°á»›ng không cho phép ở chế Ä‘á»™ khuôn đúc" ++ ++#: io.c:612 ++#, c-format ++msgid "expression in `%s' redirection only has numeric value" ++msgstr "biểu thức trong Ä‘iá»u chuyển hÆ°á»›ng « %s » chỉ có giá trị thuá»™c số" ++ ++#: io.c:618 ++#, c-format ++msgid "expression for `%s' redirection has null string value" ++msgstr "biểu thức cho Ä‘iá»u chuyển hÆ°á»›ng « %s » có giá trị chuá»—i vô giá trị" ++ ++#: io.c:623 ++#, c-format ++msgid "filename `%s' for `%s' redirection may be result of logical expression" ++msgstr "" ++"tên tập tin « %s » cho Ä‘iá»u chuyển hÆ°á»›ng « %s » có lẽ là kết quả của biểu " ++"thức luận lý" ++ ++#: io.c:666 ++#, c-format ++msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" ++msgstr "không cần hợp « > » và « >> » cho tập tin « %.*s »" ++ ++#: io.c:719 ++#, c-format ++msgid "can't open pipe `%s' for output (%s)" ++msgstr "không thể mở ống dẫn « %s » để xuất (%s)" ++ ++#: io.c:729 ++#, c-format ++msgid "can't open pipe `%s' for input (%s)" ++msgstr "không thể mở ống dẫn « %s » để nhập (%s)" ++ ++#: io.c:752 ++#, c-format ++msgid "can't open two way pipe `%s' for input/output (%s)" ++msgstr "không thể mở ống dẫn hai chiá»u « %s » để nhập/xuất (%s)" ++ ++#: io.c:834 ++#, c-format ++msgid "can't redirect from `%s' (%s)" ++msgstr "không thể chuyển hÆ°á»›ng từ « %s » (%s)" ++ ++#: io.c:837 ++#, c-format ++msgid "can't redirect to `%s' (%s)" ++msgstr "không thể chuyển hÆ°á»›ng đến « %s » (%s)" ++ ++#: io.c:888 ++msgid "" ++"reached system limit for open files: starting to multiplex file descriptors" ++msgstr "" ++"đã tá»›i giá»›i hạn hệ thống vá» tập tin được mở nên bắt đầu phối hợp nhiá»u dòng " ++"Ä‘iá»u mô tả tập tin" ++ ++#: io.c:904 ++#, c-format ++msgid "close of `%s' failed (%s)." ++msgstr "lá»—i đóng « %s » (%s)" ++ ++#: io.c:912 ++msgid "too many pipes or input files open" ++msgstr "quá nhiá»u ống dẫn hay tập tin nhập được mở" ++ ++#: io.c:934 ++msgid "close: second argument must be `to' or `from'" ++msgstr "close: (đóng) đối số thứ hai phải là « to » (đến) hay « from » (từ)" ++ ++#: io.c:951 ++#, c-format ++msgid "close: `%.*s' is not an open file, pipe or co-process" ++msgstr "" ++"close: (đóng) « %.*s » không phải là tập tin được mở, ống dẫn hay tiến trình " ++"vá»›i nhau" ++ ++#: io.c:956 ++msgid "close of redirection that was never opened" ++msgstr "việc đóng Ä‘iá»u chuyển hÆ°á»›ng chÆ°a mở" ++ ++#: io.c:1053 ++#, c-format ++msgid "close: redirection `%s' not opened with `|&', second argument ignored" ++msgstr "" ++"close: (đóng) Ä‘iá»u chuyển hÆ°á»›ng « %s » không được mở bởi « |& » nên đối số " ++"thứ hai bị bá» qua" ++ ++#: io.c:1069 ++#, c-format ++msgid "failure status (%d) on pipe close of `%s' (%s)" ++msgstr "trạng thái thất bại (%d) khi đóng ống dẫn « %s » (%s)" ++ ++#: io.c:1072 ++#, c-format ++msgid "failure status (%d) on file close of `%s' (%s)" ++msgstr "trạng thái thất bại (%d) khi đóng tập tin « %s » (%s)" ++ ++#: io.c:1092 ++#, c-format ++msgid "no explicit close of socket `%s' provided" ++msgstr "không có việc đóng dứt khoát ổ cắm « %s » được cung cấp" ++ ++#: io.c:1095 ++#, c-format ++msgid "no explicit close of co-process `%s' provided" ++msgstr "không có việc đóng dứt khoát đồng tiến trình « %s » được cung cấp" ++ ++#: io.c:1098 ++#, c-format ++msgid "no explicit close of pipe `%s' provided" ++msgstr "không có việc đóng dứt khoát ống dẫn « %s » được cung cấp" ++ ++#: io.c:1101 ++#, c-format ++msgid "no explicit close of file `%s' provided" ++msgstr "không có việc đóng dứt khoát tập tin « %s » được cung cấp" ++ ++#: io.c:1129 io.c:1184 main.c:794 main.c:831 ++#, c-format ++msgid "error writing standard output (%s)" ++msgstr "gặp lá»—i khi ghi thiết bị xụất chuẩn (%s)" ++ ++#: io.c:1133 io.c:1189 ++#, c-format ++msgid "error writing standard error (%s)" ++msgstr "gặp lá»—i khi ghi thiết bị lá»—i chuẩn (%s)" ++ ++#: io.c:1141 ++#, c-format ++msgid "pipe flush of `%s' failed (%s)." ++msgstr "lá»—i xoá sạch ống dẫn « %s » (%s)" ++ ++#: io.c:1144 ++#, c-format ++msgid "co-process flush of pipe to `%s' failed (%s)." ++msgstr "lá»—i xoá sạch ống dẫn đồng tiến trình đến « %s » (%s)" ++ ++#: io.c:1147 ++#, c-format ++msgid "file flush of `%s' failed (%s)." ++msgstr "lá»—i xoá sạch tập tin « %s » (%s)" ++ ++#: io.c:1262 ++#, c-format ++msgid "local port %s invalid in `/inet'" ++msgstr "cổng cục bá»™ %s không hợp lệ trong « /inet »" ++ ++#: io.c:1279 ++#, c-format ++msgid "remote host and port information (%s, %s) invalid" ++msgstr "thông tin vá» máy/cổng ở xa (%s, %s) không phải hợp lệ" ++ ++#: io.c:1431 ++#, c-format ++msgid "no (known) protocol supplied in special filename `%s'" ++msgstr "" ++"trong tên tập tin đặc biệt « %s » không cung cấp giao thức (đã biết) nào" ++ ++#: io.c:1445 ++#, c-format ++msgid "special file name `%s' is incomplete" ++msgstr "tên tập tin đặc biệt « %s » chÆ°a xong" ++ ++#: io.c:1462 ++msgid "must supply a remote hostname to `/inet'" ++msgstr "phải cung cấp má»™t tên máy từ xa cho " ++ ++#: io.c:1480 ++msgid "must supply a remote port to `/inet'" ++msgstr "phải cung cấp má»™t cổng từ xa cho " ++ ++#: io.c:1526 ++msgid "TCP/IP communications are not supported" ++msgstr "truyá»n thông TCP/IP không được há»— trợ" ++ ++#: io.c:1693 ++#, c-format ++msgid "could not open `%s', mode `%s'" ++msgstr "không mở được « %s », chế Ä‘á»™ « %s »" ++ ++#: io.c:1747 ++#, c-format ++msgid "close of master pty failed (%s)" ++msgstr "lá»—i đóng pty (tài sản?) chính (%s)" ++ ++#: io.c:1749 io.c:1917 io.c:2074 ++#, c-format ++msgid "close of stdout in child failed (%s)" ++msgstr "lá»—i đóng thiết bị xuất chuẩn trong tiến trình con (%s)" ++ ++#: io.c:1752 ++#, c-format ++msgid "moving slave pty to stdout in child failed (dup: %s)" ++msgstr "" ++"lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị xuất chuẩn trong Ä‘iá»u con " ++"(nhân đôi: %s)" ++ ++#: io.c:1754 io.c:1922 ++#, c-format ++msgid "close of stdin in child failed (%s)" ++msgstr "lá»—i đóng thiết bị nhập chuẩn trong tiến trình con (%s)" ++ ++#: io.c:1757 ++#, c-format ++msgid "moving slave pty to stdin in child failed (dup: %s)" ++msgstr "" ++"lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị nhập chuẩn trong Ä‘iá»u con " ++"(nhân đôi: %s)" ++ ++#: io.c:1759 io.c:1780 ++#, c-format ++msgid "close of slave pty failed (%s)" ++msgstr "lá»—i đóng pty (tài sản?) phụ (%s)" ++ ++#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 ++#, c-format ++msgid "moving pipe to stdout in child failed (dup: %s)" ++msgstr "" ++"lá»—i di chuyển ống dẫn đến thiết bị xuất chuẩn trong tiến trình con (dup: %s) " ++"(nhân đôi)" ++ ++#: io.c:1865 io.c:1925 ++#, c-format ++msgid "moving pipe to stdin in child failed (dup: %s)" ++msgstr "" ++"lá»—i di chuyển ống dẫn đến thiết bị nhập chuẩn trong tiến trình con (dup: %s) " ++"(nhân đôi)" ++ ++#: io.c:1885 io.c:2067 ++msgid "restoring stdout in parent process failed\n" ++msgstr "lá»—i phục hồi thiết bị xuất chuẩn trong tiến trình mẹ\n" ++ ++#: io.c:1893 ++msgid "restoring stdin in parent process failed\n" ++msgstr "lá»—i phục hồi thiết bị nhập chuẩn trong tiến trình mẹ\n" ++ ++#: io.c:1928 io.c:2079 io.c:2093 ++#, c-format ++msgid "close of pipe failed (%s)" ++msgstr "lá»—i đóng ống dẫn (%s)" ++ ++#: io.c:1973 ++msgid "`|&' not supported" ++msgstr "« |& » không được há»— trợ" ++ ++#: io.c:2039 ++#, c-format ++msgid "cannot open pipe `%s' (%s)" ++msgstr "không thể mở ống dẫn « %s » (%s)" ++ ++#: io.c:2087 ++#, c-format ++msgid "cannot create child process for `%s' (fork: %s)" ++msgstr "không thể tạo tiến trình con cho « %s » (fork: %s)" ++ ++#: io.c:2520 ++#, c-format ++msgid "data file `%s' is empty" ++msgstr "tập tin dữ liệu « %s » là rá»—ng" ++ ++#: io.c:2561 io.c:2569 ++msgid "could not allocate more input memory" ++msgstr "không thể cấp phát bá»™ nhá»› nhập thêm nữa" ++ ++#: io.c:3127 ++msgid "multicharacter value of `RS' is a gawk extension" ++msgstr "giá trị Ä‘a ký tá»± của « RS » là phần mở rá»™ng gawk" ++ ++#: io.c:3232 ++msgid "IPv6 communication is not supported" ++msgstr "Truyá»n thông trên IPv6 không được há»— trợ" ++ ++#: main.c:366 ++msgid "`-m[fr]' option irrelevant in gawk" ++msgstr "tùy chá»n « -m[fr] » không thích Ä‘ang trong gawk" ++ ++#: main.c:368 ++msgid "-m option usage: `-m[fr] nnn'" ++msgstr "cách sá»­ dụng tùy chá»n « -m »: « -m[fr] nnn »" ++ ++#: main.c:391 ++msgid "empty argument to `-e/--source' ignored" ++msgstr "đối số rá»—ng cho tuỳ chá»n `-e/--source' bị bá» qua" ++ ++#: main.c:462 ++#, c-format ++msgid "%s: option `-W %s' unrecognized, ignored\n" ++msgstr "%s: tùy chá»n « -W %s » không được nhận diện nên bị bá» qua\n" ++ ++#: main.c:515 ++#, c-format ++msgid "%s: option requires an argument -- %c\n" ++msgstr "%s: tùy chá»n cần đến đối số « -- %c »\n" ++ ++#: main.c:536 ++msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" ++msgstr "" ++"biến môi trÆ°á»ng « POSIXLY_CORRECT » (đúng kiểu POSIX) đã được đặt; Ä‘ang bật " ++"tùy chá»n « --posix »" ++ ++#: main.c:542 ++msgid "`--posix' overrides `--traditional'" ++msgstr "tùy chá»n « --posix » có quyá»n cao hÆ¡n « --traditional » (truyá»n thống)" ++ ++#: main.c:553 ++msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" ++msgstr "" ++"« --posix »/« --traditional » (truyá»n thống) có quyá»n cao hÆ¡n « --non-" ++"decimal-data » (dữ liệu khác thập phân)" ++ ++#: main.c:557 ++#, c-format ++msgid "running %s setuid root may be a security problem" ++msgstr "việc chạy %s vá»›i tÆ° cách « setuid root » có thể rủi rá» bảo mật" ++ ++#: main.c:562 ++msgid "`--posix' overrides `--binary'" ++msgstr "`--posix' đè lên `--binary'" ++ ++#: main.c:613 ++#, c-format ++msgid "can't set binary mode on stdin (%s)" ++msgstr "không thể đặt chế Ä‘á»™ nhị phân trên thiết bị nhập chuẩn (%s)" ++ ++#: main.c:616 ++#, c-format ++msgid "can't set binary mode on stdout (%s)" ++msgstr "không thể đặt chế Ä‘á»™ nhị phân trên thiết bị xuất chuẩn (%s)" ++ ++#: main.c:618 ++#, c-format ++msgid "can't set binary mode on stderr (%s)" ++msgstr "không thể đặt chế Ä‘á»™ nhị phân trên thiết bị lá»—i chuẩn (%s)" ++ ++#: main.c:657 ++msgid "no program text at all!" ++msgstr "không có Ä‘oạn chữ chÆ°Æ¡ng trình nào cả !" ++ ++#: main.c:734 ++#, c-format ++msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" ++msgstr "" ++"Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] -f tập_tin_chÆ°Æ¡ng_trình [--] " ++"tập_tin ...\n" ++ ++#: main.c:736 ++#, c-format ++msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" ++msgstr "" ++"Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] [--] %cchÆ°Æ¡ng_trình%c " ++"tập_tin ...\n" ++ ++#: main.c:741 ++msgid "POSIX options:\t\tGNU long options: (standard)\n" ++msgstr "Tùy chá»n POSIX:\t\tTùy chá»n dài GNU: (theo tiêu chuẩn)\n" ++ ++#: main.c:742 ++msgid "\t-f progfile\t\t--file=progfile\n" ++msgstr "\t-f tập_tin_chÆ°Æ¡ng_trình\t\t--file=tập_tin_chÆ°Æ¡ng_trình\n" ++ ++#: main.c:743 ++msgid "\t-F fs\t\t\t--field-separator=fs\n" ++msgstr "\t-F fs\t\t\t--field-separator=Ä‘iá»u phân cách trÆ°á»ng\n" ++ ++#: main.c:744 ++msgid "\t-v var=val\t\t--assign=var=val\n" ++msgstr "" ++"\t-v var=giá trị\t\t--assign=biến=giá_trị\n" ++"(assign: gán)\n" ++ ++#: main.c:745 ++msgid "Short options:\t\tGNU long options: (extensions)\n" ++msgstr "Tuỳ chá»n ngắn:\t\tTuỳ chá»n GNU dạng dài: (phần mở rá»™ng)\n" ++ ++#: main.c:746 ++msgid "\t-b\t\t\t--characters-as-bytes\n" ++msgstr "\t-b\t\t\t--characters-as-bytes\n" ++ ++#: main.c:747 ++msgid "\t-c\t\t\t--traditional\n" ++msgstr "\t-c\t\t\t--traditional\n" ++ ++#: main.c:748 ++msgid "\t-C\t\t\t--copyright\n" ++msgstr "\t-C\t\t\t--copyright\n" ++ ++#: main.c:749 ++msgid "\t-d[file]\t\t--dump-variables[=file]\n" ++msgstr "\t-d[tệp_tin]\t\t--dump-variables[=tệp_tin]\n" ++ ++#: main.c:750 ++msgid "\t-e 'program-text'\t--source='program-text'\n" ++msgstr "\t-e 'program-text'\t--source='program-text'\n" ++ ++#: main.c:751 ++msgid "\t-E file\t\t\t--exec=file\n" ++msgstr "\t-E file\t\t\t--exec=tệp_tin\n" ++ ++#: main.c:752 ++msgid "\t-g\t\t\t--gen-pot\n" ++msgstr "\t-g\t\t\t--gen-pot\n" ++ ++#: main.c:753 ++msgid "\t-h\t\t\t--help\n" ++msgstr "\t-h\t\t\t--help\n" ++ ++#: main.c:754 ++msgid "\t-L [fatal]\t\t--lint[=fatal]\n" ++msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" ++ ++#: main.c:755 ++msgid "\t-n\t\t\t--non-decimal-data\n" ++msgstr "\t-n\t\t\t--non-decimal-data\n" ++ ++#: main.c:756 ++msgid "\t-N\t\t\t--use-lc-numeric\n" ++msgstr "\t-N\t\t\t--use-lc-numeric\n" ++ ++#: main.c:757 ++msgid "\t-O\t\t\t--optimize\n" ++msgstr "\t-O\t\t\t--optimize\ttối Æ°u hoá\n" ++ ++#: main.c:758 ++msgid "\t-p[file]\t\t--profile[=file]\n" ++msgstr "\t-p[file]\t\t--profile[=file]\n" ++ ++#: main.c:759 ++msgid "\t-P\t\t\t--posix\n" ++msgstr "\t-P\t\t\t--posix\n" ++ ++#: main.c:760 ++msgid "\t-r\t\t\t--re-interval\n" ++msgstr "\t-r\t\t\t--re-interval\n" ++ ++#: main.c:762 ++msgid "\t-R file\t\t\t--command=file\n" ++msgstr "\t-R file\t\t\t--command=tệp_tin\n" ++ ++#: main.c:763 ++msgid "\t-S\t\t\t--sandbox\n" ++msgstr "\t-S\t\t\t--sandbox\n" ++ ++#: main.c:764 ++msgid "\t-t\t\t\t--lint-old\n" ++msgstr "\t-t\t\t\t--lint-old\n" ++ ++#: main.c:765 ++msgid "\t-V\t\t\t--version\n" ++msgstr "\t-V\t\t\t--version\n" ++ ++#: main.c:767 ++msgid "\t-W nostalgia\t\t--nostalgia\n" ++msgstr "" ++"\t-W nostalgia\t\t--nostalgia\n" ++"(ná»—i luyến tiếc quá khứ)\n" ++ ++#: main.c:770 ++msgid "\t-Y\t\t--parsedebug\n" ++msgstr "\t-Y\t\t--parsedebug\n" ++ ++#. TRANSLATORS: --help output 5 (end) ++#. TRANSLATORS: the placeholder indicates the bug-reporting address ++#. for this application. Please add _another line_ with the ++#. address for translation bugs. ++#. no-wrap ++#: main.c:779 ++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" ++"Äể thông báo lá»—i, xem nút « Bugs » (lá»—i) trong tập tin\n" ++"thông tin « gawk.info » mà nằm trong phần\n" ++"« Reporting Problems and Bugs » (thông báo vấn Ä‘á» và lá»—i)\n" ++"trong bản in.\n" ++"\n" ++ ++#: main.c:783 ++msgid "" ++"gawk is a pattern scanning and processing language.\n" ++"By default it reads standard input and writes standard output.\n" ++"\n" ++msgstr "" ++"gawk là ngôn ngữ quét và xá»­ lý mẫu.\n" ++"Mặc định là nó Ä‘á»c thiết bị nhập chuẩn và ghi ra thiết bị xuất chuẩn.\n" ++"\n" ++ ++#: main.c:787 ++msgid "" ++"Examples:\n" ++"\tgawk '{ sum += $1 }; END { print sum }' file\n" ++"\tgawk -F: '{ print $1 }' /etc/passwd\n" ++msgstr "" ++"Thí dụ :\n" ++"\tgawk '{ sum += $1 }; END { print sum }' file\n" ++"\tgawk -F: '{ print $1 }' /etc/passwd\n" ++ ++#: main.c:807 ++#, 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 3 of the License, or\n" ++"(at your option) any later version.\n" ++"\n" ++msgstr "" ++"Tác quyá»n © năm 1989, 1991-%d của Tổ chức Phần má»m Tá»± do.\n" ++"\n" ++"ChÆ°Æ¡ng trình này là phần má»m tá»± do; bạn có thể phát hành lại nó và/hoặc sá»­a " ++"đổi nó vá»›i Ä‘iá»u kiện của Giấy Phép Công Cá»™ng GNU nhÆ° được xuất bản bởi Tổ " ++"Chức Phần Má»m Tá»± Do; hoặc phiên bản 3 của Giấy Phép này, hoặc (tùy chá»n) bất " ++"kỳ phiên bản sau nào.\n" ++"\n" ++ ++#: main.c:815 ++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 "" ++"Chúng tôi phân phối chÆ°Æ¡ng trình này vì mong muốn nó hữu ích,\n" ++"nhÆ°ng mà KHÔNG BẢO ÄẢM GÃŒ CẢ, không ngay cả ngụ ý bảo đảm\n" ++"KHẢ NÄ‚NG BÃN hoặc KHẢ NÄ‚NG LÀM VIỆC DỨT KHOÃT.\n" ++"Hãy xem Bản Quyá»n Công Chung GNU (GPL) để tìm chi tiết.\n" ++"\n" ++ ++#: main.c:821 ++msgid "" ++"You should have received a copy of the GNU General Public License\n" ++"along with this program. If not, see http://www.gnu.org/licenses/.\n" ++msgstr "" ++"Bện nên đã nhận má»™t bản sao của Giấy Phép Công Cá»™ng GNU\n" ++"cùng vá»›i chÆ°Æ¡ng trình này. Không thì xem địa chỉ « http://www.gnu.org/" ++"licenses/ ».\n" ++ ++#: main.c:856 ++msgid "-Ft does not set FS to tab in POSIX awk" ++msgstr "-Ft không đặt FS (hệ thống tập tin?) là tab trong awk POSIX" ++ ++#: main.c:1090 ++#, c-format ++msgid "unknown value for field spec: %d\n" ++msgstr "không hiểu giá trị dành cho đặc tính trÆ°á»ng: %d\n" ++ ++#: main.c:1171 ++#, c-format ++msgid "" ++"%s: `%s' argument to `-v' not in `var=value' form\n" ++"\n" ++msgstr "" ++"%s: đối số « %s » đối vá»›i « -v » không phải có dạng « biến=giá_trị »\n" ++"\n" ++ ++#: main.c:1197 ++#, c-format ++msgid "`%s' is not a legal variable name" ++msgstr "« %s » không phải là tên biến hợp lệ" ++ ++#: main.c:1200 ++#, c-format ++msgid "`%s' is not a variable name, looking for file `%s=%s'" ++msgstr "« %s » không phải là tên biến; Ä‘ang tìm tập tin « %s=%s »" ++ ++#: main.c:1204 ++#, c-format ++msgid "cannot use gawk builtin `%s' as variable name" ++msgstr "không thể dùng builtin (dá»±ng sẵn) của gawk « %s » nhÆ° là tên biến" ++ ++#: main.c:1209 ++#, c-format ++msgid "cannot use function `%s' as variable name" ++msgstr "không thể dùng hàm « %s » nhÆ° là tên biến" ++ ++#: main.c:1262 ++msgid "floating point exception" ++msgstr "ngoại lệ Ä‘iểm phù Ä‘á»™ng" ++ ++#: main.c:1269 ++msgid "fatal error: internal error" ++msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™" ++ ++#: main.c:1284 ++msgid "fatal error: internal error: segfault" ++msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™ : lá»—i chia ra từng Ä‘oạn" ++ ++#: main.c:1296 ++msgid "fatal error: internal error: stack overflow" ++msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™ : tràn đống" ++ ++#: main.c:1346 ++#, c-format ++msgid "no pre-opened fd %d" ++msgstr "không có fd (chỉ thị tập tin?) %d đã mở trÆ°á»›c" ++ ++#: main.c:1353 ++#, c-format ++msgid "could not pre-open /dev/null for fd %d" ++msgstr "không thể mở sẵn « /dev/null » cho fd %d" ++ ++#: msg.c:63 ++#, c-format ++msgid "cmd. line:" ++msgstr "dòng lệnh:" ++ ++#: msg.c:107 ++msgid "error: " ++msgstr "lá»—i: " ++ ++#: node.c:406 ++msgid "backslash at end of string" ++msgstr "gặp xuyệc ngoặc tại kết thúc của chuá»—i" ++ ++#: node.c:517 ++#, c-format ++msgid "old awk does not support the `\\%c' escape sequence" ++msgstr "awk cÅ© không há»— trợ dãy thoát « \\%c »" ++ ++#: node.c:568 ++msgid "POSIX does not allow `\\x' escapes" ++msgstr "POSIX không cho phép Ä‘iá»u thoát « \\x »" ++ ++#: node.c:574 ++msgid "no hex digits in `\\x' escape sequence" ++msgstr "không có số thập lúc nằm trong dây thoát « \\x »" ++ ++#: node.c:596 ++#, c-format ++msgid "" ++"hex escape \\x%.*s of %d characters probably not interpreted the way you " ++"expect" ++msgstr "" ++"dây thoát thập lục \\x%.*s chứa %d ký tá»± mà rất có thể không phải được Ä‘á»c " ++"bằng cách dá»± định" ++ ++#: node.c:611 ++#, c-format ++msgid "escape sequence `\\%c' treated as plain `%c'" ++msgstr "dây thoát « \\%c » được xá»­ lý nhÆ° là « %c » chuẩn" ++ ++#: node.c:750 ++msgid "" ++"Invalid multibyte data detected. There may be a mismatch between your data " ++"and your locale." ++msgstr "" ++"Dữ liệu dạng Ä‘a byte (multibyte) không hợp lệ được tìm thấy. Tại đó có lẽ " ++"không khá»›p giữa dữ liệu của bạn và nÆ¡i xảy ra." ++ ++#: posix/gawkmisc.c:176 ++#, c-format ++msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" ++msgstr "%s %s `%s': không thể lấy cá» mô tả (fd): (fcntl F_GETFD: %s)" ++ ++#: posix/gawkmisc.c:188 ++#, c-format ++msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" ++msgstr "" ++"%s %s « %s »: không thể đặt « close-on-exec » (đóng má»™t khi thá»±c hiện): " ++"(fcntl F_SETFD: %s)" ++ ++#: profile.c:83 ++#, c-format ++msgid "could not open `%s' for writing: %s" ++msgstr "không thể mở « %s » để ghi: %s" ++ ++#: profile.c:85 ++msgid "sending profile to standard error" ++msgstr "Ä‘ang gởi hồ sÆ¡ cho thiết bị lá»—i chuẩn" ++ ++#: profile.c:203 ++#, c-format ++msgid "" ++"\t# %s block(s)\n" ++"\n" ++msgstr "" ++"\t# %s khối\n" ++"\n" ++ ++#: profile.c:208 ++#, c-format ++msgid "" ++"\t# Rule(s)\n" ++"\n" ++msgstr "" ++"\t# Quy tắc\n" ++"\n" ++ ++#: profile.c:279 ++#, c-format ++msgid "internal error: %s with null vname" ++msgstr "lá»—i ná»™i bá»™: %s vá»›i vname (tên biến?) vô giá trị" ++ ++#: profile.c:952 ++#, c-format ++msgid "\t# gawk profile, created %s\n" ++msgstr "\t# hồ sÆ¡ gawk, được tạo %s\n" ++ ++#: profile.c:1331 ++#, c-format ++msgid "" ++"\n" ++"\t# Functions, listed alphabetically\n" ++msgstr "" ++"\n" ++"\t# Danh sách các hàm theo thứ tá»± abc\n" ++ ++#: profile.c:1370 ++#, c-format ++msgid "redir2str: unknown redirection type %d" ++msgstr "redir2str: không hiểu kiểu chuyển hÆ°á»›ng %d" ++ ++#: re.c:573 ++#, c-format ++msgid "range of the form `[%c-%c]' is locale dependent" ++msgstr "dạng thức vùng `[%c-%c]' thì phụ thuá»™c vị trí" ++ ++#: re.c:600 ++#, c-format ++msgid "regexp component `%.*s' should probably be `[%.*s]'" ++msgstr "" ++"thành phần của biểu thức chính qui (regexp) `%.*s' hầu nhÆ° chắc chắn nên là `" ++"[%.*s]'" ++ ++#: regcomp.c:131 ++msgid "Success" ++msgstr "Thành công" ++ ++#: regcomp.c:134 ++msgid "No match" ++msgstr "Không khá»›p" ++ ++#: regcomp.c:137 ++msgid "Invalid regular expression" ++msgstr "Biểu thức chính quy không hợp lệ" ++ ++#: regcomp.c:140 ++msgid "Invalid collation character" ++msgstr "Ký tá»± đối chiếu không hợp lệ" ++ ++#: regcomp.c:143 ++msgid "Invalid character class name" ++msgstr "Tên hạng ký tá»± không hợp lệ" ++ ++#: regcomp.c:146 ++msgid "Trailing backslash" ++msgstr "Gặp xuyệc ngược nằm theo" ++ ++#: regcomp.c:149 ++msgid "Invalid back reference" ++msgstr "Tham chiếu trở lại không hợp lệ" ++ ++#: regcomp.c:152 ++msgid "Unmatched [ or [^" ++msgstr "ChÆ°a khá»›p « [ » hay « [^ »" ++ ++#: regcomp.c:155 ++msgid "Unmatched ( or \\(" ++msgstr "ChÆ°a khá»›p « ( » hay « \\( »" ++ ++#: regcomp.c:158 ++msgid "Unmatched \\{" ++msgstr "ChÆ°a khá»›p « \\{ »" ++ ++#: regcomp.c:161 ++msgid "Invalid content of \\{\\}" ++msgstr "Ná»™i dụng « \\{\\} » không hợp lệ" ++ ++#: regcomp.c:164 ++msgid "Invalid range end" ++msgstr "Kết thúc phạm vị không hợp lệ" ++ ++#: regcomp.c:167 ++msgid "Memory exhausted" ++msgstr "Hết bá»™ nhá»› rồi" ++ ++#: regcomp.c:170 ++msgid "Invalid preceding regular expression" ++msgstr "Biểu thức chính quy nằm trÆ°á»›c không hợp lệ" ++ ++#: regcomp.c:173 ++msgid "Premature end of regular expression" ++msgstr "Kết thúc quá sá»›m của biểu thức chính quy" ++ ++#: regcomp.c:176 ++msgid "Regular expression too big" ++msgstr "Biểu thức chính quy quá lá»›n" ++ ++#: regcomp.c:179 ++msgid "Unmatched ) or \\)" ++msgstr "ChÆ°a khá»›p « ) » hay « \\) »" ++ ++#: regcomp.c:700 ++msgid "No previous regular expression" ++msgstr "Không có biểu thức chính quy nằm trÆ°á»›c" ++ ++#~ msgid "could not find groups: %s" ++#~ msgstr "không tìm thấy nhóm: %s" ++ ++#~ msgid "statement may have no effect" ++#~ msgstr "câu có lẽ sẽ không có tác dụng" ++ ++#~ msgid "call of `length' without parentheses is deprecated by POSIX" ++#~ msgstr "POSIX phản đối lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc" ++ ++#~ msgid "division by zero attempted in `/'" ++#~ msgstr "thá»­ chia cho không trong « / »" ++ ++#~ msgid "length: untyped parameter argument will be forced to scalar" ++#~ msgstr "" ++#~ "length: (chiá»u dài) tham số không có loại thì bị ép buá»™c thành vô hÆ°á»›ng" ++ ++#~ msgid "length: untyped argument will be forced to scalar" ++#~ msgstr "" ++#~ "length: (chiá»u dài) đối số không có loại thì bị ép buá»™c thành vô hÆ°á»›ng" ++ ++#~ msgid "`break' outside a loop is not portable" ++#~ msgstr "không thể mang khả năng « break » (ngắt) nằm ở ngoại vòng lặp" ++ ++#~ msgid "`continue' outside a loop is not portable" ++#~ msgstr "" ++#~ "không thể mang khả năng « continue » (tiếp tục) nằm ở ngoại vòng lặp" ++ ++#~ msgid "`next' cannot be called from a BEGIN rule" ++#~ msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « BEGIN » (bắt đầu)" ++ ++#~ msgid "`nextfile' cannot be called from a BEGIN rule" ++#~ msgstr "" ++#~ "không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « BEGIN » (bắt " ++#~ "đầu)" ++ ++#~ msgid "" ++#~ "concatenation: side effects in one expression have changed the length of " ++#~ "another!" ++#~ msgstr "" ++#~ "concatenation: (nối chuá»—i) hiệu ứng khác trong má»™t biểu thức nào đó đã " ++#~ "thay đổi Ä‘á»™ dài của má»™t biểu thức khác !" ++ ++#~ msgid "illegal type (%s) in tree_eval" ++#~ msgstr "không cho phép kiểu (%s) trong « tree_eval » (Æ°á»›c lượng cây)" ++ ++#~ msgid "\t# -- main --\n" ++#~ msgstr "" ++#~ "\t# -- main --\n" ++#~ "(chính)\n" ++ ++#~ msgid "assignment is not allowed to result of builtin function" ++#~ msgstr "không cho phép gán cho kết quả của hàm « builtin » (có sẵn)" ++ ++#~ msgid "invalid tree type %s in redirect()" ++#~ msgstr "kiểu cây không hợp lệ « %s » trong « redirect() »" ++ ++#~ msgid "/inet/raw client not ready yet, sorry" ++#~ msgstr "tiếc là ứng dụng khách chÆ°a sẵn sàng" ++ ++#~ msgid "only root may use `/inet/raw'." ++#~ msgstr "chỉ ngÆ°á»i chủ (root) có thể dùng thôi" ++ ++#~ msgid "/inet/raw server not ready yet, sorry" ++#~ msgstr "tiếc là trình phục vụ chÆ°a sẵn sàng" ++ ++#~ msgid "file `%s' is a directory" ++#~ msgstr "tập tin « %s » là thÆ° mục" ++ ++#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" ++#~ msgstr "" ++#~ "hãy dùng « PROCINFO[\"%s\"] » (thông tin tiến trình) thay cho « %s »" ++ ++#~ msgid "use `PROCINFO[...]' instead of `/dev/user'" ++#~ msgstr "" ++#~ "hãy dùng « PROCINFO[...] » (thông tin tiến trình) thay cho " ++ ++#~ msgid "out of memory" ++#~ msgstr "không đủ bá»™ nhá»›" ++ ++#~ msgid "\t-m[fr] val\n" ++#~ msgstr "\t-m[fr] giá_trị\n" ++ ++#~ msgid "\t-W compat\t\t--compat\n" ++#~ msgstr "\t-W compat\t\t--compat\ttÆ°Æ¡ng thích\n" ++ ++#~ msgid "\t-W copyleft\t\t--copyleft\n" ++#~ msgstr "\t-W copyleft\t\t--copyleft\ttác quyá»n ngược\n" ++ ++#~ msgid "\t-W usage\t\t--usage\n" ++#~ msgstr "\t-W usage\t\t--usage\tcách sá»­ dụng\n" ++ ++#~ msgid "can't convert string to float" ++#~ msgstr "không thể chuyển đổi chuá»—i sang Ä‘iá»u lÆ¡ lá»­ng" ++ ++#~ msgid "# treated internally as `delete'" ++#~ msgstr "# được xá»­ lý ná»™i bá»™ là « delete » (xoá)" ++ ++#~ msgid "# this is a dynamically loaded extension function" ++#~ msgstr "# đây là má»™t hàm mở rá»™ng được nạp Ä‘á»™ng" ++ ++#~ msgid "" ++#~ "\t# BEGIN block(s)\n" ++#~ "\n" ++#~ msgstr "" ++#~ "\t# khối BEGIN (bắt đầu)\n" ++#~ "\n" ++ ++#~ msgid "unexpected type %s in prec_level" ++#~ msgstr "gặp kiểu bất ngỠ« %s » trong « prec_level » (cấp nằm trÆ°á»›c?)" ++ ++#~ msgid "Unknown node type %s in pp_var" ++#~ msgstr "Không rõ loại nút %s trong pp_var" diff -Nru gawk-3.1.8+dfsg/debian/patches/02_po-it.patch gawk-4.0.1+dfsg/debian/patches/02_po-it.patch --- gawk-3.1.8+dfsg/debian/patches/02_po-it.patch 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/patches/02_po-it.patch 2013-03-16 15:08:23.000000000 +0000 @@ -0,0 +1,2491 @@ +Description: Updated Italian PO file +Origin: upstream, http://git.savannah.gnu.org/cgit/gawk.git/tree/po/it.po?h=gawk-4.0-stable&id=ae93fda5 +--- gawk-4.0.1+dfsg.orig/po/it.po ++++ gawk-4.0.1+dfsg/po/it.po +@@ -1,13 +1,13 @@ + # Italian messages for GNU Awk +-# Copyright (C) 2002-2011 Free Software Foundation, Inc. ++# Copyright (C) 2002-2012 Free Software Foundation, Inc. + # Antonio Colombo . + # + msgid "" + msgstr "" + "Project-Id-Version: gawk 3.1.81\n" + "Report-Msgid-Bugs-To: arnold@skeeve.com\n" +-"POT-Creation-Date: 2012-03-28 22:03+0200\n" +-"PO-Revision-Date: 2011-03-19 16:52+0100\n" ++"POT-Creation-Date: 2012-04-27 10:06+0300\n" ++"PO-Revision-Date: 2012-05-08 16:11+0100\n" + "Last-Translator: Antonio Colombo \n" + "Language-Team: Italian \n" + "Language: it\n" +@@ -15,513 +15,462 @@ msgstr "" + "Content-Type: text/plain; charset=ISO-8859-1\n" + "Content-Transfer-Encoding: 8-bit\n" + +-#: array.c:140 ++#: array.c:266 + #, c-format + msgid "from %s" + msgstr "da %s" + +-#: array.c:248 ++#: array.c:366 + msgid "attempt to use a scalar value as array" + msgstr "tentativo di usare valore scalare come vettore" + +-#: array.c:251 +-#, c-format +-msgid "attempt to use function `%s' as an array" +-msgstr "tentativo di usare funzione '%s' come vettore" +- +-#: array.c:254 ++#: array.c:368 + #, c-format + msgid "attempt to use scalar parameter `%s' as an array" + msgstr "tentativo di usare il parametro scalare `%s' come un vettore" + +-#: array.c:257 ++#: array.c:371 + #, c-format + msgid "attempt to use scalar `%s' as an array" + msgstr "tentativo di usare scalare '%s' come vettore" + +-#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +-#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +-#: eval.c:1495 eval.c:1812 ++#: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 ++#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 ++#: eval.c:1508 + #, c-format + msgid "attempt to use array `%s' in a scalar context" + msgstr "tentativo di usare vettore `%s' in un contesto scalare" + +-#: array.c:513 +-#, c-format +-msgid "reference to uninitialized element `%s[\"%.*s\"]'" +-msgstr "riferimento a elemento non inizializzato `%s[\"%.*s\"]'" +- +-#: array.c:519 +-#, c-format +-msgid "subscript of array `%s' is null string" +-msgstr "l'indice del vettore '%s' è una stringa nulla" +- +-#: array.c:723 ++#: array.c:591 + #, c-format + msgid "delete: index `%s' not in array `%s'" + msgstr "delete: indice `%s' non presente nel vettore `%s'" + +-#: array.c:734 eval.c:1865 ++#: array.c:605 + #, c-format + msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" + msgstr "tentativo di usare scalare`%s[\"%.*s\"]' come vettore" + +-#: array.c:910 +-#, c-format +-msgid "%s: empty (null)\n" +-msgstr "%s: vuoto (nullo)\n" +- +-#: array.c:915 +-#, c-format +-msgid "%s: empty (zero)\n" +-msgstr "%s: vuoto (zero)\n" +- +-#: array.c:919 +-#, c-format +-msgid "%s: table_size = %d, array_size = %d\n" +-msgstr "%s: dimensione_tabella = %d, dimensione_vettore = %d\n" +- +-#: array.c:954 +-#, c-format +-msgid "%s: is parameter\n" +-msgstr "%s: è parametro\n" +- +-#: array.c:958 +-#, c-format +-msgid "%s: array_ref to %s\n" +-msgstr "%s: riferimento_vettoriale a %s\n" +- +-#: array.c:963 +-msgid "adump: argument not an array" +-msgstr "adump: l'argomento non è un vettore" ++#: array.c:784 ++msgid "adump: first argument not an array" ++msgstr "adump: il primo argomento non è un vettore" + +-#: array.c:1086 ++#: array.c:823 + msgid "asort: second argument not an array" + msgstr "asort: il secondo argomento non è un vettore" + +-#: array.c:1087 ++#: array.c:824 + msgid "asorti: second argument not an array" + msgstr "asorti: il secondo argomento non è un vettore" + +-#: array.c:1094 ++#: array.c:831 + msgid "asort: first argument not an array" + msgstr "asort: il primo argomento non è un vettore" + +-#: array.c:1095 ++#: array.c:832 + msgid "asorti: first argument not an array" + msgstr "asorti: il primo argomento non è un vettore" + +-#: array.c:1102 +-#, fuzzy ++#: array.c:839 + msgid "asort: cannot use a subarray of first arg for second arg" + msgstr "" +-"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" ++"asort: non permesso un secondo argomento che sia un sottovettore del primo argomento" + +-#: array.c:1103 +-#, fuzzy ++#: array.c:840 + msgid "asorti: cannot use a subarray of first arg for second arg" + msgstr "" +-"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" ++"asorti: non permesso un secondo argomento che sia un sottovettore del primo argomento" + +-#: array.c:1108 +-#, fuzzy ++#: array.c:845 + msgid "asort: cannot use a subarray of second arg for first arg" + msgstr "" +-"split: non si può usare lo stesso vettore come secondo e quarto argomento" ++"asort: non permesso un primo argomento che sia un sottovettore del secondo argomento" + +-#: array.c:1109 +-#, fuzzy ++#: array.c:846 + msgid "asorti: cannot use a subarray of second arg for first arg" + msgstr "" +-"split: non si può usare lo stesso vettore come secondo e quarto argomento" ++"asorti: non permesso un primo argomento che sia un sottovettore del secondo argomento" + +-#: array.c:1655 +-#, fuzzy, c-format ++#: array.c:1314 + msgid "`%s' is invalid as a function name" +-msgstr "estensione: manca nome di funzione" ++msgstr "`%s' non è un nome funzione valido" + +-#: array.c:1659 +-#, fuzzy, c-format ++#: array.c:1318 + msgid "sort comparison function `%s' is not defined" +-msgstr "funzione `%s' non definita" ++msgstr "funzione di confronto del sort `%s' non definita" + +-#: awkgram.y:249 ++#: awkgram.y:223 + #, c-format + msgid "%s blocks must have an action part" + msgstr "blocchi %s richiedono una 'azione'" + +-#: awkgram.y:252 ++#: awkgram.y:226 + 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:323 awkgram.y:334 ++#: awkgram.y:295 awkgram.y:306 + msgid "old awk does not support multiple `BEGIN' or `END' rules" + msgstr "il vecchio awk non supporta più di una regola `BEGIN' o `END'" + +-#: awkgram.y:371 ++#: awkgram.y:343 + #, c-format + msgid "`%s' is a built-in function, it cannot be redefined" + msgstr "`%s' è una funzione interna, non si può ridefinire" + +-#: awkgram.y:432 ++#: awkgram.y:389 + msgid "regexp constant `//' looks like a C++ comment, but is not" + msgstr "espressione regolare costante `//' sembra un commento C++, ma non lo è" + +-#: awkgram.y:436 ++#: awkgram.y:393 + #, c-format + msgid "regexp constant `/%s/' looks like a C comment, but is not" + msgstr "espressione regolare costante `/%s/' sembra un commento C, ma non lo è" + +-#: awkgram.y:528 ++#: awkgram.y:485 + #, c-format + msgid "duplicate case values in switch body: %s" + msgstr "valori di 'case' doppi all'interno di uno 'switch': %s" + +-#: awkgram.y:549 ++#: awkgram.y:506 + msgid "duplicate `default' detected in switch body" + msgstr "valori di default doppi all'interno di uno 'switch'" + +-#: awkgram.y:809 ++#: awkgram.y:766 + msgid "`break' is not allowed outside a loop or switch" + msgstr "`break' non permesso fuori da un ciclo o da uno 'switch'" + +-#: awkgram.y:818 ++#: awkgram.y:775 + msgid "`continue' is not allowed outside a loop" + msgstr "`continue' non permesso fuori da un un ciclo" + +-#: awkgram.y:828 ++#: awkgram.y:785 + #, c-format + msgid "`next' used in %s action" + msgstr "`next' usato in 'azione' %s" + +-#: awkgram.y:836 ++#: awkgram.y:793 + msgid "`nextfile' is a gawk extension" + msgstr "`nextfile' è un'estensione gawk" + +-#: awkgram.y:841 ++#: awkgram.y:798 + #, c-format + msgid "`nextfile' used in %s action" + msgstr "`nextfile' usato in 'azione' %s" + +-#: awkgram.y:865 ++#: awkgram.y:822 + msgid "`return' used outside function context" + msgstr "`return' usato fuori da una funzione" + +-#: awkgram.y:925 ++#: awkgram.y:896 + 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:995 awkgram.y:999 awkgram.y:1023 ++#: awkgram.y:966 awkgram.y:970 awkgram.y:994 + msgid "`delete array' is a gawk extension" + msgstr "`delete array' è un'estensione gawk" + +-#: awkgram.y:1019 ++#: awkgram.y:990 + msgid "`delete(array)' is a non-portable tawk extension" + msgstr "`delete(array)' è un'estensione tawk non-portabile" + +-#: awkgram.y:1135 ++#: awkgram.y:1108 + msgid "multistage two-way pipelines don't work" + msgstr "'pipeline' multistadio bidirezionali non funzionano" + +-#: awkgram.y:1238 ++#: awkgram.y:1211 + msgid "regular expression on right of assignment" + msgstr "espressione regolare usata per assegnare un valore" + +-#: awkgram.y:1249 ++#: awkgram.y:1222 + msgid "regular expression on left of `~' or `!~' operator" + msgstr "espressione regolare prima di operatore `~' o `!~'" + +-#: awkgram.y:1265 awkgram.y:1419 ++#: awkgram.y:1238 awkgram.y:1389 + msgid "old awk does not support the keyword `in' except after `for'" + msgstr "il vecchio awk non supporta la parola-chiave `in' se non dopo `for'" + +-#: awkgram.y:1275 ++#: awkgram.y:1248 + msgid "regular expression on right of comparison" + msgstr "espressione regolare a destra in un confronto" + +-#: awkgram.y:1394 ++#: awkgram.y:1364 + #, c-format + msgid "`getline var' invalid inside `%s' rule" + msgstr "`getline var' invalida all'interno della regola `%s'" + +-#: awkgram.y:1397 eval.c:2504 ++#: awkgram.y:1367 + #, c-format + msgid "`getline' invalid inside `%s' rule" + msgstr "`getline' invalida all'interno della regola `%s'" + +-#: awkgram.y:1402 ++#: awkgram.y:1372 + msgid "non-redirected `getline' undefined inside END action" + msgstr "`getline' non re-diretta indefinita dentro 'azione' END" + +-#: awkgram.y:1421 ++#: awkgram.y:1391 + msgid "old awk does not support multidimensional arrays" + msgstr "il vecchio awk non supporta vettori multidimensionali" + +-#: awkgram.y:1517 ++#: awkgram.y:1488 + msgid "call of `length' without parentheses is not portable" + msgstr "chiamata a `length' senza parentesi non portabile" + +-#: awkgram.y:1580 ++#: awkgram.y:1554 + msgid "indirect function calls are a gawk extension" + msgstr "chiamate a funzione indirette sono un'estensione gawk" + +-#: awkgram.y:1593 ++#: awkgram.y:1567 + #, c-format + msgid "can not use special variable `%s' for indirect function call" + msgstr "" + "non posso usare la variabile speciale `%s' come parametro indiretto di " + "funzione " + +-#: awkgram.y:1671 ++#: awkgram.y:1645 + msgid "invalid subscript expression" + msgstr "espressione indice invalida" + +-#: awkgram.y:1711 +-msgid "use of non-array as array" +-msgstr "uso di non-vettore come vettore" +- +-#: awkgram.y:1975 awkgram.y:1995 msg.c:98 ++#: awkgram.y:1966 awkgram.y:1986 msg.c:112 + msgid "warning: " + msgstr "attenzione: " + +-#: awkgram.y:1993 msg.c:130 ++#: awkgram.y:1984 msg.c:144 + msgid "fatal: " + msgstr "fatale: " + +-#: awkgram.y:2043 ++#: awkgram.y:2034 + msgid "unexpected newline or end of string" + msgstr "carattere 'a capo' o fine stringa inaspettati" + +-#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 ++#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 + #, 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:2301 awkgram.y:2359 builtin.c:122 ++#: awkgram.y:2300 awkgram.y:2358 builtin.c:124 + msgid "reason unknown" + msgstr "ragione indeterminata" + +-#: awkgram.y:2317 ++#: awkgram.y:2316 + #, c-format + msgid "already included source file `%s'" + msgstr "file sorgente `%s' già incluso" + +-#: awkgram.y:2343 ++#: awkgram.y:2342 + msgid "@include is a gawk extension" + msgstr "@include è un'estensione gawk" + +-#: awkgram.y:2349 ++#: awkgram.y:2348 + msgid "empty filename after @include" + msgstr "nome-file mancante dopo @include" + +-#: awkgram.y:2494 ++#: awkgram.y:2497 + msgid "empty program text on command line" + msgstr "programma nullo sulla linea comandi" + +-#: awkgram.y:2609 ++#: awkgram.y:2612 + #, c-format + msgid "can't read sourcefile `%s' (%s)" + msgstr "non riesco a leggere file sorgente `%s' (%s)" + +-#: awkgram.y:2620 ++#: awkgram.y:2623 + #, c-format + msgid "source file `%s' is empty" + msgstr "file sorgente `%s' vuoto" + +-#: awkgram.y:2797 ++#: awkgram.y:2800 + msgid "source file does not end in newline" + msgstr "file sorgente non termina con carattere 'a capo'" + +-#: awkgram.y:2900 ++#: awkgram.y:2905 + msgid "unterminated regexp ends with `\\' at end of file" + msgstr "espressione regolare non completata termina con `\\' a fine file" + +-#: awkgram.y:2924 ++#: awkgram.y:2929 + #, c-format + msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" + msgstr "" + "%s: %d: modificatore di espressione regolare tawk `/.../%c' non valido in " + "gawk" + +-#: awkgram.y:2928 ++#: awkgram.y:2933 + #, c-format + msgid "tawk regex modifier `/.../%c' doesn't work in gawk" + msgstr "modificatore di espressione regolare tawk `/.../%c' non valido in gawk" + +-#: awkgram.y:2935 ++#: awkgram.y:2940 + msgid "unterminated regexp" + msgstr "espressione regolare non completata" + +-#: awkgram.y:2939 ++#: awkgram.y:2944 + msgid "unterminated regexp at end of file" + msgstr "espressione regolare non completata a fine file" + +-#: awkgram.y:2998 ++#: awkgram.y:3003 + msgid "use of `\\ #...' line continuation is not portable" + msgstr "uso di `\\ #...' continuazione linea non portabile" + +-#: awkgram.y:3014 ++#: awkgram.y:3019 + msgid "backslash not last character on line" + msgstr "'\\' non è l'ultimo carattere della linea" + +-#: awkgram.y:3075 ++#: awkgram.y:3080 + msgid "POSIX does not allow operator `**='" + msgstr "POSIX non permette l'operatore `**='" + +-#: awkgram.y:3077 ++#: awkgram.y:3082 + msgid "old awk does not support operator `**='" + msgstr "il vecchio awk non supporta l'operatore `**='" + +-#: awkgram.y:3086 ++#: awkgram.y:3091 + msgid "POSIX does not allow operator `**'" + msgstr "POSIX non permette l'operatore `**'" + +-#: awkgram.y:3088 ++#: awkgram.y:3093 + msgid "old awk does not support operator `**'" + msgstr "il vecchio awk non supporta l'operatore `**'" + +-#: awkgram.y:3123 ++#: awkgram.y:3128 + msgid "operator `^=' is not supported in old awk" + msgstr "l'operatore `^=' non è supportato nel vecchio awk" + +-#: awkgram.y:3131 ++#: awkgram.y:3136 + msgid "operator `^' is not supported in old awk" + msgstr "l'operatore `^' non è supportato nel vecchio awk" + +-#: awkgram.y:3224 awkgram.y:3240 ++#: awkgram.y:3229 awkgram.y:3245 + msgid "unterminated string" + msgstr "stringa non terminata" + +-#: awkgram.y:3436 ++#: awkgram.y:3466 + #, c-format + msgid "invalid char '%c' in expression" + msgstr "carattere '%c' non valido in un'espressione" + +-#: awkgram.y:3483 ++#: awkgram.y:3513 + #, c-format + msgid "`%s' is a gawk extension" + msgstr "`%s' è un'estensione gawk" + +-#: awkgram.y:3488 ++#: awkgram.y:3518 + #, c-format + msgid "`%s' is a Bell Labs extension" + msgstr "`%s' è un'estensione Bell Labs" + +-#: awkgram.y:3493 ++#: awkgram.y:3523 + #, c-format + msgid "POSIX does not allow `%s'" + msgstr "POSIX non permette `%s'" + +-#: awkgram.y:3501 ++#: awkgram.y:3531 + #, c-format + msgid "`%s' is not supported in old awk" + msgstr "`%s' non è supportato nel vecchio awk" + +-#: awkgram.y:3568 ++#: awkgram.y:3598 + msgid "`goto' considered harmful!\n" + msgstr "`goto' considerato pericoloso!\n" + +-#: awkgram.y:3619 ++#: awkgram.y:3632 + #, c-format + msgid "%d is invalid as number of arguments for %s" + msgstr "%d non valido come numero di argomenti per %s" + +-#: awkgram.y:3654 ++#: awkgram.y:3667 + #, 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:3659 ++#: awkgram.y:3672 + #, c-format + msgid "%s third parameter is not a changeable object" + msgstr "il terzo parametro di '%s' non è un oggetto modificabile" + +-#: awkgram.y:3732 awkgram.y:3735 ++#: awkgram.y:3751 awkgram.y:3754 + msgid "match: third argument is a gawk extension" + msgstr "match: il terzo argomento è un'estensione gawk" + +-#: awkgram.y:3789 awkgram.y:3792 ++#: awkgram.y:3808 awkgram.y:3811 + msgid "close: second argument is a gawk extension" + msgstr "close: il secondo argomento è un'estensione gawk" + +-#: awkgram.y:3804 ++#: awkgram.y:3823 + msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" + msgstr "" + "uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" + +-#: awkgram.y:3819 ++#: awkgram.y:3838 + msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" + msgstr "" + "uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" + +-#: awkgram.y:3911 +-#, c-format +-msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +-msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" +- +-#: awkgram.y:3953 ++#: awkgram.y:3904 + #, c-format + msgid "function `%s': parameter `%s' shadows global variable" + msgstr "funzione `%s': parametro `%s' nasconde variabile globale" + +-#: awkgram.y:4111 ++#: awkgram.y:3961 + #, c-format + msgid "could not open `%s' for writing (%s)" + msgstr "non riesco ad aprire `%s' in scrittura (%s)" + +-#: awkgram.y:4112 +-#, fuzzy ++#: awkgram.y:3962 + msgid "sending variable list to standard error" +-msgstr "mando profilo a 'standard error'" ++msgstr "mando lista variabili a 'standard error'" + +-#: awkgram.y:4118 ++#: awkgram.y:3970 + #, c-format + msgid "%s: close failed (%s)" + msgstr "%s: 'close' fallita (%s)" + +-#: awkgram.y:4170 ++#: awkgram.y:3995 + msgid "shadow_funcs() called twice!" + msgstr "shadow_funcs() chiamata due volte!" + +-#: awkgram.y:4176 ++#: awkgram.y:4003 + msgid "there were shadowed variables." + msgstr "c'erano variabili nascoste." + +-#: awkgram.y:4206 ++#: awkgram.y:4074 ++#, c-format ++msgid "function name `%s' previously defined" ++msgstr "funzione di nome `%s' definita in precedenza" ++ ++#: awkgram.y:4120 + #, 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:4210 ++#: awkgram.y:4123 + #, c-format + msgid "function `%s': can't use special variable `%s' as a function parameter" + msgstr "" + "funzione `%s': non posso usare la variabile speciale `%s' come parametro di " + "funzione" + +-#: awkgram.y:4226 ++#: awkgram.y:4131 + #, c-format +-msgid "function name `%s' previously defined" +-msgstr "funzione di nome `%s' definita in precedenza" ++msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" ++msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" + +-#: awkgram.y:4394 awkgram.y:4400 ++#: awkgram.y:4210 awkgram.y:4216 + #, c-format + msgid "function `%s' called but never defined" + msgstr "funzione `%s' chiamata ma mai definita" + +-#: awkgram.y:4403 ++#: awkgram.y:4219 + #, c-format + msgid "function `%s' defined but never called directly" + msgstr "funzione `%s' definita ma mai chiamata direttamente" + +-#: awkgram.y:4435 ++#: awkgram.y:4251 + #, 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:4544 ++#: awkgram.y:4297 + #, c-format + msgid "" + "function `%s' called with space between name and `(',\n" +@@ -530,227 +479,226 @@ msgstr "" + "funzione `%s' chiamata con spazio tra il nome e `(',\n" + "o usata come variabile o vettore" + +-#: awkgram.y:4791 eval.c:2056 ++#: awkgram.y:4505 + msgid "division by zero attempted" + msgstr "tentativo di dividere per zero" + +-#: awkgram.y:4800 eval.c:2072 ++#: awkgram.y:4514 + #, c-format + msgid "division by zero attempted in `%%'" + msgstr "tentativo di dividere per zero in `%%'" + +-#: builtin.c:120 ++#: builtin.c:122 + #, c-format + msgid "%s to \"%s\" failed (%s)" + msgstr "%s a \"%s\" fallita (%s)" + +-#: builtin.c:121 ++#: builtin.c:123 + msgid "standard output" + msgstr "standard output" + +-#: builtin.c:135 ++#: builtin.c:137 + msgid "exp: received non-numeric argument" + msgstr "exp: argomento non numerico" + +-#: builtin.c:141 ++#: builtin.c:143 + #, c-format + msgid "exp: argument %g is out of range" +-msgstr "exp: argomento %g non accettabile" ++msgstr "exp: argomento %g fuori dai limiti ammessi" + +-#: builtin.c:200 ++#: builtin.c:202 + #, 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:203 ++#: builtin.c:205 + #, 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:215 ++#: builtin.c:217 + #, 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:333 ++#: builtin.c:335 + msgid "index: received non-string first argument" + msgstr "index: il primo argomento non è una stringa" + +-#: builtin.c:335 ++#: builtin.c:337 + msgid "index: received non-string second argument" + msgstr "index: il secondo argomento non è una stringa" + +-#: builtin.c:457 ++#: builtin.c:461 + msgid "int: received non-numeric argument" + msgstr "int: argomento non numerico" + +-#: builtin.c:493 ++#: builtin.c:497 + msgid "length: received array argument" + msgstr "length: l'argomento fornito è un vettore" + +-#: builtin.c:496 ++#: builtin.c:500 + msgid "`length(array)' is a gawk extension" + msgstr "`length(array)' è un'estensione gawk" + +-#: builtin.c:504 ++#: builtin.c:508 + msgid "length: received non-string argument" + msgstr "length: l'argomento non è una stringa" + +-#: builtin.c:535 ++#: builtin.c:539 + msgid "log: received non-numeric argument" + msgstr "log: argomento non numerico" + +-#: builtin.c:538 ++#: builtin.c:542 + #, c-format + msgid "log: received negative argument %g" + msgstr "log: argomento negativo %g" + +-#: builtin.c:694 builtin.c:699 ++#: builtin.c:740 builtin.c:745 + msgid "fatal: must use `count$' on all formats or none" +-msgstr "" ++msgstr "fatale: `count$' va usato per ogni 'format' o per nessuno" + +-#: builtin.c:762 ++#: builtin.c:815 + #, c-format + msgid "field width is ignored for `%%' specifier" +-msgstr "" ++msgstr "larghezza campo ignorata per la specifica `%%'" + +-#: builtin.c:764 ++#: builtin.c:817 + #, c-format + msgid "precision is ignored for `%%' specifier" +-msgstr "" ++msgstr "precisione ignorata per la specifica `%%'" + +-#: builtin.c:766 ++#: builtin.c:819 + #, c-format + msgid "field width and precision are ignored for `%%' specifier" +-msgstr "" ++msgstr "larghezza campo e precisone ignorate per la specifica `%%'" + +-#: builtin.c:817 +-#, fuzzy ++#: builtin.c:870 + msgid "fatal: `$' is not permitted in awk formats" +-msgstr "l'operatore `^' non è supportato nel vecchio awk" ++msgstr "fatale: operatore `$' non consentito nei 'format' awk" + +-#: builtin.c:826 ++#: builtin.c:879 + msgid "fatal: arg count with `$' must be > 0" +-msgstr "" ++msgstr "fatale: numero argomenti con `$' dev'essere > 0" + +-#: builtin.c:830 ++#: builtin.c:883 + #, c-format + msgid "fatal: arg count %ld greater than total number of supplied arguments" +-msgstr "" ++msgstr "fatale: numero argomenti %ld > del numero totale argomenti specificati" + +-#: builtin.c:834 ++#: builtin.c:887 + msgid "fatal: `$' not permitted after period in format" +-msgstr "" ++msgstr "fatale: `$' non permesso dopo il punto in un 'format'" + +-#: builtin.c:850 ++#: builtin.c:903 + msgid "fatal: no `$' supplied for positional field width or precision" +-msgstr "" ++msgstr "fatale: manca `$' per i campi posizionali larghezza o precisione" + +-#: builtin.c:921 ++#: builtin.c:975 + msgid "`l' is meaningless in awk formats; ignored" +-msgstr "" ++msgstr "`l' non ha senso nei 'format' awk; ignorato" + +-#: builtin.c:925 ++#: builtin.c:979 + msgid "fatal: `l' is not permitted in POSIX awk formats" +-msgstr "" ++msgstr "fatale: `l' non permesso nei 'format' POSIX awk" + +-#: builtin.c:938 ++#: builtin.c:992 + msgid "`L' is meaningless in awk formats; ignored" +-msgstr "" ++msgstr "`L' non ha senso nei 'format' awk; ignorato" + +-#: builtin.c:942 ++#: builtin.c:996 + msgid "fatal: `L' is not permitted in POSIX awk formats" +-msgstr "" ++msgstr "`L' non ha senso nei 'format' awk; ignorato" + +-#: builtin.c:955 ++#: builtin.c:1009 + msgid "`h' is meaningless in awk formats; ignored" +-msgstr "" ++msgstr "`h' non ha senso nei 'format' awk; ignorato" + +-#: builtin.c:959 ++#: builtin.c:1013 + msgid "fatal: `h' is not permitted in POSIX awk formats" +-msgstr "" ++msgstr "fatale: `h' non permesso nei 'format' POSIX awk" + +-#: builtin.c:1272 ++#: builtin.c:1408 + #, c-format + msgid "[s]printf: value %g is out of range for `%%%c' format" +-msgstr "" ++msgstr "[s]printf: valore %g fuori dai limiti ammessi per il 'format' `%%%c'" + +-#: builtin.c:1332 ++#: builtin.c:1506 + #, c-format + msgid "ignoring unknown format specifier character `%c': no argument converted" +-msgstr "" ++msgstr "carattere di 'format' sconosciuto `%c' ignorato: nessun argomento convertito" + +-#: builtin.c:1337 ++#: builtin.c:1511 + msgid "fatal: not enough arguments to satisfy format string" +-msgstr "" ++msgstr "fatale: argomenti in numero minore di quelli richiesti dalla stringa di 'format'" + +-#: builtin.c:1339 ++#: builtin.c:1513 + msgid "^ ran out for this one" +-msgstr "" ++msgstr "^ esauriti a questo punto" + +-#: builtin.c:1346 ++#: builtin.c:1520 + msgid "[s]printf: format specifier does not have control letter" +-msgstr "" ++msgstr "[s]printf: specifica di 'format' senza un carattere di controllo" + +-#: builtin.c:1349 ++#: builtin.c:1523 + msgid "too many arguments supplied for format string" +-msgstr "" ++msgstr "troppi argomenti specificati per questa stringa di 'format'" + +-#: builtin.c:1423 builtin.c:1434 ++#: builtin.c:1598 builtin.c:1609 + msgid "printf: no arguments" +-msgstr "printf: manca argomento" ++msgstr "printf: mancano argomenti" + +-#: builtin.c:1475 ++#: builtin.c:1650 + msgid "sqrt: received non-numeric argument" + msgstr "sqrt: argomento non numerico" + +-#: builtin.c:1479 ++#: builtin.c:1654 + #, c-format + msgid "sqrt: called with negative argument %g" + msgstr "sqrt: chiamata con argomento negativo %g" + +-#: builtin.c:1503 ++#: builtin.c:1685 + #, c-format + msgid "substr: length %g is not >= 1" + msgstr "substr: lunghezza %g non >= 1" + +-#: builtin.c:1505 ++#: builtin.c:1687 + #, c-format + msgid "substr: length %g is not >= 0" + msgstr "substr: lunghezza %g non >= 0" + +-#: builtin.c:1512 ++#: builtin.c:1694 + #, c-format + msgid "substr: non-integer length %g will be truncated" + msgstr "substr: lunghezza non intera %g: sarà troncata" + +-#: builtin.c:1517 ++#: builtin.c:1699 + #, 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:1529 ++#: builtin.c:1711 + #, c-format + msgid "substr: start index %g is invalid, using 1" + msgstr "substr: indice di partenza %g non valido, uso 1" + +-#: builtin.c:1534 ++#: builtin.c:1716 + #, c-format + msgid "substr: non-integer start index %g will be truncated" + msgstr "substr: indice di partenza non intero %g: sarà troncato" + +-#: builtin.c:1559 ++#: builtin.c:1741 + msgid "substr: source string is zero length" + msgstr "substr: stringa di partenza lunga zero" + +-#: builtin.c:1575 ++#: builtin.c:1757 + #, c-format + msgid "substr: start index %g is past end of string" + msgstr "substr: indice di partenza %g oltre la fine della stringa" + +-#: builtin.c:1583 ++#: builtin.c:1765 + #, c-format + msgid "" + "substr: length %g at start index %g exceeds length of first argument (%lu)" +@@ -758,228 +706,223 @@ msgstr "" + "substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo " + "argomento (%lu)" + +-#: builtin.c:1657 ++#: builtin.c:1839 + msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" + msgstr "" + "strftime: il valore del 'format' in PROCINFO[\"strftime\"] è di tipo numerico" + +-#: builtin.c:1680 ++#: builtin.c:1862 + msgid "strftime: received non-numeric second argument" + msgstr "strftime: il secondo argomento non è numerico" + +-#: builtin.c:1683 ++#: builtin.c:1866 + msgid "strftime: second argument less than 0 or too big for time_t" +-msgstr "" ++msgstr "strftime: secondo argomento < 0 o troppo elevato per time_t" + +-#: builtin.c:1690 ++#: builtin.c:1873 + msgid "strftime: received non-string first argument" + msgstr "strftime: il primo argomento non è una stringa" + +-#: builtin.c:1696 ++#: builtin.c:1880 + msgid "strftime: received empty format string" + msgstr "strftime: 'format' è una stringa nulla" + +-#: builtin.c:1762 ++#: builtin.c:1946 + msgid "mktime: received non-string argument" + msgstr "mktime: l'argomento non è una stringa" + +-#: builtin.c:1779 ++#: builtin.c:1963 + msgid "mktime: at least one of the values is out of the default range" + msgstr "mktime: almeno un valore è fuori dall'intervallo di default" + +-#: builtin.c:1814 ++#: builtin.c:1998 + msgid "'system' function not allowed in sandbox mode" + msgstr "la funzione 'system' non è permessa in modo 'sandbox'" + +-#: builtin.c:1819 ++#: builtin.c:2003 + msgid "system: received non-string argument" + msgstr "system: l'argomento non è una stringa" + +-#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +-#, c-format +-msgid "reference to uninitialized variable `%s'" +-msgstr "riferimento a variabile non inizializzata `%s'" +- +-#: builtin.c:1941 ++#: builtin.c:2121 + #, c-format + msgid "reference to uninitialized field `$%d'" + msgstr "riferimento a variabile non inizializzata `$%d'" + +-#: builtin.c:2028 ++#: builtin.c:2208 + msgid "tolower: received non-string argument" + msgstr "tolower: l'argomento non è una stringa" + +-#: builtin.c:2062 ++#: builtin.c:2242 + msgid "toupper: received non-string argument" + msgstr "toupper: l'argomento non è una stringa" + +-#: builtin.c:2098 ++#: builtin.c:2278 + msgid "atan2: received non-numeric first argument" + msgstr "atan2: il primo argomento non è numerico" + +-#: builtin.c:2100 ++#: builtin.c:2280 + msgid "atan2: received non-numeric second argument" + msgstr "atan2: il secondo argomento non è numerico" + +-#: builtin.c:2119 ++#: builtin.c:2299 + msgid "sin: received non-numeric argument" + msgstr "sin: l'argomento non è numerico" + +-#: builtin.c:2135 ++#: builtin.c:2315 + msgid "cos: received non-numeric argument" + msgstr "cos: l'argomento non è numerico" + +-#: builtin.c:2188 ++#: builtin.c:2368 + msgid "srand: received non-numeric argument" + msgstr "srand: l'argomento non è numerico" + +-#: builtin.c:2219 ++#: builtin.c:2399 + msgid "match: third argument is not an array" + msgstr "match: il terzo argomento non è un vettore" + +-#: builtin.c:2483 ++#: builtin.c:2664 + msgid "gensub: third argument of 0 treated as 1" + msgstr "gensub: il terzo argomento è 0, trattato come 1" + +-#: builtin.c:2776 ++#: builtin.c:2957 + msgid "lshift: received non-numeric first argument" + msgstr "lshift: il primo argomento non è numerico" + +-#: builtin.c:2778 ++#: builtin.c:2959 + msgid "lshift: received non-numeric second argument" + msgstr "lshift: il secondo argomento non è numerico" + +-#: builtin.c:2784 ++#: builtin.c:2965 + #, c-format + msgid "lshift(%lf, %lf): negative values will give strange results" + msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani" + +-#: builtin.c:2786 ++#: builtin.c:2967 + #, c-format + msgid "lshift(%lf, %lf): fractional values will be truncated" + msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" + +-#: builtin.c:2788 ++#: builtin.c:2969 + #, 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:2813 ++#: builtin.c:2994 + msgid "rshift: received non-numeric first argument" + msgstr "rshift: il primo argomento non è numerico" + +-#: builtin.c:2815 ++#: builtin.c:2996 + msgid "rshift: received non-numeric second argument" + msgstr "rshift: il secondo argomento non è numerico" + +-#: builtin.c:2821 ++#: builtin.c:3002 + #, c-format + msgid "rshift(%lf, %lf): negative values will give strange results" + msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani" + +-#: builtin.c:2823 ++#: builtin.c:3004 + #, c-format + msgid "rshift(%lf, %lf): fractional values will be truncated" + msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" + +-#: builtin.c:2825 ++#: builtin.c:3006 + #, 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:2850 ++#: builtin.c:3031 + msgid "and: received non-numeric first argument" + msgstr "and: il primo argomento non è numerico" + +-#: builtin.c:2852 ++#: builtin.c:3033 + msgid "and: received non-numeric second argument" + msgstr "and: il secondo argomento non è numerico" + +-#: builtin.c:2858 ++#: builtin.c:3039 + #, c-format + msgid "and(%lf, %lf): negative values will give strange results" + msgstr "and(%lf, %lf): valori negativi daranno risultati strani" + +-#: builtin.c:2860 ++#: builtin.c:3041 + #, c-format + msgid "and(%lf, %lf): fractional values will be truncated" + msgstr "and(%lf, %lf): valori con decimali verranno troncati" + +-#: builtin.c:2885 ++#: builtin.c:3066 + msgid "or: received non-numeric first argument" + msgstr "or: il primo argomento non è numerico" + +-#: builtin.c:2887 ++#: builtin.c:3068 + msgid "or: received non-numeric second argument" + msgstr "or: il secondo argomento non è numerico" + +-#: builtin.c:2893 ++#: builtin.c:3074 + #, c-format + msgid "or(%lf, %lf): negative values will give strange results" + msgstr "or(%lf, %lf): valori negativi daranno risultati strani" + +-#: builtin.c:2895 ++#: builtin.c:3076 + #, c-format + msgid "or(%lf, %lf): fractional values will be truncated" + msgstr "or(%lf, %lf): valori con decimali verranno troncati" + +-#: builtin.c:2923 ++#: builtin.c:3102 + msgid "xor: received non-numeric first argument" + msgstr "xor: il primo argomento non è numerico" + +-#: builtin.c:2925 ++#: builtin.c:3104 + msgid "xor: received non-numeric second argument" + msgstr "xor: il secondo argomento non è numerico" + +-#: builtin.c:2931 ++#: builtin.c:3110 + #, c-format + msgid "xor(%lf, %lf): negative values will give strange results" + msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" + +-#: builtin.c:2933 ++#: builtin.c:3112 + #, c-format + msgid "xor(%lf, %lf): fractional values will be truncated" + msgstr "xor(%lf, %lf): valori con decimali verranno troncati" + +-#: builtin.c:2957 builtin.c:2963 ++#: builtin.c:3136 + msgid "compl: received non-numeric argument" + msgstr "compl: l'argomento non è numerico" + +-#: builtin.c:2965 ++#: builtin.c:3142 + #, c-format + msgid "compl(%lf): negative value will give strange results" + msgstr "compl(%lf): valore negativo darà risultati strani" + +-#: builtin.c:2967 ++#: builtin.c:3144 + #, c-format + msgid "compl(%lf): fractional value will be truncated" + msgstr "compl(%lf): valore con decimali verrà troncato" + +-#: builtin.c:3136 ++#: builtin.c:3313 + #, c-format + msgid "dcgettext: `%s' is not a valid locale category" + msgstr "dcgettext: `%s' non è una categoria 'locale' valida" + +-#: eval.c:412 ++#: eval.c:395 + #, c-format + msgid "unknown nodetype %d" + msgstr "tipo nodo sconosciuto %d" + +-#: eval.c:423 eval.c:437 ++#: eval.c:406 eval.c:420 + #, c-format + msgid "unknown opcode %d" + msgstr "codice operativo sconosciuto %d" + +-#: eval.c:434 ++#: eval.c:417 + #, c-format + msgid "opcode %s not an operator or keyword" + msgstr "codice operativo %s non è un operatore o una parola chiave" + +-#: eval.c:488 ++#: eval.c:472 + msgid "buffer overflow in genflags2str" + msgstr "superamento limiti buffer in 'genflags2str'" + +-#: eval.c:698 ++#: eval.c:675 + #, c-format + msgid "" + "\n" +@@ -990,315 +933,248 @@ msgstr "" + "\t# 'Stack' (Pila) Chiamate Funzione:\n" + "\n" + +-#: eval.c:725 ++#: eval.c:704 + msgid "`IGNORECASE' is a gawk extension" + msgstr "`IGNORECASE' è un'estensione gawk" + +-#: eval.c:754 ++#: eval.c:736 + msgid "`BINMODE' is a gawk extension" + msgstr "`BINMODE' è un'estensione gawk" + +-#: eval.c:812 ++#: eval.c:793 + #, c-format + msgid "BINMODE value `%s' is invalid, treated as 3" + msgstr "valore di BINMODE `%s' non valido, considerato come 3" + +-#: eval.c:902 ++#: eval.c:885 + #, c-format + msgid "bad `%sFMT' specification `%s'" + msgstr "specificazione invalida `%sFMT' `%s'" + +-#: eval.c:980 ++#: eval.c:969 + msgid "turning off `--lint' due to assignment to `LINT'" + msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" + +-#: eval.c:1127 eval.c:1777 +-#, 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:1158 eval.c:1789 eval.c:1802 ++#: eval.c:1132 + #, c-format + msgid "reference to uninitialized argument `%s'" + msgstr "riferimento ad argomento non inizializzato `%s'" + +-#: eval.c:1177 ++#: eval.c:1133 ++#, c-format ++msgid "reference to uninitialized variable `%s'" ++msgstr "riferimento a variabile non inizializzata `%s'" ++ ++#: eval.c:1151 + msgid "attempt to field reference from non-numeric value" + msgstr "tentativo di riferimento a un campo da valore non numerico" + +-#: eval.c:1179 ++#: eval.c:1153 + msgid "attempt to field reference from null string" + msgstr "tentativo di riferimento a un campo da una stringa nulla" + +-#: eval.c:1185 ++#: eval.c:1161 + #, c-format + msgid "attempt to access field %ld" + msgstr "tentativo di accedere al campo %ld" + +-#: eval.c:1194 ++#: eval.c:1170 + #, c-format + msgid "reference to uninitialized field `$%ld'" + msgstr "riferimento a campo non inizializzato `$%ld'" + +-#: eval.c:1256 ++#: eval.c:1257 + #, c-format + msgid "function `%s' called with more arguments than declared" + msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" + +-#: eval.c:1437 ++#: eval.c:1452 + #, c-format + msgid "unwind_stack: unexpected type `%s'" + msgstr "unwind_stack: tipo non previsto `%s'" + +-#: eval.c:1532 ++#: eval.c:1546 + msgid "division by zero attempted in `/='" + msgstr "divisione per zero tentata in `/='" + +-#: eval.c:1539 ++#: eval.c:1553 + #, c-format + msgid "division by zero attempted in `%%='" + msgstr "divisione per zero tentata in `%%='" + +-#: eval.c:1876 eval.c:2122 +-#, fuzzy, c-format +-msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +-msgstr "tentativo di usare vettore `%s' in un contesto scalare" +- +-#: eval.c:1907 +-msgid "assignment used in conditional context" +-msgstr "assegnamento usato nel contesto di un test condizionale" +- +-#: eval.c:1911 +-msgid "statement has no effect" +-msgstr "istruzione che non fa nulla" +- +-#: eval.c:2343 +-#, 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:2458 +-#, c-format +-msgid "function called indirectly through `%s' does not exist" +-msgstr "la funzione chiamata indirettamente tramite `%s' non esiste" +- +-#: eval.c:2470 +-#, c-format +-msgid "function `%s' not defined" +-msgstr "funzione `%s' non definita" +- +-#: eval.c:2511 +-#, c-format +-msgid "non-redirected `getline' invalid inside `%s' rule" +-msgstr "`getline' non-diretta indefinita dentro regola '%s'" +- +-#: eval.c:2600 +-#, c-format +-msgid "error reading input file `%s': %s" +-msgstr "errore leggendo file di input `%s': %s" +- +-#: eval.c:2614 +-#, c-format +-msgid "`nextfile' cannot be called from a `%s' rule" +-msgstr "`nextfile' non può essere chiamato da una regola `%s'" +- +-#: eval.c:2661 +-#, fuzzy +-msgid "`exit' cannot be called in the current context" +-msgstr "`next' non può essere chiamato da una regola `%s'" +- +-#: eval.c:2700 +-#, c-format +-msgid "`next' cannot be called from a `%s' rule" +-msgstr "`next' non può essere chiamato da una regola `%s'" +- +-#: eval.c:2766 +-#, c-format +-msgid "Sorry, don't know how to interpret `%s'" +-msgstr "Spiacente, non so come interpretare `%s'" +- +-#: ext.c:54 ++#: ext.c:70 + msgid "extensions are not allowed in sandbox mode" + msgstr "le estensioni non sono permesse in modo 'sandbox'" + +-#: ext.c:60 ext.c:65 ++#: ext.c:73 + msgid "`extension' is a gawk extension" + msgstr "`extension' è un'estensione gawk" + +-#: ext.c:75 +-#, c-format +-msgid "fatal: extension: cannot open `%s' (%s)\n" +-msgstr "fatale: estensione: non riesco ad aprire `%s' (%s)\n" ++#: ext.c:80 ++msgid "extension: cannot open library `%s' (%s)\n" ++msgstr "estensione: non riesco ad aprire libreria `%s' (%s)\n" + +-#: ext.c:84 +-#, c-format ++#: ext.c:86 + msgid "" +-"fatal: extension: library `%s': does not define " +-"`plugin_is_GPL_compatible' (%s)\n" ++"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" + msgstr "" +-"fatale: estensione: libreria `%s': non definisce " ++"estensione: libreria `%s': non definisce " + "`plugin_is_GPL_compatible' (%s)\n" + +-#: ext.c:93 +-#, c-format +-msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" ++#: ext.c:90 ++msgid "extension: library `%s': cannot call function `%s' (%s)\n" + msgstr "" +-"fatale: estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" ++"estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" + +-#: ext.c:127 ++#: ext.c:118 + msgid "extension: missing function name" + msgstr "estensione: manca nome di funzione" + +-#: ext.c:132 ++#: ext.c:123 + #, c-format + msgid "extension: illegal character `%c' in function name `%s'" + msgstr "estensione: carattere non ammesso `%c' nel nome di funzione `%s'" + +-#: ext.c:141 ++#: ext.c:131 + #, c-format + msgid "extension: can't redefine function `%s'" + msgstr "estensione: non riesco a ridefinire funzione `%s'" + +-#: ext.c:145 ++#: ext.c:135 + #, c-format + msgid "extension: function `%s' already defined" + msgstr "estensione: funzione `%s' già definita" + +-#: ext.c:150 ++#: ext.c:139 + #, c-format + msgid "extension: function name `%s' previously defined" + msgstr "estensione: funzione di nome `%s' definita in precedenza" + +-#: ext.c:152 ++#: ext.c:141 + #, c-format + msgid "extension: can't use gawk built-in `%s' as function name" + msgstr "" + "estensione: nome funzione interna gawk `%s' non ammesso come nome funzione" + +-#: ext.c:156 ++#: ext.c:144 + #, c-format + msgid "make_builtin: negative argument count for function `%s'" + msgstr "make_builtin: contatore argomenti negativo per la funzione `%s'" + +-#: ext.c:259 ++#: ext.c:206 + #, c-format + msgid "function `%s' defined to take no more than %d argument(s)" + msgstr "funzione `%s' definita per avere al massimo %d argomenti(o)" + +-#: ext.c:262 ++#: ext.c:209 + #, c-format + msgid "function `%s': missing argument #%d" + msgstr "funzione `%s': manca argomento #%d" + +-#: ext.c:279 ++#: ext.c:226 + #, c-format + msgid "function `%s': argument #%d: attempt to use scalar as an array" + msgstr "funzione `%s': argomento #%d: tentativo di usare scalare come vettore" + +-#: ext.c:283 ++#: ext.c:230 + #, c-format + msgid "function `%s': argument #%d: attempt to use array as a scalar" + msgstr "funzione `%s': argomento #%d: tentativo di usare vettore come scalare" + +-#: ext.c:296 ++#: ext.c:244 + msgid "Operation Not Supported" + msgstr "Operazione Non Supportata" + +-#: field.c:328 ++#: ext.c:256 ++msgid "dynamic loading of library not supported" ++msgstr "caricamento dinamico di libreria non supportato" ++ ++#: field.c:339 + msgid "NF set to negative value" + msgstr "NF impostato a un valore negativo" + +-#: field.c:951 field.c:958 field.c:962 ++#: field.c:962 field.c:969 field.c:973 + msgid "split: fourth argument is a gawk extension" + msgstr "split: il quarto argomento è un'estensione gawk" + +-#: field.c:955 ++#: field.c:966 + msgid "split: fourth argument is not an array" + msgstr "split: il quarto argomento non è un vettore" + +-#: field.c:969 ++#: field.c:980 + msgid "split: second argument is not an array" + msgstr "split: il secondo argomento non è un vettore" + +-#: field.c:973 +-#, fuzzy ++#: field.c:984 + msgid "split: cannot use the same array for second and fourth args" + msgstr "" +-"split: non si può usare lo stesso vettore come secondo e quarto argomento" ++"split: non si può usare un unico vettore come secondo e quarto argomento" + +-#: field.c:978 +-#, fuzzy ++#: field.c:989 + msgid "split: cannot use a subarray of second arg for fourth arg" + msgstr "" +-"split: non si può usare lo stesso vettore come secondo e quarto argomento" ++"split: non permesso un quarto argomento che sia un sottovettore del secondo argomento" + +-#: field.c:981 +-#, fuzzy ++#: field.c:992 + msgid "split: cannot use a subarray of fourth arg for second arg" + msgstr "" +-"split: non si può usare lo stesso vettore come secondo e quarto argomento" ++"split: non permesso un secondo argomento che sia un sottovettore del quarto argomento" + +-#: field.c:1010 ++#: field.c:1021 + msgid "split: null string for third arg is a gawk extension" + msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk" + +-#: field.c:1050 ++#: field.c:1061 + msgid "patsplit: fourth argument is not an array" + msgstr "patsplit: il secondo argomento non è un vettore" + +-#: field.c:1055 ++#: field.c:1066 + msgid "patsplit: second argument is not an array" + msgstr "patsplit: il secondo argomento non è un vettore" + +-#: field.c:1061 ++#: field.c:1072 + msgid "patsplit: third argument must be non-null" + msgstr "patsplit: il terzo argomento non può essere nullo" + +-#: field.c:1065 +-#, fuzzy ++#: field.c:1076 + msgid "patsplit: cannot use the same array for second and fourth args" + msgstr "" +-"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" ++"patsplit: non si può usare un unico vettore come secondo e quarto argomento" + +-#: field.c:1070 +-#, fuzzy ++#: field.c:1081 + msgid "patsplit: cannot use a subarray of second arg for fourth arg" + msgstr "" +-"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" ++"patsplit: non permesso un quarto argomento che sia un sottovettore del secondo argomento" + +-#: field.c:1073 +-#, fuzzy ++#: field.c:1084 + msgid "patsplit: cannot use a subarray of fourth arg for second arg" + msgstr "" +-"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" ++"patsplit: non permesso un secondo argomento che sia un sottovettore del quarto argomento" + +-#: field.c:1110 ++#: field.c:1122 + msgid "`FIELDWIDTHS' is a gawk extension" + msgstr "`FIELDWIDTHS' è un'estensione gawk" + +-#: field.c:1173 ++#: field.c:1186 + #, c-format + msgid "invalid FIELDWIDTHS value, near `%s'" + msgstr "valore di FIELDWIDTHS non valido, vicino a `%s'" + +-#: field.c:1246 ++#: field.c:1259 + msgid "null string for `FS' is a gawk extension" + msgstr "la stringa nulla usata come `FS' è un'estensione gawk" + +-#: field.c:1250 ++#: field.c:1263 + msgid "old awk does not support regexps as value of `FS'" + msgstr "il vecchio awk non supporta espressioni come valori di `FS'" + +-#: field.c:1369 ++#: field.c:1382 + msgid "`FPAT' is a gawk extension" + msgstr "`FPAT' è un'estensione gawk" + + #: getopt.c:604 getopt.c:633 +-#, fuzzy, c-format + msgid "%s: option '%s' is ambiguous; possibilities:" +-msgstr "%s: opzione '%s' ambigua\n" ++msgstr "%s: opzione '%s' ambigua; possibilità:" + + #: getopt.c:679 getopt.c:683 + #, c-format +@@ -1350,461 +1226,471 @@ msgstr "%s: l'opzione '-W %s' non ammett + msgid "%s: option '-W %s' requires an argument\n" + msgstr "%s: l'opzione '-W %s' richiede un argomento\n" + +-#: io.c:280 ++#: io.c:326 + #, c-format + msgid "command line argument `%s' is a directory: skipped" + msgstr "l'argomento in linea comando `%s' è una directory: saltato" + +-#: io.c:283 io.c:385 ++#: io.c:329 io.c:438 + #, c-format + msgid "cannot open file `%s' for reading (%s)" + msgstr "non riesco ad aprire file `%s' in lettura (%s)" + +-#: io.c:501 ++#: io.c:568 + #, c-format + msgid "close of fd %d (`%s') failed (%s)" + msgstr "chiusura di fd %d (`%s') fallita (%s)" + +-#: io.c:578 ++#: io.c:645 + msgid "redirection not allowed in sandbox mode" + msgstr "re-direzione non permessa in modo 'sandbox'" + +-#: io.c:612 ++#: io.c:679 + #, c-format + msgid "expression in `%s' redirection only has numeric value" + msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" + +-#: io.c:618 ++#: io.c:685 + #, 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:623 ++#: io.c:690 + #, 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:666 ++#: io.c:733 + #, c-format + msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" + msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" + +-#: io.c:719 ++#: io.c:786 + #, c-format + msgid "can't open pipe `%s' for output (%s)" + msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" + +-#: io.c:729 ++#: io.c:796 + #, c-format + msgid "can't open pipe `%s' for input (%s)" + msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" + +-#: io.c:752 ++#: io.c:819 + #, 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:834 ++#: io.c:900 + #, c-format + msgid "can't redirect from `%s' (%s)" + msgstr "non posso re-dirigere da `%s' (%s)" + +-#: io.c:837 ++#: io.c:903 + #, c-format + msgid "can't redirect to `%s' (%s)" + msgstr "non posso re-dirigere a `%s' (%s)" + +-#: io.c:888 ++#: io.c:954 + 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:904 ++#: io.c:970 + #, c-format + msgid "close of `%s' failed (%s)." + msgstr "chiusura di `%s' fallita (%s)." + +-#: io.c:912 ++#: io.c:978 + msgid "too many pipes or input files open" + msgstr "troppe 'pipe' o file di input aperti" + +-#: io.c:934 ++#: io.c:1000 + msgid "close: second argument must be `to' or `from'" + msgstr "close: il secondo argomento deve essere `a' o `da'" + +-#: io.c:951 ++#: io.c:1017 + #, 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:956 ++#: io.c:1022 + msgid "close of redirection that was never opened" + msgstr "chiusura di una re-direzione mai aperta" + +-#: io.c:1053 ++#: io.c:1120 + #, 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:1069 ++#: io.c:1137 + #, c-format + msgid "failure status (%d) on pipe close of `%s' (%s)" + msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" + +-#: io.c:1072 ++#: io.c:1140 + #, c-format + msgid "failure status (%d) on file close of `%s' (%s)" + msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" + +-#: io.c:1092 ++#: io.c:1160 + #, c-format + msgid "no explicit close of socket `%s' provided" + msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" + +-#: io.c:1095 ++#: io.c:1163 + #, c-format + msgid "no explicit close of co-process `%s' provided" + msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" + +-#: io.c:1098 ++#: io.c:1166 + #, c-format + msgid "no explicit close of pipe `%s' provided" + msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" + +-#: io.c:1101 ++#: io.c:1169 + #, c-format + msgid "no explicit close of file `%s' provided" + msgstr "nessuna chiusura esplicita richiesta per file `%s'" + +-#: io.c:1129 io.c:1184 main.c:794 main.c:831 ++#: io.c:1197 io.c:1252 main.c:825 main.c:862 + #, c-format + msgid "error writing standard output (%s)" + msgstr "errore scrivendo 'standard output' (%s)" + +-#: io.c:1133 io.c:1189 ++#: io.c:1201 io.c:1257 + #, c-format + msgid "error writing standard error (%s)" + msgstr "errore scrivendo 'standard error' (%s)" + +-#: io.c:1141 ++#: io.c:1209 + #, c-format + msgid "pipe flush of `%s' failed (%s)." + msgstr "scaricamento di 'pipe' `%s' fallita (%s)." + +-#: io.c:1144 ++#: io.c:1212 + #, 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:1147 ++#: io.c:1215 + #, c-format + msgid "file flush of `%s' failed (%s)." + msgstr "scaricamento di file `%s' fallita (%s)." + +-#: io.c:1262 ++#: io.c:1329 + #, c-format + msgid "local port %s invalid in `/inet'" + msgstr "porta locale %s invalida in `/inet'" + +-#: io.c:1279 ++#: io.c:1347 + #, c-format + msgid "remote host and port information (%s, %s) invalid" + msgstr "host remoto e informazione di porta (%s, %s) invalidi" + +-#: io.c:1431 ++#: io.c:1499 + #, c-format + msgid "no (known) protocol supplied in special filename `%s'" + msgstr "nessuno protocollo (noto) specificato nel filename speciale `%s'" + +-#: io.c:1445 ++#: io.c:1513 + #, c-format + msgid "special file name `%s' is incomplete" + msgstr "nome-file speciale `%s' incompleto" + +-#: io.c:1462 ++#: io.c:1530 + msgid "must supply a remote hostname to `/inet'" + msgstr "va fornito nome di 'host' remoto a `/inet'" + +-#: io.c:1480 ++#: io.c:1548 + msgid "must supply a remote port to `/inet'" + msgstr "va fornita porta remota a `/inet'" + +-#: io.c:1526 ++#: io.c:1594 + msgid "TCP/IP communications are not supported" + msgstr "comunicazioni TCP/IP non supportate" + +-#: io.c:1693 ++#: io.c:1764 + #, c-format + msgid "could not open `%s', mode `%s'" + msgstr "non riesco ad aprire `%s', modo `%s'" + +-#: io.c:1747 ++#: io.c:1814 + #, c-format + msgid "close of master pty failed (%s)" + msgstr "fallita chiusura di 'pty' principale (%s)" + +-#: io.c:1749 io.c:1917 io.c:2074 ++#: io.c:1816 io.c:1984 io.c:2145 + #, c-format + msgid "close of stdout in child failed (%s)" + msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" + +-#: io.c:1752 ++#: io.c:1819 + #, 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:1754 io.c:1922 ++#: io.c:1821 io.c:1989 + #, c-format + msgid "close of stdin in child failed (%s)" + msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" + +-#: io.c:1757 ++#: io.c:1824 + #, 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:1759 io.c:1780 ++#: io.c:1826 io.c:1847 + #, c-format + msgid "close of slave pty failed (%s)" + msgstr "fallita chiusura di 'pty' secondaria (%s)" + +-#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 ++#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 + #, 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:1865 io.c:1925 ++#: io.c:1932 io.c:1992 + #, 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:1885 io.c:2067 ++#: io.c:1952 io.c:2138 + msgid "restoring stdout in parent process failed\n" + msgstr "fallito ripristino di 'stdout' nel processo-padre\n" + +-#: io.c:1893 ++#: io.c:1960 + msgid "restoring stdin in parent process failed\n" + msgstr "fallito ripristino di 'stdin' nel processo-padre\n" + +-#: io.c:1928 io.c:2079 io.c:2093 ++#: io.c:1995 io.c:2150 io.c:2164 + #, c-format + msgid "close of pipe failed (%s)" + msgstr "fallita chiusura di 'pipe' (%s)" + +-#: io.c:1973 ++#: io.c:2040 + msgid "`|&' not supported" + msgstr "`|&' non supportato" + +-#: io.c:2039 ++#: io.c:2107 + #, c-format + msgid "cannot open pipe `%s' (%s)" + msgstr "non riesco ad aprire 'pipe' `%s' (%s)" + +-#: io.c:2087 ++#: io.c:2158 + #, c-format + msgid "cannot create child process for `%s' (fork: %s)" + msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" + +-#: io.c:2520 ++#: io.c:2637 + #, c-format + msgid "data file `%s' is empty" + msgstr "file dati `%s' vuoto" + +-#: io.c:2561 io.c:2569 ++#: io.c:2678 io.c:2686 + msgid "could not allocate more input memory" + msgstr "non riesco ad allocare ulteriore memoria per l'input" + +-#: io.c:3127 ++#: io.c:3236 + msgid "multicharacter value of `RS' is a gawk extension" + msgstr "valore multicarattere per `RS' è un'estensione gawk" + +-#: io.c:3232 ++#: io.c:3326 + msgid "IPv6 communication is not supported" + msgstr "comunicazioni IPv6 non supportate" + +-#: main.c:366 ++#: main.c:355 + msgid "`-m[fr]' option irrelevant in gawk" + msgstr "`-m[fr]' opzione irrilevante per gawk" + +-#: main.c:368 ++#: main.c:357 + msgid "-m option usage: `-m[fr] nnn'" + msgstr "-m uso opzione: `-m[fr] nnn'" + +-#: main.c:391 ++#: main.c:386 + msgid "empty argument to `-e/--source' ignored" + msgstr "argomento di `-e/--source' nullo, ignorato" + +-#: main.c:462 ++#: main.c:472 + #, c-format + msgid "%s: option `-W %s' unrecognized, ignored\n" + msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" + +-#: main.c:515 ++#: main.c:518 + #, c-format + msgid "%s: option requires an argument -- %c\n" + msgstr "%s: l'opzione richiede un argomento -- %c\n" + +-#: main.c:536 ++#: main.c:539 + msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" + msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" + +-#: main.c:542 ++#: main.c:545 + msgid "`--posix' overrides `--traditional'" + msgstr "`--posix' annulla `--traditional'" + +-#: main.c:553 ++#: main.c:556 + msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" + msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" + +-#: main.c:557 ++#: main.c:560 + #, 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:562 ++#: main.c:565 + msgid "`--posix' overrides `--binary'" + msgstr "`--posix' annulla `--binary" + +-#: main.c:613 ++#: main.c:623 + #, c-format + msgid "can't set binary mode on stdin (%s)" + msgstr "non posso impostare modalità binaria su 'stdin'(%s)" + +-#: main.c:616 ++#: main.c:626 + #, c-format + msgid "can't set binary mode on stdout (%s)" + msgstr "non posso impostare modalità binaria su 'stdout'(%s)" + +-#: main.c:618 ++#: main.c:628 + #, c-format + msgid "can't set binary mode on stderr (%s)" + msgstr "non posso impostare modalità binaria su 'stderr'(%s)" + +-#: main.c:657 ++#: main.c:679 + msgid "no program text at all!" + msgstr "manca del tutto il testo del programma!" + +-#: main.c:734 ++#: main.c:763 + #, c-format + msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" + msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f file-prog. [--] file ...\n" + +-#: main.c:736 ++#: main.c:765 + #, 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:741 ++#: main.c:770 + msgid "POSIX options:\t\tGNU long options: (standard)\n" + msgstr "Opzioni POSIX:\t\topzioni lunghe GNU: (standard)\n" + +-#: main.c:742 ++#: main.c:771 + msgid "\t-f progfile\t\t--file=progfile\n" + msgstr "\t-f fileprog\t\t--file=file-prog.\n" + +-#: main.c:743 ++#: main.c:772 + msgid "\t-F fs\t\t\t--field-separator=fs\n" + msgstr "\t-F fs\t\t\t--field-separator=fs\n" + +-#: main.c:744 ++#: main.c:773 + msgid "\t-v var=val\t\t--assign=var=val\n" + msgstr "\t-v var=valore\t\t--assign=var=valore\n" + +-#: main.c:745 ++#: main.c:774 + msgid "Short options:\t\tGNU long options: (extensions)\n" + msgstr "Opzioni brevi:\t\topzioni lunghe GNU: (estensioni)\n" + +-#: main.c:746 ++#: main.c:775 + msgid "\t-b\t\t\t--characters-as-bytes\n" + msgstr "\t-b\t\t\t--characters-as-bytes\n" + +-#: main.c:747 ++#: main.c:776 + msgid "\t-c\t\t\t--traditional\n" + msgstr "\t-c\t\t\t--traditional\n" + +-#: main.c:748 ++#: main.c:777 + msgid "\t-C\t\t\t--copyright\n" + msgstr "\t-C\t\t\t--copyright\n" + +-#: main.c:749 +-#, fuzzy ++#: main.c:778 + msgid "\t-d[file]\t\t--dump-variables[=file]\n" +-msgstr "\t-d [file]\t\t--dump-variables[=file]\n" ++msgstr "\t-d[file]\t\t--dump-variables[=file]\n" ++ ++#: main.c:779 ++msgid "\t-D[file]\t\t--debug[=file]\n" ++msgstr "\t-D[file]\t\t--debug[=file]\n" + +-#: main.c:750 ++#: main.c:780 + msgid "\t-e 'program-text'\t--source='program-text'\n" + msgstr "\t-e 'testo-del-programma'\t--source='testo-del-programma'\n" + +-#: main.c:751 ++#: main.c:781 + msgid "\t-E file\t\t\t--exec=file\n" + msgstr "\t-E file\t\t\t--exec=file\n" + +-#: main.c:752 ++#: main.c:782 + msgid "\t-g\t\t\t--gen-pot\n" + msgstr "\t-g\t\t\t--gen-pot\n" + +-#: main.c:753 ++#: main.c:783 + msgid "\t-h\t\t\t--help\n" + msgstr "\t-h\t\t\t--help\n" + +-#: main.c:754 ++#: main.c:784 ++msgid "\t-l library\t\t--load=library\n" ++msgstr "\t-l libreria\t\t--load=libreria\n" ++ ++#: main.c:785 + msgid "\t-L [fatal]\t\t--lint[=fatal]\n" + msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" + +-#: main.c:755 ++#: main.c:786 + msgid "\t-n\t\t\t--non-decimal-data\n" + msgstr "\t-n\t\t\t--non-decimal-data\n" + +-#: main.c:756 ++#: main.c:787 ++msgid "\t-M\t\t\t--bignum\n" ++msgstr "\t-M\t\t\t--bignum\n" ++ ++#: main.c:788 + msgid "\t-N\t\t\t--use-lc-numeric\n" + msgstr "\t-N\t\t\t--use-lc-numeric\n" + +-#: main.c:757 ++#: main.c:789 ++msgid "\t-o[file]\t\t--pretty-print[=file]\n" ++msgstr "\t-o[file]\t\t--pretty-print[=file]\n" ++ ++#: main.c:790 + msgid "\t-O\t\t\t--optimize\n" + msgstr "\t-O\t\t\t--optimize\n" + +-#: main.c:758 +-#, fuzzy ++#: main.c:791 + msgid "\t-p[file]\t\t--profile[=file]\n" +-msgstr "\t-p [file]\t\t--profile[=file]\n" ++msgstr "\t-p[file]\t\t--profile[=file]\n" + +-#: main.c:759 ++#: main.c:792 + msgid "\t-P\t\t\t--posix\n" + msgstr "\t-P\t\t\t--posix\n" + +-#: main.c:760 ++#: main.c:793 + msgid "\t-r\t\t\t--re-interval\n" + msgstr "\t-r\t\t\t--re-interval\n" + +-#: main.c:762 +-msgid "\t-R file\t\t\t--command=file\n" +-msgstr "\t-R file\t\t\t--command=file\n" +- +-#: main.c:763 ++#: main.c:794 + msgid "\t-S\t\t\t--sandbox\n" + msgstr "\t-S\t\t\t--sandbox\n" + +-#: main.c:764 ++#: main.c:795 + msgid "\t-t\t\t\t--lint-old\n" + msgstr "\t-t\t\t\t--lint-old\n" + +-#: main.c:765 ++#: main.c:796 + msgid "\t-V\t\t\t--version\n" + msgstr "\t-V\t\t\t--version\n" + +-#: main.c:767 ++#: main.c:798 + msgid "\t-W nostalgia\t\t--nostalgia\n" + msgstr "\t-W nostalgia\t\t--nostalgia\n" + +-#: main.c:770 ++#: main.c:801 + msgid "\t-Y\t\t--parsedebug\n" + msgstr "\t-Y\t\t--parsedebug\n" + +@@ -1813,7 +1699,7 @@ msgstr "\t-Y\t\t--parsedebug\n" + #. for this application. Please add _another line_ with the + #. address for translation bugs. + #. no-wrap +-#: main.c:779 ++#: main.c:810 + msgid "" + "\n" + "To report bugs, see node `Bugs' in `gawk.info', which is\n" +@@ -1823,9 +1709,10 @@ msgstr "" + "\n" + "Per segnalare problemi, vedi nodo `Bugs' in `gawk.info', oppure la\n" + "sezione `Reporting Problems and Bugs' nella versione a stampa.\n" ++"Problemi di traduzione, segnalare ad: azc100@gmail.com.\n" + "\n" + +-#: main.c:783 ++#: main.c:814 + msgid "" + "gawk is a pattern scanning and processing language.\n" + "By default it reads standard input and writes standard output.\n" +@@ -1835,7 +1722,7 @@ msgstr "" + "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" + "\n" + +-#: main.c:787 ++#: main.c:818 + msgid "" + "Examples:\n" + "\tgawk '{ sum += $1 }; END { print sum }' file\n" +@@ -1845,7 +1732,7 @@ msgstr "" + "\tgawk '{ sum += $1 }; END { print sum }' file\n" + "\tgawk -F: '{ print $1 }' /etc/passwd\n" + +-#: main.c:807 ++#: main.c:838 + #, c-format + msgid "" + "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" +@@ -1864,7 +1751,7 @@ msgstr "" + "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n" + "\n" + +-#: main.c:815 ++#: main.c:846 + 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" +@@ -1878,7 +1765,7 @@ msgstr "" + "Vedi la 'GNU General Public License' per ulteriori dettagli.\n" + "\n" + +-#: main.c:821 ++#: main.c:852 + msgid "" + "You should have received a copy of the GNU General Public License\n" + "along with this program. If not, see http://www.gnu.org/licenses/.\n" +@@ -1887,16 +1774,16 @@ msgstr "" + "assieme a questo programma; se non è così, vedi http://www.gnu.org/" + "licenses/.\n" + +-#: main.c:856 ++#: main.c:887 + msgid "-Ft does not set FS to tab in POSIX awk" + msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX" + +-#: main.c:1090 ++#: main.c:1133 + #, c-format + msgid "unknown value for field spec: %d\n" + msgstr "valore non noto per specifica campo: %d\n" + +-#: main.c:1171 ++#: main.c:1214 + #, c-format + msgid "" + "%s: `%s' argument to `-v' not in `var=value' form\n" +@@ -1905,80 +1792,78 @@ msgstr "" + "%s: `%s' argomento di `-v' non in forma `var=valore'\n" + "\n" + +-#: main.c:1197 ++#: main.c:1240 + #, c-format + msgid "`%s' is not a legal variable name" + msgstr "`%s' non è un nome di variabile ammesso" + +-#: main.c:1200 ++#: main.c:1243 + #, c-format + 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:1204 +-#, fuzzy, c-format ++#: main.c:1247 + msgid "cannot use gawk builtin `%s' as variable name" + msgstr "" +-"estensione: nome funzione interna gawk `%s' non ammesso come nome funzione" ++"nome funzione interna gawk `%s' non ammesso come nome variabile" + +-#: main.c:1209 +-#, fuzzy, c-format ++#: main.c:1252 + msgid "cannot use function `%s' as variable name" +-msgstr "non posso usare nome di funzione `%s' come variabile o vettore" ++msgstr "non posso usare nome di funzione `%s' come nome di variabile" + +-#: main.c:1262 ++#: main.c:1305 + msgid "floating point exception" + msgstr "eccezione floating point" + +-#: main.c:1269 ++#: main.c:1312 + msgid "fatal error: internal error" + msgstr "errore fatale: errore interno" + +-#: main.c:1284 ++#: main.c:1327 + msgid "fatal error: internal error: segfault" + msgstr "errore fatale: errore interno: segfault" + +-#: main.c:1296 ++#: main.c:1339 + msgid "fatal error: internal error: stack overflow" + msgstr "errore fatale: errore interno: stack overflow" + +-#: main.c:1346 ++#: main.c:1393 + #, c-format + msgid "no pre-opened fd %d" + msgstr "manca 'fd' pre-aperta %d" + +-#: main.c:1353 ++#: main.c:1400 + #, c-format + msgid "could not pre-open /dev/null for fd %d" + msgstr "non riesco a pre-aprire /dev/null per 'fd' %d" + +-#: msg.c:63 ++#: msg.c:61 + #, c-format + msgid "cmd. line:" + msgstr "linea com.:" + +-#: msg.c:107 ++#: msg.c:121 + msgid "error: " + msgstr "errore: " + +-#: node.c:406 ++#: node.c:436 + msgid "backslash at end of string" + msgstr "'\\' a fine stringa" + +-#: node.c:517 ++#: node.c:520 + #, c-format + msgid "old awk does not support the `\\%c' escape sequence" + msgstr "il vecchio awk non supporta la sequenza di escape '\\%c'" + +-#: node.c:568 ++#: node.c:571 + msgid "POSIX does not allow `\\x' escapes" + msgstr "POSIX non permette escape `\\x'" + +-#: node.c:574 ++#: node.c:577 + msgid "no hex digits in `\\x' escape sequence" + msgstr "niente cifre esadecimali nella sequenza di escape `\\x'" + +-#: node.c:596 ++#: node.c:599 + #, c-format + msgid "" + "hex escape \\x%.*s of %d characters probably not interpreted the way you " +@@ -1987,12 +1872,12 @@ msgstr "" + "sequenza di escape esadec.\\x%.*s di %d caratteri probabilmente non " + "interpretata nel modo previsto" + +-#: node.c:611 ++#: node.c:614 + #, c-format + msgid "escape sequence `\\%c' treated as plain `%c'" + msgstr "sequenza di escape `\\%c' considerata come semplice `%c'" + +-#: node.c:750 ++#: node.c:759 + msgid "" + "Invalid multibyte data detected. There may be a mismatch between your data " + "and your locale." +@@ -2011,16 +1896,16 @@ msgid "%s %s `%s': could not set close-o + msgstr "" + "%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl F_SETFD: %s)" + +-#: profile.c:83 ++#: profile.c:69 + #, c-format + msgid "could not open `%s' for writing: %s" + msgstr "non riesco ad aprire `%s' in scrittura: %s" + +-#: profile.c:85 ++#: profile.c:71 + msgid "sending profile to standard error" + msgstr "mando profilo a 'standard error'" + +-#: profile.c:203 ++#: profile.c:187 + #, c-format + msgid "" + "\t# %s block(s)\n" +@@ -2029,7 +1914,7 @@ msgstr "" + "\t# blocco(hi) %s\n" + "\n" + +-#: profile.c:208 ++#: profile.c:192 + #, c-format + msgid "" + "\t# Rule(s)\n" +@@ -2038,36 +1923,39 @@ msgstr "" + "\t# Regola(e)\n" + "\n" + +-#: profile.c:279 ++#: profile.c:266 + #, c-format + msgid "internal error: %s with null vname" + msgstr "errore interno: %s con 'vname' nullo" + +-#: profile.c:952 ++#: profile.c:528 ++msgid "internal error: builtin with null fname" ++msgstr "errore interno: funzione interna con 'fname' nullo" ++ ++#: profile.c:943 + #, c-format + msgid "\t# gawk profile, created %s\n" + msgstr "\t# profilo gawk, creato %s\n" + +-#: profile.c:1331 ++#: profile.c:1328 + #, c-format + msgid "" + "\n" + "\t# Functions, listed alphabetically\n" + msgstr "" + "\n" +-"\t# Funzioni, listate in ordine alfabetico\n" ++"\t# Funzioni, in ordine alfabetico\n" + +-#: profile.c:1370 ++#: profile.c:1366 + #, c-format + msgid "redir2str: unknown redirection type %d" + msgstr "redir2str: tipo di re-direzione non noto %d" + +-#: re.c:573 +-#, fuzzy, c-format ++#: re.c:571 + msgid "range of the form `[%c-%c]' is locale dependent" +-msgstr "intervallo nella forma `[%c-%c]' dipende da 'locale'" ++msgstr "intervallo della forma `[%c-%c]' dipende da 'locale'" + +-#: re.c:600 ++#: re.c:598 + #, c-format + msgid "regexp component `%.*s' should probably be `[%.*s]'" + msgstr "" +@@ -2145,20 +2033,3 @@ msgstr ") o \\) non aperta" + msgid "No previous regular expression" + msgstr "Nessuna espressione regolare precedente" + +-#~ msgid "could not find groups: %s" +-#~ msgstr "non riesco a trovare gruppi: %s" +- +-#~ msgid "assignment is not allowed to result of builtin function" +-#~ msgstr "assegnamento non permesso al risultato di una funzione interna" +- +-#~ msgid "attempt to use array in a scalar context" +-#~ msgstr "tentativo di usare vettore in un contesto scalare" +- +-#~ msgid "sorted array traversal is a gawk extension" +-#~ msgstr "`sorted array traversal' è un'estensione gawk" +- +-#~ msgid "`PROCINFO[\"sorted_in\"]' value is not recognized" +-#~ msgstr "`PROCINFO[\"sorted_in\"]' valore non riconosciuto" +- +-#~ msgid "out of memory" +-#~ msgstr "memoria esaurita" diff -Nru gawk-3.1.8+dfsg/debian/patches/18_de.po-typos.diff gawk-4.0.1+dfsg/debian/patches/18_de.po-typos.diff --- gawk-3.1.8+dfsg/debian/patches/18_de.po-typos.diff 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/patches/18_de.po-typos.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -## DP: Description: Fix typos in German PO file. (#314081) -## DP: Author: Jens Seidel -## DP: Upstream status: Needs to be sent upstream -## DP: Date: 2005-06-14 - ---- a/po/de.po -+++ b/po/de.po -@@ -365,7 +365,7 @@ - - #: awkgram.y:2748 profile.c:96 - msgid "sending profile to standard error" --msgstr "Schicke Profile auf Stadard-Fehlerausgabe." -+msgstr "Schicke Profile auf Standard-Fehlerausgabe." - - #: awkgram.y:2780 - #, c-format -@@ -1544,12 +1544,12 @@ - #: main.c:721 - #, 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" -+msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -f PROGRAMM [--] Datei ...\n" - - #: main.c:723 - #, 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" -+msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -- %cPROGRAMM%c Datei ...\n" - - #: main.c:728 - msgid "POSIX options:\t\tGNU long options:\n" -@@ -1557,7 +1557,7 @@ - - #: main.c:729 - msgid "\t-f progfile\t\t--file=progfile\n" --msgstr "\t-f PROGRAM\t\t--file=PROGRAM\n" -+msgstr "\t-f PROGRAMM\t\t--file=PROGRAMM\n" - - #: main.c:730 - msgid "\t-F fs\t\t\t--field-separator=fs\n" -@@ -1817,7 +1817,7 @@ - - #: node.c:660 - msgid "POSIX does not allow `\\x' escapes" --msgstr "POSIX erlabut keine '\\x'-Escapes." -+msgstr "POSIX erlaubt keine '\\x'-Escapes." - - #: node.c:666 - msgid "no hex digits in `\\x' escape sequence" -@@ -1928,7 +1928,7 @@ - - #: regcomp.c:144 - msgid "Invalid character class name" --msgstr "Ungültier Name für Zeichenklasse." -+msgstr "Ungültiger Name für Zeichenklasse." - - #: regcomp.c:147 - msgid "Trailing backslash" diff -Nru gawk-3.1.8+dfsg/debian/patches/config-updates.diff gawk-4.0.1+dfsg/debian/patches/config-updates.diff --- gawk-3.1.8+dfsg/debian/patches/config-updates.diff 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/patches/config-updates.diff 2013-07-02 20:32:11.000000000 +0000 @@ -0,0 +1,1807 @@ +Index: b/config.guess +=================================================================== +--- a/config.guess ++++ b/config.guess +@@ -1,10 +1,8 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +-# Inc. ++# Copyright 1992-2013 Free Software Foundation, Inc. + +-timestamp='2006-07-02' ++timestamp='2013-05-16' + + # 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 +@@ -17,26 +15,22 @@ + # 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., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # 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 Per Bothner . +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). ++# ++# Originally written by Per Bothner. + # +-# This script attempts to guess a canonical system name similar to +-# config.sub. If it succeeds, it prints the system name on stdout, and +-# exits with 0. Otherwise, it exits with 1. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. ++ + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -56,8 +50,7 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +-Free Software Foundation, Inc. ++Copyright 1992-2013 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -139,12 +132,33 @@ + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + ++case "${UNAME_SYSTEM}" in ++Linux|GNU|GNU/*) ++ # If the system lacks a compiler, then just pick glibc. ++ # We could probably try harder. ++ LIBC=gnu ++ ++ eval $set_cc_for_build ++ cat <<-EOF > $dummy.c ++ #include ++ #if defined(__UCLIBC__) ++ LIBC=uclibc ++ #elif defined(__dietlibc__) ++ LIBC=dietlibc ++ #else ++ LIBC=gnu ++ #endif ++ EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ ;; ++esac ++ + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -161,6 +175,7 @@ + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched +@@ -169,7 +184,7 @@ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -179,7 +194,7 @@ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -200,6 +215,10 @@ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} +@@ -222,7 +241,7 @@ + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) +- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on +@@ -268,7 +287,10 @@ + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit ;; ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead +@@ -294,12 +316,12 @@ + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) +- echo powerpc-ibm-os400 ++ echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; +- arm:riscos:*:*|arm:RISCOS:*:*) ++ arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) +@@ -323,14 +345,33 @@ + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize +@@ -374,23 +415,23 @@ + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) +- echo m68k-milan-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) +- echo m68k-hades-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) +- echo m68k-unknown-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; +@@ -460,8 +501,8 @@ + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) +- # DG/UX returns AViiON for all architectures +- UNAME_PROCESSOR=`/usr/bin/uname -p` ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ +@@ -474,7 +515,7 @@ + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; +@@ -531,7 +572,7 @@ + echo rs6000-ibm-aix3.2 + fi + exit ;; +- *:AIX:*:[45]) ++ *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -574,52 +615,52 @@ + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` +- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` +- case "${sc_cpu_version}" in +- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 +- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 +- 532) # CPU_PA_RISC2_0 +- case "${sc_kernel_bits}" in +- 32) HP_ARCH="hppa2.0n" ;; +- 64) HP_ARCH="hppa2.0w" ;; ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 +- esac ;; +- esac ++ esac ;; ++ esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c ++ sed 's/^ //' << EOF >$dummy.c ++ ++ #define _HPUX_SOURCE ++ #include ++ #include + +- #define _HPUX_SOURCE +- #include +- #include +- +- int main () +- { +- #if defined(_SC_KERNEL_BITS) +- long bits = sysconf(_SC_KERNEL_BITS); +- #endif +- long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) +- { +- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; +- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: +- #if defined(_SC_KERNEL_BITS) +- switch (bits) +- { +- case 64: puts ("hppa2.0w"); break; +- case 32: puts ("hppa2.0n"); break; +- default: puts ("hppa2.0"); break; +- } break; +- #else /* !defined(_SC_KERNEL_BITS) */ +- puts ("hppa2.0"); break; +- #endif +- default: puts ("hppa1.0"); break; +- } +- exit (0); +- } ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); ++ ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa +@@ -639,7 +680,7 @@ + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | +- grep __LP64__ >/dev/null ++ grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else +@@ -710,22 +751,22 @@ + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; +@@ -749,14 +790,14 @@ + exit ;; + 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/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + 5000:UNIX_System_V:4.*:*) +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` +- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +@@ -768,37 +809,51 @@ + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) +- case ${UNAME_MACHINE} in +- pc98) +- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; +- i*:MINGW*:*) ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; ++ *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; + i*:windows32*:*) +- # uname -m includes "-pc" on this system. +- echo ${UNAME_MACHINE}-mingw32 ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; +- x86:Interix*:[3456]*) +- echo i586-pc-interix${UNAME_RELEASE} +- exit ;; +- EM64T:Interix*:[3456]*) +- echo x86_64-unknown-interix${UNAME_RELEASE} +- exit ;; ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ authenticamd | genuineintel | EM64T) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + 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 +@@ -819,200 +874,151 @@ + exit ;; + *:GNU:*:*) + # the GNU system +- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` ++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland +- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ arc:Linux:*:* | arceb:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + arm*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ else ++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_PCS_VFP ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf ++ fi ++ fi + exit ;; + avr32*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) +- echo crisv32-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) +- echo frv-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ hexagon:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ i*86:Linux:*:*) ++ echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- mips:Linux:*:*) ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips +- #undef mipsel ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^CPU/{ +- s: ::g +- p +- }'`" +- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; +- 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 | sed -n ' +- /^CPU/{ +- s: ::g +- p +- }'`" +- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } +- ;; +- or32:Linux:*:*) +- echo or32-unknown-linux-gnu ++ or1k:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu ++ or32:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-${LIBC} + exit ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +- PA7*) echo hppa1.1-unknown-linux-gnu ;; +- PA8*) echo hppa2.0-unknown-linux-gnu ;; +- *) echo hppa-unknown-linux-gnu ;; ++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; ++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; ++ *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-${LIBC} ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) +- echo ${UNAME_MACHINE}-ibm-linux ++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ tile*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) +- echo ${UNAME_MACHINE}-dec-linux-gnu ++ echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit ;; +- coff-i386) +- echo "${UNAME_MACHINE}-pc-linux-gnucoff" +- exit ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^LIBC/{ +- s: ::g +- p +- }'`" +- test x"${LIBC}" != x && { +- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" +- exit +- } +- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } +- ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both +@@ -1020,11 +1026,11 @@ + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) +- # Unixware is an offshoot of SVR4, but it has its own version +- # number series starting with 2... +- # I am not positive that other SVR4 systems won't match this, ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. +- # Use sysv4.2uw... so that sysv4* matches it. ++ # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) +@@ -1041,7 +1047,7 @@ + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) +@@ -1056,7 +1062,7 @@ + fi + exit ;; + i*86:*:5:[678]*) +- # UnixWare 7.x, OpenUNIX and OpenServer 6. ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; +@@ -1084,10 +1090,13 @@ + exit ;; + pc:*:*:*) + # Left here for compatibility: +- # uname -m prints for DJGPP always 'pc', but it prints nothing about +- # the processor, so we play safe by assuming i386. +- echo i386-pc-msdosdjgpp +- exit ;; ++ # uname -m prints for DJGPP always 'pc', but it prints nothing about ++ # the processor, so we play safe by assuming i586. ++ # Note: whatever this is, it MUST be the same as what config.sub ++ # prints for the "djgpp" host, or else GDB configury will decide that ++ # this is a cross-build. ++ echo i586-pc-msdosdjgpp ++ exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; +@@ -1122,8 +1131,18 @@ + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) +- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && { echo i486-ncr-sysv4; exit; } ;; ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; +@@ -1136,7 +1155,7 @@ + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) +@@ -1156,10 +1175,10 @@ + echo ns32k-sni-sysv + fi + exit ;; +- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says +- echo i586-unisys-sysv4 +- exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says ++ echo i586-unisys-sysv4 ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm +@@ -1185,11 +1204,11 @@ + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then +- echo mips-nec-sysv${UNAME_RELEASE} ++ echo mips-nec-sysv${UNAME_RELEASE} + else +- echo mips-unknown-sysv${UNAME_RELEASE} ++ echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; +@@ -1199,6 +1218,12 @@ + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; +@@ -1208,6 +1233,15 @@ + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; +@@ -1216,9 +1250,21 @@ + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown +- case $UNAME_PROCESSOR in +- unknown) UNAME_PROCESSOR=powerpc ;; +- esac ++ eval $set_cc_for_build ++ if test "$UNAME_PROCESSOR" = unknown ; then ++ UNAME_PROCESSOR=powerpc ++ fi ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ case $UNAME_PROCESSOR in ++ i386) UNAME_PROCESSOR=x86_64 ;; ++ powerpc) UNAME_PROCESSOR=powerpc64 ;; ++ esac ++ fi ++ fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) +@@ -1232,7 +1278,10 @@ + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; +- NSE-?:NONSTOP_KERNEL:*:*) ++ NEO-?:NONSTOP_KERNEL:*:*) ++ echo neo-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) +@@ -1277,13 +1326,13 @@ + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) +- echo mips-sei-seiux${UNAME_RELEASE} ++ echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) +- UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; +@@ -1298,11 +1347,14 @@ + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx ++ exit ;; + esac + +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- + eval $set_cc_for_build + cat >$dummy.c < + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 +- "4" ++ "4" + #else +- "" ++ "" + #endif +- ); exit (0); ++ ); exit (0); + #endif + #endif + +@@ -1458,9 +1510,9 @@ + the operating system you are using. It is advised that you + download the most up to date version of the config scripts from + +- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + and +- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + + If the version you run ($0) is already up to date, please + send the following data and any information you think might be +Index: b/config.sub +=================================================================== +--- a/config.sub ++++ b/config.sub +@@ -1,44 +1,40 @@ + #! /bin/sh + # Configuration validation subroutine script. +-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +-# Inc. +- +-timestamp='2006-09-20' +- +-# This file is (in principle) common to ALL GNU software. +-# The presence of a machine in this file suggests that SOME GNU software +-# can handle that machine. It does not imply ALL GNU software can. +-# +-# 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 ++# Copyright 1992-2013 Free Software Foundation, Inc. ++ ++timestamp='2013-04-24' ++ ++# 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 + # the Free Software Foundation; either version 3 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. ++# 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., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # 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. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + + +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -72,8 +68,7 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +-Free Software Foundation, Inc. ++Copyright 1992-2013 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -120,12 +115,18 @@ + # 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* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ +- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ ++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ ++ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ ++ knetbsd*-gnu* | netbsd*-gnu* | \ ++ kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; ++ android-linux) ++ os=-linux-android ++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ++ ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] +@@ -148,10 +149,13 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray) ++ -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; ++ -bluegene*) ++ os=-cnk ++ ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -166,10 +170,10 @@ + os=-chorusos + basic_machine=$1 + ;; +- -chorusrdb) +- os=-chorusrdb ++ -chorusrdb) ++ os=-chorusrdb + basic_machine=$1 +- ;; ++ ;; + -hiux*) + os=-hiuxwe2 + ;; +@@ -214,6 +218,12 @@ + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -lynx*178) ++ os=-lynxos178 ++ ;; ++ -lynx*5) ++ os=-lynxos5 ++ ;; + -lynx*) + os=-lynxos + ;; +@@ -238,24 +248,34 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ ++ | arc | arceb \ ++ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ ++ | avr | avr32 \ ++ | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +- | fr30 | frv \ ++ | epiphany \ ++ | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ++ | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ ++ | le32 | le64 \ ++ | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ +- | maxq | mb | microblaze | mcore \ ++ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +- | mips64vr | mips64vrel \ ++ | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ ++ | mips64r5900 | mips64r5900el \ ++ | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ +@@ -266,31 +286,45 @@ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ ++ | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ ++ | moxie \ + | mt \ + | msp430 \ +- | nios | nios2 \ ++ | nds32 | nds32le | nds32be \ ++ | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ +- | or32 \ ++ | open8 \ ++ | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ +- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ++ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ ++ | rl78 | rx \ + | score \ +- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ +- | spu | strongarm \ +- | tahoe | thumb | tic4x | tic80 | tron \ +- | v850 | v850e \ ++ | spu \ ++ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ ++ | ubicom32 \ ++ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ +- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ +- | z8k) ++ | x86 | xc16x | xstormy16 | xtensa \ ++ | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12) +- # Motorola 68HC11/12. ++ c54x) ++ basic_machine=tic54x-unknown ++ ;; ++ c55x) ++ basic_machine=tic55x-unknown ++ ;; ++ c6x) ++ basic_machine=tic6x-unknown ++ ;; ++ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; +@@ -300,6 +334,21 @@ + basic_machine=mt-unknown + ;; + ++ strongarm | thumb | xscale) ++ basic_machine=arm-unknown ++ ;; ++ xgate) ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; ++ xscaleeb) ++ basic_machine=armeb-unknown ++ ;; ++ ++ xscaleel) ++ basic_machine=armel-unknown ++ ;; ++ + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. +@@ -314,29 +363,37 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ ++ | be32-* | be64-* \ + | bfin-* | bs2000-* \ +- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ ++ | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ +- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ ++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ++ | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ ++ | le32-* | le64-* \ ++ | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +- | mips64vr-* | mips64vrel-* \ ++ | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ ++ | mips64r5900-* | mips64r5900el-* \ ++ | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ +@@ -347,31 +404,41 @@ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ++ | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ +- | nios-* | nios2-* \ ++ | nds32-* | nds32le-* | nds32be-* \ ++ | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ ++ | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ +- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ +- | romp-* | rs6000-* \ +- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ ++ | rl78-* | romp-* | rs6000-* | rx-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ +- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ +- | tahoe-* | thumb-* \ ++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ ++ | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ ++ | tile*-* \ + | tron-* \ +- | v850-* | v850e-* | vax-* \ ++ | ubicom32-* \ ++ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ ++ | vax-* \ + | we32k-* \ +- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ +- | xstormy16-* | xtensa-* \ ++ | x86-* | x86_64-* | xc16x-* | xps100-* \ ++ | xstormy16-* | xtensa*-* \ + | ymp-* \ +- | z8k-*) ++ | z8k-* | z80-*) ++ ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. +@@ -389,7 +456,7 @@ + basic_machine=a29k-amd + os=-udi + ;; +- abacus) ++ abacus) + basic_machine=abacus-unknown + ;; + adobe68k) +@@ -435,6 +502,10 @@ + basic_machine=m68k-apollo + os=-bsd + ;; ++ aros) ++ basic_machine=i386-pc ++ os=-aros ++ ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -443,10 +514,35 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; ++ bluegene*) ++ basic_machine=powerpc-ibm ++ os=-cnk ++ ;; ++ c54x-*) ++ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ c55x-*) ++ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; ++ c6x-*) ++ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; ++ cegcc) ++ basic_machine=arm-unknown ++ os=-cegcc ++ ;; + convex-c1) + basic_machine=c1-convex + os=-bsd +@@ -475,8 +571,8 @@ + basic_machine=craynv-cray + os=-unicosmp + ;; +- cr16c) +- basic_machine=cr16c-unknown ++ cr16 | cr16-*) ++ basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) +@@ -514,6 +610,10 @@ + basic_machine=m88k-motorola + os=-sysv3 + ;; ++ dicos) ++ basic_machine=i686-pc ++ os=-dicos ++ ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp +@@ -629,7 +729,6 @@ + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +-# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 +@@ -668,6 +767,14 @@ + basic_machine=m68k-isi + os=-sysv + ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + m88k-omron*) + basic_machine=m88k-omron + ;; +@@ -679,10 +786,21 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ microblaze*) ++ basic_machine=microblaze-xilinx ++ ;; ++ mingw64) ++ basic_machine=x86_64-pc ++ os=-mingw64 ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ os=-mingw32ce ++ ;; + miniframe) + basic_machine=m68000-convergent + ;; +@@ -711,10 +829,18 @@ + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; ++ msys) ++ basic_machine=i386-pc ++ os=-msys ++ ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ++ nacl) ++ basic_machine=le32-unknown ++ os=-nacl ++ ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 +@@ -779,6 +905,12 @@ + np1) + basic_machine=np1-gould + ;; ++ neo-tandem) ++ basic_machine=neo-tandem ++ ;; ++ nse-tandem) ++ basic_machine=nse-tandem ++ ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; +@@ -809,6 +941,14 @@ + basic_machine=i860-intel + os=-osf + ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + pbd) + basic_machine=sparc-tti + ;; +@@ -853,9 +993,10 @@ + ;; + power) basic_machine=power-ibm + ;; +- ppc) basic_machine=powerpc-unknown ++ ppc | ppcbe) basic_machine=powerpc-unknown + ;; +- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ppc-* | ppcbe-*) ++ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown +@@ -880,7 +1021,11 @@ + basic_machine=i586-unknown + os=-pw32 + ;; +- rdos) ++ rdos | rdos64) ++ basic_machine=x86_64-pc ++ os=-rdos ++ ;; ++ rdos32) + basic_machine=i386-pc + os=-rdos + ;; +@@ -925,6 +1070,9 @@ + basic_machine=sh-hitachi + os=-hms + ;; ++ sh5el) ++ basic_machine=sh5le-unknown ++ ;; + sh64) + basic_machine=sh64-unknown + ;; +@@ -946,6 +1094,9 @@ + basic_machine=i860-stratus + os=-sysv4 + ;; ++ strongarm-* | thumb-*) ++ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ++ ;; + sun2) + basic_machine=m68000-sun + ;; +@@ -1002,17 +1153,9 @@ + basic_machine=t90-cray + os=-unicos + ;; +- tic54x | c54x*) +- basic_machine=tic54x-unknown +- os=-coff +- ;; +- tic55x | c55x*) +- basic_machine=tic55x-unknown +- os=-coff +- ;; +- tic6x | c6x*) +- basic_machine=tic6x-unknown +- os=-coff ++ tile*) ++ basic_machine=$basic_machine-unknown ++ os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown +@@ -1081,6 +1224,9 @@ + xps | xps100) + basic_machine=xps100-honeywell + ;; ++ xscale-* | xscalee[bl]-*) ++ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ++ ;; + ymp) + basic_machine=ymp-cray + os=-unicos +@@ -1089,6 +1235,10 @@ + basic_machine=z8k-unknown + os=-sim + ;; ++ z80-*-coff) ++ basic_machine=z80-unknown ++ os=-sim ++ ;; + none) + basic_machine=none-none + os=-none +@@ -1127,7 +1277,7 @@ + we32k) + basic_machine=we32k-att + ;; +- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) ++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) +@@ -1174,9 +1324,12 @@ + if [ x"$os" != x"" ] + then + case $os in +- # First match some system type aliases +- # that might get confused with valid system types. ++ # First match some system type aliases ++ # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. ++ -auroraux) ++ os=-auroraux ++ ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1197,21 +1350,23 @@ + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ ++ | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* \ ++ | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ +- | -openbsd* | -solidbsd* \ ++ | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ +- | -chorusos* | -chorusrdb* \ +- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ ++ | -chorusos* | -chorusrdb* | -cegcc* \ ++ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ ++ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ ++ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ +@@ -1219,7 +1374,7 @@ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku* | -rdos* | -toppers*) ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1258,7 +1413,7 @@ + -opened*) + os=-openedition + ;; +- -os400*) ++ -os400*) + os=-os400 + ;; + -wince*) +@@ -1307,7 +1462,7 @@ + -sinix*) + os=-sysv4 + ;; +- -tpf*) ++ -tpf*) + os=-tpf + ;; + -triton*) +@@ -1343,12 +1498,14 @@ + -aros*) + os=-aros + ;; +- -kaos*) +- os=-kaos +- ;; + -zvmoe) + os=-zvmoe + ;; ++ -dicos*) ++ os=-dicos ++ ;; ++ -nacl*) ++ ;; + -none) + ;; + *) +@@ -1371,10 +1528,10 @@ + # system, and we'll never get to this point. + + case $basic_machine in +- score-*) ++ score-*) + os=-elf + ;; +- spu-*) ++ spu-*) + os=-elf + ;; + *-acorn) +@@ -1386,8 +1543,20 @@ + arm*-semi) + os=-aout + ;; +- c4x-* | tic4x-*) +- os=-coff ++ c4x-* | tic4x-*) ++ os=-coff ++ ;; ++ hexagon-*) ++ os=-elf ++ ;; ++ tic54x-*) ++ os=-coff ++ ;; ++ tic55x-*) ++ os=-coff ++ ;; ++ tic6x-*) ++ os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) +@@ -1407,19 +1576,22 @@ + ;; + m68000-sun) + os=-sunos3 +- # This also exists in the configure program, but was not the +- # default. +- # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; ++ mep-*) ++ os=-elf ++ ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; ++ or1k-*) ++ os=-elf ++ ;; + or32-*) + os=-coff + ;; +@@ -1438,7 +1610,7 @@ + *-ibm) + os=-aix + ;; +- *-knuth) ++ *-knuth) + os=-mmixware + ;; + *-wec) +@@ -1543,7 +1715,7 @@ + -sunos*) + vendor=sun + ;; +- -aix*) ++ -cnk*|-aix*) + vendor=ibm + ;; + -beos*) diff -Nru gawk-3.1.8+dfsg/debian/patches/series gawk-4.0.1+dfsg/debian/patches/series --- gawk-3.1.8+dfsg/debian/patches/series 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/patches/series 2013-07-02 20:31:52.000000000 +0000 @@ -1 +1,3 @@ -18_de.po-typos.diff +01_po-vi.patch +02_po-it.patch +config-updates.diff diff -Nru gawk-3.1.8+dfsg/debian/postinst gawk-4.0.1+dfsg/debian/postinst --- gawk-3.1.8+dfsg/debian/postinst 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/postinst 2013-03-16 15:08:23.000000000 +0000 @@ -1,4 +1,5 @@ -#!/bin/sh -e +#!/bin/sh +set -e update-alternatives --quiet --install /usr/bin/awk awk /usr/bin/gawk 10 \ --slave /usr/share/man/man1/awk.1.gz awk.1.gz /usr/share/man/man1/gawk.1.gz \ @@ -9,4 +10,4 @@ if ! ls -l $(ls -l $badlink | cut -d">" -f2) >/dev/null 2>&1; then rm -f $badlink; fi; fi; done -exit 0 +#DEBHELPER# diff -Nru gawk-3.1.8+dfsg/debian/prerm gawk-4.0.1+dfsg/debian/prerm --- gawk-3.1.8+dfsg/debian/prerm 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/prerm 2013-03-16 15:08:23.000000000 +0000 @@ -1,5 +1,8 @@ -#!/bin/sh -e +#!/bin/sh +set -e if [ "$1" != "upgrade" ]; then update-alternatives --remove awk /usr/bin/gawk fi + +#DEBHELPER# diff -Nru gawk-3.1.8+dfsg/debian/rules gawk-4.0.1+dfsg/debian/rules --- gawk-3.1.8+dfsg/debian/rules 2013-08-14 05:02:14.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/rules 2013-03-16 15:08:23.000000000 +0000 @@ -1,108 +1,64 @@ #!/usr/bin/make -f -QUILT_STAMPFN = patch-stamp -include /usr/share/quilt/quilt.make +export DEB_BUILD_MAINT_OPTIONS = hardening=+all -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) - -distribution = $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}') - -CFLAGS = -g -O2 -Wall -ifeq (sh4,$(DEB_HOST_ARCH)) +ifeq (sh4,$(shell dpkg-architecture -qDEB_HOST_ARCH)) # Renesas SH(sh4) need -mieee option. # If this option is not effective, fmtspcl test fails. - CFLAGS += -mieee + export DEB_CFLAGS_MAINT_APPEND = -mieee endif -configure: configure-stamp -configure-stamp: $(QUILT_STAMPFN) - dh_testdir +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure + # Add fake info files (see README.source). touch --date="Jan 01 2000" doc/gawk.info doc/gawk.texi \ - doc/gawkinet.info doc/gawkinet.texi - CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --libexecdir=/usr/lib \ - --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ - --enable-switch - touch $@ - -ok_tests := \ - double1 double2 fmtspcl intformat - # machine-dependant tests -ok_tests += \ - asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ - mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny - # locale-dependant tests - -build: build-stamp -build-stamp: configure-stamp - dh_testdir - $(MAKE) -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - $(MAKE) check 2>&1 | tee log-check - # Display failed tests, if any - tests=$$(ls test/_* 2>/dev/null) ; \ - if test -n "$$tests" ; then \ - echo "Failing tests: $$(echo $$tests | sed -e 's/test\/_//g')" ; \ - for test in $$(ls test/_* 2>/dev/null) ; \ - do echo ">>> $$test" && cat $$test ; \ - done ; \ - fi - ifneq ($(distribution),experimental) - @cd test/ && for test in $$(ls _* 2>/dev/null) ; \ - do if test -z "$$(echo $(addprefix _,$(ok_tests)) | grep $$test)"; \ - then exit 1 ; \ - fi ; \ - done - endif + doc/gawkinet.info doc/gawkinet.texi + +override_dh_auto_build: + dh_auto_build + make -C po update-gmo + +override_dh_auto_test: + # Only run the testsuite if it's wanted. +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + # Generate locales used in testsuite. + mkdir tmp-locales + localedef -i en_US -c -f ISO-8859-1 -A /usr/share/locale/locale.alias \ + tmp-locales/en_US.ISO-8859-1 + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias \ + tmp-locales/en_US.UTF-8 + localedef -i ja_JP -c -f UTF-8 -A /usr/share/locale/locale.alias \ + tmp-locales/ja_JP.UTF-8 + localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias \ + tmp-locales/ru_RU.UTF-8 + # Run actual test suite. + LOCPATH=$(CURDIR)/tmp-locales make check + # Display any failed tests. + tests=$$(ls test/_* 2>/dev/null); \ + if [ -n "$$tests" ]; then \ + echo "Failing tests: $$(echo $$tests | sed -e 's/test\/_//g')"; \ + for test in $$(ls test/_* 2>/dev/null); do \ + echo ">>> $$test" && cat $$test; \ + done; \ + fi endif - touch $@ -clean: unpatch - dh_testdir - dh_testroot - rm -f doc/gawk.info doc/gawk.texi doc/gawkinet.info doc/gawkinet.texi - rm -f debian/substvars awkgram.c log-check test/_* - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean - -install: build - dh_testdir - dh_prep - $(MAKE) install DESTDIR="$(CURDIR)/debian/gawk" - # Remove versioned binaries. - rm -f debian/gawk/usr/bin/*-* - # And this one. +override_dh_auto_install: + dh_auto_install + # Remove unwanted files. + rm -f debian/gawk/usr/bin/*awk-* rm -f debian/gawk/usr/bin/awk - # Remove duplicate manpage and link it to gawk.1.gz. rm -f debian/gawk/usr/share/man/man1/pgawk.1 - dh_link usr/share/man/man1/gawk.1 usr/share/man/man1/pgawk.1 - # Install upstream changelog, examples and docs. - dh_installchangelogs ChangeLog - dh_installexamples awklib/eg/data awklib/eg/misc awklib/eg/network \ - awklib/eg/prog # awklib/eg/lib is /usr/share/awk + some cruft. - dh_installdocs FUTURES POSIX.STD NEWS README AUTHORS LIMITATIONS PROBLEMS - # Install igawk script - dh_install awklib/igawk usr/bin # Remove fake info files (see README.source). rm -rf debian/gawk/usr/share/info -binary-arch: build - -binary-arch: build install - dh_testdir - dh_testroot - dh_install --sourcedir=debian/gawk - dh_installchangelogs - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: configure build clean binary-indep binary-arch binary +override_dh_auto_clean: + dh_auto_clean + rm -rf tmp-locales + +override_dh_compress: + # Don't compress awk examples. + dh_compress --exclude=.awk diff -Nru gawk-3.1.8+dfsg/debian/source/format gawk-4.0.1+dfsg/debian/source/format --- gawk-3.1.8+dfsg/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debian/source/format 2013-08-14 05:02:14.796494973 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru gawk-3.1.8+dfsg/debug.c gawk-4.0.1+dfsg/debug.c --- gawk-3.1.8+dfsg/debug.c 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/debug.c 2012-03-28 19:54:02.000000000 +0000 @@ -0,0 +1,5772 @@ +/* + * debug.c - gawk debugger + */ + +/* + * Copyright (C) 2004, 2010, 2011 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 + */ + +#include "awk.h" +#include "cmd.h" + +#ifndef O_RDONLY +#include /* open() */ +#endif + +extern int exiting; +extern SRCFILE *srcfiles; +extern INSTRUCTION *rule_list; +extern INSTRUCTION *code_block; +extern NODE **fcall_list; +extern long fcall_count; +extern FILE *output_fp; +extern IOBUF *curfile; +extern const char *command_file; +extern const char *get_spec_varname(Func_ptr fptr); +extern int r_interpret(INSTRUCTION *); +extern int zzparse(void); +#define read_command() (void) zzparse() + +extern int free_instruction(INSTRUCTION *, int *); +extern void destroy_symbol(char *name); +extern const char *redir2str(int redirtype); + +static char *linebuf = NULL; /* used to print a single line of source */ +static size_t linebuf_len; + +FILE *out_fp; +char *dPrompt; +char *commands_Prompt = "> "; /* breakpoint or watchpoint commands list */ +char *eval_Prompt = "@> "; /* awk statement(s) */ + +int input_from_tty = FALSE; +int input_fd; + +static SRCFILE *cur_srcfile; +static long cur_frame = 0; +static INSTRUCTION *cur_pc; +int cur_rule = 0; + +static int prog_running = FALSE; + +struct condition { + INSTRUCTION *code; + AWK_CONTEXT *ctxt; + char *expr; +}; + +struct commands_item { + struct commands_item *next; + struct commands_item *prev; + int cmd; + char *cmd_string; + CMDARG *arg; +}; + +/* breakpoint structure */ +typedef struct break_point { + struct break_point *next; + struct break_point *prev; + int number; + + long ignore_count; + long hit_count; + char *src; + INSTRUCTION *bpi; /* Op_breakpoint */ + + struct commands_item commands; /* list of commands to run */ + int silent; + + struct condition cndn; + + short flags; +#define BP_ENABLE 1 +#define BP_ENABLE_ONCE 2 /* enable once */ +#define BP_TEMP 4 +#define BP_IGNORE 8 + +} BREAKPOINT; + +static BREAKPOINT breakpoints = { &breakpoints, &breakpoints, 0 }; + +#ifdef HAVE_LIBREADLINE +/* do_save -- save command */ +static int sess_history_base = 0; +#endif + +/* 'list' command */ +static int last_printed_line = 0; +static int last_print_count; /* # of lines printed */ + +/* watch or display item */ +struct list_item { + struct list_item *next; + struct list_item *prev; + int number; /* item number */ + + NODE *symbol; /* variable or function param */ + NODE **subs; /* subscripts */ + int num_subs; /* subscript(dimension) count */ + char *sname; /* symbol or param name */ + + long fcall_count; + + struct commands_item commands; + int silent; + struct condition cndn; + + /* This is for the value of the watched item */ + union { + NODE *n; + long l; + } value[2]; +#define cur_value value[0].n +#define cur_size value[0].l +#define old_value value[1].n +#define old_size value[1].l + + int flags; +#define PARAM 1 +#define SUBSCRIPT 2 +#define FIELD_NUM 4 +#define OLD_IS_ARRAY 8 /* old item is array */ +#define CUR_IS_ARRAY 16 /* current item is array */ +}; + +#define IS_PARAM(d) (((d)->flags & PARAM) != 0) +#define IS_SUBSCRIPT(d) (((d)->flags & SUBSCRIPT) != 0) +#define IS_FIELD(d) (((d)->flags & FIELD_NUM) != 0) +#define WATCHING_ARRAY(d) (((d)->flags & CUR_IS_ARRAY) != 0) + +static struct list_item display_list = { &display_list, &display_list, 0 }; +static struct list_item watch_list = { &watch_list, &watch_list, 0 }; + + +/* Structure to maintain data for processing debugger commands */ + +static struct { + long fcall_count; /* 'finish', 'until', 'next', 'step', 'nexti' commands */ + int sourceline; /* source line number last + * time we stopped execution, + * used by next, until and step commands + */ + char *source; /* next, until and step */ + + INSTRUCTION *pc; /* 'until' and 'return' commands */ + int repeat_count; /* 'step', 'next', 'stepi', 'nexti' commands */ + int print_frame; /* print frame info, 'finish' and 'until' */ + int print_ret; /* print returned value, 'finish' */ + int break_point; /* non-zero (breakpoint number) if stopped at break point */ + int watch_point; /* non-zero (watchpoint number) if stopped at watch point */ + + int (*check_func)(INSTRUCTION **); /* function to decide when to suspend + * awk interpreter and return control + * to debugger command interpreter. + */ + + enum argtype command; /* command type */ +} stop; + + +/* restart related stuff */ +extern char **d_argv; /* copy of argv array */ +static int need_restart = FALSE; +enum { BREAK=1, WATCH, DISPLAY, HISTORY, OPTION }; +static const char *const env_variable[] = { +"", +"DGAWK_BREAK", +"DGAWK_WATCH", +"DGAWK_DISPLAY", +"DGAWK_HISTORY", +"DGAWK_OPTION", +}; +static void serialize(int ); +static void unserialize(int ); +static const char *commands_string = NULL; +static int commands_string_len = 0; +static char line_sep; +#define FSEP (char)'\037' +#define RSEP (char)'\036' +#define CSEP (char)'\035' + + +/* debugger option */ +struct dbg_option { + const char *name; + int *num_val; + char **str_val; + void (*assign)(const char *); + const char *help_txt; +}; + +#define DEFAULT_HISTFILE "./.dgawk_history" +#define DEFAULT_OPTFILE "./.dgawkrc" +#define DEFAULT_PROMPT "dgawk> " +#define DEFAULT_LISTSIZE 15 +#define DEFAULT_HISTSIZE 100 + +static void set_gawk_output(const char *file); +static void set_prompt(const char *value); +static void set_listsize(const char *value); +static void set_trace(const char *value); +static void set_save_history(const char *value); +static void set_save_options(const char *value); +static void set_history_size(const char *value); +static const char *options_file = DEFAULT_OPTFILE; +#ifdef HAVE_LIBREADLINE +static const char *history_file = DEFAULT_HISTFILE; +#endif + +/* keep all option variables in one place */ + +static char *output_file = "/dev/stdout"; /* gawk output redirection */ +char *dgawk_Prompt = NULL; /* initialized in interpret */ +static int list_size = DEFAULT_LISTSIZE; /* # of lines that 'list' prints */ +static int do_trace = FALSE; +static int do_save_history = TRUE; +static int do_save_options = TRUE; +static int history_size = DEFAULT_HISTSIZE; /* max # of lines in history file */ + +static const struct dbg_option option_list[] = { +{"history_size", &history_size, NULL, &set_history_size, + gettext_noop("set or show the number of lines to keep in history file.") }, +{"listsize", &list_size, NULL, &set_listsize, + gettext_noop("set or show the list command window size.") }, +{"outfile", NULL, &output_file, &set_gawk_output, + gettext_noop("set or show gawk output file.") }, +{"prompt", NULL, &dgawk_Prompt, &set_prompt, + gettext_noop("set or show debugger prompt."), }, +{"save_history", &do_save_history, NULL, &set_save_history, + gettext_noop("(un)set or show saving of command history (value=on|off).") }, +{"save_options", &do_save_options, NULL, &set_save_options, + gettext_noop("(un)set or show saving of options (value=on|off).") }, +{"trace", &do_trace, NULL, &set_trace, + gettext_noop("(un)set or show instruction tracing (value=on|off).") }, +{0, NULL, NULL, NULL, 0}, +}; + +static void save_options(const char *file); + + +/* pager */ +jmp_buf pager_quit_tag; +int pager_quit_tag_valid; +static int screen_width = INT_MAX; /* no of columns */ +static int screen_height = INT_MAX; /* no of rows */ +static int pager_lines_printed = 0; /* no of lines printed so far */ + +static void restart(int run) ATTRIBUTE_NORETURN; +static void close_all(void); +static int open_readfd(const char *file); +static int find_lines(SRCFILE *s); +static SRCFILE *source_find(char *src); +static int print_lines(char *src, int start_line, int nlines); +static void print_symbol(NODE *r, int isparam); +static NODE *find_frame(long num); +static NODE *find_param(const char *name, long num, char **pname); +static NODE *find_symbol(const char *name, char **pname); +static NODE *find_array(const char *name); +static void print_field(long field_num); +static int print_function(INSTRUCTION *pc, void *); +static void print_frame(NODE *func, char *src, int srcline); +static void print_numbered_frame(long num); +static void print_cur_frame_and_sourceline(void); +static INSTRUCTION *find_rule(char *src, long lineno); +static INSTRUCTION *mk_breakpoint(char *src, int srcline); +static int execute_commands(struct commands_item *commands); +static void delete_commands_item(struct commands_item *c); +static NODE *execute_code(volatile INSTRUCTION *code); +static int pre_execute_code(INSTRUCTION **pi); +static int parse_condition(int type, int num, char *expr); +static BREAKPOINT *add_breakpoint(INSTRUCTION *, INSTRUCTION *, char *, int); +static BREAKPOINT *set_breakpoint_next(INSTRUCTION *rp, INSTRUCTION *ip); +static BREAKPOINT *set_breakpoint_at(INSTRUCTION *, int, int); +static int set_breakpoint(CMDARG *arg, int temporary); +static void delete_breakpoint(BREAKPOINT *b); +static BREAKPOINT *find_breakpoint(long num); +static void display(struct list_item *d); +static struct list_item *find_item(struct list_item *list, long num); +static struct list_item *add_item(struct list_item *list, int type, NODE *symbol, char *pname); +static void delete_item(struct list_item *d); +static int breakpoint_triggered(BREAKPOINT *b); +static int watchpoint_triggered(struct list_item *w); + +static void print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump); +static void next_command(); +static char *g_readline(const char *prompt); +static int prompt_yes_no(const char *, char , int , FILE *); + +static struct pf_data { + Func_print print_func; + int defn; + FILE *fp; +} pf_data; + +char * (*read_a_line)(const char *) = 0; /* reads a line of input */ + +struct command_source +{ + int fd; + int is_tty; + char * (*read_func)(const char *); + int (*close_func)(int); + int eof_status; /* see push_cmd_src */ + int cmd; /* D_source or 0 */ + char *str; /* sourced file */ + struct command_source *next; +}; + +static struct command_source *cmd_src = NULL; + +#define get_param_count(f) (f)->lnode->param_cnt +#define get_params(f) (f)->parmlist + + +#define CHECK_PROG_RUNNING() \ + do { \ + if (! prog_running) { \ + d_error(_("program not running.")); \ + return FALSE; \ + } \ + } while (FALSE) + + +/* g_readline -- read a line of text; the interface is like 'readline' but + * without any command-line editing; used when not compiled with + * readline support and/or input is not from terminal (prompt set to NULL). + */ + +static char * +g_readline(const char *prompt) +{ + char *line; + size_t line_size = 100; + static char buf[2]; + char *p, *end; + int n; + + if (input_from_tty && prompt && *prompt) + fprintf(out_fp, "%s", prompt); + + emalloc(line, char *, line_size + 1, "g_readline"); + p = line; + end = line + line_size; + while ((n = read(input_fd, buf, 1)) > 0) { + if (buf[0] == '\n') { + if (p > line && p[-1] == '\r') + p--; + break; + } + if (p == end) { + erealloc(line, char *, 2 * line_size + 1, "g_readline"); + p = line + line_size; + line_size *= 2; + end = line + line_size; + } + *p++ = buf[0]; + } + if (n == -1 || (n == 0 && p == line)) { + efree(line); + return NULL; + } + *p = '\0'; + return line; +} + + +/* d_error --- print an error message */ + +void +d_error(const char *mesg, ...) +{ + va_list args; + va_start(args, mesg); + fprintf(out_fp, _("error: ")); + vfprintf(out_fp, mesg, args); + fprintf(out_fp, "\n"); + va_end(args); +} + +/* find_lines --- find the positions of the lines in the source file. */ + +static int +find_lines(SRCFILE *s) +{ + char *buf, *p, *end; + int n; + int ofs = 0; + int *pos; + int pos_size; + int maxlen = 0; + int numlines = 0; + char lastchar = '\0'; + + emalloc(buf, char *, s->bufsize, "find_lines"); + pos_size = s->srclines; + emalloc(s->line_offset, int *, (pos_size + 2) * sizeof(int), "find_lines"); + pos = s->line_offset; + pos[0] = 0; + + while ((n = read(s->fd, buf, s->bufsize)) > 0) { + end = buf + n; + lastchar = buf[n - 1]; + p = buf; + while (p < end) { + if (*p++ == '\n') { + if (++numlines > pos_size) { + erealloc(s->line_offset, int *, (2 * pos_size + 2) * sizeof(int), "find_lines"); + pos = s->line_offset + pos_size; + pos_size *= 2; + } + *++pos = ofs + (p - buf); + if ((pos[0] - pos[-1]) > maxlen) + maxlen = pos[0] - pos[-1]; /* length including NEWLINE */ + } + } + ofs += n; + } + efree(buf); + + if (n == -1) { + d_error(_("can't read source file `%s' (%s)"), + s->src, strerror(errno)); + return -1; + } + if (ofs <= 0) { + fprintf(out_fp, _("source file `%s' is empty.\n"), s->src); + return -1; + } + + if (lastchar != '\n') { + /* fake a NEWLINE at end */ + *++pos = ofs + 1; + numlines++; + if ((pos[0] - pos[-1]) > maxlen) + maxlen = pos[0] - pos[-1]; + } + s->maxlen = maxlen; + s->srclines = numlines; + return 0; +} + +/* source_find --- return the SRCFILE struct for the source 'src' */ + +static SRCFILE * +source_find(char *src) +{ + SRCFILE *s; + struct stat sbuf; + char *path; + int errno_val = 0; + + if (src == NULL || *src == '\0') { + d_error(_("no current source file.")); + return NULL; + } + + if (cur_srcfile->src == src) /* strcmp(cur_srcfile->src, src) == 0 */ + return cur_srcfile; + + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC) + && strcmp(s->src, src) == 0) + return s; + } + + path = find_source(src, &sbuf, &errno_val); + if (path != NULL) { + for (s = srcfiles->next; s != srcfiles; s = s->next) { + if ((s->stype == SRC_FILE || s->stype == SRC_INC) + && files_are_same(path, s)) { + efree(path); + return s; + } + } + efree(path); + } + + d_error(_("cannot find source file named `%s' (%s)"), src, strerror(errno_val)); + return NULL; +} + +/* print_lines --- print source lines, and update 'cur_srcfile' */ + +static int +print_lines(char *src, int start_line, int nlines) +{ + SRCFILE *s; + int *pos; + int i; + struct stat sbuf; + + s = source_find(src); + if (s == NULL) + return -1; + if (s->fd <= INVALID_HANDLE && (s->fd = srcopen(s)) <= INVALID_HANDLE) { + d_error(_("can't open source file `%s' for reading (%s)"), + src, strerror(errno)); + return -1; + } + + if (fstat(s->fd, &sbuf) == 0 && s->mtime < sbuf.st_mtime) { + fprintf(out_fp, _("WARNING: source file `%s' modified since program compilation.\n"), + src); + efree(s->line_offset); + s->line_offset = NULL; + s->mtime = sbuf.st_mtime; + + /* reopen source file */ + close(s->fd); + s->fd = INVALID_HANDLE; + if ((s->fd = srcopen(s)) <= INVALID_HANDLE) { + d_error(_("can't open source file `%s' for reading (%s)"), + src, strerror(errno)); + return -1; + } + } + + if (s->line_offset == NULL && find_lines(s) != 0) + return -1; + if (start_line < 1 || start_line > s->srclines) { + d_error(_("line number %d out of range; `%s' has %d lines"), + start_line, src, s->srclines); + return -1; + } + + assert(nlines > 0); + if ((start_line + nlines - 1) > s->srclines) + nlines = s->srclines - start_line + 1; + + pos = s->line_offset; + if (lseek(s->fd, (off_t) pos[start_line - 1], SEEK_SET) < 0) { + d_error("%s: %s", src, strerror(errno)); + return -1; + } + + if (linebuf == NULL) { + emalloc(linebuf, char *, s->maxlen + 20, "print_lines"); /* 19 for line # */ + linebuf_len = s->maxlen; + } else if (linebuf_len < s->maxlen) { + erealloc(linebuf, char *, s->maxlen + 20, "print_lines"); + linebuf_len = s->maxlen; + } + + for (i = start_line; i < start_line + nlines; i++) { + int supposed_len, len; + char *p; + + sprintf(linebuf, "%-8d", i); + + /* mark the line about to be executed with =>; nlines > 1 + * condition makes sure that we are in list command + */ + if (nlines > 1) { + BREAKPOINT *b; + int has_bpt = FALSE; + for (b = breakpoints.prev; b != &breakpoints; b = b->prev) { + if (src == b->src && i == b->bpi->source_line) { + has_bpt = TRUE; + break; + } + } + if (prog_running && src == source && i == sourceline) { + if (has_bpt) + sprintf(linebuf, "%-4d:b=>", i); + else + sprintf(linebuf, "%-4d =>", i); + } else if (has_bpt) + sprintf(linebuf, "%-4d:b ", i); + } + + p = linebuf + strlen(linebuf); + supposed_len = pos[i] - pos[i - 1]; + len = read(s->fd, p, supposed_len); + switch (len) { + case -1: + d_error(_("can't read source file `%s' (%s)"), + src, strerror(errno)); + return -1; + + case 0: + d_error(_("unexpected eof while reading file `%s', line %d"), + src, i); + return -1; + + default: + if (i == s->srclines && p[len - 1] != '\n') + p[len++] = '\n'; +#if 0 + if (len != supposed_len || p[len - 1] != '\n') { + d_error(_("source file `%s' modified since start of program execution"), + src); + return -1; + } +#endif + len += (p - linebuf); + if (fwrite(linebuf, sizeof(char), len, out_fp) != len) + return -1; + } + } + + if (cur_srcfile != s) { + if (cur_srcfile->fd != INVALID_HANDLE) { + close(cur_srcfile->fd); + cur_srcfile->fd = INVALID_HANDLE; + } + cur_srcfile = s; + } + return (i - 1); /* no of lines printed */ +} + +/* do_list --- list command */ + +int +do_list(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + long line_first, line_last; + long count = list_size; + INSTRUCTION *rp; + char *src = cur_srcfile->src; + + line_first = last_printed_line + 1; /* default or no arg */ + if (arg == NULL) /* list or list + */ + goto list; + + switch (arg->type) { + case D_int: /* list n or list - */ + if (arg->a_int < 0) { /* list - */ + line_first = last_printed_line - last_print_count - list_size + 1; + if (line_first < 1) { + if (last_printed_line != last_print_count) + line_first = 1; + else + return FALSE; + } + } else { +line: + line_first = arg->a_int - list_size / 2; + if (line_first < 1) + line_first = 1; + } + break; + + case D_range: /* list m-n */ +range: + line_first = arg->a_int; + arg = arg->next; + assert(arg != NULL); + assert(arg->type == D_int); + count = arg->a_int - line_first + 1; + break; + + case D_string: + src = arg->a_string; + if (arg->next != NULL) { + arg = arg->next; + if (arg->type == D_int) /* list file:n */ + goto line; + else if (arg->type == D_range) /* list file:m-n */ + goto range; + else if (arg->type == D_func) /* list file:function */ + goto func; + else + line_first = 1; + } else + line_first = 1; + break; + + case D_func: /* list function */ +func: + rp = arg->a_node->code_ptr; + src = rp->source_file; + line_first = rp->source_line - list_size / 2; + if (line_first < 1) + line_first = 1; + break; + + default: + break; + } + +list: + line_last = print_lines(src, line_first, count); + if (line_last != -1) { + last_printed_line = line_last; + last_print_count = line_last - line_first + 1; + } + return FALSE; +} + +/* do_info --- info command */ + +int +do_info(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + if (arg == NULL || arg->type != D_argument) + return FALSE; + + switch (arg->a_argument) { + case A_SOURCE: + fprintf(out_fp, _("Current source file: %s\n"), cur_srcfile->src); + fprintf(out_fp, _("Number of lines: %d\n"), cur_srcfile->srclines); + break; + + case A_SOURCES: + { + SRCFILE *s; + for (s = srcfiles->next; s != srcfiles; s = s->next) { + fprintf(out_fp, _("Source file (lines): %s (%d)\n"), + (s->stype == SRC_FILE || s->stype == SRC_INC) ? s->src + : "cmd. line", + s->srclines); + } + } + break; + + case A_BREAK: + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + BREAKPOINT *b; + struct commands_item *c; + + gprintf(out_fp, _("Number Disp Enabled Location\n\n")); + for (b = breakpoints.prev; b != &breakpoints; b = b->prev) { + char *disp = "keep"; + if (b->flags & BP_ENABLE_ONCE) + disp = "dis"; + else if(b->flags & BP_TEMP) + disp = "del"; + gprintf(out_fp, "%-6d %-4.4s %-7.7s file %s, line #%d\n", + b->number, disp, (b->flags & BP_ENABLE) ? "yes" : "no", + b->src, b->bpi->source_line); + if (b->hit_count > 0) + gprintf(out_fp, _("\tno of hits = %ld\n"), b->hit_count); + if (b->flags & BP_IGNORE) + gprintf(out_fp, _("\tignore next %ld hit(s)\n"), b->ignore_count); + if (b->cndn.code != NULL) + gprintf(out_fp, _("\tstop condition: %s\n"), b->cndn.expr); + if (b->commands.next != &b->commands) + gprintf(out_fp, _("\tcommands:\n")); + for (c = b->commands.next; c != &b->commands; c = c->next) { + gprintf(out_fp, "\t%s\n", c->cmd_string); + if (c->cmd == D_eval) { + char *start, *end; + CMDARG *a = c->arg; + start = strchr(a->a_string, '{'); + end = strrchr(a->a_string, '}'); + if (start == NULL || end == NULL) + continue; + start++; + *end = '\0'; + gprintf(out_fp, "%s", start); /* FIXME: translate ? */ + *end = '}'; + } + } + } + } + break; + + case A_FRAME: + CHECK_PROG_RUNNING(); + fprintf(out_fp, _("Current frame: ")); + print_numbered_frame(cur_frame); + if (cur_frame < fcall_count) { + fprintf(out_fp, _("Called by frame: ")); + print_numbered_frame(cur_frame + 1); + } + if (cur_frame > 0) { + fprintf(out_fp, _("Caller of frame: ")); + print_numbered_frame(cur_frame - 1); + } + break; + + case A_ARGS: + case A_LOCALS: + { + NODE *f, *func; + INSTRUCTION *pc; + int arg_count, pcount; + int i, from, to; + char **pnames; + + CHECK_PROG_RUNNING(); + f = find_frame(cur_frame); + func = f->func_node; + if (func == NULL) { + /* print ARGV ? */ + fprintf(out_fp, _("None in main().\n")); + return FALSE; + } + + pcount = get_param_count(func); /* # of defined params */ + pnames = get_params(func); /* param names */ + + pc = (INSTRUCTION *) f->reti; /* Op_func_call instruction */ + arg_count = (pc + 1)->expr_count; /* # of arguments supplied */ + + if (arg_count > pcount) /* extra args */ + arg_count = pcount; + if (arg->a_argument == A_ARGS) { + from = 0; + to = arg_count - 1; + } else { + from = arg_count; + to = pcount - 1; + } + + for (i = from; i <= to; i++) { + NODE *r; + r = f->stack[i]; + if (r->type == Node_array_ref) + r = r->orig_array; + fprintf(out_fp, "%s = ", pnames[i]); + print_symbol(r, TRUE); + } + if (to < from) + fprintf(out_fp, "%s", + arg->a_argument == A_ARGS ? + _("No arguments.\n") : + _("No locals.\n")); + } + break; + + case A_VARIABLES: + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + gprintf(out_fp, _("All defined variables:\n\n")); + print_vars(gprintf, out_fp); + } + break; + + case A_FUNCTIONS: + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + gprintf(out_fp, _("All defined functions:\n\n")); + pf_data.print_func = gprintf; + pf_data.fp = out_fp; + pf_data.defn = TRUE; + (void) foreach_func((int (*)(INSTRUCTION *, void *)) print_function, + FALSE, /* sort */ + &pf_data /* data */ + ); + } + break; + + case A_DISPLAY: + case A_WATCH: + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + struct list_item *d, *list; + + if (arg->a_argument == A_DISPLAY) { + list = &display_list; + gprintf(out_fp, _("Auto-display variables:\n\n")); + } else { + list = &watch_list; + gprintf(out_fp, _("Watch variables:\n\n")); + } + for (d = list->prev; d != list; d = d->prev) { + int i; + struct commands_item *c; + NODE *symbol = d->symbol; + + if (IS_SUBSCRIPT(d)) { + gprintf(out_fp, "%d:\t%s", d->number, d->sname); + for (i = 0; i < d->num_subs; i++) { + NODE *sub; + sub = d->subs[i]; + gprintf(out_fp, "[\"%s\"]", sub->stptr); + } + gprintf(out_fp, "\n"); + } else if (IS_FIELD(d)) + gprintf(out_fp, "%d:\t$%ld\n", d->number, (long) symbol->numbr); + else + gprintf(out_fp, "%d:\t%s\n", d->number, d->sname); + if (d->cndn.code != NULL) + gprintf(out_fp, _("\tstop condition: %s\n"), d->cndn.expr); + if (d->commands.next != &d->commands) + gprintf(out_fp, _("\tcommands:\n")); + for (c = d->commands.next; c != &d->commands; c = c->next) { + gprintf(out_fp, "\t%s\n", c->cmd_string); + if (c->cmd == D_eval) { + char *start, *end; + CMDARG *a = c->arg; + start = strchr(a->a_string, '{'); + end = strrchr(a->a_string, '}'); + if (start == NULL || end == NULL) + continue; + start++; + *end = '\0'; + gprintf(out_fp, "%s", start); /* FIXME: translate ? */ + *end = '}'; + } + } + + } + } + break; + + default: + break; + } + + return FALSE; +} + +/* print_symbol --- print a symbol table entry */ + +static void +print_symbol(NODE *r, int isparam) +{ + switch (r->type) { + case Node_var_new: + fprintf(out_fp, "untyped variable\n"); + break; + case Node_var: + if (! isparam && r->var_update) + r->var_update(); + valinfo(r->var_value, fprintf, out_fp); + break; + case Node_var_array: + fprintf(out_fp, "array, %ld elements\n", r->table_size); + break; + case Node_func: + fprintf(out_fp, "`function'\n"); + break; + default: + break; + } +} + +/* find_frame --- find frame given a frame number */ + +static NODE * +find_frame(long num) +{ + assert(num >= 0); + if (num == 0) + return frame_ptr; + + assert(prog_running == TRUE); + assert(num <= fcall_count); + assert(fcall_list[num] != NULL); + return fcall_list[num]; +} + +/* find_param --- find a function parameter in a given frame number */ + +static NODE * +find_param(const char *name, long num, char **pname) +{ + NODE *r = NULL; + NODE *f; + + if (pname) + *pname = NULL; + + if (num < 0 || num > fcall_count || name == NULL) + return NULL; + f = find_frame(num); + if (f->func_node != NULL) { /* in function */ + NODE *func; + char **pnames; + int i, pcount; + + func = f->func_node; + pnames = get_params(func); + pcount = get_param_count(func); + + for (i = 0; i < pcount; i++) { + if (strcmp(name, pnames[i]) == 0) { + r = f->stack[i]; + if (r->type == Node_array_ref) + r = r->orig_array; + if (pname) + *pname = pnames[i]; + break; + } + } + } + return r; +} + +/* find_symbol --- find a symbol in current context */ + +static +NODE *find_symbol(const char *name, char **pname) +{ + NODE *r = NULL; + + if (pname) + *pname = NULL; + if (prog_running) + r = find_param(name, cur_frame, pname); + if (r == NULL) + r = lookup(name); + if (r == NULL) + fprintf(out_fp, _("no symbol `%s' in current context\n"), name); + return r; +} + +/* find_array -- find an array in current context */ + +static NODE * +find_array(const char *name) +{ + NODE *r; + r = find_symbol(name, NULL); + if (r != NULL && r->type != Node_var_array) { + fprintf(out_fp, _("`%s' is not an array\n"), name); + return NULL; + } + return r; +} + +/* print_field --- print the value of $n */ + +static void +print_field(long field_num) +{ + NODE **lhs; + lhs = get_field(field_num, NULL); + if (*lhs == Null_field || *lhs == Nnull_string) + fprintf(out_fp, _("$%ld = uninitialized field\n"), field_num); + else { + fprintf(out_fp, "$%ld = ", field_num); + valinfo(*lhs, fprintf, out_fp); + } +} + +/* print_array --- print the contents of an array */ + +static int +print_array(volatile NODE *arr, char *arr_name) +{ + NODE *bucket; + NODE **list; + int i; + size_t num_elems = 0; + volatile NODE *r; + volatile int ret = 0; + volatile jmp_buf pager_quit_tag_stack; + + if (arr->var_array == NULL || arr->table_size == 0) { + gprintf(out_fp, _("array `%s' is empty\n"), arr_name); + return 0; + } + + num_elems = arr->table_size; + + /* sort indices, sub_arrays are also sorted! */ + list = assoc_list((NODE *) arr, "@ind_str_asc", SORTED_IN); + + PUSH_BINDING(pager_quit_tag_stack, pager_quit_tag, pager_quit_tag_valid); + if (setjmp(pager_quit_tag) == 0) { + for (i = 0; ret == 0 && i < num_elems; i++) { + bucket = list[i]; + r = bucket->ahvalue; + if (r->type == Node_var_array) + ret = print_array(r, r->vname); + else { + gprintf(out_fp, "%s[\"%s\"] = ", arr_name, bucket->ahname_str); + valinfo((NODE *) r, gprintf, out_fp); + } + } + } else + ret = 1; + + POP_BINDING(pager_quit_tag_stack, pager_quit_tag, pager_quit_tag_valid); + + for (i = 0; i < num_elems; i++) + unref(list[i]); + efree(list); + + return ret; +} + +/* print_subscript --- print an array element */ + +static void +print_subscript(NODE *arr, char *arr_name, CMDARG *a, int count) +{ + NODE *r, *subs; + + subs = a->a_node; + r = in_array(arr, subs); + if (r == NULL) + fprintf(out_fp, _("[\"%s\"] not in array `%s'\n"), subs->stptr, arr_name); + else if (r->type == Node_var_array) { + if (count > 1) + print_subscript(r, r->vname, a->next, count - 1); + else { + /* print # of elements in array */ + fprintf(out_fp, "%s = ", r->vname); + print_symbol(r, FALSE); + } + } else { + fprintf(out_fp, "%s[\"%s\"] = ", arr_name, subs->stptr); + valinfo(r, fprintf, out_fp); + } +} + +/* do_print_var --- print command */ + +int +do_print_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + NODE *r; + CMDARG *a; + char *name, *pname; + + for (a = arg; a != NULL; a = a->next) { + switch (a->type) { + case D_variable: + name = a->a_string; + if ((r = find_symbol(name, &pname)) != NULL) { + fprintf(out_fp, "%s = ", name); + print_symbol(r, (pname != NULL)); + } + break; + + case D_subscript: + assert(a->a_count > 0); + name = a->a_string; + r = find_array(name); + if (r != NULL) + print_subscript(r, name, a->next, a->a_count); + break; + + case D_array: + name = a->a_string; + if ((r = find_array(name)) != NULL) { + int count = a->a_count; + for (; count > 0; count--) { + NODE *value, *subs; + a = a->next; + subs = a->a_node; + value = in_array(r, subs); + if (value == NULL) { + fprintf(out_fp, _("[\"%s\"] not in array `%s'\n"), + subs->stptr, name); + break; + } else if (value->type != Node_var_array) { + fprintf(out_fp, _("`%s[\"%s\"]' is not an array\n"), + name, subs->stptr); + break; + } else { + r = value; + name = r->vname; + } + } + if (count == 0) { + initialize_pager(out_fp); + print_array((volatile NODE *) r, name); + } + } + break; + + case D_field: + print_field(a->a_node->numbr); + break; + + default: + /* notably D_node, subscript for invalid array name; skip */ + break; + } + } + return FALSE; +} + +/* do_set_var --- set command */ + +int +do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + NODE *r, *val; + NODE **lhs; + char *name, *pname; + + switch (arg->type) { + case D_variable: + name = arg->a_string; + arg = arg->next; + val = arg->a_node; + + if ((r = find_symbol(name, &pname)) == NULL) + break; + + switch (r->type) { + case Node_var_new: + r->type = Node_var; + r->var_value = Nnull_string; + /* fall through */ + case Node_var: + lhs = &r->var_value; + unref(*lhs); + *lhs = dupnode(val); + if (pname == NULL && r->var_assign != NULL) + r->var_assign(); + fprintf(out_fp, "%s = ", name); + print_symbol(r, (pname != NULL)); + break; + + default: + d_error(_("`%s' is not a scalar variable"), name); + break; + } + break; + + case D_subscript: + { + NODE *subs, *value; + int count = arg->a_count; + + assert(count > 0); + name = arg->a_string; + r = find_array(name); + if (r == NULL) + break; + for (; count > 0; count--) { + arg = arg->next; + subs = arg->a_node; + value = in_array(r, subs); + + if (count == 1) { + if (value != NULL && value->type == Node_var_array) + d_error(_("attempt to use array `%s[\"%s\"]' in a scalar context"), + name, subs->stptr); + else { + arg = arg->next; + val = arg->a_node; + lhs = assoc_lookup(r, subs, FALSE); + unref(*lhs); + *lhs = dupnode(val); + fprintf(out_fp, "%s[\"%s\"] = ", name, subs->stptr); + valinfo(*lhs, fprintf, out_fp); + } + } else { + if (value == NULL) { + NODE *array; + + getnode(array); + array->type = Node_var_array; + array->var_array = NULL; + array->vname = estrdup(subs->stptr, subs->stlen); + *assoc_lookup(r, subs, FALSE) = array; + r = array; + } else if (value->type != Node_var_array) { + d_error(_("attempt to use scalar `%s[\"%s\"]' as array"), + name, subs->stptr); + break; + } else { + r = value; + name = r->vname; + } + } + } + } + break; + + case D_field: + { + long field_num; + Func_ptr assign = NULL; + + field_num = (long) arg->a_node->numbr; + assert(field_num >= 0); + arg = arg->next; + val = arg->a_node; + lhs = get_field(field_num, &assign); + unref(*lhs); + *lhs = dupnode(val); + if (assign) + assign(); + print_field(field_num); + } + break; + + default: + break; + } + return FALSE; +} + +/* find_item --- find an item in the watch/display list */ + +static struct list_item * +find_item(struct list_item *list, long num) +{ + struct list_item *d; + + if (num <= 0) + return NULL; + for (d = list->next; d != list; d = d->next) { + if (d->number == num) + return d; + } + return NULL; +} + +/* delete_item --- delete an item from the watch/display list */ + +static void +delete_item(struct list_item *d) +{ + struct commands_item *c; + int i; + + if (IS_SUBSCRIPT(d)) { + for (i = 0; i < d->num_subs; i++) + unref(d->subs[i]); + efree(d->subs); + } else if (IS_FIELD(d)) + unref(d->symbol); + + if ((d->flags & CUR_IS_ARRAY) == 0) + unref(d->cur_value); + if ((d->flags & OLD_IS_ARRAY) == 0) + unref(d->old_value); + + /* delete commands */ + for (c = d->commands.next; c != &d->commands; c = c->next) { + c = c->prev; + delete_commands_item(c->next); + } + + free_context(d->cndn.ctxt, FALSE); + if (d->cndn.expr != NULL) + efree(d->cndn.expr); + + d->next->prev = d->prev; + d->prev->next = d->next; + efree(d); +} + +/* add_item --- craete a watch/display item and add it to the list */ + +static struct list_item * +add_item(struct list_item *list, int type, NODE *symbol, char *pname) +{ + struct list_item *d; + + emalloc(d, struct list_item *, sizeof(struct list_item), "add_item"); + memset(d, 0, sizeof(struct list_item)); + d->commands.next = d->commands.prev = &d->commands; + + d->number = ++list->number; + d->sname = symbol->vname; + if (pname != NULL) { /* function param */ + d->sname = pname; + d->flags |= PARAM; + d->fcall_count = fcall_count - cur_frame; + } + + if (type == D_field) { /* field number */ + d->symbol = symbol; + d->flags |= FIELD_NUM; + } else if (type == D_subscript) { /* subscript */ + d->symbol = symbol; + d->flags |= SUBSCRIPT; + } else /* array or variable */ + d->symbol = symbol; + + /* add to list */ + d->next = list->next; + d->prev = list; + list->next = d; + d->next->prev = d; + return d; +} + +/* do_add_item --- add an item to the watch/display list */ + +static struct list_item * +do_add_item(struct list_item *list, CMDARG *arg) +{ + NODE *symbol = NULL; + char *name, *pname = NULL; + struct list_item *item = NULL; + + switch (arg->type) { + case D_subscript: + case D_variable: + name = arg->a_string; + if ((symbol = find_symbol(name, &pname)) == NULL) + return NULL; + if (symbol->type == Node_func) { + d_error(_("`%s' is a function"), name); + return NULL; + } + if (arg->type == D_subscript && symbol->type != Node_var_array) { + d_error(_("`%s' is not an array\n"), name); + return NULL; + } + + item = add_item(list, arg->type, symbol, pname); + if (item != NULL && arg->type == D_subscript) { + NODE **subs; + int count = arg->a_count; + int i; + + assert(count > 0); + emalloc(subs, NODE **, count * sizeof(NODE *), "do_add_item"); + for (i = 0; i < count; i++) { + arg = arg->next; + subs[i] = dupnode(arg->a_node); + (void) force_string(subs[i]); + } + item->subs = subs; + item->num_subs = count; + } + break; + + case D_field: + symbol = dupnode(arg->a_node); + item = add_item(list, D_field, symbol, NULL); + break; + + default: + break; + } + + /* watch condition if any */ + if (list == &watch_list) { + arg = arg->next; + if (item != NULL && arg != NULL) { + if (parse_condition(D_watch, item->number, arg->a_string) == 0) + arg->a_string = NULL; /* don't let free_cmdarg free it */ + else + fprintf(out_fp, _("watchpoint %d is unconditional\n"), item->number); + } + } + return item; +} + +/* do_delete_item --- delete a watch/display item from list. */ + +static void +do_delete_item(struct list_item *list, CMDARG *arg) +{ + if (arg == NULL) { + while (list->next != list) + delete_item(list->next); + } + + for (; arg != NULL; arg = arg->next) { + struct list_item *d; + if (arg->type == D_range) { + long i, j; + + i = arg->a_int; + arg = arg->next; + j = arg->a_int; + if (j > list->number) + j = list->number; + for (; i <= j; i++) { + if ((d = find_item(list, i)) != NULL) + delete_item(d); + } + } else { + if ((d = find_item(list, arg->a_int)) == NULL) { + /* split into two for easier message translation */ + if (list == &display_list) + d_error(_("No display item numbered %ld"), + arg->a_int); + else + d_error(_("No watch item numbered %ld"), + arg->a_int); + } else + delete_item(d); + } + } +} + +/* display --- print an item from the auto-display list */ + +static void +display(struct list_item *d) +{ + NODE *symbol; + + symbol = d->symbol; + if (IS_PARAM(d) && (d->fcall_count != (fcall_count - cur_frame))) + return; + + if (IS_SUBSCRIPT(d)) { + NODE *sub, *r; + int i = 0, count = d->num_subs; + for (i = 0; i < count; i++) { + sub = d->subs[i]; + r = in_array(symbol, sub); + if (r == NULL) { + fprintf(out_fp, _("%d: [\"%s\"] not in array `%s'\n"), + d->number, sub->stptr, d->sname); + break; + } + if (r->type == Node_var_array) { + symbol = r; + if (i == count - 1) /* it's a sub-array */ + goto print_sym; /* print # of elements in sub-array */ + } else { + if (i != count - 1) + return; /* FIXME msg and delete item ? */ + fprintf(out_fp, "%d: %s[\"%s\"] = ", d->number, + d->sname, sub->stptr); + valinfo(r, fprintf, out_fp); + } + } + } else if (IS_FIELD(d)) { + NODE *r = d->symbol; + fprintf(out_fp, "%d: ", d->number); + print_field(r->numbr); + } else { +print_sym: + fprintf(out_fp, "%d: %s = ", d->number, d->sname); + print_symbol(symbol, IS_PARAM(d)); + } +} + + +/* do_display --- display command */ + +int +do_display(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + struct list_item *d; + + if (arg == NULL) { + /* display all items */ + for (d = display_list.prev; d != &display_list; d = d->prev) + display(d); + return FALSE; + } + + if ((d = do_add_item(&display_list, arg)) != NULL) + display(d); + + return FALSE; +} + +/* do_undisplay --- undisplay command */ + +int +do_undisplay(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + do_delete_item(&display_list, arg); + return FALSE; +} + +/* condition_triggered --- test if a condition expression is true */ + +static int +condition_triggered(struct condition *cndn) +{ + NODE *r; + int di; + + assert(cndn != NULL); + if (cndn->code == NULL) + return TRUE; + + push_context(cndn->ctxt); + r = execute_code((volatile INSTRUCTION *) cndn->code); + pop_context(); /* switch to prev context */ + if (r == NULL) /* fatal error */ + return FALSE; /* not triggered */ + + force_number(r); + di = (r->numbr != 0.0); + DEREF(r); + return di; +} + + + +static int +find_subscript(struct list_item *item, NODE **ptr) +{ + NODE *symbol = item->symbol; + NODE *sub, *r; + int i = 0, count = item->num_subs; + + r = *ptr = NULL; + for (i = 0; i < count; i++) { + sub = item->subs[i]; + r = in_array(symbol, sub); + if (r == NULL) + return 0; + if (r->type == Node_var_array) + symbol = r; + else if (i < count - 1) + return -1; + } + *ptr = r; + return 0; +} + +/* cmp_val --- compare values of watched item, returns TRUE if different; */ + +static int +cmp_val(struct list_item *w, NODE *old, NODE *new) +{ + /* + * case old new result + * ------------------------------ + * 1: NULL ARRAY TRUE + * 2: NULL SCALAR TRUE + * 3: NULL NULL FALSE + * 4: SCALAR SCALAR cmp_node + * 5: SCALAR ARRAY TRUE + * 6: SCALAR NULL TRUE + * 7: ARRAY SCALAR TRUE + * 8: ARRAY ARRAY compare size + * 9: ARRAY NULL TRUE + */ + + if (WATCHING_ARRAY(w)) { + long size = 0; + if (! new) /* 9 */ + return TRUE; + if (new->type == Node_val) /* 7 */ + return TRUE; + /* new->type == Node_var_array */ /* 8 */ + if (new->var_array != NULL) + size = new->table_size; + if (w->cur_size == size) + return FALSE; + return TRUE; + } + + if (! old && ! new) /* 3 */ + return FALSE; + if ((! old && new) /* 1, 2 */ + || (old && ! new)) /* 6 */ + return TRUE; + + if (new->type == Node_var_array) /* 5 */ + return TRUE; + return cmp_nodes(old, new); /* 4 */ +} + +/* watchpoint_triggered --- check if we should stop at this watchpoint; + * update old and current values accordingly. + */ + +static int +watchpoint_triggered(struct list_item *w) +{ + NODE *symbol; + NODE *t1, *t2; + + symbol = w->symbol; + if (IS_PARAM(w) && (w->fcall_count != (fcall_count - cur_frame))) + return 0; /* parameter with same name in a different function */ + if (! condition_triggered(&w->cndn)) + return 0; + + t1 = w->cur_value; + t2 = (NODE *) 0; + if (IS_SUBSCRIPT(w)) + (void) find_subscript(w, &t2); + else if (IS_FIELD(w)) { + long field_num; + field_num = (long) w->symbol->numbr; + t2 = *get_field(field_num, NULL); + } else { + switch (symbol->type) { + case Node_var: + t2 = symbol->var_value; + break; + case Node_var_array: + t2 = symbol; + break; + case Node_var_new: + break; + default: + cant_happen(); + } + } + + if (! cmp_val(w, t1, t2)) + return 0; + + /* update old and current values */ + + if ((w->flags & OLD_IS_ARRAY) == 0) + unref(w->old_value); + w->flags &= ~OLD_IS_ARRAY; + if (WATCHING_ARRAY(w)) { /* 7, 8, 9 */ + w->old_size = w->cur_size; + w->flags |= OLD_IS_ARRAY; + if (! t2) { + w->flags &= ~CUR_IS_ARRAY; + w->cur_value = 0; + } else if (t2->type == Node_val) { + w->flags &= ~CUR_IS_ARRAY; + w->cur_value = dupnode(t2); + } else + w->cur_size = (t2->var_array != NULL) ? t2->table_size : 0; + } else if (! t1) { /* 1, 2 */ + w->old_value = 0; + /* new != NULL */ + if (t2->type == Node_val) + w->cur_value = dupnode(t2); + else { + w->flags |= CUR_IS_ARRAY; + w->cur_size = (t2->var_array != NULL) ? t2->table_size : 0; + } + } else /* if (t1->type == Node_val) */ { /* 4, 5, 6 */ + w->old_value = w->cur_value; + if (! t2) + w->cur_value = 0; + else if (t2->type == Node_var_array) { + w->flags |= CUR_IS_ARRAY; + w->cur_size = (t2->var_array != NULL) ? t2->table_size : 0; + } else + w->cur_value = dupnode(t2); + } + + return w->number; +} + +/* initialize_watch_item --- initialize current value of a watched item */ + +static int +initialize_watch_item(struct list_item *w) +{ + NODE *t, *r; + NODE *symbol = w->symbol; + + if (IS_SUBSCRIPT(w)) { + if (find_subscript(w, &r) == -1) { + d_error(_("attempt to use scalar value as array")); + return -1; + } + + if (r == NULL) + w->cur_value = (NODE *) 0; + else if (r->type == Node_var_array) { /* it's a sub-array */ + w->flags |= CUR_IS_ARRAY; + w->cur_size = (r->var_array != NULL) ? r->table_size : 0; + } else + w->cur_value = dupnode(r); + } else if (IS_FIELD(w)) { + long field_num; + t = w->symbol; + field_num = (long) t->numbr; + r = *get_field(field_num, NULL); + w->cur_value = dupnode(r); + } else { + if (symbol->type == Node_var_new) + w->cur_value = (NODE *) 0; + else if (symbol->type == Node_var) { + r = symbol->var_value; + w->cur_value = dupnode(r); + } else if (symbol->type == Node_var_array) { + w->flags |= CUR_IS_ARRAY; + w->cur_size = (symbol->var_array != NULL) ? symbol->table_size : 0; + } /* else + can't happen */ + } + return 0; +} + +/* do_watch --- watch command */ + +int +do_watch(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + struct list_item *w; + NODE *symbol, *sub; + int i; + + w = do_add_item(&watch_list, arg); + if (w == NULL) + return FALSE; + + if (initialize_watch_item(w) == -1) { + delete_item(w); + return FALSE; + } + + fprintf(out_fp, "Watchpoint %d: ", w->number); + symbol = w->symbol; + +/* FIXME: common code also in print_watch_item */ + if (IS_SUBSCRIPT(w)) { + fprintf(out_fp, "%s", w->sname); + for (i = 0; i < w->num_subs; i++) { + sub = w->subs[i]; + fprintf(out_fp, "[\"%s\"]", sub->stptr); + } + fprintf(out_fp, "\n"); + } else if (IS_FIELD(w)) + fprintf(out_fp, "$%ld\n", (long) symbol->numbr); + else + fprintf(out_fp, "%s\n", w->sname); + + return FALSE; +} + +/* do_unwatch --- unwatch command */ + +int +do_unwatch(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + do_delete_item(&watch_list, arg); + return FALSE; +} + +/* callback from pop_frame in eval.c */ + +void +frame_popped() +{ + struct list_item *item; + + /* delete all out of scope watchpoints */ + for (item = watch_list.next; item != &watch_list; item = item->next) { + if (IS_PARAM(item) && (item->fcall_count > fcall_count)) { + fprintf(out_fp, + _("Watchpoint %d deleted because parameter is out of scope.\n"), + item->number); + item = item->prev; + delete_item(item->next); + } + } + + /* delete all out of scope display items */ + for (item = display_list.next; item != &display_list; item = item->next) { + if (IS_PARAM(item) && (item->fcall_count > fcall_count)) { + fprintf(out_fp, + _("Display %d deleted because parameter is out of scope.\n"), + item->number); + item = item->prev; + delete_item(item->next); + } + } +} + +/* print_function --- print function name, parameters, and optionally + * file and line number. + */ + +static int +print_function(INSTRUCTION *pc, void *x) +{ + NODE *func; + int i, pcount; + char **pnames; + struct pf_data *data = (struct pf_data *) x; + int defn = data->defn; + Func_print print_func = data->print_func; + FILE *fp = data->fp; + + func = pc->func_body; + pcount = get_param_count(func); + pnames = get_params(func); + + print_func(fp, "%s(", func->lnode->param); + for (i = 0; i < pcount; i++) { + print_func(fp, "%s", pnames[i]); + if (i < pcount - 1) + print_func(fp, ", "); + } + print_func(fp, ")"); + if (defn) + print_func(fp, _(" in file `%s', line %d\n"), + pc->source_file, pc->source_line); + return 0; +} + +/* print_frame --- print function name, parameters, + * source and line number of where it is + * executing. + */ + +static void +print_frame(NODE *func, char *src, int srcline) +{ + if (func == NULL) + fprintf(out_fp, "main()"); + else { + pf_data.print_func = fprintf; + pf_data.fp = out_fp; + pf_data.defn = FALSE; + (void) print_function(func->code_ptr, &pf_data); + } + fprintf(out_fp, _(" at `%s':%d"), src, srcline); +} + +/* print_numbered_frame --- print a frame given its number */ + +static void +print_numbered_frame(long num) +{ + NODE *f; + + assert(prog_running == TRUE); + f = find_frame(num); + if (num == 0) { + fprintf(out_fp, "#%ld\t ", num); + print_frame(f->func_node, source, sourceline); + } else { + fprintf(out_fp, _("#%ld\tin "), num); + print_frame(f->func_node, f->vname, + ((INSTRUCTION *) find_frame(num - 1)->reti)->source_line); + } + fprintf(out_fp, "\n"); +} + +/* do_backtrace --- backtrace command */ + +int +do_backtrace(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + long cur = 0; + long last = fcall_count; + + CHECK_PROG_RUNNING(); + if (arg != NULL && arg->type == D_int) { + long count = arg->a_int; + + /* frame_ptr (frame #0), fcall_list[1, 2, ... fcall_count] => total count */ + if (count >= 0) { + /* toward outermost frame #fcall_count */ + last = count - 1; + if (last > fcall_count) + last = fcall_count; + } else { + /* toward innermost frame #0 */ + cur = 1 + fcall_count + count; + if (cur < 0) + cur = 0; + } + } + + for (; cur <= last; cur++) { + print_numbered_frame(cur); + } + if (cur <= fcall_count) + fprintf(out_fp, _("More stack frames follow ...\n")); + return FALSE; +} + +/* print_cur_frame_and_sourceline --- print current frame, and + * current source line. + */ + +static void +print_cur_frame_and_sourceline() +{ + NODE *f; + int srcline; + char *src; + + assert(prog_running == TRUE); + f = find_frame(cur_frame); + if (cur_frame == 0) { + src = source; + srcline = sourceline; + } else { + f = find_frame(cur_frame); + src = f->vname; + srcline = ((INSTRUCTION *) find_frame(cur_frame - 1)->reti)->source_line; + } + + fprintf(out_fp, (cur_frame > 0 ? _("#%ld\tin ") : "#%ld\t "), cur_frame); + print_frame(f->func_node, src, srcline); + fprintf(out_fp, "\n"); + print_lines(src, srcline, 1); + last_printed_line = srcline - list_size / 2; + if (last_printed_line < 0) + last_printed_line = 0; +} + +/* do_frame --- frame command */ + +int +do_frame(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + CHECK_PROG_RUNNING(); + if (arg && arg->type == D_int) { + if (arg->a_int < 0 || arg->a_int > fcall_count) { + d_error(_("invalid frame number")); + return FALSE; + } + cur_frame = arg->a_int; + } + print_cur_frame_and_sourceline(); + return FALSE; +} + +/* do_up --- up command */ + +int +do_up(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + CHECK_PROG_RUNNING(); + if (arg != NULL && arg->type == D_int) + cur_frame += arg->a_int; + else + cur_frame++; + if (cur_frame < 0) + cur_frame = 0; + else if (cur_frame > fcall_count) + cur_frame = fcall_count; + print_cur_frame_and_sourceline(); + return FALSE; +} + +/* do_down --- down command */ + +int +do_down(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + CHECK_PROG_RUNNING(); + if (arg != NULL && arg->type == D_int) + cur_frame -= arg->a_int; + else + cur_frame--; + if (cur_frame < 0) + cur_frame = 0; + else if (cur_frame > fcall_count) + cur_frame = fcall_count; + print_cur_frame_and_sourceline(); + return FALSE; +} + +/* find_rule --- find a rule or function in file 'src' containing + * source line 'lineno' + */ + +static INSTRUCTION * +find_rule(char *src, long lineno) +{ + INSTRUCTION *rp; + + assert(lineno > 0); + for (rp = rule_list->nexti; rp != NULL; rp = rp->nexti) { + if ((rp - 1)->source_file == src + && lineno >= (rp + 1)->first_line + && lineno <= (rp + 1)->last_line) + return (rp - 1); + } + return NULL; +} + +/* mk_breakpoint --- create a breakpoint instruction and the corresponding + * breakpoint structure. + */ + +static INSTRUCTION * +mk_breakpoint(char *src, int srcline) +{ + INSTRUCTION *bp; + BREAKPOINT *b; + + bp = bcalloc(Op_breakpoint, 1, srcline); + emalloc(b, BREAKPOINT *, sizeof(BREAKPOINT), "mk_breakpoint"); + memset(&b->cndn, 0, sizeof(struct condition)); + b->commands.next = b->commands.prev = &b->commands; + b->silent = FALSE; + + + b->number = ++watch_list.number; /* breakpoints and watchpoints use same counter */ + b->ignore_count = 0; + b->hit_count = 0; + b->flags = BP_ENABLE; + b->src = src; + bp->break_pt = b; + b->bpi = bp; + + /* prepend to list */ + b->next = breakpoints.next; + b->prev = &breakpoints; + breakpoints.next = b; + b->next->prev = b; + return bp; +} + +/* delete_breakpoint --- delete a breakpoint structure and + * disable the breakpoint instruction. + */ + +static void +delete_breakpoint(BREAKPOINT *b) +{ + INSTRUCTION *pc = b->bpi; + struct commands_item *c; + + /* N.B.: easiest thing to do is to turn Op_breakpoint into a no-op; + * deleteing the instruction is not that simple, + * since could have reference to it somewhere else (e.g. cur_pc). + */ + + pc->opcode = Op_no_op; + pc->source_line = 0; + pc->break_pt = NULL; + + /* delete commands */ + for (c = b->commands.next; c != &b->commands; c = c->next) { + c = c->prev; + delete_commands_item(c->next); + } + + free_context(b->cndn.ctxt, FALSE); + if (b->cndn.expr != NULL) + efree(b->cndn.expr); + + /* remove from list */ + b->next->prev = b->prev; + b->prev->next = b->next; + efree(b); +} + +/* find_breakpoint --- find the breakpoint structure from a breakpoint number */ + +static BREAKPOINT * +find_breakpoint(long num) +{ + BREAKPOINT *b; + + if (num <= 0) + return NULL; + + for (b = breakpoints.next; b != &breakpoints; b = b->next) { + if (b->number == num) + return b; + } + return NULL; +} + +/* add_breakpoint --- add a breakpoint instruction between PREVP and IP */ + +static BREAKPOINT * +add_breakpoint(INSTRUCTION *prevp, INSTRUCTION *ip, char *src, int silent) +{ + BREAKPOINT *b; + INSTRUCTION *bp; + int lineno = ip->source_line; + + /* add new breakpoint instruction at the end of + * already set breakpoints at this line number. + */ + + while (ip->opcode == Op_breakpoint && ip->source_line == lineno) { + if (! silent) { + b = ip->break_pt; + /* + * This is more verbose that it might otherwise be, + * in order to provide easily translatable strings. + */ + if (b->flags & BP_ENABLE) { + if (b->flags & BP_IGNORE) + fprintf(out_fp, + _("Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d"), + b->number, + b->ignore_count, + b->src, + lineno); + else + fprintf(out_fp, + _("Note: breakpoint %d (enabled), also set at %s:%d"), + b->number, + b->src, + lineno); + } else { + if (b->flags & BP_IGNORE) + fprintf(out_fp, + _("Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d"), + b->number, + b->ignore_count, + b->src, + lineno); + else + fprintf(out_fp, + _("Note: breakpoint %d (disabled), also set at %s:%d"), + b->number, + b->src, + lineno); + } + } + prevp = ip; + ip = ip->nexti; + } + + assert(ip->source_line == lineno); + + bp = mk_breakpoint(src, lineno); + prevp->nexti = bp; + bp->nexti = ip; + b = bp->break_pt; + if (! silent) + fprintf(out_fp, _("Breakpoint %d set at file `%s', line %d\n"), + b->number, src, lineno); + return b; +} + +/* set_breakpoint_at --- set a breakpoint at given line number*/ + +static BREAKPOINT * +set_breakpoint_at(INSTRUCTION *rp, int lineno, int silent) +{ + INSTRUCTION *ip, *prevp; + + for (prevp = rp, ip = rp->nexti; ip; prevp = ip, ip = ip->nexti) { + if (ip->opcode == Op_K_case) { + INSTRUCTION *i1, *i2; + + /* Special case: the code line numbers for a switch do not form + * a monotonically increasing sequence. Check if the line # is between + * the first and last statements of the case block before continuing + * the search. + */ + for (i2 = ip->stmt_start, i1 = i2->nexti; i2 != ip->stmt_end; + i2 = i1, i1 = i1->nexti) { + if (i1->source_line >= lineno) + return add_breakpoint(i2, i1, rp->source_file, silent); + if (i1 == ip->stmt_end) + break; + } + } + + if (ip->source_line >= lineno) + return add_breakpoint(prevp, ip, rp->source_file, silent); + if (ip == (rp + 1)->lasti) + break; + } + return NULL; +} + +/* set_breakpoint_next --- set a breakpoint at the next instruction */ + +static BREAKPOINT * +set_breakpoint_next(INSTRUCTION *rp, INSTRUCTION *ip) +{ + INSTRUCTION *prevp; + + if (ip == (rp + 1)->lasti) + return NULL; + prevp = ip; + if (ip->opcode != Op_breakpoint) + ip = ip->nexti; + for (; ip; prevp = ip, ip = ip->nexti) { + if (ip->source_line > 0) + return add_breakpoint(prevp, ip, rp->source_file, FALSE); + if (ip == (rp + 1)->lasti) + break; + } + return NULL; +} + +/* set_breakpoint --- set a breakpoint */ + +static int +set_breakpoint(CMDARG *arg, int temporary) +{ + int lineno; + BREAKPOINT *b = NULL; + INSTRUCTION *rp, *ip; + NODE *func; + SRCFILE *s = cur_srcfile; + char *src = cur_srcfile->src; + + if (arg == NULL) { +/* +* (From GDB Documentation): +* +* When called without any arguments, break sets a breakpoint at the next instruction +* to be executed in the selected stack frame (see section Examining the Stack). +* In any selected frame but the innermost, this makes your program stop as soon +* as control returns to that frame. This is similar to the effect of a finish command +* in the frame inside the selected frame--except that finish does not leave an +* active breakpoint. If you use break without an argument in the innermost frame, +* GDB stops the next time it reaches the current location; this may be useful +* inside loops. +* GDB normally ignores breakpoints when it resumes execution, until at least +* one instruction has been executed. If it did not do this, +* you would be unable to proceed past a breakpoint without first disabling the +* breakpoint. This rule applies whether or not the breakpoint already existed +* when your program stopped. +*/ + CHECK_PROG_RUNNING(); + if (cur_frame == 0) { + src = source; + ip = cur_pc; + } else { + NODE *f; + f = find_frame(cur_frame); + src = f->vname; + ip = (INSTRUCTION *) find_frame(cur_frame - 1)->reti; /* Op_func_call */ + } + rp = find_rule(src, ip->source_line); + assert(rp != NULL); + if ((b = set_breakpoint_next(rp, ip)) == NULL) + fprintf(out_fp, _("Can't set breakpoint in file `%s'\n"), src); + else { + if (cur_frame == 0) { /* stop next time */ + b->flags |= BP_IGNORE; + b->ignore_count = 1; + } + if (temporary) + b->flags |= BP_TEMP; + } + return FALSE; + } + + /* arg != NULL */ + + switch (arg->type) { + case D_string: /* break filename:lineno|function */ + s = source_find(arg->a_string); + arg = arg->next; + if (s == NULL || arg == NULL + || (arg->type != D_int && arg->type != D_func)) + return FALSE; + src = s->src; + if (arg->type == D_func) /* break filename:function */ + goto func; + else + /* fall through */ + case D_int: /* break lineno */ + lineno = (int) arg->a_int; + if (lineno <= 0 || lineno > s->srclines) + d_error(_("line number %d in file `%s' out of range"), lineno, src); + else { + rp = find_rule(src, lineno); + if (rp == NULL) + fprintf(out_fp, _("Can't find rule!!!\n")); + if (rp == NULL || (b = set_breakpoint_at(rp, lineno, FALSE)) == NULL) + fprintf(out_fp, _("Can't set breakpoint at `%s':%d\n"), + src, lineno); + if (b != NULL && temporary) + b->flags |= BP_TEMP; + } + break; + + case D_func: /* break function */ +func: + func = arg->a_node; + rp = func->code_ptr; + if ((b = set_breakpoint_at(rp, rp->source_line, FALSE)) == NULL) + fprintf(out_fp, _("Can't set breakpoint in function `%s'\n"), + func->lnode->param); + else if (temporary) + b->flags |= BP_TEMP; + lineno = b->bpi->source_line; + break; + + default: + return FALSE; + } + /* condition if any */ + arg = arg->next; + if (b != NULL && arg != NULL) { + if (parse_condition(D_break, b->number, arg->a_string) == 0) + arg->a_string = NULL; /* don't let free_cmdarg free it */ + else + fprintf(out_fp, _("breakpoint %d set at file `%s', line %d is unconditional\n"), + b->number, src, lineno); + } + return FALSE; +} + + +/* breakpoint_triggered --- check if we should stop at this breakpoint */ + +static int +breakpoint_triggered(BREAKPOINT *b) +{ + if ((b->flags & BP_ENABLE) == 0) + return 0; + if ((b->flags & BP_IGNORE) != 0) { + if (--b->ignore_count <= 0) + b->flags &= ~BP_IGNORE; + return 0; + } + + if (! condition_triggered(&b->cndn)) + return 0; + + b->hit_count++; + if (b->flags & BP_ENABLE_ONCE) { + b->flags &= ~BP_ENABLE_ONCE; + b->flags &= ~BP_ENABLE; + } + return b->number; +} + +/* do_breakpoint --- break command */ + +int +do_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + return set_breakpoint(arg, FALSE); +} + +/* do_tmp_breakpoint --- tbreak command */ + +int +do_tmp_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + return set_breakpoint(arg, TRUE); +} + +/* do_clear --- clear command */ + +int +do_clear(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + int lineno; + BREAKPOINT *b; + INSTRUCTION *rp, *ip; + NODE *func; + SRCFILE *s = cur_srcfile; + char *src = cur_srcfile->src; + int bp_found = FALSE; + + if (arg == NULL) { /* clear */ + CHECK_PROG_RUNNING(); + if (cur_frame == 0) { + lineno = sourceline; + src = source; + } else { + NODE *f; + f = find_frame(cur_frame); + src = f->vname; + lineno = ((INSTRUCTION *) find_frame(cur_frame - 1)->reti)->source_line; + } + goto delete_bp; + } + + switch (arg->type) { + case D_string: /* clear filename:lineno|function */ + s = source_find(arg->a_string); + arg = arg->next; + if (s == NULL || arg == NULL || + (arg->type != D_int && arg->type != D_func)) + return FALSE; + src = s->src; + if (arg->type == D_func) + goto func; + /* else + fall through */ + case D_int: /* clear lineno */ + lineno = (int) arg->a_int; + if (lineno <= 0 || lineno > s->srclines) { + d_error(_("line number %d in file `%s' out of range"), lineno, src); + return FALSE; + } + break; + + case D_func: /* clear function */ +func: + func = arg->a_node; + rp = func->code_ptr; + for (ip = rp->nexti; ip; ip = ip->nexti) { + if (ip->source_line <= 0) + continue; + if (ip->opcode != Op_breakpoint) + break; + b = ip->break_pt; + if (++bp_found == 1) + fprintf(out_fp, _("Deleted breakpoint %d"), b->number); + else + fprintf(out_fp, ", %d", b->number); + delete_breakpoint(b); + } + if (! bp_found) + fprintf(out_fp, _("No breakpoint(s) at entry to function `%s'\n"), + func->lnode->param); + else + fprintf(out_fp, "\n"); + /* fall through */ + default: + return FALSE; + } + +delete_bp: + rp = find_rule(src, lineno); + if (rp != NULL) { + for (ip = rp->nexti; ip; ip = ip->nexti) { + if (ip->opcode == Op_breakpoint && ip->source_line == lineno) { + b = ip->break_pt; + if (++bp_found == 1) + fprintf(out_fp, _("Deleted breakpoint %d"), b->number); + else + fprintf(out_fp, ", %d", b->number); + delete_breakpoint(b); + } + if (ip == (rp + 1)->lasti) + break; + } + } + + if (! bp_found) + fprintf(out_fp, _("No breakpoint at file `%s', line #%d\n"), + src, (int) lineno); + else + fprintf(out_fp, "\n"); + return FALSE; +} + +/* enable_breakpoint --- enable a breakpoint and set its disposition */ + +static inline void +enable_breakpoint(BREAKPOINT *b, short disp) +{ + b->flags &= ~(BP_ENABLE_ONCE|BP_TEMP); + b->flags |= BP_ENABLE; + if (disp) + b->flags |= disp; +} + +/* do_enable_breakpoint --- enable command */ + +int +do_enable_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + BREAKPOINT *b; + short disp = 0; + + if (arg != NULL && arg->type == D_argument) { + if (arg->a_argument == A_DEL) /* del */ + disp = BP_TEMP; + else /* once */ + disp = BP_ENABLE_ONCE; + arg = arg->next; + } + + if (arg == NULL) { /* enable [once|del] */ + for (b = breakpoints.next; b != &breakpoints; b = b->next) + enable_breakpoint(b, disp); + } + + for (; arg != NULL; arg = arg->next) { + if (arg->type == D_range) { + long i, j; + + i = arg->a_int; + arg = arg->next; + j = arg->a_int; + if (j > breakpoints.number) + j = breakpoints.number; + for (; i <= j; i++) { + if ((b = find_breakpoint(i)) != NULL) + enable_breakpoint(b, disp); + } + } else { + assert(arg->type == D_int); + if ((b = find_breakpoint(arg->a_int)) == NULL) + d_error(_("invalid breakpoint number")); + else + enable_breakpoint(b, disp); + } + } + return FALSE; +} + +/* do_delete_breakpoint --- delete command */ + +int +do_delete_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + if (arg == NULL) { + int delete_all = TRUE; + delete_all = prompt_yes_no( + _("Delete all breakpoints? (y or n) "), + _("y")[0], TRUE, out_fp); + + if (delete_all) { + while (breakpoints.next != &breakpoints) + delete_breakpoint(breakpoints.next); + } + } + + for (; arg != NULL; arg = arg->next) { + BREAKPOINT *b; + if (arg->type == D_range) { + long i, j; + + i = arg->a_int; + arg = arg->next; + j = arg->a_int; + if (j > breakpoints.number) + j = breakpoints.number; + for (; i <= j; i++) { + if ((b = find_breakpoint(i)) != NULL) + delete_breakpoint(b); + } + } else { + if ((b = find_breakpoint(arg->a_int)) == NULL) + d_error(_("invalid breakpoint number")); + else + delete_breakpoint(b); + } + } + return FALSE; +} + +/* do_ignore_breakpoint --- ignore command */ + +int +do_ignore_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + BREAKPOINT *b; + + if (arg == NULL || arg->type != D_int + || arg->next == NULL || arg->next->type != D_int) + return FALSE; + + if ((b = find_breakpoint(arg->a_int)) == NULL) + d_error(_("invalid breakpoint number")); + else { + b->ignore_count = arg->next->a_int; + if (b->ignore_count > 0) { + b->flags |= BP_IGNORE; + fprintf(out_fp, _("Will ignore next %ld crossing(s) of breakpoint %d.\n"), + b->ignore_count, b->number); + } else { + b->flags &= ~BP_IGNORE; + fprintf(out_fp, _("Will stop next time breakpoint %d is reached.\n"), + b->number); + } + } + return FALSE; +} + +/* do_disable_breakpoint --- disable command */ + +int +do_disable_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + BREAKPOINT *b; + + if (arg == NULL) { + /* disable all */ + for (b = breakpoints.next; b != &breakpoints; b = b->next) + b->flags &= ~BP_ENABLE; + } + + for (; arg != NULL; arg = arg->next) { + if (arg->type == D_range) { + long i, j; + + i = arg->a_int; + arg = arg->next; + j = arg->a_int; + if (j > breakpoints.number) + j = breakpoints.number; + for (; i <= j; i++) + if ((b = find_breakpoint(i)) != NULL) + b->flags &= ~BP_ENABLE; + } else { + if ((b = find_breakpoint(arg->a_int)) == NULL) + d_error(_("invalid breakpoint number")); + else + b->flags &= ~BP_ENABLE; + } + } + return FALSE; +} + +#ifdef HAVE_LIBREADLINE + +/* get_parmlist --- list of function params in current context */ + +char ** +get_parmlist() +{ + NODE *func; + + if (! prog_running) + return NULL; + func = find_frame(cur_frame)->func_node; + if (func == NULL) /* in main */ + return NULL; + return func->parmlist; +} + +/* initialize_readline --- initialize readline */ + +static void +initialize_readline() +{ + /* tell readline which stream to use for output, + * default input stream is stdin. + */ + rl_outstream = out_fp; + + /* allow conditional parsing of the ~/.inputrc file. */ + rl_readline_name = "gawk"; + + /* our completion function. */ + rl_attempted_completion_function = command_completion; + + read_a_line = readline; +} +#else +#define initialize_readline() /* nothing */ +#endif + + +/* interpret --- debugger entry point */ + +int +interpret(INSTRUCTION *pc) +{ + char *run; + + input_fd = fileno(stdin); + out_fp = stdout; + if (os_isatty(input_fd)) + input_from_tty = TRUE; + if (input_fd == 0 && input_from_tty) + initialize_readline(); + + if (! read_a_line) + read_a_line = g_readline; + + push_cmd_src(input_fd, input_from_tty, read_a_line, 0, 0, EXIT_FATAL); + + setbuf(out_fp, (char *) NULL); + for (cur_srcfile = srcfiles->prev; cur_srcfile != srcfiles; + cur_srcfile = cur_srcfile->prev) { + if (cur_srcfile->stype == SRC_FILE + || cur_srcfile->stype == SRC_INC) + break; + } + + if (cur_srcfile == srcfiles) { + fprintf(out_fp, _("Can only debug programs provided with the `-f' option.\n")); + exit(EXIT_FAILURE); + } + + dgawk_Prompt = estrdup(DEFAULT_PROMPT, strlen(DEFAULT_PROMPT)); + dPrompt = dgawk_Prompt; + + memset(&stop, 0, sizeof(stop)); + stop.command = D_illegal; + + if ((run = getenv("DGAWK_RESTART")) != NULL) { + /* We are restarting; restore state (breakpoints, history etc.) + * passed as environment variables and optionally execute the run command. + */ + unserialize(BREAK); + unserialize(WATCH); + unserialize(DISPLAY); + unserialize(HISTORY); + unserialize(OPTION); + unsetenv("DGAWK_RESTART"); + fprintf(out_fp, "Restarting ...\n"); + if (run[0] == 'T') + (void) do_run(NULL, 0); + + } else if (command_file != NULL) { + /* run commands from a file (--command=file or -R file) */ + int fd; + fd = open_readfd(command_file); + if (fd == INVALID_HANDLE) { + fprintf(stderr, _("can't open source file `%s' for reading (%s)"), + command_file, strerror(errno)); + exit(EXIT_FAILURE); + } + push_cmd_src(fd, FALSE, g_readline, close, 0, EXIT_FAILURE); + cmd_src->str = estrdup(command_file, strlen(command_file)); + + } else { + int fd; + +#ifdef HAVE_LIBREADLINE + (void) read_history(history_file); + sess_history_base = history_length; +#endif + + /* read saved options */ + fd = open_readfd(options_file); + if (fd > INVALID_HANDLE) + push_cmd_src(fd, FALSE, g_readline, close, 0, EXIT_SUCCESS); + } + + /* start the command interpreter */ + read_command(); /* yyparse */ + return EXIT_SUCCESS; +} + + +/* N.B.: ignore breakpoints and watchpoints for return command */ + +/* check_watchpoint --- check if any watchpoint triggered */ + +static int +check_watchpoint() +{ + struct list_item *w; + + if (stop.command == D_return) + return FALSE; + for (w = watch_list.prev; w != &watch_list; w = w->prev) { + int wnum = watchpoint_triggered(w); + if (wnum > 0) { + stop.watch_point = wnum; + stop.print_frame = TRUE; + return TRUE; + } + } + return FALSE; +} + +/* check_breakpoint --- check if breakpoint triggered */ + +static int +check_breakpoint(INSTRUCTION **pi) +{ + INSTRUCTION *pc; + + pc = *pi; + if (stop.command == D_return) + return FALSE; + if (pc->opcode == Op_breakpoint) { + int bnum; + *pi = pc->nexti; /* skip past the breakpoint instruction; + * interpreter doesn't process Op_breakpoint. + */ + bnum = breakpoint_triggered(pc->break_pt); + if (bnum > 0) { + stop.break_point = bnum; + stop.print_frame = TRUE; + return TRUE; + } + } + return FALSE; +} + +/* restart --- restart the debugger */ + +static void +restart(int run) +{ + /* save state in the environment after serialization */ + serialize(BREAK); + serialize(WATCH); + serialize(DISPLAY); + serialize(HISTORY); + serialize(OPTION); + + /* tell the new process to restore state from the environment */ + setenv("DGAWK_RESTART", (run ? "TRUE" : "FALSE"), 1); + + /* close all open files */ + close_all(); + + /* start a new process replacing the current process */ + execvp(d_argv[0], d_argv); + + /* execvp failed !!! */ + fprintf(out_fp, _("Failed to restart debugger")); + exit(EXIT_FAILURE); +} + +/* do_run --- run command */ + +int +do_run(CMDARG *arg ATTRIBUTE_UNUSED, int cmd ATTRIBUTE_UNUSED) +{ + if (prog_running) { + if (! input_from_tty) + need_restart = TRUE; /* handled later */ + else { + need_restart = prompt_yes_no( + _("Program already running. Restart from beginning (y/n)? "), + _("y")[0], FALSE, out_fp); + + if (! need_restart) { + fprintf(out_fp, _("Program not restarted\n")); + return FALSE; + } + } + } + + if (need_restart) { + /* avoid endless cycles of restarting */ + if (command_file != NULL) { + /* input_from_tty = FALSE */ + fprintf(stderr, _("error: cannot restart, operation not allowed\n")); + exit(EXIT_FAILURE); + } + + if (cmd_src->cmd == D_source) { + /* input_from_tty = FALSE */ + fprintf(out_fp, _("error (%s): cannot restart, ignoring rest of the commands\n"), cmd_src->str); + pop_cmd_src(); + return FALSE; + } + + restart(TRUE); /* does not return */ + } + + fprintf(out_fp, _("Starting program: \n")); + + prog_running = TRUE; + fatal_tag_valid = TRUE; + if (setjmp(fatal_tag) == 0) + (void) r_interpret(code_block); + + fatal_tag_valid = FALSE; + prog_running = FALSE; + fprintf(out_fp, _("Program exited %s with exit value: %d\n"), + (! exiting && exit_val != EXIT_SUCCESS) ? "abnormally" + : "normally", + exit_val); + need_restart = TRUE; + return FALSE; +} + +/* do_quit --- quit command */ + +int +do_quit(CMDARG *arg ATTRIBUTE_UNUSED, int cmd ATTRIBUTE_UNUSED) +{ + int terminate = TRUE; + if (prog_running) + terminate = prompt_yes_no( + _("The program is running. Exit anyway (y/n)? "), + _("y")[0], TRUE, out_fp); + if (terminate) { + close_all(); + do_trace = FALSE; /* don't save 'trace on' */ + +#ifdef HAVE_LIBREADLINE + if (do_save_history && input_from_tty) { + int ret; + ret = write_history(history_file); + if (ret == 0 && history_length > history_size) + (void) history_truncate_file(history_file, history_size); + } +#endif + if (do_save_options && input_from_tty) + save_options(options_file); + + exit(exit_val); + } + return FALSE; +} + +/* do_continue --- continue command */ + +int +do_continue(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + BREAKPOINT *b; + + CHECK_PROG_RUNNING(); + if (! arg || arg->type != D_int) + return TRUE; + + /* arg is breakpoint ignore count if stopped at a breakpoint */ + if (! stop.break_point) { + fprintf(out_fp, _("Not stopped at any breakpoint; argument ignored.\n")); + return TRUE; + } + b = find_breakpoint(stop.break_point); + if (b == NULL) { + d_error(_("invalid breakpoint number %d."), stop.break_point); + return FALSE; + } + b->flags |= BP_IGNORE; + b->ignore_count = arg->a_int; + fprintf(out_fp, _("Will ignore next %ld crossings of breakpoint %d.\n"), + b->ignore_count, stop.break_point); + return TRUE; +} + +/* next_step --- common code for next and step commands */ + +static int +next_step(CMDARG *arg, int cmd) +{ + CHECK_PROG_RUNNING(); + if (arg != NULL && arg->type == D_int) + stop.repeat_count = arg->a_int; + else + stop.repeat_count = 1; + stop.command = cmd; + return TRUE; +} + +/* check_step --- process step command, return TRUE if stopping */ + +static int +check_step(INSTRUCTION **pi) +{ + if (fcall_count != stop.fcall_count) { + stop.fcall_count = fcall_count; + stop.sourceline = sourceline; + stop.source = source; + stop.print_frame = TRUE; + return (--stop.repeat_count == 0); + } + + if (source != stop.source) { + stop.source = source; + stop.sourceline = sourceline; + return (--stop.repeat_count == 0); + } + + if (sourceline != stop.sourceline) { + stop.sourceline = sourceline; + return (--stop.repeat_count == 0); + } + return FALSE; +} + +/* do_step -- process step command, return TRUE if stopping */ + +int +do_step(CMDARG *arg, int cmd) +{ + int ret; + ret = next_step(arg, cmd); + if (ret) { + stop.fcall_count = fcall_count; + stop.source = source; + stop.sourceline = sourceline; + stop.check_func = check_step; + } + return ret; +} + +/* do_stepi -- process stepi command, return TRUE if stopping */ + +static int +check_stepi(INSTRUCTION **pi) +{ + return (--stop.repeat_count == 0); +} + +/* do_stepi -- stepi command */ + +int +do_stepi(CMDARG *arg, int cmd) +{ + int ret; + ret = next_step(arg, cmd); + if (ret) + stop.check_func = check_stepi; + return ret; +} + + +/* check_next -- process next command returning TRUE if stopping */ + +static int +check_next(INSTRUCTION **pi) +{ + /* make sure not to step inside function calls */ + + if (fcall_count < stop.fcall_count) { + stop.fcall_count = fcall_count; + stop.sourceline = sourceline; + stop.source = source; + stop.print_frame = TRUE; + return (--stop.repeat_count == 0); + } + + if (fcall_count == stop.fcall_count) { + if (source != stop.source) { + stop.source = source; + stop.sourceline = sourceline; + return (--stop.repeat_count == 0); + } + if (sourceline != stop.sourceline) { + stop.sourceline = sourceline; + return (--stop.repeat_count == 0); + } + } + +#if 0 + /* redundant ? */ + if (fcall_count > stop.fcall_count) { + stop.source = source; + stop.sourceline = sourceline; + } +#endif + + return FALSE; +} + +/* do_next -- next command */ + +int +do_next(CMDARG *arg, int cmd) +{ + int ret; + + ret = next_step(arg, cmd); + if (ret) { + stop.source = source; + stop.sourceline = sourceline; + stop.fcall_count = fcall_count; + stop.check_func = check_next; + } + return ret; +} + +/* check_nexti --- process nexti command, returns TRUE if stopping */ + +static int +check_nexti(INSTRUCTION **pi) +{ + + /* make sure not to step inside function calls */ + + if (fcall_count < stop.fcall_count) { + stop.print_frame = TRUE; + stop.fcall_count = fcall_count; + } + return (fcall_count == stop.fcall_count + && --stop.repeat_count == 0); +} + +/* do_nexti -- nexti command */ + +int +do_nexti(CMDARG *arg, int cmd) +{ + int ret; + + ret = next_step(arg, cmd); + if (ret) { + stop.fcall_count = fcall_count; + stop.check_func = check_nexti; + } + return ret; +} + +/* check_finish --- process finish command, returns TRUE if stopping */ + +static int +check_finish(INSTRUCTION **pi) +{ + if (fcall_count == stop.fcall_count) { + stop.print_frame = TRUE; + return TRUE; + } + return FALSE; +} + +/* do_finish --- finish command */ + +int +do_finish(CMDARG *arg ATTRIBUTE_UNUSED, int cmd) +{ + CHECK_PROG_RUNNING(); + if (cur_frame == fcall_count) { + fprintf(out_fp, + _("'finish' not meaningful in the outermost frame main()\n")); + return FALSE; + } + stop.fcall_count = fcall_count - cur_frame - 1; + assert(stop.fcall_count >= 0); + fprintf(out_fp, _("Run till return from ")); + print_numbered_frame(cur_frame); + stop.check_func = check_finish; + stop.command = cmd; + stop.print_ret = TRUE; + return TRUE; +} + +/* check_return --- process return, returns TRUE if stopping */ + +static int +check_return(INSTRUCTION **pi) +{ + assert(fcall_count >= stop.fcall_count); + + if (fcall_count == stop.fcall_count) { + stop.print_frame = TRUE; + return TRUE; + } + + if (fcall_count > stop.fcall_count) { /* innermost frame just returned */ + /* force this one to return too */ + NODE *func; + + func = find_frame(cur_frame)->func_node; + assert(func != NULL); + *pi = (func->code_ptr + 1)->lasti; + /* assert((*pi)->opcode == Op_K_return); */ + } + + return FALSE; +} + +/* do_return --- return command */ + +int +do_return(CMDARG *arg, int cmd) +{ + NODE *func; + + CHECK_PROG_RUNNING(); + func = find_frame(cur_frame)->func_node; + if (func == NULL) { + fprintf(out_fp, _("'return' not meaningful in the outermost frame main()\n")); + return FALSE; + } + + stop.fcall_count = fcall_count - cur_frame - 1; + assert(stop.fcall_count >= 0); + stop.pc = (func->code_ptr + 1)->lasti; + assert(stop.pc->opcode == Op_K_return); + stop.command = cmd; + + stop.check_func = check_return; + + if (arg != NULL && arg->type == D_node) { /* optional return value */ + NODE *n; + n = dupnode(arg->a_node); + PUSH(n); + } else + PUSH(Nnull_string); + + return TRUE; +} + +/* check_until --- process until, returns TRUE if stopping */ + +int +check_until(INSTRUCTION **pi) +{ + if (fcall_count < stop.fcall_count) { /* current stack frame returned */ + stop.print_frame = TRUE; + return TRUE; + } else if (fcall_count == stop.fcall_count) { + if (stop.pc && *pi == stop.pc) /* until location */ + return TRUE; + if (stop.sourceline > 0 /* until */ + && source == stop.source + && sourceline > stop.sourceline) + return TRUE; + } + return FALSE; +} + +/* do_until --- until command */ + +int +do_until(CMDARG *arg, int cmd) +{ + SRCFILE *s = cur_srcfile; + char *src = cur_srcfile->src; + int lineno; + INSTRUCTION *rp, *ip; + NODE *func; + + CHECK_PROG_RUNNING(); + stop.pc = NULL; + stop.sourceline = 0; + + if (arg == NULL) { /* until without argument */ + + /* GDB doc.: continue running until a source line past the current line, + * in the current stack frame, is reached. Is used to avoid single + * stepping through a loop more than once. ... + * This means that when you reach the end of a loop after single + * stepping though it, until makes your program continue execution + * until it exits the loop. In contrast, a next command at the end + * of a loop simply steps back to the beginning of the loop, which + * forces you to step through the next iteration. + */ + + stop.source = source; + stop.sourceline = sourceline; + stop.fcall_count = fcall_count - cur_frame; + stop.check_func = check_until; + stop.command = cmd; + return TRUE; + } + + /* GDB: until location - continue running program until + * either the specified location is reached, or the + * current stack frame returns. + */ + + switch (arg->type) { + case D_string: /* until filename : lineno|function */ + s = source_find(arg->a_string); + arg = arg->next; + if (s == NULL || arg == NULL + || (arg->type != D_int && arg->type != D_func)) + return FALSE; + src = s->src; + if (arg->type == D_func) + goto func; + /* else + fall through */ + case D_int: /* until lineno */ + lineno = arg->a_int; + if (lineno <= 0 || lineno > s->srclines) { + d_error(_("line number %d in file `%s' out of range"), + lineno, src); + return FALSE; + } + break; + + case D_func: /* until function */ +func: + func = arg->a_node; + rp = func->code_ptr; + for (ip = rp->nexti; ip; ip = ip->nexti) { + if (ip->opcode != Op_breakpoint && ip->source_line > 0) { + stop.pc = ip; + stop.fcall_count = fcall_count - cur_frame; + stop.check_func = check_until; + stop.command = cmd; + return TRUE; + } + } + fprintf(out_fp, _("Can't find specified location in function `%s'\n"), + func->lnode->param); + /* fall through */ + default: + return FALSE; + } + + if ((rp = find_rule(src, lineno)) == NULL) { + d_error(_("invalid source line %d in file `%s'"), lineno, src); + return FALSE; + } + + for (ip = rp->nexti; ip; ip = ip->nexti) { + if (ip->opcode != Op_breakpoint && ip->source_line >= lineno) { + stop.pc = ip; + stop.fcall_count = fcall_count - cur_frame; + stop.check_func = check_until; + stop.command = cmd; + return TRUE; + } + if (ip == (rp + 1)->lasti) + break; + } + fprintf(out_fp, _("Can't find specified location %d in file `%s'\n"), + lineno, src); + return FALSE; +} + +/* print_watch_item --- print watched item name, old and current values */ + +static void +print_watch_item(struct list_item *w) +{ + NODE *symbol, *sub; + int i; + + symbol = w->symbol; + if (IS_SUBSCRIPT(w)) { + fprintf(out_fp, "%s", w->sname); + for (i = 0; i < w->num_subs; i++) { + sub = w->subs[i]; + fprintf(out_fp, "[\"%s\"]", sub->stptr); + } + fprintf(out_fp, "\n"); + } else if (IS_FIELD(w)) + fprintf(out_fp, "$%ld\n", (long) symbol->numbr); + else + fprintf(out_fp, "%s\n", w->sname); + + +#define print_value(X, S, V) \ +if (X) \ + fprintf(out_fp, "array, %ld elements\n", w->S); \ +else if (! w->V) \ + fprintf(out_fp, IS_SUBSCRIPT(w) ? \ + _("element not in array\n") : _("untyped variable\n")); \ +else \ + valinfo(w->V, fprintf, out_fp); + + fprintf(out_fp, " Old value: "); + print_value((w->flags & OLD_IS_ARRAY), old_size, old_value); + fprintf(out_fp, " New value: "); + print_value((w->flags & CUR_IS_ARRAY), cur_size, cur_value); + +#undef print_value +} + +/* next_command --- (optionally) print stoppage location and reason; + * also fetch next debug command from the user. + */ + +static void +next_command() +{ + static int last_rule = 0; + struct list_item *d = NULL, *w = NULL; + BREAKPOINT *b = NULL; + SRCFILE *s; + + if (source == NULL) { + stop.command = D_illegal; + stop.check_func = NULL; + return; + } + + if (stop.break_point) { + b = find_breakpoint(stop.break_point); + assert(b != NULL); + if (b->silent) + goto no_output; + } else if (stop.watch_point) { + w = find_item(&watch_list, stop.watch_point); + if (w->silent) + goto no_output; + } + + if (cur_rule != last_rule) { + fprintf(out_fp, _("Stopping in %s ...\n"), ruletab[cur_rule]); + last_rule = cur_rule; + } + + if (b != NULL) + fprintf(out_fp, "Breakpoint %d, ", b->number); + else if (w != NULL) { + fprintf(out_fp, "Watchpoint %d: ", w->number); + print_watch_item(w); + } + + /* frame info */ + if (stop.print_frame) { + print_frame(frame_ptr->func_node, source, sourceline); + fprintf(out_fp, "\n"); + stop.print_frame = FALSE; + } + + (void) print_lines(source, sourceline, 1); + + /* automatic display of variables */ + for (d = display_list.prev; d != &display_list; d = d->prev) + display(d); + +no_output: + /* update last_printed_line, so that output of 'list' is + * centered around current sourceline + */ + + last_printed_line = sourceline - list_size / 2; + if (last_printed_line < 0) + last_printed_line = 0; + + /* update current source file */ + s = source_find(source); + if (cur_srcfile != s) { + if (cur_srcfile->fd != INVALID_HANDLE) { + close(cur_srcfile->fd); + cur_srcfile->fd = INVALID_HANDLE; + } + cur_srcfile = s; + } + + stop.command = D_illegal; + stop.check_func = NULL; + + if (b != NULL) { + int ret; + ret = execute_commands(&b->commands); + if ((b->flags & BP_TEMP) != 0) + delete_breakpoint(b); + if (ret) /* resume execution */ + return; + } else if (w != NULL && execute_commands(&w->commands)) + return; + + read_command(); /* zzparse */ +} + +/* post_execute --- post_hook in the interpreter */ + +void +post_execute(INSTRUCTION *pc) +{ + if (! in_main_context()) + return; + + switch (pc->opcode) { + case Op_K_next: + case Op_K_nextfile: + case Op_K_exit: + if (stop.command == D_finish) { + /* cancel finish command */ + stop.print_ret = FALSE; + stop.print_frame = FALSE; + stop.command = D_illegal; + stop.check_func = NULL; + fprintf(out_fp, _("'finish' not meaningful with non-local jump '%s'\n"), + op2str(pc->opcode)); + } else if (stop.command == D_until) { + /* cancel until command */ + stop.print_frame = FALSE; + stop.command = D_illegal; + stop.check_func = NULL; + fprintf(out_fp, _("'until' not meaningful with non-local jump '%s'\n"), + op2str(pc->opcode)); + } + break; + + case Op_K_return: + if (stop.command == D_finish + && fcall_count == stop.fcall_count + && stop.print_ret + ) { + NODE *r; + /* print the returned value before it disappears. */ + r = TOP(); + fprintf(out_fp, "Returned value = "); + valinfo(r, fprintf, out_fp); + stop.print_ret = FALSE; + } + break; + + case Op_newfile: + case Op_get_record: + return; + + default: + break; + } +} + +/* pre_execute --- pre_hook, called by the interpreter before execution; + * checks if execution needs to be suspended and control + * transferred to the debugger. + */ + +int +pre_execute(INSTRUCTION **pi) +{ + static int cant_stop = FALSE; + NODE *m; + + if (! in_main_context()) + return pre_execute_code(pi); + + cur_pc = *pi; + stop.break_point = 0; + stop.watch_point = 0; + cur_frame = 0; + + if (do_trace + && cur_pc->opcode != Op_breakpoint + && stop.command != D_return + ) + print_instruction(cur_pc, fprintf, out_fp, FALSE); + +/* N.B.: For Op_field_spec_lhs must execute instructions upto Op_field_assign + * as a group before stopping. Otherwise, watch/print of field variables + * yield surprising results. Ditto for Op_push_lhs for special variables + * (upto Op_var_assign, the set_FOO routine). + */ + + switch (cur_pc->opcode) { + case Op_field_spec_lhs: + cant_stop = TRUE; + break; + + case Op_field_assign: + cant_stop = FALSE; + return TRUE; /* may stop at next instruction */ + + case Op_push_lhs: + m = cur_pc->memory; + if (m->type == Node_var && m->var_assign) + cant_stop = TRUE; + break; + + case Op_arrayfor_incr: /* can have special var as array variable !!! */ + m = cur_pc->array_var; + if (m->type == Node_var && m->var_assign) + cant_stop = TRUE; + break; + + case Op_var_assign: + cant_stop = FALSE; + return TRUE; /* may stop at next instruction */ + + case Op_rule: + cur_rule = cur_pc->in_rule; + return TRUE; + + case Op_func: + case Op_ext_func: + case Op_var_update: + return TRUE; + + case Op_breakpoint: + break; /* processed later in check_breakpoint() */ + + default: + if (cur_pc->source_line <= 0) + return TRUE; + break; + } + + if (cant_stop) + return TRUE; + + assert(sourceline > 0); + + if (check_breakpoint(pi) + || check_watchpoint() + || (stop.check_func && stop.check_func(pi))) { + next_command(); /* return to debugger interface */ + if (stop.command == D_return) + *pi = stop.pc; /* jump to this instruction */ + } + + /* if cur_pc == *pi, interpreter executes cur_pc; + * Otherwise, jumps to instruction *pi. + */ + return (cur_pc == *pi); +} + +/* print_memory --- print a scalar value */ + +static void +print_memory(NODE *m, char **fparms, Func_print print_func, FILE *fp) +{ + switch (m->type) { + case Node_val: + if (m == Nnull_string) + print_func(fp, "Nnull_string"); + else if ((m->flags & NUMBER) != 0) + print_func(fp, "%g", m->numbr); + else if ((m->flags & STRING) != 0) + pp_string_fp(print_func, fp, m->stptr, m->stlen, '"', FALSE); + else if ((m->flags & NUMCUR) != 0) + print_func(fp, "%g", m->numbr); + else if ((m->flags & STRCUR) != 0) + pp_string_fp(print_func, fp, m->stptr, m->stlen, '"', FALSE); + else + print_func(fp, "-?-"); + print_func(fp, " [%s]", flags2str(m->flags)); + break; + + case Node_regex: + pp_string_fp(print_func, fp, m->re_exp->stptr, m->re_exp->stlen, '/', FALSE); + break; + + case Node_dynregex: + break; + + case Node_param_list: + assert(fparms != NULL); + print_func(fp, "%s", fparms[m->param_cnt]); + break; + + case Node_var: + case Node_var_new: + case Node_var_array: + print_func(fp, "%s", m->vname); + break; + + default: + print_func(fp, "?"); /* can't happen */ + } +} + +/* print_instruction --- print a bytecode */ + +static void +print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump) +{ + static char **fparms = NULL; + int pcount = 0; + NODE *func = NULL; + static int noffset = 0; + + if (noffset == 0) { + static char buf[50]; + /* offset for 2nd to last lines in a multi-line output */ + noffset = sprintf(buf, "[ :%p] %-20.20s: ", pc, opcode2str(pc->opcode)); + } + + if (pc->opcode == Op_func) { + func = pc->func_body; + fparms = get_params(func); + pcount = get_param_count(func); + if (in_dump) { + int j; + print_func(fp, "\n\t# Function: %s (", func->lnode->param); + for (j = 0; j < pcount; j++) { + print_func(fp, "%s", fparms[j]); + if (j < pcount - 1) + print_func(fp, ", "); + } + print_func(fp, ")\n\n"); + } + } else if (pc->opcode == Op_ext_func) { + func = pc->func_body; + fparms = get_params(func); + pcount = get_param_count(func); + if (in_dump) + print_func(fp, "\n\t# Extension function: %s (... %d params ...)\n\n", + func->lnode->param, pcount); + } else if (pc->opcode == Op_rule) { + if (in_dump) + print_func(fp, "\n\t# %s\n\n", ruletab[pc->in_rule]); + } + + if (pc->opcode == Op_newfile) + print_func(fp, "\n"); + + if (pc->source_line <= 0) + print_func(fp, "[ :%p] %-20.20s: ", pc, opcode2str(pc->opcode)); + else + print_func(fp, "[%6d:%p] %-20.20s: ", + pc->source_line, pc, opcode2str(pc->opcode)); + + if (prog_running && ! in_dump) { + /* find params in the current frame */ + func = find_frame(0)->func_node; + if (func != NULL) + fparms = get_params(func); + /* else + fparms = NULL; */ + } + + + switch (pc->opcode) { + case Op_var_update: + print_func(fp, "[update_%s()]\n", get_spec_varname(pc->update_var)); + break; + + case Op_var_assign: + print_func(fp, "[set_%s()]", get_spec_varname(pc->assign_var)); + if (pc->assign_ctxt != 0) + print_func(fp, " [assign_ctxt = %s]", opcode2str(pc->assign_ctxt)); + print_func(fp, "\n"); + break; + + case Op_field_assign: + print_func(fp, "[%s]\n", pc->field_assign == reset_record ? + "reset_record()" : "invalidate_field0()"); + break; + + case Op_field_spec_lhs: + print_func(fp, "[target_assign = %p] [do_reference = %s]\n", + pc->target_assign, pc->do_reference ? "TRUE" : "FALSE"); + break; + + case Op_ext_func: + print_func(fp, "[param_cnt = %d]\n", pcount); + break; + + case Op_func: + print_func(fp, "[param_cnt = %d] [source_file = %s]\n", pcount, + pc->source_file ? pc->source_file : "cmd. line"); + break; + + case Op_K_getline_redir: + print_func(fp, "[into_var = %s] [redir_type = \"%s\"]\n", + pc->into_var ? "TRUE" : "FALSE", + redir2str(pc->redir_type)); + break; + + case Op_K_getline: + print_func(fp, "[into_var = %s]\n", pc->into_var ? "TRUE" : "FALSE"); + print_func(fp, "%*s[target_beginfile = %p] [target_endfile = %p]\n", + noffset, "", + (pc + 1)->target_beginfile, (pc + 1)->target_endfile); + break; + + case Op_K_print_rec: + print_func(fp, "[redir_type = \"%s\"]\n", redir2str(pc->redir_type)); + break; + + case Op_K_print: + case Op_K_printf: + print_func(fp, "[expr_count = %ld] [redir_type = \"%s\"]\n", + pc->expr_count, redir2str(pc->redir_type)); + break; + + case Op_indirect_func_call: + case Op_func_call: + print_func(fp, "[func_name = %s] [arg_count = %ld]\n", + pc->func_name, (pc + 1)->expr_count); + break; + + case Op_K_nextfile: + print_func(fp, "[target_newfile = %p] [target_endfile = %p]\n", + pc->target_newfile, pc->target_endfile); + break; + + case Op_newfile: + print_func(fp, "[target_jmp = %p] [target_endfile = %p]\n", + pc->target_jmp, pc->target_endfile); + print_func(fp, "%*s[target_get_record = %p]\n", + noffset, "", (pc + 1)->target_get_record); + break; + + case Op_get_record: + print_func(fp, "[target_newfile = %p]\n", pc->target_newfile); + break; + + case Op_jmp: + case Op_jmp_false: + case Op_jmp_true: + case Op_and: + case Op_or: + case Op_K_next: + case Op_arrayfor_init: + case Op_K_break: + case Op_K_continue: + print_func(fp, "[target_jmp = %p]\n", pc->target_jmp); + break; + case Op_K_exit: + print_func(fp, "[target_end = %p] [target_atexit = %p]\n", + pc->target_end, pc->target_atexit); + break; + + case Op_K_case: + print_func(fp, "[target_jmp = %p] [match_exp = %s]\n", + pc->target_jmp, (pc + 1)->match_exp ? "TRUE" : "FALSE"); + break; + + case Op_arrayfor_incr: + print_func(fp, "[array_var = %s] [target_jmp = %p]\n", + pc->array_var->type == Node_param_list ? + fparms[pc->array_var->param_cnt] : pc->array_var->vname, + pc->target_jmp); + break; + + case Op_line_range: + print_func(fp, "[triggered = %ld] [target_jmp = %p]\n", + pc->triggered, pc->target_jmp); + break; + + case Op_cond_pair: + print_func(fp, "[line_range = %p] [target_jmp = %p]\n", + pc->line_range, pc->target_jmp); + break; + + case Op_sub_builtin: + { + const char *fname = "sub"; + static const struct flagtab values[] = { + { GSUB, "GSUB" }, + { GENSUB, "GENSUB" }, + { LITERAL, "LITERAL" }, + { 0, NULL } + }; + + if (pc->sub_flags & GSUB) + fname = "gsub"; + else if (pc->sub_flags & GENSUB) + fname = "gensub"; + print_func(fp, "%s [arg_count = %ld] [sub_flags = %s]\n", + fname, pc->expr_count, + genflags2str(pc->sub_flags, values)); + } + break; + + case Op_builtin: + { + const char *fname = getfname(pc->builtin); + if (fname == NULL) + print_func(fp, "(extension func) [arg_count = %ld]\n", pc->expr_count); + else + print_func(fp, "%s [arg_count = %ld]\n", fname, pc->expr_count); + } + break; + + case Op_subscript: + case Op_sub_array: + print_func(fp, "[sub_count = %ld]\n", pc->sub_count); + break; + + case Op_store_sub: + print_memory(pc->memory, fparms, print_func, fp); + print_func(fp, " [sub_count = %ld]\n", pc->expr_count); + break; + + case Op_subscript_lhs: + print_func(fp, "[sub_count = %ld] [do_reference = %s]\n", + pc->sub_count, + pc->do_reference ? "TRUE" : "FALSE"); + break; + + case Op_K_delete: + case Op_in_array: + print_func(fp, "[expr_count = %ld]\n", pc->expr_count); + break; + + case Op_concat: + /* NB: concat_flag CSVAR only used in grammar, don't display it */ + print_func(fp, "[expr_count = %ld] [concat_flag = %s]\n", + pc->expr_count, + (pc->concat_flag & CSUBSEP) ? "CSUBSEP" : "0"); + break; + + case Op_rule: + print_func(fp, "[in_rule = %s] [source_file = %s]\n", + ruletab[pc->in_rule], + pc->source_file ? pc->source_file : "cmd. line"); + break; + + case Op_lint: + { + static const char *const linttypetab[] = { + "LINT_illegal", + "LINT_assign_in_cond", + "LINT_no_effect" + }; + print_func(fp, "[lint_type = %s]\n", linttypetab[pc->lint_type]); + } + break; + + case Op_exec_count: + print_func(fp, "[exec_count = %ld]\n", pc->exec_count); + break; + + case Op_store_var: + case Op_push_lhs: + print_memory(pc->memory, fparms, print_func, fp); + print_func(fp, " [do_reference = %s]\n", + pc->do_reference ? "TRUE" : "FALSE"); + break; + + case Op_push_i: + case Op_push: + case Op_push_arg: + case Op_push_param: + case Op_push_array: + case Op_push_re: + case Op_match_rec: + case Op_match: + case Op_nomatch: + case Op_plus_i: + case Op_minus_i: + case Op_times_i: + case Op_exp_i: + case Op_quotient_i: + case Op_mod_i: + case Op_assign_concat: + print_memory(pc->memory, fparms, print_func, fp); + /* fall through */ + default: + print_func(fp, "\n"); + break; + } +} + +/* do_trace_instruction --- trace command */ + +int +do_trace_instruction(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + if (arg != NULL && arg->type == D_argument + && arg->a_argument == A_TRACE_ON) + do_trace = TRUE; + else + do_trace = FALSE; + return FALSE; +} + +/* print_code --- print a list of instructions */ + +static int +print_code(INSTRUCTION *pc, void *x) +{ + struct pf_data *data = (struct pf_data *) x; + for (; pc != NULL; pc = pc->nexti) + print_instruction(pc, data->print_func, data->fp, data->defn /* in_dump */); + return 0; +} + +/* do_dump_instructions --- dump command */ + +int +do_dump_instructions(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + FILE *fp; + + if (arg != NULL && arg->type == D_string) { + /* dump to a file */ + if ((fp = fopen(arg->a_string, "w")) == NULL) { + d_error(_("could not open `%s' for writing (%s)"), + arg->a_string, strerror(errno)); + return FALSE; + } + pf_data.print_func = fprintf; + pf_data.fp = fp; + pf_data.defn = TRUE; /* in_dump = TRUE */ + (void) print_code(code_block, &pf_data); + (void) foreach_func((int (*)(INSTRUCTION *, void *)) print_code, + FALSE, /* sort */ + &pf_data /* data */ + ); + fclose(fp); + return FALSE; + } + + initialize_pager(out_fp); + if (setjmp(pager_quit_tag) == 0) { + pf_data.print_func = gprintf; + pf_data.fp = out_fp; + pf_data.defn = TRUE; /* in_dump = TRUE */ + (void) print_code(code_block, &pf_data); + (void) foreach_func((int (*)(INSTRUCTION *, void *)) print_code, + FALSE, /* sort */ + &pf_data /* data */ + ); + } + return FALSE; +} + +/* do_save --- save command */ + +int +do_save(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ +#ifdef HAVE_LIBREADLINE + FILE *fp; + HIST_ENTRY **hist_list; + int i; + + if ((fp = fopen(arg->a_string, "w")) == NULL) { + d_error(_("could not open `%s' for writing (%s)"), + arg->a_string, strerror(errno)); + return FALSE; + } + + hist_list = history_list(); + if (hist_list && history_length > sess_history_base) { + for (i = sess_history_base; hist_list[i] != NULL; i++) { + char *line; + line = hist_list[i]->line; + + /* exclude save commands; + * N.B.: this test may fail if there is another + * command with the same first 2 letters. + */ + + if (strlen(line) > 1 + && strncmp(line, "sa", 2) == 0) + continue; + + fprintf(fp, "%s\n", line); + } + } + fclose(fp); +#endif + return FALSE; +} + +/* do_option --- option command */ + +int +do_option(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + const struct dbg_option *opt; + char *name, *value; + + if (arg == NULL) { /* display all available options and corresponding values */ + for (opt = option_list; opt->name; opt++) { + if (opt->str_val != NULL) + fprintf(out_fp, "%s = \"%s\"\n", opt->name, *(opt->str_val)); + else + fprintf(out_fp, "%s = %d\n", opt->name, *(opt->num_val)); + } + return FALSE; + } + + name = arg->a_string; + arg = arg->next; + value = arg ? arg->a_string : NULL; + + for (opt = option_list; opt->name; opt++) { /* linear search */ + if (strcmp(name, opt->name) == 0) + break; + } + if (! opt->name) + return FALSE; + + if (value == NULL) { /* display current setting */ + if (opt->str_val != NULL) + fprintf(out_fp, "%s = \"%s\"\n", opt->name, *(opt->str_val)); + else + fprintf(out_fp, "%s = %d\n", opt->name, *(opt->num_val)); + } else + (*(opt->assign))(value); + return FALSE; +} + + +#ifdef HAVE_LIBREADLINE + +/* initialize_pager --- initialize our idea of the terminal size */ + +void +initialize_pager(FILE *fp) +{ + if (! os_isatty(fileno(fp)) || ! input_from_tty || input_fd != 0) { + screen_width = INT_MAX; + screen_height = INT_MAX; + } else { + /* get the terminal size from readline. */ + + rl_reset_terminal(NULL); /* N.B.: NULL argument means + * "use TERM env variable for terminal name". + */ + rl_get_screen_size(&screen_height, &screen_width); + if (screen_height <= 1) + screen_height = INT_MAX; + if (screen_width <= 1) + screen_width = INT_MAX; + } + pager_lines_printed = 0; +} +#endif + +static void +prompt_continue(FILE *fp) +{ + int quit_pager = FALSE; + + if (os_isatty(fileno(fp)) && input_fd == 0) + quit_pager = prompt_yes_no( + _("\t------[Enter] to continue or q [Enter] to quit------"), + _("q")[0], FALSE, fp); + if (quit_pager) + longjmp(pager_quit_tag, 1); + pager_lines_printed = 0; +} + +/* gprintf --- like fprintf but allows paging */ + +int +gprintf(FILE *fp, const char *format, ...) +{ + va_list args; + static char *buf = NULL; + static size_t buflen = 0; + static int bl = 0; + char *p, *q; + int nchar; + +#define GPRINTF_BUFSIZ 512 + if (buf == NULL) { + buflen = GPRINTF_BUFSIZ; + emalloc(buf, char *, (buflen + 2) * sizeof(char), "gprintf"); + } else if (buflen - bl < GPRINTF_BUFSIZ/2) { + buflen += GPRINTF_BUFSIZ; + erealloc(buf, char *, (buflen + 2) * sizeof(char), "gprintf"); + } +#undef GPRINTF_BUFSIZ + + while (TRUE) { + va_start(args, format); + nchar = vsnprintf(buf + bl, buflen - bl, format, args); + va_end(args); + if (nchar == 0) + return 0; + if (nchar > 0 && nchar < buflen - bl) { + bl += nchar; + if (buf[bl-1] != '\n') /* buffer output until see a newline at end */ + return nchar; + break; + } + + /* enlarge buffer, and try again */ + buflen *= 2; + erealloc(buf, char *, (buflen + 2) * sizeof(char), "gprintf"); + } + + bl = 0; + for (p = buf; (q = strchr(p, '\n')) != NULL; p = q + 1) { + int sz = (int) (q - p); + + while (sz > 0) { + int cnt; + cnt = sz > screen_width ? screen_width : sz; + + /* do not print partial line before scrolling */ + if (cnt < sz && (pager_lines_printed == (screen_height - 2))) + prompt_continue(fp); + + if (fwrite(p, sizeof(char), cnt, fp) != cnt) + return -1; + if (cnt == sz) + break; + else { + if (++pager_lines_printed == (screen_height - 1)) + prompt_continue(fp); + sz -= screen_width; + assert(sz > 0); + p += cnt; + } + } + + fprintf(fp, "\n"); + if (++pager_lines_printed == (screen_height - 1)) + prompt_continue(fp); + p++; + } + return nchar; +} + + +static int +serialize_subscript(char *buf, int buflen, struct list_item *item) +{ + int bl = 0, nchar, i; + NODE *sub; + + nchar = snprintf(buf, buflen, "%d%c%d%c%s%c%d%c", + item->number, FSEP, D_subscript, FSEP, item->sname, FSEP, + item->num_subs, FSEP); + if (nchar <= 0) + return 0; + else if (nchar >= buflen) /* need larger buffer */ + return nchar; + bl += nchar; + for (i = 0; i < item->num_subs; i++) { + sub = item->subs[i]; + nchar = snprintf(buf + bl, buflen - bl, "%lu%c%s%c", + (unsigned long) sub->stlen, FSEP, sub->stptr, FSEP); + if (nchar <= 0) + return 0; + bl += nchar; + if (bl >= buflen) /* need larger buffer */ + return bl; + } + return bl; +} + + + +/* serialize --- convert a list structure to a byte stream and + * save in environment. + */ + +static void +serialize(int type) +{ +#ifndef HAVE_LIBREADLINE +#define HIST_ENTRY void +#define history_list() NULL +#endif + + static char *buf = NULL; + static int buflen = 0; + int bl; + BREAKPOINT *b = NULL; + struct list_item *wd = NULL; + HIST_ENTRY **hist_list = NULL; + int hist_index = 0; + struct dbg_option *opt = NULL; + struct commands_item *commands = NULL, *c; + int cnum = 0; + struct condition *cndn = NULL; + void *ptr, *end_ptr; +#ifdef HAVE_LIBREADLINE + HIST_ENTRY *h = NULL; +#endif + + switch (type) { + case BREAK: + end_ptr = (void *) &breakpoints; + ptr = (void *) breakpoints.prev; + break; + case WATCH: + end_ptr = (void *) &watch_list; + ptr = (void *) watch_list.prev; + break; + case DISPLAY: + end_ptr = (void *) &display_list; + ptr = (void *) display_list.prev; + break; + case HISTORY: + hist_list = history_list(); + if (hist_list == NULL) /* empty history list */ + return; + end_ptr = NULL; + ptr = (void *) hist_list[0]; + break; + case OPTION: + { + int n; + n = sizeof(option_list)/sizeof(option_list[0]); + end_ptr = (void *) &option_list[n - 1]; + ptr = (void *) option_list; + } + break; + + default: + return; + } + + if (type != HISTORY && ptr == end_ptr) /* empty list */ + return; + +#define SERIALIZE_BUFSIZ 512 + + if (buf == NULL) { /* first time */ + buflen = SERIALIZE_BUFSIZ; + emalloc(buf, char *, buflen + 2, "serialize"); + } + bl = 0; + + while (ptr != end_ptr) { + int nchar = 0; + if (buflen - bl < SERIALIZE_BUFSIZ/2) { +enlarge_buffer: + buflen *= 2; + erealloc(buf, char *, buflen + 2, "serialize"); + } + +#undef SERIALIZE_BUFSIZ + + /* field seperator is FSEP ('\037'), and the record separator is RSEP ('\036') */ + + switch (type) { + case BREAK: + b = (BREAKPOINT *) ptr; + + /* src source_line flags ignore_count hit_count number; + * commands and condition processed later in the end switch + */ + + nchar = snprintf(buf + bl, buflen - bl, + "%s%c%d%c%d%c%d%c%d%c%d%c", + b->src, FSEP, b->bpi->source_line, FSEP, b->flags, FSEP, + (int) b->ignore_count, FSEP, + (int) b->hit_count, FSEP, b->number, FSEP); + cnum = b->number; + commands = &b->commands; + cndn = &b->cndn; + break; + case DISPLAY: + case WATCH: + wd = (struct list_item *) ptr; + + /* subscript -- number type sname num_subs subs(stlen + stptr) [commands [condition]] + * variable -- number type sname [commands [condition]] + * field -- number type symbol(numbr) [commands [condition]] + */ + + if (IS_PARAM(wd)) /* exclude parameters */ + nchar = 0; + else if (IS_SUBSCRIPT(wd)) + nchar = serialize_subscript(buf + bl, buflen - bl, wd); + else if (IS_FIELD(wd)) + nchar = snprintf(buf + bl, buflen - bl, "%d%c%d%c%d%c", + wd->number, FSEP, D_field, FSEP, (int) wd->symbol->numbr, FSEP); + else + nchar = snprintf(buf + bl, buflen - bl, "%d%c%d%c%s%c", + wd->number, FSEP, D_variable, FSEP, wd->sname, FSEP); + cnum = wd->number; + commands = &wd->commands; + cndn = &wd->cndn; + break; + case HISTORY: +#ifdef HAVE_LIBREADLINE + h = (HIST_ENTRY *) ptr; + nchar = strlen(h->line); + if (nchar >= buflen - bl) + goto enlarge_buffer; + strcpy(buf + bl, h->line); +#endif + break; + case OPTION: + opt = (struct dbg_option *) ptr; + if (opt->num_val != NULL) + nchar = snprintf(buf + bl, buflen - bl, + "%s%c%d%c", opt->name, FSEP, *(opt->num_val), FSEP); + else + nchar = snprintf(buf + bl, buflen - bl, + "%s%c%s%c", opt->name, FSEP, *(opt->str_val), FSEP); + break; + default: + break; + } + + if (nchar == 0) /* skip empty history lines etc.*/ + ; + else if (nchar > 0 && nchar < buflen - bl) { + bl += nchar; + buf[bl] = RSEP; /* record */ + buf[++bl] = '\0'; + } else + goto enlarge_buffer; + + switch (type) { + case BREAK: + case WATCH: + /* recreate the `commands' command strings including the `commands' + * and `end' commands; command seperator is '\034'. + * re-parsed in unserialize to recover the commands list. + * Alternatively, one could encode(serialize) each command and it's arguments. + */ + + bl--; /* undo RSEP from above */ + + /* compute required room in buffer */ + nchar = 0; + for (c = commands->next; c != commands; c = c->next) { + nchar += (strlen(c->cmd_string) + 1); + if (c->cmd == D_eval) { + CMDARG *a = c->arg; + nchar += (strlen(a->a_string) + 1); /* awk statements */ + nchar += (strlen("end") + 1); + } + } + + if (nchar > 0) { /* non-empty commands list */ + nchar += (strlen("commands ") + 20 + strlen("end") + 2); /* 20 for cnum (an int) */ + if (nchar > buflen - bl) { + buflen = bl + nchar; + erealloc(buf, char *, buflen + 3, "serialize"); + } + nchar = sprintf(buf + bl, "commands %d", cnum); + bl += nchar; + buf[bl++] = CSEP; + for (c = commands->next; c != commands; c = c->next) { + nchar = strlen(c->cmd_string); + memcpy(buf + bl, c->cmd_string, nchar); + bl += nchar; + buf[bl++] = CSEP; + + if (c->cmd == D_eval) { + CMDARG *a = c->arg; + nchar = strlen(a->a_string); /* statements */ + memcpy(buf + bl, a->a_string, nchar); + bl += nchar; + buf[bl++] = CSEP; + nchar = strlen("end"); /* end of 'eval' */ + memcpy(buf + bl, "end", nchar); + bl += nchar; + buf[bl++] = CSEP; + } + } + nchar = strlen("end"); /* end of 'commands' */ + memcpy(buf + bl, "end", nchar); + bl += nchar; + } + buf[bl++] = FSEP; /* field */ + buf[bl++] = RSEP; /* record */ + buf[bl] = '\0'; + + /* condition expression */ + if (cndn->expr) { + bl--; /* undo RSEP from above */ + nchar = strlen(cndn->expr); + if (nchar > buflen - bl) { + buflen = bl + nchar; + erealloc(buf, char *, buflen + 3, "serialize"); + } + memcpy(buf + bl, cndn->expr, nchar); + bl += nchar; + buf[bl++] = FSEP; /* field */ + buf[bl++] = RSEP; /* record */ + buf[bl] = '\0'; + } + + ptr = (type == BREAK) ? (void *) b->prev : (void *) wd->prev; + break; + case DISPLAY: + ptr = (void *) wd->prev; + break; + case HISTORY: + ptr = (void *) hist_list[++hist_index]; + break; + case OPTION: + ptr = (void *) (++opt); + break; + default: + break; + } + } + + if (bl > 0) /* non-empty list */ + setenv(env_variable[type], buf, 1); +} + + +static void +unserialize_commands(char *str, int str_len) +{ + if (str_len <= 0 || str == NULL) + return; + commands_string = str; + commands_string_len = str_len; + push_cmd_src(INVALID_HANDLE, FALSE, read_commands_string, 0, 0, EXIT_FATAL); + line_sep = CSEP; + read_command(); /* forced to return in do_commands */ + pop_cmd_src(); +} + + +/* unserialize_list_item --- create a list_item structure from unserialized data */ + +static struct list_item * +unserialize_list_item(struct list_item *list, char **pstr, int *pstr_len, int field_cnt) +{ + int num, type, i; + struct list_item *l; + NODE *symbol = NULL; + int sub_cnt = 0, cnt; + NODE **subs = NULL; + + /* subscript -- number type sname num_subs subs [commands [condition]] + * variable -- number type sname [commands [condition]] + * field -- number type symbol(numbr) commands [commands [condition]] + */ + + num = strtol(pstr[0], NULL, 0); + type = strtol(pstr[1], NULL, 0); + + if (type == D_field) { + int field_num; + field_num = strtol(pstr[2], NULL, 0); + symbol = make_number((AWKNUM) field_num); + cnt = 3; + } else { + char *name; + name = estrdup(pstr[2], pstr_len[2]); + symbol = find_symbol(name, NULL); + efree(name); + if (symbol == NULL) + return NULL; + cnt = 3; + if (type == D_subscript) { + int sub_len; + sub_cnt = strtol(pstr[3], NULL, 0); + emalloc(subs, NODE **, sub_cnt * sizeof(NODE *), "unserialize_list_item"); + cnt++; + for (i = 0; i < sub_cnt; i++) { + sub_len = strtol(pstr[cnt], NULL, 0); + subs[i] = make_string(pstr[cnt + 1], sub_len); + cnt += 2; + } + } + } + + l = add_item(list, type, symbol, NULL); + if (type == D_subscript) { + l->num_subs = sub_cnt; + l->subs = subs; + } + l->number = num; /* keep same item number across executions */ + + if (list == &watch_list) { + initialize_watch_item(l); + /* unserialize watchpoint `commands' */ + unserialize_commands(pstr[cnt], pstr_len[cnt]); + cnt++; + if (field_cnt > cnt) { + char *expr; + expr = estrdup(pstr[cnt], pstr_len[cnt]); + if (parse_condition(D_watch, l->number, expr) != 0) + efree(expr); + } + if (num > list->number) /* update list number counter */ + list->number = num; + } else + list->number = num; + + return l; +} + +/* unserialize_breakpoint --- create a breakpoint structure from unserialized data */ + +static BREAKPOINT * +unserialize_breakpoint(char **pstr, int *pstr_len, int field_cnt) +{ + char *src; + int lineno; + BREAKPOINT *b = NULL; + INSTRUCTION *rp; + SRCFILE *s; + + /* src source_line flags ignore_count hit_count number commands [condition] */ + + src = estrdup(pstr[0], pstr_len[0]); + s = source_find(src); + efree(src); + if (s == NULL) + return NULL; + src = s->src; + lineno = strtol(pstr[1], NULL, 0); + if (lineno <= 0 || lineno > s->srclines) + return NULL; + rp = find_rule(src, lineno); + if (rp == NULL + || (b = set_breakpoint_at(rp, lineno, TRUE)) == NULL + ) + return NULL; + + b->flags = strtol(pstr[2], NULL, 0); + b->ignore_count = strtol(pstr[3], NULL, 0); + b->hit_count = strtol(pstr[4], NULL, 0); + b->number = strtol(pstr[5], NULL, 0); /* same number as previous run */ + + if (field_cnt > 6) /* unserialize breakpoint `commands' */ + unserialize_commands(pstr[6], pstr_len[6]); + + if (field_cnt > 7) { /* condition expression */ + char *expr; + expr = estrdup(pstr[7], pstr_len[7]); + if (parse_condition(D_break, b->number, expr) != 0) + efree(expr); + } + + if (b->number > watch_list.number) /* watch and break has same number counter */ + watch_list.number = b->number; /* update counter */ + return b; +} + +/* unserialize_option --- set a debugger option from unserialized data. */ + +static struct dbg_option * +unserialize_option(char **pstr, int *pstr_len, int field_cnt ATTRIBUTE_UNUSED) +{ + const struct dbg_option *opt; + + for (opt = option_list; opt->name; opt++) { + if (strncmp(pstr[0], opt->name, pstr_len[0]) == 0) { + char *value; + + value = estrdup(pstr[1], pstr_len[1]); + (*(opt->assign))(value); + efree(value); + return ((struct dbg_option *) opt); + } + } + return NULL; +} + +/* unserialize -- reconstruct list from serialized data stored in + * environment variable. + */ + +static void +unserialize(int type) +{ + char *val; + char *p, *q, *r, *s; +#define MAX_FIELD 30 + static char *pstr[MAX_FIELD]; + static int pstr_len[MAX_FIELD]; + + val = getenv(env_variable[type]); + if (val == NULL) + return; + + for (p = val; (q = strchr(p, RSEP)) != NULL; p = q + 1) { + int field_cnt = 0; + if (type == HISTORY) { + *q = '\0'; + add_history(p); + *q = RSEP; + continue; + } + + r = p; + while ((s = strchr(r, FSEP)) != NULL && s < q) { + pstr[field_cnt] = r; + pstr_len[field_cnt] = (int) (s - r); + r = s + 1; + field_cnt++; + if (field_cnt == MAX_FIELD) +#ifdef GAWKDEBUG + fatal("Increase MAX_FIELD and recompile.\n"); +#else + return; +#endif + } + + switch (type) { + case BREAK: + (void) unserialize_breakpoint(pstr, pstr_len, field_cnt); + break; + case DISPLAY: + (void) unserialize_list_item(&display_list, pstr, pstr_len, field_cnt); + break; + case WATCH: + (void) unserialize_list_item(&watch_list, pstr, pstr_len, field_cnt); + break; + case OPTION: + (void) unserialize_option(pstr, pstr_len, field_cnt); + break; + case HISTORY: + /* processed at the beginning of for loop */ + break; + default: + break; + } + } + +#ifdef HAVE_LIBREADLINE + if (type == HISTORY) + sess_history_base = history_length; +#endif + + unsetenv(env_variable[type]); +#undef MAX_FIELD +} + +static int +prompt_yes_no(const char *mesg, char res_true, int res_default, FILE *fp) +{ + char *in_str; + int ret = res_default; /* default */ + + if (input_from_tty) { + fprintf(fp, "%s", _(mesg)); + in_str = read_a_line(NULL); + if (in_str == NULL) /* EOF */ + exit(EXIT_FAILURE); + ret = (*in_str == res_true); + efree(in_str); + } + return ret; +} + +/* has_break_or_watch_point --- check if given breakpoint or watchpoint + * number exists. When flag any is TRUE, + * check if any breakpoint/watchpoint + * has been set (ignores num). Returns + * type (breakpoint or watchpoint) or 0. + */ + +int +has_break_or_watch_point(int *pnum, int any) +{ + BREAKPOINT *b = NULL; + struct list_item *w = NULL; + + if (any) { + if (breakpoints.next != &breakpoints) + b = breakpoints.next; + if (watch_list.next != &watch_list) + w = watch_list.next; + + if (! b && ! w) + return 0; + if (b && ! w) { + *pnum = b->number; + return D_break; + } + if (w && ! b) { + *pnum = w->number; + return D_watch; + } + if (w->number > b->number) { + *pnum = w->number; + return D_watch; + } + *pnum = b->number; + return D_break; + } + + /* N.B: breakpoints and watchpoints get numbers from a single + * counter/sequencer watch_list.number. + */ + + for (b = breakpoints.next; b != &breakpoints; b = b->next) { + if (b->number == *pnum) + return D_break; + } + for (w = watch_list.next; w != &watch_list; w = w->next) { + if (w->number == *pnum) + return D_watch; + } + + return 0; +} + +/* delete_commands_item --- delete item(command) from `commands' list. */ + +static void +delete_commands_item(struct commands_item *c) +{ + efree(c->cmd_string); + free_cmdarg(c->arg); + c->next->prev = c->prev; + c->prev->next = c->next; + efree(c); +} + +/* do_commands --- commands command */ + +int +do_commands(CMDARG *arg, int cmd) +{ + static BREAKPOINT *b; + static struct list_item *w; + static struct commands_item *commands; + struct commands_item *c; + + if (cmd == D_commands) { + int num, type; + if (arg == NULL) + type = has_break_or_watch_point(&num, TRUE); + else { + num = arg->a_int; + type = has_break_or_watch_point(&num, FALSE); + } + b = NULL; + w = NULL; + if (type == D_break) + b = find_breakpoint(num); + else if (type == D_watch) + w = find_item(&watch_list, num); + assert((b != NULL) || (w != NULL)); + commands = (b != NULL) ? &b->commands : &w->commands; + + /* delete current commands */ + for (c = commands->next; c != commands; c = c->next) { + c = c->prev; + delete_commands_item(c->next); + } + return FALSE; + + } else if (cmd == D_end) { + commands = NULL; + if (read_a_line == read_commands_string) /* unserializig commands */ + return TRUE; /* done unserializing, terminate zzparse() */ + return FALSE; + + } else if (cmd == D_silent) { + if (b != NULL) + b->silent = TRUE; + else if (w != NULL) + w->silent = TRUE; + /* we also append silent command to the list for use + * in `info break(watch)', and to simplify + * serialization/unserialization of commands. + */ + } + + assert(commands != NULL); + + emalloc(c, struct commands_item *, sizeof(struct commands_item), "do_commands"); + c->next = NULL; + c->cmd = cmd; + + /* N.B.: first arg is the command string, see command.y */ + c->cmd_string = arg->a_string; + c->arg = arg->next; /* actual arguments to the command */ + efree(arg); + + /* append to the list */ + c->prev = commands->prev; + c->next = commands; + commands->prev = c; + c->prev->next = c; + return FALSE; +} + +/* execute_commands --- execute breakpoint/watchpoint commands, the first + * command that resumes execution terminates + * commands processing. + */ + +static int +execute_commands(struct commands_item *commands) +{ + struct commands_item *c; + Func_cmd cmd_ptr; + int ret = FALSE; + + for (c = commands->next; c != commands; c = c->next) { + if (c->cmd == D_silent) + continue; + cmd_ptr = get_command(c->cmd); /* command handler */ + ret = (*cmd_ptr)(c->arg, c->cmd); + if (ret) /* resume execution (continue, next etc.) */ + break; + } + return ret; +} + +/* do_print_f --- printf command */ + +int +do_print_f(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + int count = 0; + int i; + CMDARG *a; + NODE **tmp; + char *name; + NODE *r; + volatile jmp_buf fatal_tag_stack; + + /* count maximum required size for tmp */ + for (a = arg; a != NULL ; a = a->next) + count++; + emalloc(tmp, NODE **, count * sizeof(NODE *), "do_print_f"); + + for (i = 0, a = arg; a != NULL ; i++, a = a->next) { + switch (a->type) { + case D_variable: + name = a->a_string; + r = find_symbol(name, NULL); + if (r == NULL) + goto done; + if (r->type == Node_var_new) + tmp[i] = Nnull_string; + else if (r->type != Node_var) { + d_error(_("`%s' is not a scalar variable"), name); + goto done; + } else + tmp[i] = r->var_value; + break; + case D_field: + { + long field_num; + r = a->a_node; + field_num = (long) r->numbr; + tmp[i] = *get_field(field_num, NULL); + } + break; + case D_subscript: + { + int cnt = a->a_count; + name = a->a_string; + r = find_array(name); + if (r == NULL) + goto done; + + for (; cnt > 0; cnt--) { + NODE *value, *subs; + a = a->next; + subs = a->a_node; + value = in_array(r, subs); + if (cnt == 1) { + if (value == NULL) + tmp[i] = Nnull_string; /* FIXME: goto done ? */ + else if (value->type == Node_var_array) { + d_error(_("attempt to use array `%s[\"%s\"]' in a scalar context"), + name, subs->stptr); + goto done; + } else + tmp[i] = value; + } else { + if (value == NULL) { + d_error(_("[\"%s\"] not in array `%s'"), + subs->stptr, name); + goto done; + } else if (value->type != Node_var_array) { + d_error(_("attempt to use scalar `%s[\"%s\"]' as array"), + name, subs->stptr); + goto done; + } else { + r = value; + name = r->vname; + } + } + } + } + break; + case D_node: + tmp[i] = a->a_node; + break; + default: + break; + } + } + + force_string(tmp[0]); + + PUSH_BINDING(fatal_tag_stack, fatal_tag, fatal_tag_valid); + if (setjmp(fatal_tag) == 0) + r = format_tree(tmp[0]->stptr, tmp[0]->stlen, tmp, i); + else { + /* fatal error, restore exit_val of program */ + exit_val = EXIT_SUCCESS; + r = NULL; + } + POP_BINDING(fatal_tag_stack, fatal_tag, fatal_tag_valid); + + if (r != NULL) { + (void) fwrite(r->stptr, sizeof(char), r->stlen, out_fp); + unref(r); + } +done: + efree(tmp); + return FALSE; +} + +/* do_source --- source command */ + +int +do_source(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + int fd; + char *file = arg->a_string; + + fd = open_readfd(file); + if (fd <= INVALID_HANDLE) { + d_error(_("can't open source file `%s' for reading (%s)"), + file, strerror(errno)); + return FALSE; + } + + push_cmd_src(fd, FALSE, g_readline, close, D_source, EXIT_SUCCESS); + cmd_src->str = estrdup(file, strlen(file)); + return FALSE; +} + +/* open_readfd --- open a file for reading */ + +static int +open_readfd(const char *file) +{ + int fd; + + fd = open(file, O_RDONLY); + if (fd <= INVALID_HANDLE) + return INVALID_HANDLE; + else if (os_isdir(fd)) { + (void) close(fd); + errno = EISDIR; + return INVALID_HANDLE; + } + return fd; +} + +/* find_option --- check if option name is valid */ + +int +find_option(char *name) +{ + const char *p; + int idx; + + for (idx = 0; (p = option_list[idx].name); idx++) { + if (strcmp(p, name) == 0) + return idx; + } + return -1; +} + +/* option_help --- display help text for debugger options */ + +void +option_help() +{ + const struct dbg_option *opt; + + for (opt = option_list; opt->name; opt++) + fprintf(out_fp, "\t%-15.15s - %s\n", opt->name, _(opt->help_txt)); +} + +#ifdef HAVE_LIBREADLINE + +/* option_generator --- generator function for option name completion */ + +char * +option_generator(const char *text, int state) +{ + static size_t textlen; + static int idx; + const char *name; + + if (! state) { /* first time */ + textlen = strlen(text); + idx = 0; + } + + while ((name = option_list[idx++].name)) { + if (strncmp(name, text, textlen) == 0) + return estrdup(name, strlen(name)); + } + return NULL; +} + +#endif + +/* set_gawk_output --- redirect gawk (normal) output */ + +static void +set_gawk_output(const char *file) +{ + int fd = INVALID_HANDLE; + FILE *fp = NULL; + + if (output_fp != stdout) { + if (output_fp != stderr) { + fclose(output_fp); + efree(output_file); + } + output_fp = stdout; + output_is_tty = os_isatty(fileno(stdout)); + output_file = "/dev/stdout"; + } + + if (file == NULL || file[0] == '\0') + return; + + errno = 0; + if ((fd = os_devopen(file, O_WRONLY)) != INVALID_HANDLE) { + fp = fdopen(fd, "w"); + if (fp == NULL) + close(fd); + + } else if (strncmp(file, "/dev/", 5) == 0) { + char *cp = (char *) file + 5; + + if (strcmp(cp, "stdout") == 0) + return; + if (strcmp(cp, "stderr") == 0) { + output_fp = stderr; + output_file = "/dev/stderr"; + output_is_tty = os_isatty(fileno(stderr)); + return; + } + + if (strncmp(cp, "fd/", 3) == 0) { + cp += 3; + fd = (int) strtoul(cp, NULL, 10); + if (errno == 0 && fd > INVALID_HANDLE) { + fp = fdopen(fd, "w"); + if (fp == NULL) + fd = INVALID_HANDLE; + } else + fd = INVALID_HANDLE; + } else { + /* /dev/ttyN, /dev/pts/N, /dev/null etc. */ + fd = open(file, O_WRONLY); + } + + if (fd > INVALID_HANDLE && fp == NULL) { + fp = fdopen(fd, "w"); + if (fp == NULL) + close(fd); + } + + } else { + /* regular file */ + fp = fopen(file, "w"); + } + + if (fp != NULL) { + output_fp = fp; + output_file = estrdup(file, strlen(file)); + setbuf(fp, (char *) NULL); + output_is_tty = os_isatty(fileno(fp)); + } else { + d_error(_("could not open `%s' for writing (%s)"), + file, + errno != 0 ? strerror(errno) : _("reason unknown")); + fprintf(out_fp, _("sending output to stdout\n")); + } +} + +/* set_prompt --- set debugger prompt */ + +static void +set_prompt(const char *value) +{ + efree(dgawk_Prompt); + dgawk_Prompt = estrdup(value, strlen(value)); + dPrompt = dgawk_Prompt; +} + +/* set_option_flag --- convert option string to flag value */ + +static int +set_option_flag(const char *value) +{ + long n; + if (strcmp(value, "on") == 0) + return TRUE; + if (strcmp(value, "off") == 0) + return FALSE; + errno = 0; + n = strtol(value, NULL, 0); + return (errno == 0 && n != 0); +} + +/* set_option_num --- set integer option value from string */ + +static void +set_option_num(int *pnum, const char *value) +{ + long n; + errno = 0; + n = strtol(value, NULL, 0); + if (errno == 0 && n > 0) + *pnum = n; + else + d_error(_("invalid number")); +} + +/* set_listsize --- set list output window size */ + +static void +set_listsize(const char *value) +{ + set_option_num(&list_size, value); +} + +/* set_trace --- set instruction tracing on or off */ + +static void +set_trace(const char *value) +{ + do_trace = set_option_flag(value); +} + +/* set_save_history --- save history on exit */ + +static void +set_save_history(const char *value) +{ + do_save_history = set_option_flag(value); +} + +/* set_save_options --- save options on exit */ + +static void +set_save_options(const char *value) +{ + do_save_options = set_option_flag(value); +} + +/* set_history_size --- maximum entries in history file */ + +static void +set_history_size(const char *value) +{ + set_option_num(&history_size, value); +} + + +/* read_commands_string --- one of the many ways zzlex fetches a line to parse; + * this one is used to parse `commands' string during + * unserialization. + */ + +char * +read_commands_string(const char *prompt ATTRIBUTE_UNUSED) +{ + char *p, *end, *line; + + if (commands_string == NULL) + return NULL; + + p = (char *) commands_string; + end = (char *) commands_string + commands_string_len; + for (; p < end; p++) { + if (*p == line_sep) { + line = estrdup(commands_string, p - commands_string); + commands_string = p + 1; + commands_string_len = end - commands_string; + return line; + } + } + + line = estrdup(commands_string, commands_string_len); + commands_string = NULL; + commands_string_len = 0; + return line; +} + +/* save_options --- save current options to file */ + +static void +save_options(const char *file) +{ + FILE *fp; + const struct dbg_option *opt; + + fp = fopen(file, "w"); + if (fp == NULL) + return; + + for (opt = option_list; opt->name; opt++) { + if (opt->str_val != NULL) + fprintf(fp, "option %s = \"%s\"\n", opt->name, *(opt->str_val)); + else + fprintf(fp, "option %s = %d\n", opt->name, *(opt->num_val)); + } + fclose(fp); + chmod(file, 0600); +} + +/* close_all --- close all open files */ + +static void +close_all() +{ + int stdio_problem; + struct command_source *cs; + + (void) nextfile(&curfile, TRUE); /* close input data file */ + (void) close_io(&stdio_problem); + if (cur_srcfile->fd != INVALID_HANDLE) { + close(cur_srcfile->fd); + cur_srcfile->fd = INVALID_HANDLE; + } + for (cs = cmd_src; cs != NULL; cs = cs->next) { + if (cs->close_func && cs->fd != INVALID_HANDLE) { + cs->close_func(cs->fd); + cs->fd = INVALID_HANDLE; + } + } + + set_gawk_output(NULL); /* closes output_fp if not stdout */ +} + +/* install_params --- install function parameters into the symbol table */ + +static void +install_params(NODE *func) +{ + NODE *np; + + if (func == NULL) + return; + /* function parameters of type Node_param_list */ + np = func->lnode; + for (np = np->rnode; np != NULL; np = np->rnode) + install_symbol(np->param, np); +} + +/* remove_params --- remove function parameters out of the symbol table */ + +static void +remove_params(NODE *func) +{ + NODE *np; + + if (func == NULL) + return; + np = func->lnode; + for (np = np->rnode; np != NULL; np = np->rnode) + remove_symbol(np->param); +} + +/* pre_execute_code --- pre_hook for execute_code, called by pre_execute */ + +static int +pre_execute_code(INSTRUCTION **pi) +{ + INSTRUCTION *ei = *pi; + + switch (ei->opcode) { + case Op_K_exit: + case Op_K_next: + case Op_K_nextfile: + case Op_K_getline: /* getline without redirection */ + d_error(_("`%s' not allowed in current context;" + " statement ignored"), + op2str(ei->opcode)); + *pi = ei->nexti; + break; + case Op_K_return: + if (ei->nexti != NULL) { /* not an implicit return */ + NODE *r; + d_error(_("`return' not allowed in current context;" + " statement ignored")); + /* throw away return value already pushed onto stack */ + r = POP_SCALAR(); + DEREF(r); + *pi = ei->nexti; + } + break; + default: + break; + } + return (ei == *pi); +} + +extern INSTRUCTION *unwind_stack(long n); + +static NODE * +execute_code(volatile INSTRUCTION *code) +{ + volatile NODE *r = NULL; + volatile jmp_buf fatal_tag_stack; + long save_stack_size; + + /* We use one global stack for all contexts. + * Save # of items in stack; in case of + * a fatal error, pop stack until it has that many items. + */ + save_stack_size = (stack_ptr - stack_bottom) + 1; + + PUSH_BINDING(fatal_tag_stack, fatal_tag, fatal_tag_valid); + if (setjmp(fatal_tag) == 0) { + (void) r_interpret((INSTRUCTION *) code); + r = POP_SCALAR(); + } else /* fatal error */ + (void) unwind_stack(save_stack_size); + + POP_BINDING(fatal_tag_stack, fatal_tag, fatal_tag_valid); + + if (exit_val != EXIT_SUCCESS) { /* must be EXIT_FATAL? */ + exit_val = EXIT_SUCCESS; + return NULL; + } + return (NODE *) r; +} + +/* do_eval --- eval command */ + +int +do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + NODE *r, *ret_val; + NODE *f = NULL; + NODE *this_frame = NULL, *this_func = NULL; + NODE **sp; + INSTRUCTION *eval, *code = NULL; + AWK_CONTEXT *ctxt; + char **save_parmlist = NULL; + int ecount = 0, pcount = 0; + int ret; + + if (prog_running) { + this_frame = find_frame(0); + this_func = this_frame->func_node; + } + + install_params(this_func); /* expose current function parameters to eval */ + ctxt = new_context(); + ctxt->install_func = append_symbol; /* keep track of newly installed globals */ + push_context(ctxt); + (void) add_srcfile(SRC_CMDLINE, arg->a_string, srcfiles, NULL, NULL); + ret = parse_program(&code); + remove_params(this_func); + if (ret != 0) { + pop_context(); /* switch to prev context */ + free_context(ctxt, FALSE /* keep_globals */); + return FALSE; + } + + f = lookup("@eval"); + assert(f != NULL); + if (this_func == NULL) { /* in main */ + /* do a function call */ + eval = bcalloc(Op_func_call, 2, 0); + eval->source_file = cur_srcfile->src; + eval->func_body = f; + eval->func_name = NULL; /* not needed, func_body already assigned */ + (eval + 1)->expr_count = 0; + eval->nexti = bcalloc(Op_stop, 1, 0); + + } else { + /* execute as a part of the current function */ + int i; + char **varnames; + INSTRUCTION *t; + NODE *np; + + eval = f->code_ptr; /* Op_func */ + eval->source_file = cur_srcfile->src; + /* turn implicit Op_K_return into Op_stop */ + t = (eval + 1)->lasti; /* Op_K_return */ + t->opcode = Op_stop; + + /* add or append eval locals to the current frame stack */ + ecount = f->lnode->param_cnt; /* eval local count */ + pcount = this_func->lnode->param_cnt; + save_parmlist = this_func->parmlist; + + if (ecount > 0) { + if (pcount == 0) + emalloc(this_frame->stack, NODE **, ecount * sizeof(NODE *), "do_eval"); + else + erealloc(this_frame->stack, NODE **, (pcount + ecount) * sizeof(NODE *), "do_eval"); + + emalloc(varnames, char **, (pcount + ecount + 1) * sizeof(char *), "do_eval"); + if (pcount > 0) + memcpy(varnames, save_parmlist, pcount * sizeof(char *)); + for (np = f->lnode->rnode, i = 0; np != NULL; np = np->rnode, i++) { + varnames[pcount + i] = np->param; + np->param_cnt += pcount; /* appending eval locals: fixup param_cnt */ + } + varnames[pcount + ecount] = NULL; + sp = this_frame->stack + pcount; + for (i = 0; i < ecount; i++) { + getnode(r); + memset(r, 0, sizeof(NODE)); + *sp++ = r; + /* local variable */ + r->type = Node_var_new; + r->vname = varnames[pcount + i]; + } + + this_func->parmlist = varnames; + this_func->lnode->param_cnt += ecount; + } + } + +#if 0 + pf_data.print_func = fprintf; + pf_data.fp = out_fp; + pf_data.defn = FALSE; /* in_dump = FALSE */ + (void) print_code(f->code_ptr, &pf_data); +#endif + + ret_val = execute_code((volatile INSTRUCTION *) eval); + + if (ret_val != NULL) + DEREF(ret_val); /* throw away return value */ + /* else + fatal error */ + + if (this_func != NULL && ecount > 0) { + int i; + + /* undo frame manipulation from above */ + + /* free eval locals */ + sp = this_frame->stack + pcount; + for (i = ecount; i > 0; i--) { + r = *sp; + if (r->type == Node_var) /* eval local variable */ + DEREF(r->var_value); + else if (r->type == Node_var_array) /* eval local array */ + assoc_clear(r); + freenode(r); + *sp++ = (NODE *) 0; + } + if (pcount == 0) { + efree(this_frame->stack); + this_frame->stack = NULL; + } /* else + restore_frame() will free it */ + + efree(this_func->parmlist); + this_func->parmlist = save_parmlist; + this_func->lnode->param_cnt -= ecount; + } + + /* always destroy symbol "@eval", however destroy all newly installed + * globals only if fatal error in r_interpret (r == NULL). + */ + + pop_context(); /* switch to prev context */ + free_context(ctxt, (ret_val != NULL)); /* free all instructions and optionally symbols */ + if (ret_val != NULL) + destroy_symbol("@eval"); /* destroy "@eval" */ + return FALSE; +} + +/* +GDB Documentation: + ... When you use condition, GDB checks expression +immediately for syntactic correctness, and to determine whether symbols +in it have referents in the context of your breakpoint. If expression +uses symbols not referenced in the context of the breakpoint, GDB prints +an error message: + + No symbol "foo" in current context. +*/ + +static int invalid_symbol = 0; + +void +check_symbol(char *name) +{ + invalid_symbol++; + d_error(_("No symbol `%s' in current context"), name); + /* install anyway, but keep track of it */ + append_symbol(name); +} + +/* parse_condition --- compile a condition expression */ + +static int +parse_condition(int type, int num, char *expr) +{ + INSTRUCTION *code = NULL; + AWK_CONTEXT *ctxt = NULL; + int ret; + BREAKPOINT *b; + struct list_item *w; + NODE *this_func = NULL; + INSTRUCTION *it, *stop, *rule; + struct condition *cndn = NULL; + + if (type == D_break && (b = find_breakpoint(num)) != NULL) { + INSTRUCTION *rp; + cndn = &b->cndn; + rp = find_rule(b->src, b->bpi->source_line); + if (rp != NULL && rp->opcode == Op_func) + this_func = rp->func_body; + } else if (type == D_watch && (w = find_item(&watch_list, num)) != NULL) { + cndn = &w->cndn; + this_func = find_frame(cur_frame)->func_node; + } + + if (cndn == NULL) + return -1; + if (expr == NULL) + goto out; /* delete condition */ + + install_params(this_func); + ctxt = new_context(); + invalid_symbol = 0; + ctxt->install_func = check_symbol; + push_context(ctxt); + (void) add_srcfile(SRC_CMDLINE, expr, srcfiles, NULL, NULL); + ret = parse_program(&code); + remove_params(this_func); + pop_context(); + + if (ret != 0 || invalid_symbol) { + free_context(ctxt, FALSE /* keep_globals */); + return -1; + } + + /* condition expression is parsed as awk pattern without + * any action. The code is then modified to end up with + * a `1.0' on stack when the expression is true, `0.0' otherwise. + */ + + assert(code != NULL); + rule = ctxt->rule_list.nexti; + stop = bcalloc(Op_stop, 1, 0); + + it = rule->firsti; /* Op_K_print_rec */ + assert(it->opcode == Op_K_print_rec); + it->opcode = Op_push_i; + it->memory = mk_number((AWKNUM) 1.0, PERM|NUMBER|NUMCUR); + it->nexti = bcalloc(Op_jmp, 1, 0); + it->nexti->target_jmp = stop; + it->nexti->nexti = rule->lasti; + + it = rule->lasti; /* Op_no_op, target for Op_jmp_false */ + assert(it->opcode == Op_no_op); + it->opcode = Op_push_i; + it->memory = mk_number((AWKNUM) 0.0, PERM|NUMBER|NUMCUR); + it->nexti = stop; + +out: + if (cndn->expr != NULL) + efree(cndn->expr); + free_context(cndn->ctxt, FALSE); + cndn->code = code; + cndn->expr = expr; + cndn->ctxt = ctxt; + + return 0; +} + +/* do_condition --- condition command */ + +int +do_condition(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) +{ + int type, num; + char *expr = NULL; + + num = arg->a_int; + type = has_break_or_watch_point(&num, FALSE); + if (! type) + return FALSE; + arg = arg->next; /* condition expression */ + if (arg != NULL) + expr = arg->a_string; + if (parse_condition(type, num, expr) == 0 && arg != NULL) + arg->a_string = NULL; /* don't let free_cmdarg free it */ + return FALSE; +} + +/* in_cmd_src --- check if filename already in cmd_src */ + +int +in_cmd_src(const char *filename) +{ + struct command_source *cs; + for (cs = cmd_src; cs != NULL; cs = cs->next) { + if (cs->str != NULL && strcmp(cs->str, filename) == 0) + return TRUE; + } + return FALSE; +} + +int +get_eof_status() +{ + if (cmd_src == NULL) + return EXIT_FATAL; + return cmd_src->eof_status; +} + +void +push_cmd_src( + int fd, + int istty, + char * (*readfunc)(const char *), + int (*closefunc)(int), + int ctype, + int eofstatus) +{ + struct command_source *cs; + emalloc(cs, struct command_source *, sizeof(struct command_source), "push_cmd_src"); + cs->fd = fd; + cs->is_tty = istty; + cs->read_func = readfunc; + cs->close_func = closefunc; + cs->cmd = ctype; + + /* eof_status = EXIT_FATAL - exit with status EXIT_FATAL on EOF or error. + * = EXIT_FAILURE - exit status EXIT_FAILURE on error. + * = EXIT_SUCCESS - don't exit on EOF or error. + */ + cs->eof_status = eofstatus; + cs->str = NULL; + cs->next = cmd_src; + cmd_src = cs; + + input_fd = fd; + input_from_tty = istty; + read_a_line = readfunc; +} + +int +pop_cmd_src() +{ + struct command_source *cs; + + if (cmd_src->next == NULL) + return -1; + + cs = cmd_src; + cmd_src = cs->next; + if (cs->close_func && cs->fd != INVALID_HANDLE) + cs->close_func(cs->fd); + if (cs->str != NULL) + efree(cs->str); + efree(cs); + + input_fd = cmd_src->fd; + input_from_tty = cmd_src->is_tty; + read_a_line = cmd_src->read_func; + return 0; +} diff -Nru gawk-3.1.8+dfsg/dfa.c gawk-4.0.1+dfsg/dfa.c --- gawk-3.1.8+dfsg/dfa.c 2010-05-05 17:47:42.000000000 +0000 +++ gawk-4.0.1+dfsg/dfa.c 2012-03-28 19:47:53.000000000 +0000 @@ -1,5 +1,5 @@ /* dfa.c - deterministic extended regexp routines for GNU - Copyright (C) 1988, 1998, 2000, 2002, 2004, 2005, 2007-2010 Free Software + Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -53,18 +53,26 @@ #include "gettext.h" #define _(str) gettext (str) -#include "mbsupport.h" /* defines MBS_SUPPORT if appropriate */ -#ifdef MBS_SUPPORT +#include "mbsupport.h" /* defines MBS_SUPPORT to 1 or 0, as appropriate */ +#if MBS_SUPPORT /* We can handle multibyte strings. */ #include #include + +#if HAVE_LANGINFO_CODESET # include #endif +#endif + +#ifdef GAWK +#define bool int +#define true (1) +#define false (0) +#endif /* GAWK */ #include "regex.h" #include "dfa.h" #include "xalloc.h" -#include "hard-locale.h" #ifdef GAWK static int @@ -72,7 +80,7 @@ { return (c == ' ' || c == '\t'); } -#endif +#endif /* GAWK */ /* HPUX, define those as macros in sys/param.h */ #ifdef setbit @@ -101,6 +109,24 @@ /* Sets of unsigned characters are stored as bit vectors in arrays of ints. */ typedef int charclass[CHARCLASS_INTS]; +/* Convert a possibly-signed character to an unsigned character. This is + a bit safer than casting to unsigned char, since it catches some type + errors that the cast doesn't. */ +static inline unsigned char to_uchar (char ch) { return ch; } + +/* Contexts tell us whether a character is a newline or a word constituent. + Word-constituent characters are those that satisfy iswalnum(), plus '_'. + + A state also stores a context value, which is nonzero if its + predecessors always matches a newline or a word constituent. + The definition of a state's context is a bit unclear, but will be + modified soon anyway. */ + +#define CTX_NONE 1 +#define CTX_LETTER 2 +#define CTX_NEWLINE 4 +#define CTX_ANY 7 + /* Sometimes characters can only be matched depending on the surrounding context. Such context decisions depend on what the previous character was, and the value of the current (lookahead) character. Context @@ -117,20 +143,19 @@ bit 1 - previous wasn't word-constituent, current is bit 0 - neither previous nor current is word-constituent - Word-constituent characters are those that satisfy isalnum(). - - The macro SUCCEEDS_IN_CONTEXT determines whether a a given constraint - succeeds in a particular context. Prevn is true if the previous character - was a newline, currn is true if the lookahead character is a newline. - Prevl and currl similarly depend upon whether the previous and current - characters are word-constituent letters. */ -#define MATCHES_NEWLINE_CONTEXT(constraint, prevn, currn) \ - ((constraint) & 1 << (((prevn) ? 2 : 0) + ((currn) ? 1 : 0) + 4)) -#define MATCHES_LETTER_CONTEXT(constraint, prevl, currl) \ - ((constraint) & 1 << (((prevl) ? 2 : 0) + ((currl) ? 1 : 0))) -#define SUCCEEDS_IN_CONTEXT(constraint, prevn, currn, prevl, currl) \ - (MATCHES_NEWLINE_CONTEXT(constraint, prevn, currn) \ - && MATCHES_LETTER_CONTEXT(constraint, prevl, currl)) + The macro SUCCEEDS_IN_CONTEXT determines whether a given constraint + succeeds in a particular context. Prev is the context value for + the previous character, curr is the context value for the lookahead + character. */ +#define MATCHES_NEWLINE_CONTEXT(constraint, prev, curr) \ + ((constraint) & \ + 1 << (((prev & CTX_NEWLINE) ? 2 : 0) + ((curr & CTX_NEWLINE) ? 1 : 0) + 4)) +#define MATCHES_LETTER_CONTEXT(constraint, prev, curr) \ + ((constraint) & \ + 1 << (((prev & CTX_LETTER) ? 2 : 0) + ((curr & CTX_LETTER) ? 1 : 0))) +#define SUCCEEDS_IN_CONTEXT(constraint, prev, curr) \ + (MATCHES_NEWLINE_CONTEXT(constraint, prev, curr) \ + && MATCHES_LETTER_CONTEXT(constraint, prev, curr)) /* The following macros give information about what a constraint depends on. */ #define PREV_NEWLINE_DEPENDENT(constraint) \ @@ -167,7 +192,7 @@ the empty string. */ BACKREF, /* BACKREF is generated by \; it - it not completely handled. If the scanner + is not completely handled. If the scanner detects a transition on backref, it returns a kind of "semi-success" indicating that the match will have to be verified with @@ -256,9 +281,17 @@ typedef struct { position *elems; /* Elements of this position set. */ - int nelem; /* Number of elements in this set. */ + size_t nelem; /* Number of elements in this set. */ + size_t alloc; /* Number of elements allocated in ELEMS. */ } position_set; +/* Sets of leaves are also stored as arrays. */ +typedef struct +{ + unsigned int *elems; /* Elements of this position set. */ + size_t nelem; /* Number of elements in this set. */ +} leaf_set; + /* A state of the dfa consists of a set of positions, some flags, and the token value of the lowest-numbered position of the state that contains an END token. */ @@ -266,20 +299,16 @@ { int hash; /* Hash of the positions of this state. */ position_set elems; /* Positions this state could match. */ - char newline; /* True if previous state matched newline. */ - char letter; /* True if previous state matched a letter. */ - char backref; /* True if this state matches a \. */ + unsigned char context; /* Context from previous state. */ + char backref; /* True if this state matches a \. */ unsigned char constraint; /* Constraint for this state to accept. */ int first_end; /* Token value of the first END in elems. */ -#if MBS_SUPPORT position_set mbps; /* Positions which can match multibyte characters. e.g. period. These staff are used only if MB_CUR_MAX > 1. */ -#endif } dfa_state; -#if MBS_SUPPORT /* A bracket operator. e.g. [a-c], [[:alpha:]], etc. */ struct mb_char_classes @@ -298,7 +327,6 @@ char **coll_elems; int ncoll_elems; /* Collating elements. */ }; -#endif /* A compiled regular expression. */ struct dfa @@ -404,26 +432,45 @@ /* ACCEPTS_IN_CONTEXT returns true if the given state accepts in the specified context. */ -#define ACCEPTS_IN_CONTEXT(prevn, currn, prevl, currl, state, dfa) \ - SUCCEEDS_IN_CONTEXT((dfa).states[state].constraint, \ - prevn, currn, prevl, currl) +#define ACCEPTS_IN_CONTEXT(prev, curr, state, dfa) \ + SUCCEEDS_IN_CONTEXT((dfa).states[state].constraint, prev, curr) static void dfamust (struct dfa *dfa); static void regexp (void); -#define CALLOC(p, t, n) ((p) = xcalloc((size_t)(n), sizeof (t))) -#define MALLOC(p, t, n) ((p) = xmalloc((n) * sizeof (t))) -#define REALLOC(p, t, n) ((p) = xrealloc((p), (n) * sizeof (t))) - -/* Reallocate an array of type t if nalloc is too small for index. */ -#define REALLOC_IF_NECESSARY(p, t, nalloc, index) \ - if ((index) >= (nalloc)) \ - { \ - do \ - (nalloc) *= 2; \ - while ((index) >= (nalloc)); \ - REALLOC(p, t, nalloc); \ - } +/* These two macros are identical to the ones in gnulib's xalloc.h, + except that they not to case the result to "(t *)", and thus may + be used via type-free CALLOC and MALLOC macros. */ +#undef XNMALLOC +#undef XCALLOC + +/* Allocate memory for N elements of type T, with error checking. */ +/* extern t *XNMALLOC (size_t n, typename t); */ +# define XNMALLOC(n, t) \ + (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))) + +/* Allocate memory for N elements of type T, with error checking, + and zero it. */ +/* extern t *XCALLOC (size_t n, typename t); */ +# define XCALLOC(n, t) \ + (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))) + +#define CALLOC(p, n) do { (p) = XCALLOC (n, *(p)); } while (0) +#define MALLOC(p, n) do { (p) = XNMALLOC (n, *(p)); } while (0) +#define REALLOC(p, n) do {(p) = xnrealloc (p, n, sizeof (*(p))); } while (0) + +/* Reallocate an array of type *P if N_ALLOC is <= N_REQUIRED. */ +#define REALLOC_IF_NECESSARY(p, n_alloc, n_required) \ + do \ + { \ + if ((n_alloc) <= (n_required)) \ + { \ + size_t new_n_alloc = (n_required) + !(p); \ + (p) = x2nrealloc (p, &new_n_alloc, sizeof (*(p))); \ + (n_alloc) = new_n_alloc; \ + } \ + } \ + while (false) #ifdef DEBUG @@ -456,10 +503,8 @@ case OR: s = "OR"; break; case LPAREN: s = "LPAREN"; break; case RPAREN: s = "RPAREN"; break; -#if MBS_SUPPORT case ANYCHAR: s = "ANYCHAR"; break; case MBCSET: s = "MBCSET"; break; -#endif /* MBS_SUPPORT */ default: s = "CSET"; break; } fprintf(stderr, "%s", s); @@ -526,7 +571,7 @@ for (i = 0; i < dfa->cindex; ++i) if (equal(s, dfa->charclasses[i])) return i; - REALLOC_IF_NECESSARY(dfa->charclasses, charclass, dfa->calloc, dfa->cindex); + REALLOC_IF_NECESSARY(dfa->charclasses, dfa->calloc, dfa->cindex + 1); ++dfa->cindex; copyset(s, dfa->charclasses[i]); return i; @@ -541,60 +586,138 @@ /* End-of-line byte in data. */ static unsigned char eolbyte; +/* Cache of char-context values. */ +static int sbit[NOTCHAR]; + +/* Set of characters considered letters. */ +static charclass letters; + +/* Set of characters that are newline. */ +static charclass newline; + +/* Add this to the test for whether a byte is word-constituent, since on + BSD-based systems, many values in the 128..255 range are classified as + alphabetic, while on glibc-based systems, they are not. */ +#ifdef __GLIBC__ +# define is_valid_unibyte_character(c) 1 +#else +# define is_valid_unibyte_character(c) (! (MBS_SUPPORT && btowc (c) == WEOF)) +#endif + +/* Return non-zero if C is a 'word-constituent' byte; zero otherwise. */ +#define IS_WORD_CONSTITUENT(C) \ + (is_valid_unibyte_character (C) && (isalnum (C) || (C) == '_')) + +static int +char_context (unsigned char c) +{ + if (c == eolbyte || c == 0) + return CTX_NEWLINE; + if (IS_WORD_CONSTITUENT (c)) + return CTX_LETTER; + return CTX_NONE; +} + +static int +wchar_context(wint_t wc) +{ + if (wc == (wchar_t)eolbyte || wc == 0) + return CTX_NEWLINE; + if (wc == L'_' || iswalnum (wc)) + return CTX_LETTER; + return CTX_NONE; +} + /* Entry point to set syntax options. */ void dfasyntax (reg_syntax_t bits, int fold, unsigned char eol) { + unsigned int i; + syntax_bits_set = 1; syntax_bits = bits; case_fold = fold; eolbyte = eol; + + for (i = 0; i < NOTCHAR; ++i) + { + sbit[i] = char_context (i); + switch (sbit[i]) + { + case CTX_LETTER: + setbit (i, letters); + break; + case CTX_NEWLINE: + setbit (i, newline); + break; + } + } } -/* Like setbit, but if case is folded, set both cases of a letter. - For MB_CUR_MAX > 1, one or both of the two cases may not be set, - so the resulting charset may only be used as an optimization. */ -static void -setbit_case_fold ( +/* Set a bit in the charclass for the given wchar_t. Do nothing if WC + is represented by a multi-byte sequence. Even for MB_CUR_MAX == 1, + this may happen when folding case in weird Turkish locales where + dotless i/dotted I are not included in the chosen character set. + Return whether a bit was set in the charclass. */ #if MBS_SUPPORT - wint_t b, +static bool +setbit_wc (wint_t wc, charclass c) +{ + int b = wctob (wc); + if (b == EOF) + return false; + + setbit (b, c); + return true; +} + +/* Set a bit in the charclass for the given single byte character, + if it is valid in the current character set. */ +static void +setbit_c (int b, charclass c) +{ + /* Do nothing if b is invalid in this character set. */ + if (MB_CUR_MAX > 1 && btowc (b) == WEOF) + return; + setbit (b, c); +} #else - unsigned int b, +# define setbit_c setbit +static inline bool +setbit_wc (wint_t wc, charclass c) +{ + abort (); + /*NOTREACHED*/ + return false; +} #endif - charclass c) + +/* Like setbit_c, but if case is folded, set both cases of a letter. For + MB_CUR_MAX > 1, the resulting charset is only used as an optimization, + and the caller takes care of setting the appropriate field of struct + mb_char_classes. */ +static void +setbit_case_fold_c (int b, charclass c) { - if (case_fold) + if (MB_CUR_MAX > 1) { -#if MBS_SUPPORT - if (MB_CUR_MAX > 1) - { - wint_t b1 = iswupper(b) ? towlower(b) : b; - wint_t b2 = iswlower(b) ? towupper(b) : b; - if (wctob ((unsigned char)b1) == b1) - setbit (b1, c); - if (b2 != b1 && wctob ((unsigned char)b2) == b2) - setbit (b2, c); - } - else -#endif - { - unsigned char b1 = isupper(b) ? tolower(b) : b; - unsigned char b2 = islower(b) ? toupper(b) : b; - setbit (b1, c); - if (b2 != b1) - setbit (b2, c); - } + wint_t wc = btowc (b); + if (wc == WEOF) + return; + setbit (b, c); + if (case_fold && iswalpha (wc)) + setbit_wc (iswupper (wc) ? towlower (wc) : towupper (wc), c); } else { -#if MBS_SUPPORT - if (wctob ((unsigned char)b) == b) -#endif - setbit (b, c); + setbit (b, c); + if (case_fold && isalpha (b)) + setbit_c (isupper (b) ? tolower (b) : toupper (b), c); } } + /* UTF-8 encoding allows some optimizations that we can't otherwise assume in a multibyte encoding. */ static inline int @@ -603,7 +726,7 @@ static int utf8 = -1; if (utf8 == -1) { -#if defined HAVE_LANGINFO_CODESET && defined MBS_SUPPORT +#if defined HAVE_LANGINFO_CODESET && MBS_SUPPORT utf8 = (STREQ (nl_langinfo (CODESET), "UTF-8")); #else utf8 = 0; @@ -625,11 +748,9 @@ only by zero-width characters. */ static int parens; /* Count of outstanding left parens. */ static int minrep, maxrep; /* Repeat counts for {m,n}. */ -static int hard_LC_COLLATE; /* Nonzero if LC_COLLATE is hard. */ static int cur_mb_len = 1; /* Length of the multibyte representation of wctok. */ -#if MBS_SUPPORT /* These variables are used only if (MB_CUR_MAX > 1). */ static mbstate_t mbs; /* Mbstate for mbrlen(). */ static wchar_t wctok; /* Wide character representation of the current @@ -652,7 +773,6 @@ And inputwcs[i] is the codepoint. */ static unsigned char const *buf_begin; /* reference to begin in dfaexec(). */ static unsigned char const *buf_end; /* reference to end in dfaexec(). */ -#endif /* MBS_SUPPORT */ #if MBS_SUPPORT @@ -674,7 +794,7 @@ { \ cur_mb_len = 1; \ --lexleft; \ - (wc) = (c) = (unsigned char) *lexptr++; \ + (wc) = (c) = to_uchar (*lexptr++); \ } \ else \ { \ @@ -703,7 +823,7 @@ else \ return lasttok = END; \ } \ - (c) = (unsigned char) *lexptr++; \ + (c) = to_uchar (*lexptr++); \ --lexleft; \ } while(0) @@ -711,48 +831,34 @@ #endif /* MBS_SUPPORT */ -static int -in_coll_range (char ch, char from, char to) -{ - char c[6]; - c[0] = from; - c[1] = 0; - c[2] = ch; - c[3] = 0; - c[4] = to; - c[5] = 0; - return strcoll (&c[0], &c[2]) <= 0 && strcoll (&c[2], &c[4]) <= 0; -} - typedef int predicate (int); /* The following list maps the names of the Posix named character classes to predicate functions that determine whether a given character is in the class. The leading [ has already been eaten by the lexical analyzer. */ -static struct { +struct dfa_ctype { const char *name; - predicate *pred; -} const prednames[] = { - { "alpha", isalpha }, - { "upper", isupper }, - { "lower", islower }, - { "digit", isdigit }, - { "xdigit", isxdigit }, - { "space", isspace }, - { "punct", ispunct }, - { "alnum", isalnum }, - { "print", isprint }, - { "graph", isgraph }, - { "cntrl", iscntrl }, -#ifdef GAWK - { "blank", is_blank }, -#else - { "blank", isblank }, -#endif - { NULL, NULL } + predicate *func; + bool single_byte_only; +}; + +static const struct dfa_ctype prednames[] = { + { "alpha", isalpha, false }, + { "upper", isupper, false }, + { "lower", islower, false }, + { "digit", isdigit, true }, + { "xdigit", isxdigit, true }, + { "space", isspace, false }, + { "punct", ispunct, false }, + { "alnum", isalnum, false }, + { "print", isprint, false }, + { "graph", isgraph, false }, + { "cntrl", iscntrl, false }, + { "blank", is_blank, false }, + { NULL, NULL, false } }; -static predicate * +static const struct dfa_ctype * _GL_ATTRIBUTE_PURE find_pred (const char *str) { unsigned int i; @@ -760,7 +866,7 @@ if (STREQ (str, prednames[i].name)) break; - return prednames[i].pred; + return &prednames[i]; } /* Multibyte character handling sub-routine for lex. @@ -773,21 +879,28 @@ int c, c1, c2; charclass ccl; -#if MBS_SUPPORT - wint_t wc, wc1, wc2; + /* Used to warn about [:space:]. + Bit 0 = first character is a colon. + Bit 1 = last character is a colon. + Bit 2 = includes any other character but a colon. + Bit 3 = includes ranges, char/equiv classes or collation elements. */ + int colon_warning_state; + + wint_t wc; + wint_t wc2; + wint_t wc1 = 0; /* Work area to build a mb_char_classes. */ struct mb_char_classes *work_mbc; int chars_al, range_sts_al, range_ends_al, ch_classes_al, equivs_al, coll_elems_al; - chars_al = 1; + chars_al = 0; range_sts_al = range_ends_al = 0; ch_classes_al = equivs_al = coll_elems_al = 0; if (MB_CUR_MAX > 1) { - REALLOC_IF_NECESSARY(dfa->mbcsets, struct mb_char_classes, - dfa->mbcsets_alloc, dfa->nmbcsets + 1); + REALLOC_IF_NECESSARY(dfa->mbcsets, dfa->mbcsets_alloc, dfa->nmbcsets + 1); /* dfa->multibyte_prop[] hold the index of dfa->mbcsets. We will update dfa->multibyte_prop[] in addtok(), because we can't @@ -799,7 +912,6 @@ } else work_mbc = NULL; -#endif memset (ccl, 0, sizeof ccl); FETCH_WC (c, wc, _("unbalanced [")); @@ -811,9 +923,11 @@ else invert = 0; + colon_warning_state = (c == ':'); do { c1 = EOF; /* mark c1 is not initialized". */ + colon_warning_state &= ~2; /* Note that if we're looking at some other [:...:] construct, we just treat it as a bunch of ordinary characters. We can do @@ -827,10 +941,8 @@ /* If pattern contains `[[:', `[[.', or `[[='. */ if (c1 == ':' -#if MBS_SUPPORT /* TODO: handle `[[.' and `[[=' also for MB_CUR_MAX == 1. */ || (MB_CUR_MAX > 1 && (c1 == '.' || c1 == '=')) -#endif ) { size_t len = 0; @@ -857,44 +969,36 @@ || STREQ (str, "lower")) ? "alpha" : str); -#if MBS_SUPPORT - if (MB_CUR_MAX > 1) + const struct dfa_ctype *pred = find_pred (class); + if (!pred) + dfaerror(_("invalid character class")); + + if (MB_CUR_MAX > 1 && !pred->single_byte_only) { /* Store the character class as wctype_t. */ wctype_t wt = wctype (class); - if (ch_classes_al == 0) - MALLOC(work_mbc->ch_classes, wctype_t, ++ch_classes_al); - REALLOC_IF_NECESSARY(work_mbc->ch_classes, wctype_t, + REALLOC_IF_NECESSARY(work_mbc->ch_classes, ch_classes_al, work_mbc->nch_classes + 1); work_mbc->ch_classes[work_mbc->nch_classes++] = wt; } -#endif - { - predicate *pred = find_pred (class); - if (!pred) - dfaerror(_("invalid character class")); - for (c2 = 0; c2 < NOTCHAR; ++c2) - if ((*pred)(c2)) - setbit_case_fold (c2, ccl); - } + for (c2 = 0; c2 < NOTCHAR; ++c2) + if (pred->func(c2)) + setbit_case_fold_c (c2, ccl); } -#if MBS_SUPPORT - else if (c1 == '=' || c1 == '.') + else if (MBS_SUPPORT && (c1 == '=' || c1 == '.')) { char *elem; - MALLOC(elem, char, len + 1); + MALLOC(elem, len + 1); strncpy(elem, str, len + 1); if (c1 == '=') /* build equivalent class. */ { - if (equivs_al == 0) - MALLOC(work_mbc->equivs, char*, ++equivs_al); - REALLOC_IF_NECESSARY(work_mbc->equivs, char*, + REALLOC_IF_NECESSARY(work_mbc->equivs, equivs_al, work_mbc->nequivs + 1); work_mbc->equivs[work_mbc->nequivs++] = elem; @@ -903,15 +1007,13 @@ if (c1 == '.') /* build collating element. */ { - if (coll_elems_al == 0) - MALLOC(work_mbc->coll_elems, char*, ++coll_elems_al); - REALLOC_IF_NECESSARY(work_mbc->coll_elems, char*, + REALLOC_IF_NECESSARY(work_mbc->coll_elems, coll_elems_al, work_mbc->ncoll_elems + 1); work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem; } } -#endif + colon_warning_state |= 8; /* Fetch new lookahead character. */ FETCH_WC (c1, wc1, _("unbalanced [")); @@ -947,19 +1049,13 @@ && (syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS)) FETCH_WC(c2, wc2, _("unbalanced [")); -#if MBS_SUPPORT if (MB_CUR_MAX > 1) { /* When case folding map a range, say [m-z] (or even [M-z]) to the pair of ranges, [m-z] [M-Z]. */ - if (range_sts_al == 0) - { - MALLOC(work_mbc->range_sts, wchar_t, ++range_sts_al); - MALLOC(work_mbc->range_ends, wchar_t, ++range_ends_al); - } - REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t, + REALLOC_IF_NECESSARY(work_mbc->range_sts, range_sts_al, work_mbc->nranges + 1); - REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t, + REALLOC_IF_NECESSARY(work_mbc->range_ends, range_ends_al, work_mbc->nranges + 1); work_mbc->range_sts[work_mbc->nranges] = case_fold ? towlower(wc) : (wchar_t)wc; @@ -969,17 +1065,16 @@ #ifndef GREP if (case_fold && (iswalpha(wc) || iswalpha(wc2))) { - REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t, + REALLOC_IF_NECESSARY(work_mbc->range_sts, range_sts_al, work_mbc->nranges + 1); work_mbc->range_sts[work_mbc->nranges] = towupper(wc); - REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t, + REALLOC_IF_NECESSARY(work_mbc->range_ends, range_ends_al, work_mbc->nranges + 1); work_mbc->range_ends[work_mbc->nranges++] = towupper(wc2); } #endif } else -#endif { c1 = c; if (case_fold) @@ -987,81 +1082,61 @@ c1 = tolower (c1); c2 = tolower (c2); } - if (!hard_LC_COLLATE) - for (c = c1; c <= c2; c++) - setbit_case_fold (c, ccl); - else - for (c = 0; c < NOTCHAR; ++c) - if (!(case_fold && isupper (c)) - && in_coll_range (c, c1, c2)) - setbit_case_fold (c, ccl); + for (c = c1; c <= c2; c++) + setbit_case_fold_c (c, ccl); } + colon_warning_state |= 8; FETCH_WC(c1, wc1, _("unbalanced [")); continue; } -#if MBS_SUPPORT - /* Build normal characters. */ - setbit_case_fold (wc, ccl); - if (MB_CUR_MAX > 1) + colon_warning_state |= (c == ':') ? 2 : 4; + + if (MB_CUR_MAX == 1) { - if (case_fold && iswalpha(wc)) - { - wc = towlower(wc); - c = wctob(wc); - if (c == EOF || (wint_t)c != (wint_t)wc) - { - REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, - work_mbc->nchars + 1); - work_mbc->chars[work_mbc->nchars++] = wc; - } -#ifdef GREP - continue; -#else - wc = towupper(wc); - c = wctob(wc); -#endif - } - if (c == EOF || (wint_t)c != (wint_t)wc) + setbit_case_fold_c (c, ccl); + continue; + } + + if (case_fold && iswalpha(wc)) + { + wc = towlower(wc); + if (!setbit_wc (wc, ccl)) { - REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, + REALLOC_IF_NECESSARY(work_mbc->chars, chars_al, work_mbc->nchars + 1); work_mbc->chars[work_mbc->nchars++] = wc; } - } +#ifdef GREP + continue; #else - setbit_case_fold (c, ccl); + wc = towupper(wc); #endif + } + if (!setbit_wc (wc, ccl)) + { + REALLOC_IF_NECESSARY(work_mbc->chars, chars_al, + work_mbc->nchars + 1); + work_mbc->chars[work_mbc->nchars++] = wc; + } } - while (( -#if MBS_SUPPORT - wc = wc1, -#endif - (c = c1) != ']')); + while ((wc = wc1, (c = c1) != ']')); -#if MBS_SUPPORT - if (MB_CUR_MAX > 1 - && (!using_utf8() - || invert - || work_mbc->nchars != 0 - || work_mbc->nch_classes != 0 - || work_mbc->nranges != 0 - || work_mbc->nequivs != 0 - || work_mbc->ncoll_elems != 0)) + if (colon_warning_state == 7) + dfawarn (_("character class syntax is [[:space:]], not [:space:]")); + + if (MB_CUR_MAX > 1) { static charclass zeroclass; work_mbc->invert = invert; work_mbc->cset = equal(ccl, zeroclass) ? -1 : charclass_index(ccl); return MBCSET; } -#endif if (invert) { -#if MBS_SUPPORT assert(MB_CUR_MAX == 1); -#endif notset(ccl); if (syntax_bits & RE_HAT_LISTS_NOT_NEWLINE) clrbit(eolbyte, ccl); @@ -1070,9 +1145,6 @@ return CSET + charclass_index(ccl); } -/* Return non-zero if C is a `word-constituent' byte; zero otherwise. */ -#define IS_WORD_CONSTITUENT(C) (isalnum(C) || (C) == '_') - static token lex (void) { @@ -1089,7 +1161,6 @@ "if (backslash) ...". */ for (i = 0; i < 2; ++i) { -#if MBS_SUPPORT if (MB_CUR_MAX > 1) { FETCH_WC (c, wctok, NULL); @@ -1097,7 +1168,6 @@ goto normal_char; } else -#endif /* MBS_SUPPORT */ FETCH(c, NULL); switch (c) @@ -1320,7 +1390,6 @@ case '.': if (backslash) goto normal_char; -#if MBS_SUPPORT if (MB_CUR_MAX > 1) { /* In multibyte environment period must match with a single @@ -1328,7 +1397,6 @@ laststart = 0; return lasttok = ANYCHAR; } -#endif /* MBS_SUPPORT */ zeroset(ccl); notset(ccl); if (!(syntax_bits & RE_DOT_NEWLINE)) @@ -1338,7 +1406,6 @@ laststart = 0; return lasttok = CSET + charclass_index(ccl); -#ifndef GAWK case 's': case 'S': if (!backslash || (syntax_bits & RE_NO_GNU_OPS)) @@ -1351,7 +1418,6 @@ notset(ccl); laststart = 0; return lasttok = CSET + charclass_index(ccl); -#endif case 'w': case 'W': @@ -1375,17 +1441,15 @@ default: normal_char: laststart = 0; -#if MBS_SUPPORT /* For multibyte character sets, folding is done in atom. Always return WCHAR. */ if (MB_CUR_MAX > 1) return lasttok = WCHAR; -#endif if (case_fold && isalpha(c)) { zeroset(ccl); - setbit_case_fold (c, ccl); + setbit_case_fold_c (c, ccl); return lasttok = CSET + charclass_index(ccl); } @@ -1411,18 +1475,14 @@ static void addtok_mb (token t, int mbprop) { -#if MBS_SUPPORT if (MB_CUR_MAX > 1) { - REALLOC_IF_NECESSARY(dfa->multibyte_prop, int, dfa->nmultibyte_prop, - dfa->tindex); + REALLOC_IF_NECESSARY(dfa->multibyte_prop, dfa->nmultibyte_prop, + dfa->tindex + 1); dfa->multibyte_prop[dfa->tindex] = mbprop; } -#else - (void) mbprop; -#endif - REALLOC_IF_NECESSARY(dfa->tokens, token, dfa->talloc, dfa->tindex); + REALLOC_IF_NECESSARY(dfa->tokens, dfa->talloc, dfa->tindex + 1); dfa->tokens[dfa->tindex++] = t; switch (t) @@ -1447,17 +1507,63 @@ dfa->depth = depth; } +static void addtok_wc (wint_t wc); + /* Add the given token to the parse tree, maintaining the depth count and updating the maximum depth if necessary. */ static void addtok (token t) { -#if MBS_SUPPORT if (MB_CUR_MAX > 1 && t == MBCSET) - addtok_mb (MBCSET, ((dfa->nmbcsets - 1) << 2) + 3); + { + bool need_or = false; + struct mb_char_classes *work_mbc = &dfa->mbcsets[dfa->nmbcsets - 1]; + + /* Extract wide characters into alternations for better performance. + This does not require UTF-8. */ + if (!work_mbc->invert) + { + int i; + for (i = 0; i < work_mbc->nchars; i++) + { + addtok_wc (work_mbc->chars[i]); + if (need_or) + addtok (OR); + need_or = true; + } + work_mbc->nchars = 0; + } + + /* UTF-8 allows treating a simple, non-inverted MBCSET like a CSET. */ + if (work_mbc->invert + || (!using_utf8() && work_mbc->cset != -1) + || work_mbc->nchars != 0 + || work_mbc->nch_classes != 0 + || work_mbc->nranges != 0 + || work_mbc->nequivs != 0 + || work_mbc->ncoll_elems != 0) + { + addtok_mb (MBCSET, ((dfa->nmbcsets - 1) << 2) + 3); + if (need_or) + addtok (OR); + } + else + { + /* Characters have been handled above, so it is possible + that the mbcset is empty now. Do nothing in that case. */ + if (work_mbc->cset != -1) + { + assert (using_utf8 ()); + addtok (CSET + work_mbc->cset); + if (need_or) + addtok (OR); + } + } + } else -#endif - addtok_mb (t, 3); + { + addtok_mb (t, 3); + } } #if MBS_SUPPORT @@ -1489,11 +1595,14 @@ addtok(CAT); } } +#else +static void addtok_wc (wint_t wc) {} #endif static void add_utf8_anychar (void) { +#if MBS_SUPPORT static const charclass utf8_classes[5] = { { 0, 0, 0, 0, ~0, ~0, 0, 0 }, /* 80-bf: non-lead bytes */ { ~0, ~0, ~0, ~0, 0, 0, 0, 0 }, /* 00-7f: 1-byte sequence */ @@ -1509,7 +1618,7 @@ for (i = 0; i < n; i++) { charclass c; - memcpy (c, utf8_classes[i], sizeof c); + copyset (utf8_classes[i], c); if (i == 1) { if (!(syntax_bits & RE_DOT_NEWLINE)) @@ -1538,6 +1647,7 @@ addtok (CAT); addtok (OR); } +#endif } /* The grammar understood by the parser is as follows. @@ -1582,8 +1692,7 @@ { /* empty */ } -#if MBS_SUPPORT - else if (tok == WCHAR) + else if (MBS_SUPPORT && tok == WCHAR) { addtok_wc (case_fold ? towlower(wctok) : wctok); #ifndef GREP @@ -1596,8 +1705,7 @@ tok = lex(); } - - else if (tok == ANYCHAR && using_utf8()) + else if (MBS_SUPPORT && tok == ANYCHAR && using_utf8()) { /* For UTF-8 expand the period to a series of CSETs that define a valid UTF-8 character. This avoids using the slow multibyte path. I'm @@ -1609,8 +1717,6 @@ add_utf8_anychar(); tok = lex(); } -#endif /* MBS_SUPPORT */ - else if ((tok >= 0 && tok < NOTCHAR) || tok >= CSET || tok == BACKREF || tok == BEGLINE || tok == ENDLINE || tok == BEGWORD #if MBS_SUPPORT @@ -1634,7 +1740,7 @@ } /* Return the number of tokens in the given subexpression. */ -static int +static int _GL_ATTRIBUTE_PURE nsubtoks (int tindex) { int ntoks1; @@ -1663,11 +1769,9 @@ for (i = 0; i < ntokens; ++i) { addtok(dfa->tokens[tindex + i]); -#if MBS_SUPPORT /* Update index into multibyte csets. */ if (MB_CUR_MAX > 1 && dfa->tokens[tindex + i] == MBCSET) dfa->multibyte_prop[dfa->tindex - 1] = dfa->multibyte_prop[tindex + i]; -#endif } } @@ -1747,16 +1851,11 @@ lasttok = END; laststart = 1; parens = 0; -#ifdef LC_COLLATE - hard_LC_COLLATE = hard_locale (LC_COLLATE); -#endif -#if MBS_SUPPORT if (MB_CUR_MAX > 1) { cur_mb_len = 0; memset(&mbs, 0, sizeof mbs); } -#endif /* MBS_SUPPORT */ if (! syntax_bits_set) dfaerror(_("no syntax specified")); @@ -1784,41 +1883,49 @@ static void copy (position_set const *src, position_set *dst) { - int i; - - for (i = 0; i < src->nelem; ++i) - dst->elems[i] = src->elems[i]; + REALLOC_IF_NECESSARY(dst->elems, dst->alloc, src->nelem); + memcpy(dst->elems, src->elems, sizeof(dst->elems[0]) * src->nelem); dst->nelem = src->nelem; } -/* Insert a position in a set. Position sets are maintained in sorted - order according to index. If position already exists in the set with - the same index then their constraints are logically or'd together. +static void +alloc_position_set (position_set *s, size_t size) +{ + MALLOC(s->elems, size); + s->alloc = size; + s->nelem = 0; +} + +/* Insert position P in set S. S is maintained in sorted order on + decreasing index. If there is already an entry in S with P.index + then merge (logically-OR) P's constraints into the one in S. S->elems must point to an array large enough to hold the resulting set. */ static void insert (position p, position_set *s) { int count = s->nelem; int lo = 0, hi = count; + int i; while (lo < hi) { int mid = ((unsigned) lo + (unsigned) hi) >> 1; - if (s->elems[mid].index < p.index) + if (s->elems[mid].index > p.index) lo = mid + 1; else hi = mid; } if (lo < count && p.index == s->elems[lo].index) - s->elems[lo].constraint |= p.constraint; - else { - int i; - for (i = count; i > lo; i--) - s->elems[i] = s->elems[i - 1]; - s->elems[lo] = p; - ++s->nelem; + s->elems[lo].constraint |= p.constraint; + return; } + + REALLOC_IF_NECESSARY(s->elems, s->alloc, count + 1); + for (i = count; i > lo; i--) + s->elems[i] = s->elems[i - 1]; + s->elems[lo] = p; + ++s->nelem; } /* Merge two sets of positions into a third. The result is exactly as if @@ -1828,6 +1935,7 @@ { int i = 0, j = 0; + REALLOC_IF_NECESSARY(m->elems, m->alloc, s1->nelem + s2->nelem); m->nelem = 0; while (i < s1->nelem && j < s2->nelem) if (s1->elems[i].index > s2->elems[j].index) @@ -1861,18 +1969,15 @@ /* Find the index of the state corresponding to the given position set with the given preceding context, or create a new state if there is no such - state. Newline and letter tell whether we got here on a newline or - letter, respectively. */ + state. Context tells whether we got here on a newline or letter. */ static int -state_index (struct dfa *d, position_set const *s, int newline, int letter) +state_index (struct dfa *d, position_set const *s, int context) { int hash = 0; int constraint; int i, j; - newline = newline ? 1 : 0; - letter = letter ? 1 : 0; - + context &= ~CTX_NONE; for (i = 0; i < s->nelem; ++i) hash ^= s->elems[i].index + s->elems[i].constraint; @@ -1880,7 +1985,7 @@ for (i = 0; i < d->sindex; ++i) { if (hash != d->states[i].hash || s->nelem != d->states[i].elems.nelem - || newline != d->states[i].newline || letter != d->states[i].letter) + || context != d->states[i].context) continue; for (j = 0; j < s->nelem; ++j) if (s->elems[j].constraint @@ -1892,27 +1997,26 @@ } /* We'll have to create a new state. */ - REALLOC_IF_NECESSARY(d->states, dfa_state, d->salloc, d->sindex); + REALLOC_IF_NECESSARY(d->states, d->salloc, d->sindex + 1); d->states[i].hash = hash; - MALLOC(d->states[i].elems.elems, position, s->nelem); + alloc_position_set(&d->states[i].elems, s->nelem); copy(s, &d->states[i].elems); - d->states[i].newline = newline; - d->states[i].letter = letter; + d->states[i].context = context; d->states[i].backref = 0; d->states[i].constraint = 0; d->states[i].first_end = 0; -#if MBS_SUPPORT - d->states[i].mbps.nelem = 0; - d->states[i].mbps.elems = NULL; -#endif + if (MBS_SUPPORT) + { + d->states[i].mbps.nelem = 0; + d->states[i].mbps.elems = NULL; + } for (j = 0; j < s->nelem; ++j) if (d->tokens[s->elems[j].index] < 0) { constraint = s->elems[j].constraint; - if (SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 0) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 1) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0) - || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 1)) + if (SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NONE) + || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_NEWLINE) + || SUCCEEDS_IN_CONTEXT(constraint, context, CTX_LETTER)) d->states[i].constraint |= constraint; if (! d->states[i].first_end) d->states[i].first_end = d->tokens[s->elems[j].index]; @@ -1940,7 +2044,7 @@ char *visited; /* array of booleans, enough to use char, not int */ position p, old; - CALLOC(visited, char, d->tindex); + CALLOC(visited, d->tindex); for (i = 0; i < s->nelem; ++i) if (d->tokens[s->elems[i].index] >= NOTCHAR @@ -1995,6 +2099,55 @@ free(visited); } +/* Returns the set of contexts for which there is at least one + character included in C. */ + +static int +charclass_context(charclass c) +{ + int context = 0; + unsigned int j; + + if (tstbit(eolbyte, c)) + context |= CTX_NEWLINE; + + for (j = 0; j < CHARCLASS_INTS; ++j) + { + if (c[j] & letters[j]) + context |= CTX_LETTER; + if (c[j] & ~(letters[j] | newline[j])) + context |= CTX_NONE; + } + + return context; +} + +/* Returns the subset of POSSIBLE_CONTEXTS on which the position set S + depends. Each context in the set of returned contexts (let's call it + SC) may have a different follow set than other contexts in SC, and + also different from the follow set of the complement set. However, + all contexts in the complement set will have the same follow set. */ + +static int _GL_ATTRIBUTE_PURE +state_separate_contexts (position_set *s, int possible_contexts) +{ + int separate_context = 0; + unsigned int j; + + for (j = 0; j < s->nelem; ++j) + { + if ((possible_contexts & CTX_NEWLINE) + && PREV_NEWLINE_DEPENDENT(s->elems[j].constraint)) + separate_context |= CTX_NEWLINE; + if ((possible_contexts & CTX_LETTER) + && PREV_LETTER_DEPENDENT(s->elems[j].constraint)) + separate_context |= CTX_LETTER; + } + + return separate_context; +} + + /* Perform bottom-up analysis on the parse tree, computing various functions. Note that at this point, we're pretending constructs like \< are real characters rather than constraints on what can follow them. @@ -2055,10 +2208,9 @@ position *firstpos; /* Array where firstpos elements are stored. */ int *nlastpos; /* Element count stack for lastpos sets. */ position *lastpos; /* Array where lastpos elements are stored. */ - int *nalloc; /* Sizes of arrays allocated to follow sets. */ position_set tmp; /* Temporary set for merging sets. */ position_set merged; /* Result of merging sets. */ - int wants_newline; /* True if some position wants newline info. */ + int separate_contexts; /* Context wanted by some position. */ int *o_nullable; int *o_nfirst, *o_nlast; position *o_firstpos, *o_lastpos; @@ -2077,25 +2229,22 @@ d->searchflag = searchflag; - MALLOC(nullable, int, d->depth); + MALLOC(nullable, d->depth); o_nullable = nullable; - MALLOC(nfirstpos, int, d->depth); + MALLOC(nfirstpos, d->depth); o_nfirst = nfirstpos; - MALLOC(firstpos, position, d->nleaves); + MALLOC(firstpos, d->nleaves); o_firstpos = firstpos, firstpos += d->nleaves; - MALLOC(nlastpos, int, d->depth); + MALLOC(nlastpos, d->depth); o_nlast = nlastpos; - MALLOC(lastpos, position, d->nleaves); + MALLOC(lastpos, d->nleaves); o_lastpos = lastpos, lastpos += d->nleaves; - CALLOC(nalloc, int, d->tindex); - MALLOC(merged.elems, position, d->nleaves); + alloc_position_set(&merged, d->nleaves); - CALLOC(d->follows, position_set, d->tindex); + CALLOC(d->follows, d->tindex); for (i = 0; i < d->tindex; ++i) -#ifdef DEBUG - { /* Nonsyntactic #ifdef goo... */ -#endif + { switch (d->tokens[i]) { case EMPTY: @@ -2116,8 +2265,6 @@ for (j = 0; j < nlastpos[-1]; ++j) { merge(&tmp, &d->follows[pos[j].index], &merged); - REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems, position, - nalloc[pos[j].index], merged.nelem - 1); copy(&merged, &d->follows[pos[j].index]); } @@ -2136,8 +2283,6 @@ for (j = 0; j < nlastpos[-2]; ++j) { merge(&tmp, &d->follows[pos[j].index], &merged); - REALLOC_IF_NECESSARY(d->follows[pos[j].index].elems, position, - nalloc[pos[j].index], merged.nelem - 1); copy(&merged, &d->follows[pos[j].index]); } @@ -2197,8 +2342,7 @@ firstpos->constraint = lastpos->constraint = NO_CONSTRAINT; /* Allocate the follow set for this position. */ - nalloc[i] = 1; - MALLOC(d->follows[i].elems, position, nalloc[i]); + alloc_position_set(&d->follows[i], 1); break; } #ifdef DEBUG @@ -2220,8 +2364,8 @@ prtok(d->tokens[lastpos[j].index]); } putc('\n', stderr); - } #endif + } /* For each follow set that is the follow set of a real position, replace it with its epsilon closure. */ @@ -2246,8 +2390,6 @@ #endif copy(&d->follows[i], &merged); epsclosure(&merged, d); - if (d->follows[i].nelem < merged.nelem) - REALLOC(d->follows[i].elems, position, merged.nelem); copy(&merged, &d->follows[i]); } @@ -2258,27 +2400,23 @@ insert(firstpos[i], &merged); epsclosure(&merged, d); - /* Check if any of the positions of state 0 will want newline context. */ - wants_newline = 0; - for (i = 0; i < merged.nelem; ++i) - if (PREV_NEWLINE_DEPENDENT(merged.elems[i].constraint)) - wants_newline = 1; - /* Build the initial state. */ d->salloc = 1; d->sindex = 0; - MALLOC(d->states, dfa_state, d->salloc); - state_index(d, &merged, wants_newline, 0); + MALLOC(d->states, d->salloc); + + separate_contexts = state_separate_contexts(&merged, CTX_NEWLINE); + state_index(d, &merged, separate_contexts); free(o_nullable); free(o_nfirst); free(o_firstpos); free(o_nlast); free(o_lastpos); - free(nalloc); free(merged.elems); } + /* Find, for each character, the transition out of state s of d, and store it in the appropriate slot of trans. @@ -2312,8 +2450,8 @@ void dfastate (int s, struct dfa *d, int trans[]) { - position_set grps[NOTCHAR]; /* As many as will ever be needed. */ - charclass labels[NOTCHAR]; /* Labels corresponding to the groups. */ + leaf_set *grps; /* As many as will ever be needed. */ + charclass *labels; /* Labels corresponding to the groups. */ int ngrps = 0; /* Number of groups actually used. */ position pos; /* Current position being considered. */ charclass matches; /* Set of matching characters. */ @@ -2322,30 +2460,18 @@ int intersectf; /* True if intersect is nonempty. */ charclass leftovers; /* Stuff in the label that didn't match. */ int leftoversf; /* True if leftovers is nonempty. */ - static charclass letters; /* Set of characters considered letters. */ - static charclass newline; /* Set of characters that aren't newline. */ position_set follows; /* Union of the follows of some group. */ position_set tmp; /* Temporary space for merging sets. */ + int possible_contexts; /* Contexts that this group can match. */ + int separate_contexts; /* Context that new state wants to know. */ int state; /* New state. */ - int wants_newline; /* New state wants to know newline context. */ int state_newline; /* New state on a newline transition. */ - int wants_letter; /* New state wants to know letter context. */ int state_letter; /* New state on a letter transition. */ - static int initialized; /* Flag for static initialization. */ -#if MBS_SUPPORT int next_isnt_1st_byte = 0; /* Flag if we can't add state0. */ -#endif int i, j, k; - /* Initialize the set of letters, if necessary. */ - if (! initialized) - { - initialized = 1; - for (i = 0; i < NOTCHAR; ++i) - if (IS_WORD_CONSTITUENT(i)) - setbit(i, letters); - setbit(eolbyte, newline); - } + MALLOC (grps, NOTCHAR); + MALLOC (labels, NOTCHAR); zeroset(matches); @@ -2356,23 +2482,19 @@ setbit(d->tokens[pos.index], matches); else if (d->tokens[pos.index] >= CSET) copyset(d->charclasses[d->tokens[pos.index] - CSET], matches); -#if MBS_SUPPORT - else if (d->tokens[pos.index] == ANYCHAR - || d->tokens[pos.index] == MBCSET) - /* MB_CUR_MAX > 1 */ + else if (MBS_SUPPORT + && (d->tokens[pos.index] == ANYCHAR + || d->tokens[pos.index] == MBCSET)) + /* MB_CUR_MAX > 1 */ { /* ANYCHAR and MBCSET must match with a single character, so we must put it to d->states[s].mbps, which contains the positions which can match with a single character not a byte. */ if (d->states[s].mbps.nelem == 0) - { - MALLOC(d->states[s].mbps.elems, position, - d->states[s].elems.nelem); - } + alloc_position_set(&d->states[s].mbps, 1); insert(pos, &(d->states[s].mbps)); continue; } -#endif /* MBS_SUPPORT */ else continue; @@ -2381,18 +2503,20 @@ if (pos.constraint != 0xFF) { if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, - d->states[s].newline, 1)) + d->states[s].context & CTX_NEWLINE, + CTX_NEWLINE)) clrbit(eolbyte, matches); if (! MATCHES_NEWLINE_CONTEXT(pos.constraint, - d->states[s].newline, 0)) + d->states[s].context & CTX_NEWLINE, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= newline[j]; if (! MATCHES_LETTER_CONTEXT(pos.constraint, - d->states[s].letter, 1)) + d->states[s].context & CTX_LETTER, + CTX_LETTER)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= ~letters[j]; if (! MATCHES_LETTER_CONTEXT(pos.constraint, - d->states[s].letter, 0)) + d->states[s].context & CTX_LETTER, 0)) for (j = 0; j < CHARCLASS_INTS; ++j) matches[j] &= letters[j]; @@ -2436,14 +2560,16 @@ { copyset(leftovers, labels[ngrps]); copyset(intersect, labels[j]); - MALLOC(grps[ngrps].elems, position, d->nleaves); - copy(&grps[j], &grps[ngrps]); + MALLOC(grps[ngrps].elems, d->nleaves); + memcpy(grps[ngrps].elems, grps[j].elems, + sizeof (grps[j].elems[0]) * grps[j].nelem); + grps[ngrps].nelem = grps[j].nelem; ++ngrps; } - /* Put the position in the current group. Note that there is no - reason to call insert() here. */ - grps[j].elems[grps[j].nelem++] = pos; + /* Put the position in the current group. The constraint is + irrelevant here. */ + grps[j].elems[grps[j].nelem++] = pos.index; /* If every character matching the current position has been accounted for, we're done. */ @@ -2457,40 +2583,34 @@ { copyset(matches, labels[ngrps]); zeroset(matches); - MALLOC(grps[ngrps].elems, position, d->nleaves); + MALLOC(grps[ngrps].elems, d->nleaves); grps[ngrps].nelem = 1; - grps[ngrps].elems[0] = pos; + grps[ngrps].elems[0] = pos.index; ++ngrps; } } - MALLOC(follows.elems, position, d->nleaves); - MALLOC(tmp.elems, position, d->nleaves); + alloc_position_set(&follows, d->nleaves); + alloc_position_set(&tmp, d->nleaves); /* If we are a searching matcher, the default transition is to a state containing the positions of state 0, otherwise the default transition is to fail miserably. */ if (d->searchflag) { - wants_newline = 0; - wants_letter = 0; - for (i = 0; i < d->states[0].elems.nelem; ++i) - { - if (PREV_NEWLINE_DEPENDENT(d->states[0].elems.elems[i].constraint)) - wants_newline = 1; - if (PREV_LETTER_DEPENDENT(d->states[0].elems.elems[i].constraint)) - wants_letter = 1; - } + /* Find the state(s) corresponding to the positions of state 0. */ copy(&d->states[0].elems, &follows); - state = state_index(d, &follows, 0, 0); - if (wants_newline) - state_newline = state_index(d, &follows, 1, 0); + separate_contexts = state_separate_contexts(&follows, CTX_ANY); + state = state_index(d, &follows, 0); + if (separate_contexts & CTX_NEWLINE) + state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; - if (wants_letter) - state_letter = state_index(d, &follows, 0, 1); + if (separate_contexts & CTX_LETTER) + state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; + for (i = 0; i < NOTCHAR; ++i) trans[i] = (IS_WORD_CONSTITUENT(i)) ? state_letter : state; trans[eolbyte] = state_newline; @@ -2506,10 +2626,9 @@ /* Find the union of the follows of the positions of the group. This is a hideously inefficient loop. Fix it someday. */ for (j = 0; j < grps[i].nelem; ++j) - for (k = 0; k < d->follows[grps[i].elems[j].index].nelem; ++k) - insert(d->follows[grps[i].elems[j].index].elems[k], &follows); + for (k = 0; k < d->follows[grps[i].elems[j]].nelem; ++k) + insert(d->follows[grps[i].elems[j]].elems[k], &follows); -#if MBS_SUPPORT if (d->mb_cur_max > 1) { /* If a token in follows.elems is not 1st byte of a multibyte @@ -2528,7 +2647,7 @@ by accepting accepts 1st byte of , and state[i+1] accepts 2nd byte of , if state[i+1] encounter the codepoint of , it must not be but 2nd byte of - , so we can not add state[0]. */ + , so we cannot add state[0]. */ next_isnt_1st_byte = 0; for (j = 0; j < follows.nelem; ++j) @@ -2540,42 +2659,27 @@ } } } -#endif /* If we are building a searching matcher, throw in the positions of state 0 as well. */ -#if MBS_SUPPORT - if (d->searchflag && (d->mb_cur_max == 1 || !next_isnt_1st_byte)) -#else - if (d->searchflag) -#endif + if (d->searchflag + && (! MBS_SUPPORT + || (d->mb_cur_max == 1 || !next_isnt_1st_byte))) for (j = 0; j < d->states[0].elems.nelem; ++j) insert(d->states[0].elems.elems[j], &follows); /* Find out if the new state will want any context information. */ - wants_newline = 0; - if (tstbit(eolbyte, labels[i])) - for (j = 0; j < follows.nelem; ++j) - if (PREV_NEWLINE_DEPENDENT(follows.elems[j].constraint)) - wants_newline = 1; - - wants_letter = 0; - for (j = 0; j < CHARCLASS_INTS; ++j) - if (labels[i][j] & letters[j]) - break; - if (j < CHARCLASS_INTS) - for (j = 0; j < follows.nelem; ++j) - if (PREV_LETTER_DEPENDENT(follows.elems[j].constraint)) - wants_letter = 1; + possible_contexts = charclass_context(labels[i]); + separate_contexts = state_separate_contexts(&follows, possible_contexts); /* Find the state(s) corresponding to the union of the follows. */ - state = state_index(d, &follows, 0, 0); - if (wants_newline) - state_newline = state_index(d, &follows, 1, 0); + state = state_index(d, &follows, 0); + if (separate_contexts & CTX_NEWLINE) + state_newline = state_index(d, &follows, CTX_NEWLINE); else state_newline = state; - if (wants_letter) - state_letter = state_index(d, &follows, 0, 1); + if (separate_contexts & CTX_LETTER) + state_letter = state_index(d, &follows, CTX_LETTER); else state_letter = state; @@ -2599,6 +2703,8 @@ free(grps[i].elems); free(follows.elems); free(tmp.elems); + free(grps); + free(labels); } /* Some routines for manipulating a compiled dfa's transition tables. @@ -2633,17 +2739,14 @@ /* Set up the success bits for this state. */ d->success[s] = 0; - if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 1, d->states[s].letter, 0, - s, *d)) - d->success[s] |= 4; - if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 1, - s, *d)) - d->success[s] |= 2; - if (ACCEPTS_IN_CONTEXT(d->states[s].newline, 0, d->states[s].letter, 0, - s, *d)) - d->success[s] |= 1; + if (ACCEPTS_IN_CONTEXT(d->states[s].context, CTX_NEWLINE, s, *d)) + d->success[s] |= CTX_NEWLINE; + if (ACCEPTS_IN_CONTEXT(d->states[s].context, CTX_LETTER, s, *d)) + d->success[s] |= CTX_LETTER; + if (ACCEPTS_IN_CONTEXT(d->states[s].context, CTX_NONE, s, *d)) + d->success[s] |= CTX_NONE; - MALLOC(trans, int, NOTCHAR); + MALLOC(trans, NOTCHAR); dfastate(s, d, trans); /* Now go through the new transition table, and make sure that the trans @@ -2656,11 +2759,11 @@ while (trans[i] >= d->tralloc) d->tralloc *= 2; - REALLOC(d->realtrans, int *, d->tralloc + 1); + REALLOC(d->realtrans, d->tralloc + 1); d->trans = d->realtrans + 1; - REALLOC(d->fails, int *, d->tralloc); - REALLOC(d->success, int, d->tralloc); - REALLOC(d->newlines, int, d->tralloc); + REALLOC(d->fails, d->tralloc); + REALLOC(d->success, d->tralloc); + REALLOC(d->newlines, d->tralloc); while (oldalloc < d->tralloc) { d->trans[oldalloc] = NULL; @@ -2684,15 +2787,14 @@ { d->tralloc = 1; d->trcount = 0; - CALLOC(d->realtrans, int *, d->tralloc + 1); + CALLOC(d->realtrans, d->tralloc + 1); d->trans = d->realtrans + 1; - CALLOC(d->fails, int *, d->tralloc); - MALLOC(d->success, int, d->tralloc); - MALLOC(d->newlines, int, d->tralloc); + CALLOC(d->fails, d->tralloc); + MALLOC(d->success, d->tralloc); + MALLOC(d->newlines, d->tralloc); build_state(0, d); } -#if MBS_SUPPORT /* Multibyte character handling sub-routines for dfaexec. */ /* Initial state may encounter the byte which is not a single byte character @@ -2729,11 +2831,11 @@ while (new_state >= d->tralloc) d->tralloc *= 2; - REALLOC(d->realtrans, int *, d->tralloc + 1); + REALLOC(d->realtrans, d->tralloc + 1); d->trans = d->realtrans + 1; - REALLOC(d->fails, int *, d->tralloc); - REALLOC(d->success, int, d->tralloc); - REALLOC(d->newlines, int, d->tralloc); + REALLOC(d->fails, d->tralloc); + REALLOC(d->success, d->tralloc); + REALLOC(d->newlines, d->tralloc); while (oldalloc < d->tralloc) { d->trans[oldalloc] = NULL; @@ -2796,51 +2898,42 @@ return rval; } -/* Check whether period can match or not in the current context. If it can, - return the amount of the bytes with which period can match, otherwise - return 0. - `pos' is the position of the period. `idx' is the index from the - buf_begin, and it is the current position in the buffer. */ +/* Match a "." against the current context. buf_begin[IDX] is the + current position. Return the length of the match, in bytes. + POS is the position of the ".". */ static int match_anychar (struct dfa *d, int s, position pos, int idx) { - int newline = 0; - int letter = 0; + int context; wchar_t wc; int mbclen; wc = inputwcs[idx]; mbclen = (mblen_buf[idx] == 0)? 1 : mblen_buf[idx]; - /* Check context. */ + /* Check syntax bits. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; - newline = 1; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; - newline = 1; } - if (iswalnum(wc) || wc == L'_') - letter = 1; - - if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].newline, - newline, d->states[s].letter, letter)) + context = wchar_context(wc); + if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].context, context)) return 0; return mbclen; } -/* Check whether bracket expression can match or not in the current context. - If it can, return the amount of the bytes with which expression can match, - otherwise return 0. - `pos' is the position of the bracket expression. `idx' is the index - from the buf_begin, and it is the current position in the buffer. */ +/* Match a bracket expression against the current context. + buf_begin[IDX] is the current position. + Return the length of the match, in bytes. + POS is the position of the bracket expression. */ static int match_mb_charset (struct dfa *d, int s, position pos, int idx) { @@ -2850,34 +2943,29 @@ with which this operator match. */ int op_len; /* Length of the operator. */ char buffer[128]; - wchar_t wcbuf[6]; /* Pointer to the structure to which we are currently refering. */ struct mb_char_classes *work_mbc; - int newline = 0; - int letter = 0; + int context; wchar_t wc; /* Current refering character. */ wc = inputwcs[idx]; - /* Check context. */ + /* Check syntax bits. */ if (wc == (wchar_t)eolbyte) { if (!(syntax_bits & RE_DOT_NEWLINE)) return 0; - newline = 1; } else if (wc == (wchar_t)'\0') { if (syntax_bits & RE_DOT_NOT_NULL) return 0; - newline = 1; } - if (iswalnum(wc) || wc == L'_') - letter = 1; - if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].newline, - newline, d->states[s].letter, letter)) + + context = wchar_context(wc); + if (!SUCCEEDS_IN_CONTEXT(pos.constraint, d->states[s].context, context)) return 0; /* Assign the current refering operator to work_mbc. */ @@ -2927,17 +3015,11 @@ } } - wcbuf[0] = wc; - wcbuf[1] = wcbuf[3] = wcbuf[5] = '\0'; - /* match with a range? */ for (i = 0; inranges; i++) { - wcbuf[2] = work_mbc->range_sts[i]; - wcbuf[4] = work_mbc->range_ends[i]; - - if (wcscoll(wcbuf, wcbuf+2) >= 0 && - wcscoll(wcbuf+4, wcbuf) >= 0) + if (work_mbc->range_sts[i] <= wc && + wc <= work_mbc->range_ends[i]) goto charset_matched; } @@ -2967,7 +3049,7 @@ int i; int* rarray; - MALLOC(rarray, int, d->states[s].mbps.nelem); + MALLOC(rarray, d->states[s].mbps.nelem); for (i = 0; i < d->states[s].mbps.nelem; ++i) { position pos = d->states[s].mbps.elems[i]; @@ -2980,7 +3062,7 @@ rarray[i] = match_mb_charset(d, s, pos, idx); break; default: - break; /* can not happen. */ + break; /* cannot happen. */ } } return rarray; @@ -3087,8 +3169,7 @@ } /* This state has some operators which can match a multibyte character. */ - follows.nelem = 0; - MALLOC(follows.elems, position, d->nleaves); + alloc_position_set(&follows, d->nleaves); /* `maxlen' may be longer than the length of a character, because it may not be a character but a (multi character) collating element. @@ -3097,12 +3178,11 @@ transit_state_consume_1char(d, s, pp, match_lens, &mbclen, &follows); wc = inputwcs[*pp - mbclen - buf_begin]; - s1 = state_index(d, &follows, wc == L'\n', iswalnum(wc)); + s1 = state_index(d, &follows, wchar_context (wc)); realloc_trans_if_necessary(d, s1); while (*pp - p1 < maxlen) { - follows.nelem = 0; transit_state_consume_1char(d, s1, pp, NULL, &mbclen, &follows); for (i = 0; i < nelem ; i++) @@ -3115,7 +3195,7 @@ } wc = inputwcs[*pp - mbclen - buf_begin]; - s1 = state_index(d, &follows, wc == L'\n', iswalnum(wc)); + s1 = state_index(d, &follows, wchar_context (wc)); realloc_trans_if_necessary(d, s1); } free(match_lens); @@ -3123,7 +3203,55 @@ return s1; } + +/* Initialize mblen_buf and inputwcs with data from the next line. */ + +static void +prepare_wc_buf (const char *begin, const char *end) +{ +#if MBS_SUPPORT + unsigned char eol = eolbyte; + size_t remain_bytes, i; + + buf_begin = (unsigned char *) begin; + + remain_bytes = 0; + for (i = 0; i < end - begin + 1; i++) + { + if (remain_bytes == 0) + { + remain_bytes + = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs); + if (remain_bytes < 1 + || remain_bytes == (size_t) -1 + || remain_bytes == (size_t) -2 + || (remain_bytes == 1 && inputwcs[i] == (wchar_t)begin[i])) + { + remain_bytes = 0; + inputwcs[i] = (wchar_t)begin[i]; + mblen_buf[i] = 0; + if (begin[i] == eol) + break; + } + else + { + mblen_buf[i] = remain_bytes; + remain_bytes--; + } + } + else + { + mblen_buf[i] = remain_bytes; + inputwcs[i] = 0; + remain_bytes--; + } + } + + buf_end = (unsigned char *) (begin + i); + mblen_buf[i] = 0; + inputwcs[i] = 0; /* sentinel */ #endif /* MBS_SUPPORT */ +} /* Search through a buffer looking for a match to the given struct dfa. Find the first occurrence of a string matching the regexp in the @@ -3132,34 +3260,22 @@ points to the beginning of the buffer, and END points to the first byte after its end. Note however that we store a sentinel byte (usually newline) in *END, so the actual buffer must be one byte longer. - When NEWLINE is nonzero, newlines may appear in the matching string. + When ALLOW_NL is nonzero, newlines may appear in the matching string. If COUNT is non-NULL, increment *COUNT once for each newline processed. Finally, if BACKREF is non-NULL set *BACKREF to indicate whether we encountered a back-reference (1) or not (0). The caller may use this to decide whether to fall back on a backtracking matcher. */ char * dfaexec (struct dfa *d, char const *begin, char *end, - int newline, int *count, int *backref) + int allow_nl, int *count, int *backref) { - int s, s1, tmp; /* Current state. */ + int s, s1; /* Current state. */ unsigned char const *p; /* Current input character. */ int **trans, *t; /* Copy of d->trans so it can be optimized into a register. */ unsigned char eol = eolbyte; /* Likewise for eolbyte. */ - static int sbit[NOTCHAR]; /* Table for anding with d->success. */ - static int sbit_init; unsigned char saved_end; - if (! sbit_init) - { - unsigned int i; - - sbit_init = 1; - for (i = 0; i < NOTCHAR; ++i) - sbit[i] = (IS_WORD_CONSTITUENT(i)) ? 2 : 1; - sbit[eol] = 4; - } - if (! d->tralloc) build_state_zero(d); @@ -3169,57 +3285,20 @@ saved_end = *(unsigned char *) end; *end = eol; -#if MBS_SUPPORT if (d->mb_cur_max > 1) { - unsigned int i; - int remain_bytes; - buf_begin = (unsigned char *) begin; - buf_end = (unsigned char *) end; - - /* initialize mblen_buf, and inputwcs. */ - MALLOC(mblen_buf, unsigned char, end - begin + 2); - MALLOC(inputwcs, wchar_t, end - begin + 2); - memset(&mbs, 0, sizeof mbs); - remain_bytes = 0; - for (i = 0; i < end - begin + 1; i++) - { - if (remain_bytes == 0) - { - remain_bytes - = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs); - if (remain_bytes < 1 - || (remain_bytes == 1 && inputwcs[i] == (wchar_t)begin[i])) - { - remain_bytes = 0; - inputwcs[i] = (wchar_t)begin[i]; - mblen_buf[i] = 0; - } - else - { - mblen_buf[i] = remain_bytes; - remain_bytes--; - } - } - else - { - mblen_buf[i] = remain_bytes; - inputwcs[i] = 0; - remain_bytes--; - } - } - mblen_buf[i] = 0; - inputwcs[i] = 0; /* sentinel */ + MALLOC(mblen_buf, end - begin + 2); + MALLOC(inputwcs, end - begin + 2); + memset(&mbs, 0, sizeof(mbstate_t)); + prepare_wc_buf ((const char *) p, end); } -#endif /* MBS_SUPPORT */ for (;;) { -#if MBS_SUPPORT if (d->mb_cur_max > 1) - while ((t = trans[s])) + while ((t = trans[s]) != NULL) { - if ((char *) p > end) + if (p > buf_end) break; s1 = s; SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p); @@ -3230,21 +3309,37 @@ continue; } + /* Falling back to the glibc matcher in this case gives + better performance (up to 25% better on [a-z], for + example) and enables support for collating symbols and + equivalence classes. */ + if (backref) + { + *backref = 1; + free(mblen_buf); + free(inputwcs); + *end = saved_end; + return (char *) p; + } + /* Can match with a multibyte character (and multi character collating element). Transition table might be updated. */ s = transit_state(d, s, &p); trans = d->trans; } else -#endif /* MBS_SUPPORT */ - while ((t = trans[s]) != 0) { /* hand-optimized loop */ - s1 = t[*p++]; - if ((t = trans[s1]) == 0) { - tmp = s ; s = s1 ; s1 = tmp ; /* swap */ - break; + { + while ((t = trans[s]) != NULL) + { + s1 = t[*p++]; + if ((t = trans[s1]) == NULL) + { + int tmp = s; s = s1; s1 = tmp; /* swap */ + break; + } + s = t[*p++]; + } } - s = t[*p++]; - } if (s >= 0 && (char *) p <= end && d->fails[s]) { @@ -3252,19 +3347,16 @@ { if (backref) *backref = (d->states[s].backref != 0); -#if MBS_SUPPORT if (d->mb_cur_max > 1) { free(mblen_buf); free(inputwcs); } -#endif /* MBS_SUPPORT */ *end = saved_end; return (char *) p; } s1 = s; -#if MBS_SUPPORT if (d->mb_cur_max > 1) { /* Can match with a multibyte character (and multicharacter @@ -3273,25 +3365,28 @@ trans = d->trans; } else -#endif /* MBS_SUPPORT */ - s = d->fails[s][*p++]; + s = d->fails[s][*p++]; continue; } /* If the previous character was a newline, count it. */ - if (count && (char *) p <= end && p[-1] == eol) - ++*count; + if ((char *) p <= end && p[-1] == eol) + { + if (count) + ++*count; + + if (d->mb_cur_max > 1) + prepare_wc_buf ((const char *) p, end); + } /* Check if we've run off the end of the buffer. */ if ((char *) p > end) { -#if MBS_SUPPORT if (d->mb_cur_max > 1) { free(mblen_buf); free(inputwcs); } -#endif /* MBS_SUPPORT */ *end = saved_end; return NULL; } @@ -3303,7 +3398,7 @@ continue; } - if (p[-1] == eol && newline) + if (p[-1] == eol && allow_nl) { s = d->newlines[s1]; continue; @@ -3313,7 +3408,6 @@ } } -#if MBS_SUPPORT static void free_mbdata (struct dfa *d) { @@ -3344,7 +3438,6 @@ d->mbcsets = NULL; d->nmbcsets = 0; } -#endif /* Initialize the components of a dfa that the other routines don't initialize for themselves. */ @@ -3354,29 +3447,28 @@ memset (d, 0, sizeof *d); d->calloc = 1; - MALLOC(d->charclasses, charclass, d->calloc); + MALLOC(d->charclasses, d->calloc); d->talloc = 1; - MALLOC(d->tokens, token, d->talloc); + MALLOC(d->tokens, d->talloc); -#if MBS_SUPPORT d->mb_cur_max = MB_CUR_MAX; + if (d->mb_cur_max > 1) { d->nmultibyte_prop = 1; - MALLOC(d->multibyte_prop, int, d->nmultibyte_prop); + MALLOC(d->multibyte_prop, d->nmultibyte_prop); d->mbcsets_alloc = 1; - MALLOC(d->mbcsets, struct mb_char_classes, d->mbcsets_alloc); + MALLOC(d->mbcsets, d->mbcsets_alloc); } -#endif } -#if MBS_SUPPORT static void dfaoptimize (struct dfa *d) { unsigned int i; - if (!using_utf8()) + + if (!MBS_SUPPORT || !using_utf8()) return; for (i = 0; i < d->tindex; ++i) @@ -3397,7 +3489,6 @@ free_mbdata (d); d->mb_cur_max = 1; } -#endif /* Parse and analyze a single string of the given length. */ void @@ -3406,9 +3497,7 @@ dfainit(d); dfaparse(s, len, d); dfamust(d); -#if MBS_SUPPORT dfaoptimize(d); -#endif dfaanalyze(d, searchflag); } @@ -3422,16 +3511,13 @@ free(d->charclasses); free(d->tokens); -#if MBS_SUPPORT if (d->mb_cur_max > 1) free_mbdata(d); -#endif /* MBS_SUPPORT */ for (i = 0; i < d->sindex; ++i) { free(d->states[i].elems.elems); -#if MBS_SUPPORT - free(d->states[i].mbps.elems); -#endif /* MBS_SUPPORT */ + if (MBS_SUPPORT) + free(d->states[i].mbps.elems); } free(d->states); for (i = 0; i < d->tindex; ++i) @@ -3539,23 +3625,15 @@ 'psi|epsilon' is likelier)? */ static char * -icatalloc (char const *old, char const *new) +icatalloc (char *old, char const *new) { char *result; - size_t oldsize, newsize; - - newsize = (new == NULL) ? 0 : strlen(new); - if (old == NULL) - oldsize = 0; - else if (newsize == 0) - return (char *) old; - else oldsize = strlen(old); - if (old == NULL) - result = malloc(newsize + 1); - else - result = realloc((void *) old, oldsize + newsize + 1); - if (result != NULL && new != NULL) - (void) strcpy(result + oldsize, new); + size_t oldsize = old == NULL ? 0 : strlen (old); + size_t newsize = new == NULL ? 0 : strlen (new); + if (newsize == 0) + return old; + result = xrealloc (old, oldsize + newsize + 1); + strcpy (result + oldsize, new); return result; } @@ -3565,7 +3643,7 @@ return icatalloc (NULL, string); } -static char * +static char * _GL_ATTRIBUTE_PURE istrstr (char const *lookin, char const *lookfor) { char const *cp; @@ -3626,9 +3704,7 @@ cpp[i] = NULL; } /* Add the new string. */ - cpp = realloc((char *) cpp, (i + 2) * sizeof *cpp); - if (cpp == NULL) - return NULL; + REALLOC(cpp, i + 2); cpp[i] = new; cpp[i + 1] = NULL; return cpp; @@ -3665,8 +3741,16 @@ } if (len == 0) continue; - if ((cpp = enlist(cpp, lcp, len)) == NULL) - break; + { + char **p = enlist (cpp, lcp, len); + if (p == NULL) + { + freelist (cpp); + cpp = NULL; + break; + } + cpp = p; + } } return cpp; } @@ -3753,21 +3837,16 @@ result = empty_string; exact = 0; - musts = malloc((d->tindex + 1) * sizeof *musts); - if (musts == NULL) - return; + MALLOC (musts, d->tindex + 1); mp = musts; for (i = 0; i <= d->tindex; ++i) mp[i] = must0; for (i = 0; i <= d->tindex; ++i) { - mp[i].in = malloc(sizeof *mp[i].in); - mp[i].left = malloc(2); - mp[i].right = malloc(2); - mp[i].is = malloc(2); - if (mp[i].in == NULL || mp[i].left == NULL || - mp[i].right == NULL || mp[i].is == NULL) - goto done; + mp[i].in = xmalloc(sizeof *mp[i].in); + mp[i].left = xmalloc(2); + mp[i].right = xmalloc(2); + mp[i].is = xmalloc(2); mp[i].left[0] = mp[i].right[0] = mp[i].is[0] = '\0'; mp[i].in[0] = NULL; } @@ -3874,13 +3953,8 @@ char *tp; tp = icpyalloc(lmp->right); - if (tp == NULL) - goto done; tp = icatalloc(tp, rmp->left); - if (tp == NULL) - goto done; - lmp->in = enlist(lmp->in, tp, - strlen(tp)); + lmp->in = enlist(lmp->in, tp, strlen(tp)); free(tp); if (lmp->in == NULL) goto done; @@ -3921,10 +3995,9 @@ goto done; } else if (t >= CSET -#if MBS_SUPPORT + || !MBS_SUPPORT || t == ANYCHAR || t == MBCSET -#endif /* MBS_SUPPORT */ ) { /* easy enough */ @@ -3957,9 +4030,9 @@ done: if (strlen(result)) { - MALLOC(dm, struct dfamust, 1); + MALLOC(dm, 1); dm->exact = exact; - MALLOC(dm->must, char, strlen(result) + 1); + MALLOC(dm->must, strlen(result) + 1); strcpy(dm->must, result); dm->next = d->musts; d->musts = dm; @@ -3982,7 +4055,7 @@ return xmalloc (sizeof (struct dfa)); } -struct dfamust * +struct dfamust * _GL_ATTRIBUTE_PURE dfamusts (struct dfa const *d) { return d->musts; diff -Nru gawk-3.1.8+dfsg/dfa.h gawk-4.0.1+dfsg/dfa.h --- gawk-3.1.8+dfsg/dfa.h 2010-04-20 07:58:46.000000000 +0000 +++ gawk-4.0.1+dfsg/dfa.h 2012-03-28 19:47:53.000000000 +0000 @@ -1,5 +1,5 @@ /* dfa.h - declarations for GNU deterministic regexp compiler - Copyright (C) 1988, 1998, 2007, 2009-2010 Free Software Foundation, Inc. + Copyright (C) 1988, 1998, 2007, 2009-2011 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 @@ -22,6 +22,13 @@ # define __attribute__(x) #endif +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + /* Element of a list of strings, at least one of which is known to appear in any R.E. matching the DFA. */ struct dfamust @@ -90,6 +97,12 @@ /* Error handling. */ +/* dfawarn() is called by the regexp routines whenever a regex is compiled + that likely doesn't do what the user wanted. It takes a single + argument, a NUL-terminated string describing the situation. The user + must supply a dfawarn. */ +extern void dfawarn (const char *); + /* dfaerror() is called by the regexp routines whenever an error occurs. It takes a single argument, a NUL-terminated string describing the error. The user must supply a dfaerror. */ diff -Nru gawk-3.1.8+dfsg/doc/ChangeLog gawk-4.0.1+dfsg/doc/ChangeLog --- gawk-3.1.8+dfsg/doc/ChangeLog 2010-05-06 17:56:25.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/ChangeLog 2012-03-28 20:02:36.000000000 +0000 @@ -1,754 +1,60 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Tue Apr 20 11:48:31 2010 Arnold D. Robbins +2012-02-10 Arnold D. Robbins - * texinfo.tex: Update to latest from texinfo git repository. - * gawk.texi, gawk.1, awkcard.in: Update version and copyright dates. + * gawk.texi, awkcard.in: Bump patch level. + * texinfo.tex: Updated from Texinfo CVS. -Thu Mar 25 21:51:58 2010 Arnold D. Robbins +2011-12-06 Arnold D. Robbins - * gawk.1: Clarify the socket timeout environment variables. + * gawk.texi: Various typo fixes from mailing list. -Wed Mar 10 21:28:12 2010 Arnold D. Robbins +2011-11-10 Arnold D. Robbins - * gawk.texi: Reworded 'index in array' so that there's no chance of - someone using 'index' as a real subscript. Thanks to Hermann - Peifer for the push. + * gawk.1: Fix some .BR to be .B. -Thu Feb 4 20:54:48 2010 Arnold D. Robbins +2011-11-08 Arnold D. Robbins - * gawk.texi: Multiple cleanups and bringing of things up to date. - * gawk.1: Ditto, only not as much. - * Makefile.am: New `all-pdf' target to make PDF files of manpage - and reference card. + * gawk.texi: Further improvement in the discussion of sorted array + traversal. Some sections reordered and text edited to suit. -Tue Aug 4 06:07:35 2009 Arnold D. Robbins +2011-11-06 Arnold D. Robbins - * gawk.texi, gawk.1, awkcard.in: Document that 0 flag in - printf applies only to the numeric formats. + * gawk.texi: Try to improve discussion of sorted array + traversal. -Tue Aug 4 05:58:52 2009 Arnold D. Robbins +2011-09-24 Arnold D. Robbins - * texinfo.tex: Updated to current version. + * gawk.1: Fix some spelling errors. Thanks to + Jeroen Schot . + * gawk.texi: Some minor fixes. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2011-07-28 Arnold D. Robbins - * Release 3.1.7: Release tar file made. + * gawk.texi (Gory Details): Restore text on historical behavior + etc. and add explanation on gawk 4.0.x. -Tue Jul 21 22:20:25 2009 Arnold D. Robbins +2011-07-17 Arnold D. Robbins - * gawk.texi, awkcard.in: Update mawk site information now - that Thomas Dickey is maintaining it. + * gawk.texi: Add reference in node Expressions to node Precedence, + based on suggestion from Dan Jacobson dated 4 Jun 2001. -Mon Jul 13 07:53:32 2009 Arnold D. Robbins +2011-07-17 Paul Eggert - * Makefile.am (SEDME2): New macro, used in making awkcard.ps, - removes last empty page. Finally! + * gawk.texi: Warn up-front (indirectly) that plain gawk is not + compatible with SVR4 awk and with POSIX awk. Describe how + gawk differs from the GNU standard in its interpretation of + POSIXLY_CORRECT. (From mail dated 15 May 2001). -Fri Jul 10 10:35:29 2009 Arnold D. Robbins +2011-06-24 Arnold D. Robbins - * awkcard.in: Rearrange items for better formatting and - organization. - * gawk.texi (Exit Status): New node to document exit values. - (Exit Statement): Give portability advice about exit value. + * Makefile.am (EXTRA_DIST): Add ChangeLog.0. + * 4.0.0: Remake the tar ball. -Wed Jul 8 08:55:50 2009 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * awkcard.in: Really fix table option for --verbose. Other - fixes and improvements, including document %'d flag. - -Tue Jul 7 09:13:02 2009 Arnold D. Robbins - - * awkcard.in: Fix table option for --verbose. - -Mon Jun 8 00:40:26 2009 Tommi Vainikainen - - * gawk.1: Bug fix to restore space between paragraphs at - entry for "--". - -Thu May 21 21:09:59 2009 Arnold D. Robbins - - * gawk.1, awkcard.in: Document new -O / --optimize option. - * gawk.texi (Options): Likewise. - -Fri May 15 14:34:37 2009 Arnold D. Robbins - - * gawk.texi (User-defined): Document that you can't use - the name of a built-in variable as a function parameter. - -Sat May 2 23:36:10 2009 Arnold D. Robbins - - * gawk.texi (Other Versions): Add Quiktrim awk. - (How to Contribute): Change things to point to awk.info. - -Mon Apr 6 22:29:47 2009 Arnold D. Robbins - - * awkcard.in: Bell Labs awk also supports fflush() - and fflush(""). Thanks to Steffen Schuler - . - -Mon Mar 30 21:26:04 2009 Arnold D. Robbins - - * gawk.texi (Simple Server): Fix bug since 3.1.0 where error - message from typo was in the middle of the HandleGet function. - Thanks to Tim Menzies for catching this. - -Mon Feb 9 22:11:16 2009 Arnold D. Robbins - - * gawk.texi (Translate Program): Bug fix in stranslate - function from Steffen Schuler . - -Tue Feb 3 22:06:10 2009 Arnold D. Robbins - - * gawk.texi (Regexp Field Splitting): Documented dark corner - of ^ in FS. - -Sat Jan 17 20:37:12 2009 Arnold D. Robbins - - * gawk.texi (Plain Getline): Bug fix in code. Thanks to - Steffen Schuler . - -Mon Jan 5 22:47:42 2009 Arnold D. Robbins - - * gawk.1, awkcard.in: Document that getline returns 1 - on sucess. Thanks to Paolo for - the report. - -Fri Dec 26 14:45:39 2008 Arnold D. Robbins - - * gawk.texi, gawkinet.texi: Update to FDL 1.3. - -Mon Dec 1 21:20:39 2008 Arnold D. Robbins - - * gawk.texi (File Checking): Correct the text at the end; getline - isn't fatal, period, not related to POSIX. Thanks to - Seb for pointing this out. - (Round-Function): Change initial return when equal to return ival, - which lops off any digits, e.g. if given 121.0. Thanks to - Timothy J. Stefanski . - -Fri Aug 1 17:34:55 2008 Arnold D. Robbins - - * gawk.texi (Signature Program): Added new subsection. - -Thu Jul 31 21:38:08 2008 Arnold D. Robbins - - * gawk.texi (Variable Typing): Document that array elements created - by `match' also get strnum attribute. - -Mon Jun 2 22:47:08 2008 Arnold D. Robbins - - * gawk.texi (Control Letters): Add a note about %c only - taking values from 0 to 255. - (DOS Quoting): New node. - -Thu Jan 31 16:17:27 2008 Arnold D. Robbins - - * gawk.texi, gawkinet.texi: Updated the Back-Cover text per - latest from the FSF. - -Fri Jan 25 12:13:39 2008 Dave Pitts - - * gawk.texi (pwcat.c, grcat.c): Added ZOS_USS changes. - -Mon Jan 14 05:30:16 2008 Arnold D. Robbins - - * gawk.texi: Add maintainer contact info for z/OS. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Fri Oct 19 04:13:33 2007 Arnold D. Robbins - - * gawk.1: Add length(array) to list of extensions at end. - Revise date. - -Thu Oct 18 08:40:59 2007 Arnold D. Robbins - - * texinfo.tex: Updated to version from Texinfo 4.11. - -Sun Oct 14 20:37:59 2007 Arnold D. Robbins - - * awkcard.in: Fix version numbers and copyright info, minor - cleanups to format nicely. - -Sun Sep 30 22:30:05 2007 Arnold D. Robbins - - * gawk.texi (Conversion): Add table describing locale decimal - point versus period. - -Sat Sep 8 23:53:46 2007 Arnold D. Robbins - - * gawk.texi: A number of minor fixes based on suggestions - from Jack Kelley . - -Sat Aug 11 22:46:14 2007 Arnold D. Robbins - - * gawk.texi (Copying): Move to GPL 3. - -Wed May 30 17:11:19 2007 Arnold D. Robbins - - * Makefile.am (CLEANFILES): Added, so that even "make distclean" - will do the right thing. - (clean): Removed, let automake to do it. - -Tue May 29 22:49:16 2007 Arnold D. Robbins - - * gawk.texi: Document --use-lc-numeric. Document that some - VMS systems come with an old version of gawk. - -Mon May 28 08:21:51 2007 Arnold D. Robbins - - * gawk.1, awkcard.in: Document --use-lc-numeric. - -Tue May 15 13:27:38 2007 Arnold D. Robbins - - * gawk.texi, gawk.1: Documented --disable-directories-fatal - configure option. - -Wed May 9 21:50:44 2007 Arnold D. Robbins - - * gawk.1: Reviewed and updated, minor typos fixed. - * awkcard.in: Added mention of %F. - -Wed May 2 19:55:02 2007 Arnold D. Robbins - - * gawk.texi: Cleaned up discussion of string concatenation - where needed, including a note about the mixed treatment - of `"echo " "date" | getline'. Sigh. - -Sun Apr 29 13:33:27 2007 Arnold D. Robbins - - * gawk.texi (Time Functions): Update description of strftime - for third utc-flag argument. Other minor fixes. - * gawk.1, awkcard.in: Same. - -Tue Apr 3 22:47:40 2007 Arnold D. Robbins - - * gawk.texi (New Ports): Update list of files for all of - regex that should not be messed with lightly. - -Wed Mar 21 09:02:53 2007 Arnold D. Robbins - - * gawk.texi: Removed last vestiges of arnold@gnu.org - email address. - -Wed Mar 7 13:06:31 2007 Arnold D. Robbins - - * gawk.texi (Getopt Function): Add a note that user level - code must clear out ARGV from 1 to Optind. - Thanks to Matthew.Hall1@VerizonWireless.com, from mail - dated Tue, 02 Aug 2005 09:04:37 -0700. - -Wed Mar 7 08:48:02 2007 Arnold D. Robbins - - * gawk.texi: Fix my personal email address. Sheesh. - Thanks again to Sahak Petrosyan . - -Tue Mar 6 09:13:38 2007 Arnold D. Robbins - - * gawk.texi: Fix link to online version of the manual. - Thanks to Sahak Petrosyan . - -Wed Feb 14 19:40:33 2007 Arnold D. Robbins - - * gawk.texi: Add discussion of magic values for Inf, NaN, - and hexadecimal floating point in appendix on numbers. - Other minor updates for date, trademarks, etc. - -Sun Jan 21 12:59:33 2007 "Ennio-(Sr)" - - * gawk.1: Add note that locale settings can influence the - choice of decimal point character. - -Sat Jan 13 22:43:39 2007 Ralf Wildenhues - - * gawk.texi: Fix some typos. - * gawkinet.texi: Likewise. - -Sat Jan 13 21:25:28 2007 Ralf Wildenhues - - * awkcard.in: next is POSIX. - * gawk.texi: V7/SVR3.1: Mention assignable `$0', `var in index' - as expression. Specify `FS' limitation. - -Fri Jan 12 12:28:51 2007 Arnold D. Robbins - - * texinfo.tex: Updated upon move to current autotools. - -Thu Jan 4 19:56:45 2007 Arnold D. Robbins - - * gawk.1: Applied patch from Eric Raymond to stop his stupid - automated email kvetching about the wonders of docbook. - -2006-07-29 Paul Eggert - - * gawk.texi: Document that `$$0++--' isn't valid even though it - is unambiguous according to the Awk grammar. This is in response - to Open Group XCU ERN 86 - . - -Fri Oct 21 12:50:19 2005 Arnold D. Robbins - - Better support for PDF, thanks to Marty Leisner - for the prodding. - - * Makefile.am: Add lflashlight.pdf, rflashlight.pdf, statist.pdf - to EXTRADIST and add gawk.pdf and gawkinet.pdf to list of files - to remove for `clean'. - * lflashlight.pdf, rflashlight.pdf, statist.pdf: New files, created - with `epstopdf foo.eps > foo.pdf'. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Sun Jun 26 16:24:07 2005 Arnold D. Robbins - - * gawk.texi: Document `length(array)'. - * gawk.1: Ditto. - * awkcard.in: Ditto. - -Mon May 23 20:56:32 2005 Arnold D. Robbins - - * gawk.texi: Removed references to `--with-included-gettext'. - -Fri Apr 1 06:25:30 2005 Arnold D. Robbins - - * texinfo.tex: Updated to version 2005-01-30.17. - -Wed Feb 9 11:39:38 2005 Arnold D. Robbins - - * Makefile.am: Per Stepan Kasal, removed html rules, since - Automake does it for us. - -Tue Jan 4 18:47:34 2005 Arnold D. Robbins - - * texinfo.tex: Updated to version 2004-11-25.16. - -Mon Jan 3 14:09:57 2005 Arnold D. Robbins - - * texinfo.tex: Updated to version 2004-10-31.06. - -Wed Sep 22 11:40:06 2004 Arnold D. Robbins - - * gawk.1, gawk.texi, awkcard.in: Documented new --exec option. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Wed Jul 28 17:03:16 2004 Arnold D. Robbins - - * Makefile.am (TROFF): Add -U flag to invocation. Makes it - possible to format ref card from a build directory that isn't - the source directory. - (distclean): Removed target. Let automake handle it. - -Tue Jun 15 12:21:09 2004 Arnold D. Robbins - - * texinfo.tex: Updated to version 2004-06-14.14. - * gawk.texi (Dynamic Extensions): Text revised to follow - current implementation: new APIs, info on `n->param_cnt' - fixed. - - Also in all index entries where comma does not separate - primary, secondary or tertiary terms, replaced the comma - with @comma{} and removed the corresponding comments. - -Mon May 31 09:11:01 2004 Arnold D. Robbins - - * ad.block, awkcard.in, cardfonts, colors, no.colors: Change - old email address to current one. - -Mon May 3 09:54:46 2004 Arnold D. Robbins - - * texinfo.tex: Updated to version from Automake 1.8.4. - -Mon Mar 22 10:53:13 2004 Arnold D. Robbins - - * texinfo.tex: Updated. - -Tue Jan 6 17:38:40 2004 Arnold D. Robbins - - * texinfo.tex: Updated. - * gawk.texi: All @strong{Note:} changed to `@quotation NOTE'. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -Mon Jun 9 16:06:30 2003 Arnold D. Robbins - - * gawk.texi: Set automatic-xref-title and change all cross - references to be of the single-argument type. Made all - @node lines have just the node name. - - Should have done both of these years ago. - -Sun May 11 16:08:58 2003 Arnold D. Robbins - - * Makefile.am (html, gawk.html, gawkinet.html): New targets. - -Mon Mar 31 17:15:23 2003 Arnold D. Robbins - - * Makefile.am (install-data-hook, uninstall-hook): Added code to - hard link gawk.1 to pgawk.1 upon install and remove pgawk.1 upon - uninstall. Avoids MANPATH search problems, etc. etc. - (man_MANS): Removed pgawk.1 from the list. - * pgawk.1: Removed. - -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. - -Tue Apr 16 13:26:13 2002 Arnold D. Robbins - - * gawk.texi: FINALLY. All O'Reilly production and - indexing changes integrated. Index reviewed and - cleaned up. - * gawkinet.texi: Ditto. - * awkcard.in: Redid page breaking. - * Makefile.am (clean): Add `awkcard.tr' to list of files - that are removed. - (distclean): Depend on clean to REALLY GET `awkcard.tr'. - Sheesh. - -Mon Apr 15 14:43:51 2002 Arnold D. Robbins - - * texinfo.tex: Updated to version from Texinfo 4.2. - * gawk.texi: Modified to use new @copying command. - * gawkinet.texi: Ditto. - -Wed Mar 20 17:07:50 2002 Arnold D. Robbins - - * texinfo.tex: Updated to version from Texinfo 4.1. - -2002-02-10 Paul Eggert - - * gawk.texi (Word Sorting): Don't use sort +1, as POSIX 1003.1-2001 - no longer allows it. Use sort -k instead. - -2002-01-27 Bruno Haible - - * gawk.texi: Document the dcngettext function. - * awkcard.in: Likewise. - * gawk.1: Likewise. - -Mon Jan 28 18:41:02 2002 Arnold D. Robbins - - * gawkinet.texi, Makefile.am: Removed User Friendly cartoon. - Sigh. - -Wed Dec 19 16:00:39 2001 Eli Zaretskii - - * gawk.texi (Profiling): Describe the signals used for profile - dumping in the DJGPP version. - -Mon Sep 3 18:30:13 2001 Arnold D. Robbins - - * gawk.texi (Top): Put in @ifnottex so that makeinfo - --html is now happy. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Mon May 14 19:57:31 2001 Arnold D. Robbins - - * gawk.texi, gawkinet.texi: Versions for distribution - put in place. - * gawk.1, awkcard.in: Minor edits for consistency of - usage, formatting. - -Wed Nov 22 14:57:59 2000 Arnold D. Robbins - - * gawk.texi, gawk.1, awkcard.in: Removed all documentation - of abort. - -Sun Aug 13 11:23:50 2000 Arnold D. Robbins - - * gawk.texi, gawk.1, awkcard.in: documented sort function - and optional third argument to match. - -Sun Aug 13 00:40:41 2000 Arnold D. Robbins - - * gawk.texi: hardwired publisher info. - * publisher.texi: Removed. Not needed any more. - * gawkinet.texi: Added title page stuff. - -Thu Jul 5 21:05:57 2000 Arnold D. Robbins - - * gawk.texi: moved to use of @command, @option everywhere - appropriate. Removed all @page and @group in anticipation - of re-page breaking. Updated stuff for install-info. - Added FDL. - -Tue Nov 10 11:42:26 1998 Arnold D. Robbins - - * publisher.texi: new file with publisher related info. - * Makefile.in: updated dvi and postscript targets to make - them lots smarter about not reformatting if need be. - -Mon Aug 7 15:23:00 2000 Arnold D. Robbins - - * Release 3.0.6: Release tar file made. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed May 17 19:04:54 2000 Arnold D. Robbins - - * gawk.texi, gawk.1, awkcard.in: Documented %u. Ooops. - -Tue May 2 11:44:13 2000 Arnold D. Robbins - - * texinfo.tex: Updated to version 1999-10-01.07. - * gawk.texi: Redid page breaking for new texinfo.tex. - -Thu Apr 6 12:32:49 2000 Arnold D. Robbins - - * gawk.texi: Change info dir file entry to `(gawk)' from - `(gawk.info)'. - * Makefile.in [$(infodir)/gawk.info]: Fix grep test is - accordance with above. - -Sun Feb 13 15:36:32 2000 Paul Eggert - - * gawk.texi: Mention that arithmetic is done in double - precision floating point, and point to Goldberg's paper for - people who want to know more. Fix some other minor floating - point discussion issues. - -Wed Nov 3 17:04:35 1999 Arnold D. Robbins - - * gawk.1: Lots of troff ``lint'' from Paul Eggert. Not all - of his changes, just the ones I thought worth doing. - -Mon Oct 11 16:53:54 1999 Arnold D. Robbins - - * Makefile.in (gawk.dvi): Put $(srcdir) first in TEXINPUTS, - and also just use texi2dvi, don't run texindex and tex - manually. Doing so is no longer necessary. - -Mon Aug 9 13:06:01 1999 Arnold D. Robbins - - * gawk.texi: New node `Array Efficiency' on the best use - of subscripting to avoid memory bloat. - -Thu Jul 29 23:15:34 1999 Arnold D. Robbins - - * Makefile.in ($(infodir)/gawk.info): Removed loop around - $(INSTALL_DATA), since there's only one Info file to install, - install it directly. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Wed Oct 7 21:59:33 1998 Arnold D. Robbins - - * texinfo.tex: Updated to version 2.227, from Texinfo 3.12. - -Sun Oct 19 12:26:08 1997 Arnold D. Robbins - - * ALL: change references to arnold@gnu.ai.mit.edu to arnold@gnu.org. - -Tue Sep 23 10:31:17 1997 Arnold D. Robbins - - * texinfo.tex: Updated to version 2.218, from Texinfo 3.11. - -Fri Jul 4 08:19:00 1997 Arnold D. Robbins - - * Makefile.in ($(infodir)/gawk.info): Don't make dependent upon - gawk.info, in case installed one is newer. Instead, check that - an installed gawk.info exists and is identical to current one. - If so, just exit; otherwise do the install. - -Wed Jul 2 14:55:12 1997 Arnold D. Robbins - - * Makefile.in ($(infodir)/gawk.info): typo fix. - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Sun Apr 13 15:39:20 1997 Arnold D. Robbins - - * Makefile.in ($(infodir)/gawk.info): exit 0 in case install-info - fails. - -Thu Jan 2 23:17:53 1997 Fred Fish - - * Makefile.in (awkcard.tr): Use ':' chars to separate parts of - sed command, since $(srcdir) may expand to something with '/' - characters in it, which confuses sed terribly. - * gawk.texi (Amiga Installation): Note change of configuration - from "m68k-cbm-amigados" to "m68k-amigaos". Point ftp users - towards current ADE distribution and not obsolete Aminet - "gcc" distribution. Change "FreshFish" to "Geek Gadgets". - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Wed Dec 25 11:17:32 1996 Arnold D. Robbins - - * Makefile.in ($(mandir)/igawk$(manext),$(mandir)/gawk$(manext)): - remove chmod command; let $(INSTALL_DATA) use -m. - -Tue Dec 17 22:38:28 1996 Arnold D. Robbins - - * Makefile.in (gawk.info,gawk.dvi,postscript): run makeinfo, TeX, - and/or troff against files in $(srcdir). Thanks to Ulrich Drepper. - ($(infodir)/gawk.info): use --info-dir to install-info, not - --infodir. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Mon Dec 9 12:48:54 1996 Arnold D. Robbins - - * no.colors: new file from Michal for old troffs. - * Makefile.in [AWKCARD]: changes to parameterize old/new troff. - -Sun Dec 1 15:04:56 1996 Arnold D. Robbins - - * texinfo.tex: Updated to version 2.193, from Karl Berry. - -Tue Nov 26 22:57:15 1996 Arnold D. Robbins - - * Makefile.in ($(infodir)/gawk.info): Change option in call - to `install-info' to `--info-dir' from `--infodir'. - -Mon Nov 4 13:30:39 1996 Arnold D. Robbins - - * Makefile.in: updates for reference card. - (ad.block, awkcard.in, cardfonts, colors, macros, setter.outline): - new files for reference card. - -Wed Oct 16 12:43:02 1996 Arnold D. Robbins - - * texinfo.tex: Updated to version 2.185, from texinfo-3.9 dist. - -Sun Aug 11 23:12:08 1996 Arnold D. Robbins - - * Makefile.in ($(infodir)/gawk.info): correct use of - $(INSTALL_DATA) and remove chmod command. - -Thu Jul 11 22:06:50 1996 Arnold D. Robbins - - * Makefile.in ($(mandir)/gawk.$(ext), $(mandir)/igawk.$(ext)): - made dependant on files in $(srcdir). - -Fri Mar 15 06:45:35 1996 Arnold D. Robbins - - * Makefile.in (clean): add `*~' to list of files to be removed. - -Thu Jan 25 23:40:15 1996 Arnold D. Robbins - - * Makefile.in (dvi): run texindex and tex an extra time. - This gets the cross references right. Sigh. - -Wed Jan 24 11:51:54 1996 Arnold D. Robbins - - * Makefile.in (maintainer-clean): - Depend on distclean, not the other way around. - Output warning message as per GNU standards. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/doc/ChangeLog.0 gawk-4.0.1+dfsg/doc/ChangeLog.0 --- gawk-3.1.8+dfsg/doc/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/ChangeLog.0 2011-06-13 19:29:07.000000000 +0000 @@ -0,0 +1,1032 @@ +Mon Jun 13 22:28:02 2011 Arnold D. Robbins + + * gawk.texi: Document that POSIX now says [a-z] is undefined outside + the C and POSIX locales, so gawk treats it as the Good Lord intended + in all cases. Thanks to Paul Eggert for letting me know about this + and providing URLs to cite. + +Fri May 27 09:59:38 2011 Arnold D. Robbins + + * gawk.1, gawk.texi: Minor edits w.r.t. the bug reporting address. + +Wed May 25 22:03:53 2011 Arnold D. Robbins + + * gawk.1, gawk.texi: Straighten out owners of the different + Windows ports. + +Thu May 19 17:52:46 2011 Arnold D. Robbins + + * gawk.texi: Igawk, have pathto check for "-". + Thanks to Steffen Schuler , + from email dated 27, December 2008. + +Thu May 19 16:57:28 2011 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Revised to reflect the reality + that -d and -p don't allow a space before the file name. + Thanks to Pat Rankin. + +Mon May 16 16:40:50 2011 Arnold D. Robbins + + * gawk.texi: Remove last vestiges of old PROCINFO sorting + description. + +Mon May 9 15:58:33 2011 Arnold D. Robbins + + * gawk.texi: Finish array sorting and do a spell check. + +Fri May 6 13:21:20 2011 Arnold D. Robbins + + * gawk.texi: Finish edits after full read through. + * gawk.1: Update array sorting information. + +Wed May 4 23:39:09 2011 Arnold D. Robbins + + * gawk.texi: Start at revamping array sorting doc. Still + needs work. + +Wed Apr 27 21:49:23 2011 Arnold D. Robbins + + * gawk.1: Minor edit. + * awkcard.in: Document third arg to asort and asorti. + +Thu Apr 7 21:55:27 2011 Arnold D. Robbins + + * gawk.texi (Nextfile Function): Removed, along with all references, + since only gawk and MKS awk allow next from a function, so this + function was useless for most people. Strange that noone noticed. + I wonder who really reads the doc? + + Lots of other fixes have been going in too. + +Sun Mar 27 21:10:55 2011 Pat Rankin + + * gawk.texi (Builit-in Variables: PROCINFO array, Scanning All + Elements of an Array: `for' statement): Update the documentation + for PROCINFO["sorted_in"]; add "ascending index number", + "descending index string", "ascending value", and "descending + value" as supported sort orderings. + * gawk.1 (PROCINFO array): Update PROCINFO["sorted_in"] to + reflect that the value matters, and list the supported sort orders. + +Tue Feb 15 17:11:26 2011 Pat Rankin + + * gawk.texi (Builit-in Variables: PROCINFO array, Scanning All + Elements of an Array: `for' statement): Document that the value + of PROCINFO["sorted_in"] matters; sort orders "ascending index + string", "descending index string", and "unsorted" are supported. + +Sun Feb 13 19:58:35 2011 Arnold D. Robbins + + * awkcard.in, gawk.1, gawk.texi, gawkinet.texi: Fix typos + and spelling errors. + +Thu Feb 10 21:48:18 2011 Pat Rankin + + * gawk.texi: Update VMS section. + +Thu Feb 10 21:31:36 2011 Andreas Buening + + * gawk.texi: Update OS/2 information. + +Thu Feb 10 21:06:14 2011 Arnold D. Robbins + + * lflashlight-small.xpic: Renamed from lflashlight.small.xpic. + * rflashlight-small.xpic: Renamed from rflashlight.small.xpic. + * Makefile.am (EXTRA_DIST): Adjusted. + +Tue Feb 1 10:21:22 2011 Arnold D. Robbins + + * gawk.texi, awkcard.in, gawk.1: Document isarray function, + magic string in PROCINFO for array sorting. Needs a little + more work in gawk.texi. + +Mon Jan 10 21:52:21 2011 Arnold D. Robbins + + * lflashlight.small.xpic, rflashlight.small.xpic: Original + source files for flashlight files from xpic tool. + It only took over 10 years to put them into the dist. + * Makefile.am (EXTRA_DIST): Add the new files. + +Thu Jan 6 22:13:11 2011 Arnold D. Robbins + + * gawk.texi: Replace xpic figures in Appendix D with figures + from xfig. + * general-program.eps, general-program.fig, general-program.pdf, + process-flow.eps, process-flow.fig, process-flow.pdf: New files. + * Makefile.am (EXTRA_DIST): Add the new files. + +Wed Jan 5 14:33:51 2011 Arnold D. Robbins + + * Makefile.am: Sanitize making of different PDF files. + +Sun Jan 2 20:30:37 2011 Arnold D. Robbins + + * texinfo.tex: Update to latest from texinfo CVS repository. + +Tue Dec 28 21:46:21 2010 Arnold D. Robbins + + * README.DGAWK: Removed, since there is now a chapter on the + debugger. + * Makefile.am (EXTRA_DIST): Remove README.DGAWK. + +Tue Dec 28 07:13:20 2010 John Haque + + * gawk.texi: Update dgawk examples. Document condition command + without an expression. Fix a typo. + +Tue Dec 21 10:06:05 2010 Arnold D. Robbins + + * Makefile.am (pdf): Renamed from `all-pdf'. Much more logical + and easier to remember. + +Sat Dec 18 20:14:58 2010 Eli Zaretskii + + * gawk.texi (DOS Quoting): Fix a typo. + (Top, PC Installation): Remove "PC Dynamic" from the menus. + (PC Installation, PC Compiling, PC Using): Remove obsolete stuff. + Fix whitespace between sentences. Add indexing. + (PC Testing): New node, stuff moved from "PC Compiling". + (PC Dynamic): Node removed. + (Cygwin): Fix wording. + (MSYS): Fix whitespace between sentences. + +Thu Dec 9 22:27:53 2010 Arnold D. Robbins + + * awkcard.in, gawk.1, gawk.texi, gawkinet.texi: Remove discussion + of raw option in making sockets, since it was never implemented. + +Wed Dec 1 21:39:15 2010 Arnold D. Robbins + + * awkcard.in, gawk.1: Document arrays of arrays. + * gawk.texi: General progress. + +Mon Nov 8 22:24:21 2010 Arnold D. Robbins + + * gawk.1: Minor fix from Jari Aalto + to help Emacs fontification. + +Tue Nov 2 12:15:56 2010 Arnold D. Robbins + + * awkcard.in, gawk.1, gawk.texi: --lint --> -L, + --lint-old --> -t. + +Mon Nov 1 22:01:26 2010 Arnold D. Robbins + + * awkcard.in, gawk.1, gawk.texi: -l renamed -t. + +Sat Oct 30 05:53:25 2010 John Haque + + * gawk.texi: Added section on Array of Arrays. + +Sat Oct 23 20:36:58 2010 Arnold D. Robbins + + * awkcard.in: Updated, cleaned up. + * gawk.1: Updated, some clean up. + +Wed Sep 22 05:29:43 2010 Arnold D. Robbins + + * gawk.texi: Added section on @include files. + +Wed Aug 18 22:14:19 2010 Arnold D. Robbins + + * gawk.texi: Minor edits. + * Makefile.am (LN): Use `ln -f' when installing link for + pgawk.1. Thanks to Peter Breitenlohner . + +Thu Jul 1 21:29:25 2010 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Document `/inet4' and `/inet6'. + +Sun Jun 27 21:58:47 2010 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Document all short options. + +Wed Jun 2 22:06:22 2010 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Document FPAT variable and patsplit + function. + +Fri Jun 12 13:28:24 2009 Arnold D. Robbins + + * gawk.texi, gawk.1: Remove --disable-directories-fatal configuration + option. + +Thu Feb 26 20:36:18 2009 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Document BEGINFILE and ENDFILE. + +Mon Feb 16 21:53:22 2009 Arnold D. Robbins + + * gawk.texi: Document switch statements as always available. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Thu Feb 12 22:36:32 2009 Arnold D. Robbins + + * gawk.texi: Document that interval expressions are now on by default. + Also that --gen-po is now --gen-pot. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Sat Jan 17 20:03:43 2009 Arnold D. Robbins + + * gawk.texi: Document indirect function calls. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Tue Dec 30 22:22:04 2008 Assaf Gordon + + * gawk.texi: Document new --sandbox option. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Tue Dec 30 22:21:11 2008 Arnold D. Robbins + + * gawk.texi: Change --binary to --characters-as-bytes, per Karl Berry. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Thu Dec 18 05:30:13 2008 Steffen Schuler + + * gawk.texi: Documented fourth parameter of split(). + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Thu Dec 18 05:16:48 2008 Arnold D. Robbins + + * gawk.texi: Minimally document `-b' / --binary. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Sun Nov 16 22:03:50 2008 Arnold D. Robbins + + * gawk.texi: Fully documented `-r' as synonym for --re-interval. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Tue Aug 3 13:35:15 2004 Arnold D. Robbins + + * gawk.texi: Document that gawk now uses the 2001 POSIX + rules for `sub' and `gsub'. + +Wed Dec 26 22:15:05 2001 Arnold D. Robbins + + * gawk.texi: Documented that process special files are gone. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Tue Apr 20 11:48:31 2010 Arnold D. Robbins + + * texinfo.tex: Update to latest from texinfo git repository. + * gawk.texi, gawk.1, awkcard.in: Update version and copyright dates. + +Thu Mar 25 21:51:58 2010 Arnold D. Robbins + + * gawk.1: Clarify the socket timeout environment variables. + +Wed Mar 10 21:28:12 2010 Arnold D. Robbins + + * gawk.texi: Reworded 'index in array' so that there's no chance of + someone using 'index' as a real subscript. Thanks to Hermann + Peifer for the push. + +Thu Feb 4 20:54:48 2010 Arnold D. Robbins + + * gawk.texi: Multiple cleanups and bringing of things up to date. + * gawk.1: Ditto, only not as much. + * Makefile.am: New `all-pdf' target to make PDF files of manpage + and reference card. + +Tue Aug 4 06:07:35 2009 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Document that 0 flag in + printf applies only to the numeric formats. + +Tue Aug 4 05:58:52 2009 Arnold D. Robbins + + * texinfo.tex: Updated to current version. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Tue Jul 21 22:20:25 2009 Arnold D. Robbins + + * gawk.texi, awkcard.in: Update mawk site information now + that Thomas Dickey is maintaining it. + +Mon Jul 13 07:53:32 2009 Arnold D. Robbins + + * Makefile.am (SEDME2): New macro, used in making awkcard.ps, + removes last empty page. Finally! + +Fri Jul 10 10:35:29 2009 Arnold D. Robbins + + * awkcard.in: Rearrange items for better formatting and + organization. + * gawk.texi (Exit Status): New node to document exit values. + (Exit Statement): Give portability advice about exit value. + +Wed Jul 8 08:55:50 2009 Arnold D. Robbins + + * awkcard.in: Really fix table option for --verbose. Other + fixes and improvements, including document %'d flag. + +Tue Jul 7 09:13:02 2009 Arnold D. Robbins + + * awkcard.in: Fix table option for --verbose. + +Mon Jun 8 00:40:26 2009 Tommi Vainikainen + + * gawk.1: Bug fix to restore space between paragraphs at + entry for "--". + +Thu May 21 21:09:59 2009 Arnold D. Robbins + + * gawk.1, awkcard.in: Document new -O / --optimize option. + * gawk.texi (Options): Likewise. + +Fri May 15 14:34:37 2009 Arnold D. Robbins + + * gawk.texi (User-defined): Document that you can't use + the name of a built-in variable as a function parameter. + +Sat May 2 23:36:10 2009 Arnold D. Robbins + + * gawk.texi (Other Versions): Add Quiktrim awk. + (How to Contribute): Change things to point to awk.info. + +Mon Apr 6 22:29:47 2009 Arnold D. Robbins + + * awkcard.in: Bell Labs awk also supports fflush() + and fflush(""). Thanks to Steffen Schuler + . + +Mon Mar 30 21:26:04 2009 Arnold D. Robbins + + * gawk.texi (Simple Server): Fix bug since 3.1.0 where error + message from typo was in the middle of the HandleGet function. + Thanks to Tim Menzies for catching this. + +Mon Feb 9 22:11:16 2009 Arnold D. Robbins + + * gawk.texi (Translate Program): Bug fix in stranslate + function from Steffen Schuler . + +Tue Feb 3 22:06:10 2009 Arnold D. Robbins + + * gawk.texi (Regexp Field Splitting): Documented dark corner + of ^ in FS. + +Sat Jan 17 20:37:12 2009 Arnold D. Robbins + + * gawk.texi (Plain Getline): Bug fix in code. Thanks to + Steffen Schuler . + +Mon Jan 5 22:47:42 2009 Arnold D. Robbins + + * gawk.1, awkcard.in: Document that getline returns 1 + on sucess. Thanks to Paolo for + the report. + +Fri Dec 26 14:45:39 2008 Arnold D. Robbins + + * gawk.texi, gawkinet.texi: Update to FDL 1.3. + +Mon Dec 1 21:20:39 2008 Arnold D. Robbins + + * gawk.texi (File Checking): Correct the text at the end; getline + isn't fatal, period, not related to POSIX. Thanks to + Seb for pointing this out. + (Round-Function): Change initial return when equal to return ival, + which lops off any digits, e.g. if given 121.0. Thanks to + Timothy J. Stefanski . + +Fri Aug 1 17:34:55 2008 Arnold D. Robbins + + * gawk.texi (Signature Program): Added new subsection. + +Thu Jul 31 21:38:08 2008 Arnold D. Robbins + + * gawk.texi (Variable Typing): Document that array elements created + by `match' also get strnum attribute. + +Mon Jun 2 22:47:08 2008 Arnold D. Robbins + + * gawk.texi (Control Letters): Add a note about %c only + taking values from 0 to 255. + (DOS Quoting): New node. + +Thu Jan 31 16:17:27 2008 Arnold D. Robbins + + * gawk.texi, gawkinet.texi: Updated the Back-Cover text per + latest from the FSF. + +Fri Jan 25 12:13:39 2008 Dave Pitts + + * gawk.texi (pwcat.c, grcat.c): Added ZOS_USS changes. + +Mon Jan 14 05:30:16 2008 Arnold D. Robbins + + * gawk.texi: Add maintainer contact info for z/OS. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Fri Oct 19 04:13:33 2007 Arnold D. Robbins + + * gawk.1: Add length(array) to list of extensions at end. + Revise date. + +Thu Oct 18 08:40:59 2007 Arnold D. Robbins + + * texinfo.tex: Updated to version from Texinfo 4.11. + +Sun Oct 14 20:37:59 2007 Arnold D. Robbins + + * awkcard.in: Fix version numbers and copyright info, minor + cleanups to format nicely. + +Sun Sep 30 22:30:05 2007 Arnold D. Robbins + + * gawk.texi (Conversion): Add table describing locale decimal + point versus period. + +Sat Sep 8 23:53:46 2007 Arnold D. Robbins + + * gawk.texi: A number of minor fixes based on suggestions + from Jack Kelley . + +Sat Aug 11 22:46:14 2007 Arnold D. Robbins + + * gawk.texi (Copying): Move to GPL 3. + +Wed May 30 17:11:19 2007 Arnold D. Robbins + + * Makefile.am (CLEANFILES): Added, so that even "make distclean" + will do the right thing. + (clean): Removed, let automake to do it. + +Tue May 29 22:49:16 2007 Arnold D. Robbins + + * gawk.texi: Document --use-lc-numeric. Document that some + VMS systems come with an old version of gawk. + +Mon May 28 08:21:51 2007 Arnold D. Robbins + + * gawk.1, awkcard.in: Document --use-lc-numeric. + +Tue May 15 13:27:38 2007 Arnold D. Robbins + + * gawk.texi, gawk.1: Documented --disable-directories-fatal + configure option. + +Wed May 9 21:50:44 2007 Arnold D. Robbins + + * gawk.1: Reviewed and updated, minor typos fixed. + * awkcard.in: Added mention of %F. + +Wed May 2 19:55:02 2007 Arnold D. Robbins + + * gawk.texi: Cleaned up discussion of string concatenation + where needed, including a note about the mixed treatment + of `"echo " "date" | getline'. Sigh. + +Sun Apr 29 13:33:27 2007 Arnold D. Robbins + + * gawk.texi (Time Functions): Update description of strftime + for third utc-flag argument. Other minor fixes. + * gawk.1, awkcard.in: Same. + +Tue Apr 3 22:47:40 2007 Arnold D. Robbins + + * gawk.texi (New Ports): Update list of files for all of + regex that should not be messed with lightly. + +Wed Mar 21 09:02:53 2007 Arnold D. Robbins + + * gawk.texi: Removed last vestiges of arnold@gnu.org + email address. + +Wed Mar 7 13:06:31 2007 Arnold D. Robbins + + * gawk.texi (Getopt Function): Add a note that user level + code must clear out ARGV from 1 to Optind. + Thanks to Matthew.Hall1@VerizonWireless.com, from mail + dated Tue, 02 Aug 2005 09:04:37 -0700. + +Wed Mar 7 08:48:02 2007 Arnold D. Robbins + + * gawk.texi: Fix my personal email address. Sheesh. + Thanks again to Sahak Petrosyan . + +Tue Mar 6 09:13:38 2007 Arnold D. Robbins + + * gawk.texi: Fix link to online version of the manual. + Thanks to Sahak Petrosyan . + +Wed Feb 14 19:40:33 2007 Arnold D. Robbins + + * gawk.texi: Add discussion of magic values for Inf, NaN, + and hexadecimal floating point in appendix on numbers. + Other minor updates for date, trademarks, etc. + +Sun Jan 21 12:59:33 2007 "Ennio-(Sr)" + + * gawk.1: Add note that locale settings can influence the + choice of decimal point character. + +Sat Jan 13 22:43:39 2007 Ralf Wildenhues + + * gawk.texi: Fix some typos. + * gawkinet.texi: Likewise. + +Sat Jan 13 21:25:28 2007 Ralf Wildenhues + + * awkcard.in: next is POSIX. + * gawk.texi: V7/SVR3.1: Mention assignable `$0', `var in index' + as expression. Specify `FS' limitation. + +Fri Jan 12 12:28:51 2007 Arnold D. Robbins + + * texinfo.tex: Updated upon move to current autotools. + +Thu Jan 4 19:56:45 2007 Arnold D. Robbins + + * gawk.1: Applied patch from Eric Raymond to stop his stupid + automated email kvetching about the wonders of docbook. + +2006-07-29 Paul Eggert + + * gawk.texi: Document that `$$0++--' isn't valid even though it + is unambiguous according to the Awk grammar. This is in response + to Open Group XCU ERN 86 + . + +Fri Oct 21 12:50:19 2005 Arnold D. Robbins + + Better support for PDF, thanks to Marty Leisner + for the prodding. + + * Makefile.am: Add lflashlight.pdf, rflashlight.pdf, statist.pdf + to EXTRADIST and add gawk.pdf and gawkinet.pdf to list of files + to remove for `clean'. + * lflashlight.pdf, rflashlight.pdf, statist.pdf: New files, created + with `epstopdf foo.eps > foo.pdf'. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Sun Jun 26 16:24:07 2005 Arnold D. Robbins + + * gawk.texi: Document `length(array)'. + * gawk.1: Ditto. + * awkcard.in: Ditto. + +Mon May 23 20:56:32 2005 Arnold D. Robbins + + * gawk.texi: Removed references to `--with-included-gettext'. + +Fri Apr 1 06:25:30 2005 Arnold D. Robbins + + * texinfo.tex: Updated to version 2005-01-30.17. + +Wed Feb 9 11:39:38 2005 Arnold D. Robbins + + * Makefile.am: Per Stepan Kasal, removed html rules, since + Automake does it for us. + +Tue Jan 4 18:47:34 2005 Arnold D. Robbins + + * texinfo.tex: Updated to version 2004-11-25.16. + +Mon Jan 3 14:09:57 2005 Arnold D. Robbins + + * texinfo.tex: Updated to version 2004-10-31.06. + +Wed Sep 22 11:40:06 2004 Arnold D. Robbins + + * gawk.1, gawk.texi, awkcard.in: Documented new --exec option. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Wed Jul 28 17:03:16 2004 Arnold D. Robbins + + * Makefile.am (TROFF): Add -U flag to invocation. Makes it + possible to format ref card from a build directory that isn't + the source directory. + (distclean): Removed target. Let automake handle it. + +Tue Jun 15 12:21:09 2004 Arnold D. Robbins + + * texinfo.tex: Updated to version 2004-06-14.14. + * gawk.texi (Dynamic Extensions): Text revised to follow + current implementation: new APIs, info on `n->param_cnt' + fixed. + + Also in all index entries where comma does not separate + primary, secondary or tertiary terms, replaced the comma + with @comma{} and removed the corresponding comments. + +Mon May 31 09:11:01 2004 Arnold D. Robbins + + * ad.block, awkcard.in, cardfonts, colors, no.colors: Change + old email address to current one. + +Mon May 3 09:54:46 2004 Arnold D. Robbins + + * texinfo.tex: Updated to version from Automake 1.8.4. + +Mon Mar 22 10:53:13 2004 Arnold D. Robbins + + * texinfo.tex: Updated. + +Tue Jan 6 17:38:40 2004 Arnold D. Robbins + + * texinfo.tex: Updated. + * gawk.texi: All @strong{Note:} changed to `@quotation NOTE'. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +Mon Jun 9 16:06:30 2003 Arnold D. Robbins + + * gawk.texi: Set automatic-xref-title and change all cross + references to be of the single-argument type. Made all + @node lines have just the node name. + + Should have done both of these years ago. + +Sun May 11 16:08:58 2003 Arnold D. Robbins + + * Makefile.am (html, gawk.html, gawkinet.html): New targets. + +Mon Mar 31 17:15:23 2003 Arnold D. Robbins + + * Makefile.am (install-data-hook, uninstall-hook): Added code to + hard link gawk.1 to pgawk.1 upon install and remove pgawk.1 upon + uninstall. Avoids MANPATH search problems, etc. etc. + (man_MANS): Removed pgawk.1 from the list. + * pgawk.1: Removed. + +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. + +Tue Apr 16 13:26:13 2002 Arnold D. Robbins + + * gawk.texi: FINALLY. All O'Reilly production and + indexing changes integrated. Index reviewed and + cleaned up. + * gawkinet.texi: Ditto. + * awkcard.in: Redid page breaking. + * Makefile.am (clean): Add `awkcard.tr' to list of files + that are removed. + (distclean): Depend on clean to REALLY GET `awkcard.tr'. + Sheesh. + +Mon Apr 15 14:43:51 2002 Arnold D. Robbins + + * texinfo.tex: Updated to version from Texinfo 4.2. + * gawk.texi: Modified to use new @copying command. + * gawkinet.texi: Ditto. + +Wed Mar 20 17:07:50 2002 Arnold D. Robbins + + * texinfo.tex: Updated to version from Texinfo 4.1. + +2002-02-10 Paul Eggert + + * gawk.texi (Word Sorting): Don't use sort +1, as POSIX 1003.1-2001 + no longer allows it. Use sort -k instead. + +2002-01-27 Bruno Haible + + * gawk.texi: Document the dcngettext function. + * awkcard.in: Likewise. + * gawk.1: Likewise. + +Mon Jan 28 18:41:02 2002 Arnold D. Robbins + + * gawkinet.texi, Makefile.am: Removed User Friendly cartoon. + Sigh. + +Wed Dec 19 16:00:39 2001 Eli Zaretskii + + * gawk.texi (Profiling): Describe the signals used for profile + dumping in the DJGPP version. + +Mon Sep 3 18:30:13 2001 Arnold D. Robbins + + * gawk.texi (Top): Put in @ifnottex so that makeinfo + --html is now happy. + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +Mon May 14 19:57:31 2001 Arnold D. Robbins + + * gawk.texi, gawkinet.texi: Versions for distribution + put in place. + * gawk.1, awkcard.in: Minor edits for consistency of + usage, formatting. + +Wed Nov 22 14:57:59 2000 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Removed all documentation + of abort. + +Sun Aug 13 11:23:50 2000 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: documented sort function + and optional third argument to match. + +Sun Aug 13 00:40:41 2000 Arnold D. Robbins + + * gawk.texi: hardwired publisher info. + * publisher.texi: Removed. Not needed any more. + * gawkinet.texi: Added title page stuff. + +Thu Jul 5 21:05:57 2000 Arnold D. Robbins + + * gawk.texi: moved to use of @command, @option everywhere + appropriate. Removed all @page and @group in anticipation + of re-page breaking. Updated stuff for install-info. + Added FDL. + +Tue Nov 10 11:42:26 1998 Arnold D. Robbins + + * publisher.texi: new file with publisher related info. + * Makefile.in: updated dvi and postscript targets to make + them lots smarter about not reformatting if need be. + +Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed May 17 19:04:54 2000 Arnold D. Robbins + + * gawk.texi, gawk.1, awkcard.in: Documented %u. Ooops. + +Tue May 2 11:44:13 2000 Arnold D. Robbins + + * texinfo.tex: Updated to version 1999-10-01.07. + * gawk.texi: Redid page breaking for new texinfo.tex. + +Thu Apr 6 12:32:49 2000 Arnold D. Robbins + + * gawk.texi: Change info dir file entry to `(gawk)' from + `(gawk.info)'. + * Makefile.in [$(infodir)/gawk.info]: Fix grep test is + accordance with above. + +Sun Feb 13 15:36:32 2000 Paul Eggert + + * gawk.texi: Mention that arithmetic is done in double + precision floating point, and point to Goldberg's paper for + people who want to know more. Fix some other minor floating + point discussion issues. + +Wed Nov 3 17:04:35 1999 Arnold D. Robbins + + * gawk.1: Lots of troff ``lint'' from Paul Eggert. Not all + of his changes, just the ones I thought worth doing. + +Mon Oct 11 16:53:54 1999 Arnold D. Robbins + + * Makefile.in (gawk.dvi): Put $(srcdir) first in TEXINPUTS, + and also just use texi2dvi, don't run texindex and tex + manually. Doing so is no longer necessary. + +Mon Aug 9 13:06:01 1999 Arnold D. Robbins + + * gawk.texi: New node `Array Efficiency' on the best use + of subscripting to avoid memory bloat. + +Thu Jul 29 23:15:34 1999 Arnold D. Robbins + + * Makefile.in ($(infodir)/gawk.info): Removed loop around + $(INSTALL_DATA), since there's only one Info file to install, + install it directly. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + +Wed Oct 7 21:59:33 1998 Arnold D. Robbins + + * texinfo.tex: Updated to version 2.227, from Texinfo 3.12. + +Sun Oct 19 12:26:08 1997 Arnold D. Robbins + + * ALL: change references to arnold@gnu.ai.mit.edu to arnold@gnu.org. + +Tue Sep 23 10:31:17 1997 Arnold D. Robbins + + * texinfo.tex: Updated to version 2.218, from Texinfo 3.11. + +Fri Jul 4 08:19:00 1997 Arnold D. Robbins + + * Makefile.in ($(infodir)/gawk.info): Don't make dependent upon + gawk.info, in case installed one is newer. Instead, check that + an installed gawk.info exists and is identical to current one. + If so, just exit; otherwise do the install. + +Wed Jul 2 14:55:12 1997 Arnold D. Robbins + + * Makefile.in ($(infodir)/gawk.info): typo fix. + +Thu May 15 12:49:08 1997 Arnold D. Robbins + + * Release 3.0.3: Release tar file made. + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Sun Apr 13 15:39:20 1997 Arnold D. Robbins + + * Makefile.in ($(infodir)/gawk.info): exit 0 in case install-info + fails. + +Thu Jan 2 23:17:53 1997 Fred Fish + + * Makefile.in (awkcard.tr): Use ':' chars to separate parts of + sed command, since $(srcdir) may expand to something with '/' + characters in it, which confuses sed terribly. + * gawk.texi (Amiga Installation): Note change of configuration + from "m68k-cbm-amigados" to "m68k-amigaos". Point ftp users + towards current ADE distribution and not obsolete Aminet + "gcc" distribution. Change "FreshFish" to "Geek Gadgets". + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Wed Dec 25 11:17:32 1996 Arnold D. Robbins + + * Makefile.in ($(mandir)/igawk$(manext),$(mandir)/gawk$(manext)): + remove chmod command; let $(INSTALL_DATA) use -m. + +Tue Dec 17 22:38:28 1996 Arnold D. Robbins + + * Makefile.in (gawk.info,gawk.dvi,postscript): run makeinfo, TeX, + and/or troff against files in $(srcdir). Thanks to Ulrich Drepper. + ($(infodir)/gawk.info): use --info-dir to install-info, not + --infodir. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Mon Dec 9 12:48:54 1996 Arnold D. Robbins + + * no.colors: new file from Michal for old troffs. + * Makefile.in [AWKCARD]: changes to parameterize old/new troff. + +Sun Dec 1 15:04:56 1996 Arnold D. Robbins + + * texinfo.tex: Updated to version 2.193, from Karl Berry. + +Tue Nov 26 22:57:15 1996 Arnold D. Robbins + + * Makefile.in ($(infodir)/gawk.info): Change option in call + to `install-info' to `--info-dir' from `--infodir'. + +Mon Nov 4 13:30:39 1996 Arnold D. Robbins + + * Makefile.in: updates for reference card. + (ad.block, awkcard.in, cardfonts, colors, macros, setter.outline): + new files for reference card. + +Wed Oct 16 12:43:02 1996 Arnold D. Robbins + + * texinfo.tex: Updated to version 2.185, from texinfo-3.9 dist. + +Sun Aug 11 23:12:08 1996 Arnold D. Robbins + + * Makefile.in ($(infodir)/gawk.info): correct use of + $(INSTALL_DATA) and remove chmod command. + +Thu Jul 11 22:06:50 1996 Arnold D. Robbins + + * Makefile.in ($(mandir)/gawk.$(ext), $(mandir)/igawk.$(ext)): + made dependant on files in $(srcdir). + +Fri Mar 15 06:45:35 1996 Arnold D. Robbins + + * Makefile.in (clean): add `*~' to list of files to be removed. + +Thu Jan 25 23:40:15 1996 Arnold D. Robbins + + * Makefile.in (dvi): run texindex and tex an extra time. + This gets the cross references right. Sigh. + +Wed Jan 24 11:51:54 1996 Arnold D. Robbins + + * Makefile.in (maintainer-clean): + Depend on distclean, not the other way around. + Output warning message as per GNU standards. diff -Nru gawk-3.1.8+dfsg/doc/Makefile.am gawk-4.0.1+dfsg/doc/Makefile.am --- gawk-3.1.8+dfsg/doc/Makefile.am 2010-04-20 08:30:45.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/Makefile.am 2011-06-24 08:13:14.000000000 +0000 @@ -1,7 +1,7 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2010 +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2010, 2011 # the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the @@ -28,15 +28,18 @@ man_MANS = gawk.1 igawk.1 -EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ +EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ + general-program.eps general-program.fig general-program.pdf \ + process-flow.eps process-flow.fig process-flow.pdf \ macros colors no.colors $(man_MANS) \ - lflashlight.eps rflashlight.eps \ - lflashlight.pdf rflashlight.pdf \ - statist.jpg statist.eps statist.pdf + lflashlight-small.xpic lflashlight.eps lflashlight.pdf \ + rflashlight-small.xpic rflashlight.eps rflashlight.pdf \ + statist.jpg statist.eps statist.pdf \ + bc_notes # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf MAKEINFO = @MAKEINFO@ --no-split --force @@ -62,7 +65,7 @@ # make pgawk.1 a link to gawk.1 in the installed man directory. # We want hard links for install-data-hook, below -LN= ln +LN= ln -f # Link gawk.1 to pgawk.1 install-data-hook: @@ -76,9 +79,7 @@ postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) -all-pdf: postscript - ps2pdf awkcard.ps awkcard.pdf - ps2pdf gawk.1.ps gawk.1.pdf +pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi @@ -89,9 +90,15 @@ gawk.1.ps: gawk.1 -groff -man $(srcdir)/gawk.1 > gawk.1.ps +gawk.1.pdf: gawk.1.ps + ps2pdf gawk.1.ps gawk.1.pdf + igawk.1.ps: igawk.1 -groff -man $(srcdir)/igawk.1 > igawk.1.ps +igawk.1.pdf: igawk.1.ps + ps2pdf igawk.1.ps igawk.1.pdf + awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr @@ -100,3 +107,6 @@ awkcard.nc: $(CARDFILES) $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps && touch awkcard.nc + +awkcard.pdf: awkcard.ps + ps2pdf awkcard.ps awkcard.pdf diff -Nru gawk-3.1.8+dfsg/doc/Makefile.in gawk-4.0.1+dfsg/doc/Makefile.in --- gawk-3.1.8+dfsg/doc/Makefile.in 2010-05-06 17:55:44.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/Makefile.in 2012-03-28 20:03:23.000000000 +0000 @@ -18,7 +18,7 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2010 +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2010, 2011 # the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the @@ -63,13 +63,14 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -153,6 +154,7 @@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ +LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ @@ -180,7 +182,6 @@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ -U = @U@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ @@ -240,16 +241,19 @@ top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi man_MANS = gawk.1 igawk.1 -EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ +EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ + general-program.eps general-program.fig general-program.pdf \ + process-flow.eps process-flow.fig process-flow.pdf \ macros colors no.colors $(man_MANS) \ - lflashlight.eps rflashlight.eps \ - lflashlight.pdf rflashlight.pdf \ - statist.jpg statist.eps statist.pdf + lflashlight-small.xpic lflashlight.eps lflashlight.pdf \ + rflashlight-small.xpic rflashlight.eps rflashlight.pdf \ + statist.jpg statist.eps statist.pdf \ + bc_notes # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf TROFF = groff -t -Tps -U 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/" @@ -272,7 +276,7 @@ # make pgawk.1 a link to gawk.1 in the installed man directory. # We want hard links for install-data-hook, below -LN = ln +LN = ln -f all: all-am .SUFFIXES: @@ -721,8 +725,6 @@ mostlyclean-am: mostlyclean-aminfo mostlyclean-generic -pdf: pdf-am - pdf-am: $(PDFS) ps: ps-am @@ -765,9 +767,7 @@ postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) -all-pdf: postscript - ps2pdf awkcard.ps awkcard.pdf - ps2pdf gawk.1.ps gawk.1.pdf +pdf: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi @@ -778,9 +778,15 @@ gawk.1.ps: gawk.1 -groff -man $(srcdir)/gawk.1 > gawk.1.ps +gawk.1.pdf: gawk.1.ps + ps2pdf gawk.1.ps gawk.1.pdf + igawk.1.ps: igawk.1 -groff -man $(srcdir)/igawk.1 > igawk.1.ps +igawk.1.pdf: igawk.1.ps + ps2pdf igawk.1.ps igawk.1.pdf + awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr @@ -790,6 +796,9 @@ awkcard.nc: $(CARDFILES) $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps && touch awkcard.nc +awkcard.pdf: awkcard.ps + ps2pdf awkcard.ps awkcard.pdf + # 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 -Nru gawk-3.1.8+dfsg/doc/awkcard.in gawk-4.0.1+dfsg/doc/awkcard.in --- gawk-3.1.8+dfsg/doc/awkcard.in 2010-04-20 09:10:01.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/awkcard.in 2012-03-28 19:47:53.000000000 +0000 @@ -1,7 +1,8 @@ .\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" .\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, -.\" 2003, 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. +.\" 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012 +.\" Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -47,42 +48,42 @@ .ES .in +.2i .nf -\*(FRAction Statements 7 -Arrays 10 -Awk Program Execution 4 -Bit Manipulation Functions (\*(GK) 15 +\*(FRAction Statements 9 +Arrays 7 +Awk Program Execution 5 +Bit Manipulation Functions (\*(GK) 17 Bug Reports 2 -Closing Redirections 12 +Closing Redirections 13 Command Line Arguments (standard) 2 Command Line Arguments (\*(GK) 3 Command Line Arguments (\*(MK) 4 -Conversions And Comparisons 9 +Conversions And Comparisons 8 Copying Permissions 18 Definitions 2 -Dynamic Extensions (\*(GK) 16 -Environment Variables (\*(GK) 17 -Escape Sequences 8 -Expressions 10 -Fields 6 +Dynamic Extensions (\*(GK) 17 +Environment Variables (\*(GK) 11 +Escape Sequences 9 +Expressions 7 +Fields 10 FTP/HTTP Information 18 -Historical Features (\*(GK) 17 -Input Control 11 -Internationalization (\*(GK) 16 -Lines And Statements 5 -Localization (\*(GK) 16 +Historical Features (\*(GK) 10 +Input Control 13 +Internationalization (\*(GK) 18 +Lines And Statements 4 +Localization (\*(GK) 12 Numeric Functions 15 -Output Control 11 -Pattern Elements 7 -POSIX Character Classes 6 -Printf Formats 13 -Records 6 -Regular Expressions 5 +Output Control 13 +Pattern Elements 8 +Printf Formats 14 +Records 10 +Regular Expressions 11 Signals (\*(PK) 4 Special Filenames 12 -String Functions 14 -Time Functions (\*(GK) 15 -User-defined Functions 17 -Variables 8\*(CX +String Functions 16 +Time Functions (\*(GK) 17 +Type Functions (\*(GK) 18 +User-defined Functions 15 +Variables 5\*(CX .in -.2i .EB "\s+2\f(HBCONTENTS\*(FR\s0" .sp .4 @@ -101,7 +102,7 @@ .SL .nf \*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -2005, 2007, 2009, 2010 Free Software Foundation, Inc. +2005, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. .nf .BT @@ -111,7 +112,7 @@ .\" --- Definitions .fi .ES -\*(CDThis card describes POSIX AWK, as well as the three +\*(CDThis card describes POSIX AWK, as well as three freely available \*(AK implementations (see \fHFTP/HTTP Information\fP below). \*(CLCommon extensions (in two or more versions) are printed in light blue. @@ -158,7 +159,7 @@ \*(FIname\fP \- a variable, array or function name. .sp .5 \*(FIentry\fP(\*(FIN\fP) \- entry \*(FIentry\fP in section \*(FIN\fP of the -UNIX reference manual. +Unix reference manual. .sp .5 \*(FIpattern\fP \- an expression describing an input record to be matched. .sp .5 @@ -181,19 +182,19 @@ .sp .5 .TS expand; -l lw(2.2i). -\*(FC\-F \*(FIfs\*(FR use \*(FIfs\fP for the input field separator. +l lw(2.0i). +\*(FC\-F \*(FIfs\*(FR Use \*(FIfs\fP for the input field separator. \*(FC\-v\*(FI var\*(FC\^=\^\*(FIval\*(FR T{ -assign the value \*(FIval\*(FR to the variable \*(FIvar\*(FR +Assign the value \*(FIval\*(FR to the variable \*(FIvar\*(FR before execution of the program begins. Such variable values are available to the \*(FCBEGIN\fP rule. T} \*(FC\-f \*(FIprog-file\*(FR T{ -read the AWK program source from the file +Read the AWK program source from the file \*(FIprog-file\*(FR, instead of from the first command line argument. Multiple \*(FC\-f\*(FR options may be used. T} -\*(FC\-\^\-\*(FR signal the end of options.\*(CX +\*(FC\-\^\-\*(FR Signal the end of options.\*(CX .TE .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (standard)\*(FR\s0" @@ -223,68 +224,53 @@ long time \*(AK users. T} .. +.de TI \" table item +.ti -4n +\\$1 +.br +.. .TS expand, tab(%); l lw(1.3i). -\*(FC\-\^\-assign \*(FIvar\*(FC\^=\^\*(FIval\*(FR%just like \*(FC\-v\fP. -\*(FC\-\^\-field-separator \*(FIfs\*(FR%just like \*(FC\-F\fP. -\*(FC\-\^\-file \*(FIprog-file%\*(FRjust like \*(FC\-f\fP. +\*(FC\-\^\-assign \*(FIvar\*(FC\^=\^\*(FIval\*(FR%Same as \*(FC\-v\fP. +\*(FC\-\^\-field-separator \*(FIfs\*(FR%Same as \*(FC\-F\fP. +\*(FC\-\^\-file \*(FIprog-file%\*(FRSame as \*(FC\-f\fP. .TE -.TS -expand, tab(%); -ls -l lw(2.2i). -\*(FC\-\^\-compat\*(FR, \*(FC\-\^\-traditional\*(FR -%T{ -disable \*(GK-specific extensions -(the use of \*(FC\-\^\-traditional\*(FR is preferred). -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-copyleft\*(FR, \*(FC\-\^\-copyright\*(FR -%T{ -print the short version of the GNU +.in +4n +.TI "\*(FC\-b\*(FR, \*(FC\-\^\-characters\-as\-bytes\*(FR +Treat all input data as single-byte characters. I.e., +don't attempt to +process strings as multibyte characters. +Overridden by \*(FC\-\^\-posix\*(FR. +.TI "\*(FC\-c\*(FR, \*(FC\-\^\-traditional\*(FR +Disable \*(GK-specific extensions. +.TI "\*(FC\-C\*(FR, \*(FC\-\^\-copyright\*(FR +Print the short version of the GNU copyright information on \*(FCstdout\*(FR. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-dump-variables\*(FR[\*(FC=\*(FIfile\*(FR] -%T{ -print a sorted list of global variables, +.TI "\*(FC\-d\*(FR[\*(FIfile\*(FR], \*(FC\-\^\-dump-variables\*(FR[\*(FC=\*(FIfile\*(FR] +Print a sorted list of global variables, their types and final values to \*(FIfile\*(FR. If no \*(FIfile\*(FR is provided, \*(FCgawk\*(FR uses \*(FCawkvars.out\*(FR. -T} -\*(FC\-\^\-exec \*(FIfile\*(FR%T{ -read program text from \*(FIfile\fP. No other +.TI "\*(FC-e '\*(FItext\*(FC'\*(FR, \*(FC\-\^\-source '\*(FItext\*(FC'\*(FR +Use \*(FItext\*(FR as AWK program source code. +.TI "\*(FC\-E \*(FIfile\*(FR, \*(FC\-\^\-exec \*(FIfile\*(FR +Read program text from \*(FIfile\fP. No other options are processed. Also disables command-line variable assignments. Useful with \*(FC#!\fP. -T} -\*(FC\-\^\-gen\-po\*(FR%T{ -process the program and print a GNU \*(FCgettext\*(FR -format \*(FC\&.po\*(FR format file on standard output, +.TI "\*(FC\-g\*(FR, \*(FC\-\^\-gen\-pot\*(FR +Process the program and print a GNU \*(FCgettext\*(FR +format \*(FC\&.pot\*(FR file on standard output, containing the text of all strings that were marked for localization. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-help\*(FR, \*(FC\-\^\-usage\*(FR -%T{ -print a short summary of the available +.TI "\*(FC\-h\*(FR, \*(FC\-\^\-help\*(FR +Print a short summary of the available options on \*(FCstdout\*(FR, then exit zero. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR] -%T{ -warn about dubios or non-portable constructs. +.TI "\*(FC\-L \*(FR[\*(FC\*(FIvalue\*(FR], \*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR] +Warn about dubious or non-portable constructs. If \*(FIvalue\*(FR is \*(FCfatal\*(FR, lint warnings become fatal errors. @@ -292,83 +278,57 @@ \*(FCinvalid\*(FR, only issue warnings about things that are actually invalid (not fully implemented yet). -T} -.T& -l lw(2.2i). -\*(FC\-\^\-lint\-old\*(FR%T{ -warn about constructs that are not -portable to the original version of -Unix \*(AK. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-non\-decimal\-data\*(FR -%T{ -recognize octal and hexadecimal values in input data. +.TI "\*(FC\-n\*(FR, \*(FC\-\^\-non\-decimal\-data\*(FR +Recognize octal and hexadecimal values in input data. \*(FIUse this option with great caution!\*(FR -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-optimize\*(FR, \*(FC\-O\*(FR -%T{ -enable some internal optimizations. -T} -.T& -l lw(2.2i). -\*(FC\-\^\-posix\*(FR%T{ -disable common and GNU extensions. -Enable \*(FIinterval expressions\*(FR in regular -expression matching (see \fHRegular -Expressions\fP below). -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-profile\*(FR[\*(FC=\*(FIprof_file\*(FR] -%T{ -send profiling data to \*(FIprof_file\*(FR +.TI "\*(FC\-N\*(FR, \*(FC\-\^\-use\-lc\-numeric\*(FR +Force use of the locale's decimal point character when parsing input data. +.TI "\*(FC\-O\*(FR, \*(FC\-\^\-optimize\*(FR +Enable some internal optimizations. +.TI "\*(FC\-p\*(FR[\*(FC\*(FIfile\*(FR], \*(FC\-\^\-profile\*(FR[\*(FC=\*(FIfile\*(FR] +Send profiling data to \*(FIfile\*(FR (default: \*(FCawkprof.out\*(FR). With \*(GK, the profile is just a ``pretty printed'' version of the program. With \*(PK, the profile contains execution counts in the left margin of each statement in the program. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-re\-interval\*(FR -%T{ -enable \*(FIinterval expressions\*(FR in regular +.TI "\*(FC\-P\*(FR, \*(FC\-\^\-posix\*(FR +Disable common and GNU extensions. +.TI "\*(FC\-R \*(FIfile\*(FR, \*(FC\-\^\-command \*(FIfile\*(FR" +\*(FCdgawk\*(FR only. +Read stored debugger commands from \*(FIfile\*(FR. +.TI "\*(FC\-r\*(FR, \*(FC\-\^\-re\-interval\*(FR +Enable \*(FIinterval expressions\*(FR in regular expression matching (see \fHRegular Expressions\fP below). Useful if -\*(FC\-\^\-posix\*(FR is not specified. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-source '\*(FItext\*(FC'\*(FR -%T{ -use \*(FItext\*(FR as AWK program source code. -T} -.T& -l lw(2.2i). -\*(FC\-\^\-version\*(FR%T{ -print version \" information +\*(FC\-\^\-traditional\*(FR is specified. +.TI "\*(FC\-S\*(FR, \*(FC\-\^\-sandbox\*(FR +Disable the \*(FCsystem()\*(FR function, +input redirection with \*(FCgetline\*(FR, +output redirection with \*(FCprint\*(FR and \*(FCprintf\*(FR, +and dynamic extensions loading.\*(CB +.in -4n +.EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" + +.BT + +.\" +.\" +.\" --- Command Line Arguments (gawk) continued +.ES +.fi +.in +4n +.TI "\*(FC-t\*(FR, \*(FC\-\^\-lint\-old\*(FR +Warn about constructs that are not +portable to the original version of +Unix \*(AK. +.TI "\*(FC\-V\*(FR, \*(FC\-\^\-version\*(FR +Print version \" information info on \*(FCstdout\fP and exit zero. -T} -.T& -ls -l lw(2.2i). -\*(FC\-\^\-use\-lc\-numeric -%T{ -force use of the locale's decimal point character when parsing input data. -T} -.TE +.in -4n .sp .5 .fi In compatibility mode, @@ -379,8 +339,6 @@ for processing.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" -.BT - .\" .\" .\" --- Command Line Arguments (mawk) @@ -393,26 +351,26 @@ expand; l lw(1.8i). \*(FC\-W dump\*(FR T{ -print an assembly listing of the program to +Print an assembly listing of the program to \*(FCstdout\fP and exit zero. T} \*(FC\-W exec \*(FIfile\*(FR T{ -read program text from \*(FIfile\fP. No other +Read program text from \*(FIfile\fP. No other options are processed. Useful with \*(FC#!\fP. T} \*(FC\-W interactive\*(FR T{ -unbuffer \*(FCstdout\fP and line buffer \*(FCstdin\fP. +Unbuffer \*(FCstdout\fP and line buffer \*(FCstdin\fP. Lines are always records, ignoring \*(FCRS\fP. T} \*(FC\-W posix_space\*(FR T{ \*(FC\en\*(FR separates fields when \*(FCRS = "\^"\fP. T} \*(FC\-W sprintf=\*(FInum\*(FR T{ -adjust the size of \*(MK's internal +Adjust the size of \*(MK's internal \*(FCsprintf\*(FR buffer. T} \*(FC\-W version\*(FR T{ -print version and copyright on +Print version and copyright on \*(FCstdout\fP and limit information on \*(FCstderr\fP and exit zero. T} @@ -433,13 +391,53 @@ 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 + +.\" --- Lines And Statements +.ES +.fi +\*(CDAWK is a line-oriented language. The pattern comes first, and then the +action. Action statements are enclosed in \*(FC{\fP and \*(FC}\*(FR. +Either the pattern or the action may be missing, but +not both. If the pattern is missing, the action is +executed for every input record. +A missing action is equivalent to +.sp .5 + \*(FC{ print }\fP +.sp .5 +which prints the entire record. +.sp .5 +Comments begin with the \*(FC#\*(FR character, and continue until the +end of the line. +Normally, a statement ends with a newline, but lines ending in +a ``,'', +\*(FC{\*(FR, +\*(CB\*(FC?\*(FR, +\*(FC:\*(FR,\*(CD +\*(FC&&\*(FR +or +\*(FC||\*(FR +are automatically continued. +Lines ending in \*(FCdo\fP or \*(FCelse\fP +also have their statements automatically continued on the following line. +In other cases, a line can be continued by ending it with a ``\e'', +in which case the newline is ignored. However, a ``\e'' after a +\*(FC#\*(FR is not special. +.sp .5 +Multiple statements may be put on one line by separating them with a ``;''. +This applies to both the statements within the action part of a +pattern-action pair (the usual case) +and to the pattern-action statements themselves.\*(CX +.EB "\s+2\f(HBLINES AND STATEMENTS\*(FR\s0" +.BT + .\" --- Awk Program Execution .ES .fi \*(CDAWK programs are a sequence of pattern-action statements and optional function definitions. .sp .5 + \*(CB\*(FC@include "\*(FIfilename\*(FC"\*(CD +.br \*(FIpattern\*(FC { \*(FIaction statements\*(FC }\*(FR .br \*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC) { \*(FIstatements\*(FC }\*(FR @@ -451,6 +449,9 @@ The program text is read as if all the \*(FIprog-file\*(FR(s) \*(CBand command line source texts\*(CD had been concatenated. +.sp +\*(GK includes files named on \*(FC@include\*(FR lines. +Nested includes are allowed.\*(CD .sp .5 AWK programs execute in the following order. First, all variable assignments specified via the \*(FC\-v\fP @@ -478,6 +479,11 @@ If the value of a particular element of \*(FCARGV\fP is empty (\*(FC"\^"\*(FR), \*(AK skips over it. .sp .5 +\*(CBFor each input file, +if a \*(FCBEGINFILE\fP rule exists, \*(GK executes the associated code +before processing the contents of the file. Similarly, \*(GK executes +the code associated with \*(FCENDFILE\fP after processing the file.\*(CD +.sp .5 For each record in the input, \*(AK tests to see if it matches any \*(FIpattern\fP in the AWK program. For each pattern that the record matches, the associated @@ -488,408 +494,88 @@ \*(AK executes the code in the \*(FCEND\fP rule(s), if any. .sp .5 If a program only has a \*(FCBEGIN\fP rule, no input files are processed. -If a program only has an \*(FCEND\fP rule, the input will be read. +If a program only has an \*(FCEND\fP rule, the input is read. \*(CX .EB "\s+2\f(HBAWK PROGRAM EXECUTION\*(FR\s0" - - -.BT - -.\" --- Lines And Statements -.ES -.fi -\*(CDAWK is a line-oriented language. The pattern comes first, and then the -action. Action statements are enclosed in \*(FC{\fP and \*(FC}\*(FR. -Either the pattern or the action may be missing, but -not both. If the pattern is missing, the action is -executed for every input record. -A missing action is equivalent to -.sp .5 - \*(FC{ print }\fP -.sp .5 -which prints the entire record. -.sp .5 -Comments begin with the \*(FC#\*(FR character, and continue until the -end of the line. -Normally, a statement ends with a newline, but lines ending in -a ``,'', -\*(FC{\*(FR, -\*(CB\*(FC?\*(FR, -\*(FC:\*(FR,\*(CD -\*(FC&&\*(FR -or -\*(FC||\*(FR -are automatically continued. -Lines ending in \*(FCdo\fP or \*(FCelse\fP -also have their statements automatically continued on the following line. -In other cases, a line can be continued by ending it with a ``\e'', -in which case the newline is ignored. However, a ``\e'' after a -\*(FC#\*(FR is not special. .sp .5 -Multiple statements may be put on one line by separating them with a ``;''. -This applies to both the statements within the action part of a -pattern-action pair (the usual case) -and to the pattern-action statements themselves.\*(CX -.EB "\s+2\f(HBLINES AND STATEMENTS\*(FR\s0" - - - -.\" --- Regular Expressions +.\" --- Variables .ES .fi -\*(CDRegular expressions are the extended kind originally defined by -\*(FCegrep\fP. -\*(CBAdditional GNU regexp operators are supported by \*(GK. -A \*(FIword-constituent\fP character is a letter, digit, or -underscore (\*(FC_\fP).\*(CD -.sp .5 .TS -center, tab(~); -cp8 sp8 -cp8 sp8 -lp8|lp8. -.\" .vs 10 -_ -Summary of Regular Expressions -In Decreasing Precedence -_ -\*(FC(\^\*(FIr\*(FC)\*(FR~regular expression (for grouping) -\*(FIc\*(FR~if non-special char, matches itself -\*(FC\e\*(FI\^c\*(FR~turn off special meaning of \*(FIc\fP -\*(FC^\*(FR~beginning of string (note: \*(FInot\fP line) -\*(FC$\*(FR~end of string (note: \*(FInot\fP line) -\*(FC.\*(FR~any single character, including newline -\*(FC[\*(FR...\*(FC]\*(FR~any one character in ... or range -\*(FC[^\*(FR...\*(FC]\*(FR~any one character not in ... or range -\*(CB\*(FC\ey\*(FR~word boundary -\*(FC\eB\*(FR~middle of a word -\*(FC\e<\*(FR~beginning of a word -\*(FC\e>\*(FR~end of a word -\*(FC\ew\*(FR~any word-constituent character -\*(FC\eW\*(FR~any non-word-constituent character -\*(FC\e`\*(FR~beginning of a string -\*(FC\e'\*(FR~end of a string\*(CD -\*(FIr\*(FC*\*(FR~zero or more occurrences of \*(FIr\*(FR -\*(FIr\*(FC+\*(FR~one or more occurrences of \*(FIr\*(FR -\*(FIr\*(FC?\*(FR~zero or one occurrences of \*(FIr\*(FR -\*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR~\*(FIn\fP to \*(FIm\fP occurrences of \*(FIr\*(FR \*(CR(POSIX: see note below)\*(CD -\*(FIr1\*(FC|\|\*(FIr2\*(FR~\*(FIr1\*(FR or \*(FIr2\*(FR +expand; +l lw(2i). +\*(CD\*(FCARGC\fP T{ +Number of command line arguments. +T} +\*(CB\*(FCARGIND\fP T{ +Index in \*(FCARGV\fP of current data file.\*(CD +T} +\*(FCARGV\fP T{ +Array of command line arguments. Indexed from +0 to \*(FCARGC\fP \- 1. Dynamically changing the +contents of \*(FCARGV\fP can control the files used +for data. +T} +\*(CL\*(FCBINMODE\fP T{ +Controls ``binary'' mode for all file I/O. Values of 1, 2, or 3, +indicate input, output, or all files, respectively, should use binary +I/O. \*(CR(Not \*(NK.) \*(CLApplies only to non-POSIX systems. +\*(CBFor \*(GK, string values of \*(FC"r"\fP, or \*(FC"w"\fP specify +that input files, or output files, respectively, should use binary I/O. +Use \*(FC"rw"\fP or \*(FC"wr"\fP for all files.\*(CX +T} .TE -.sp .5 -.fi -\*(CRThe \*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR notation is called an -\*(FIinterval expression\fP. POSIX mandates it for AWK regexps, but -most \*(AKs don't implement it. \*(CBUse \*(FC\-\^\-re\-interval\*(FR -or \*(FC\-\^\-posix\*(FR to enable -this feature in \*(GK.\*(CX -.EB "\s+2\f(HBREGULAR EXPRESSIONS\*(FR\s0" - - +.EB "\s+2\f(HBVARIABLES\*(FR\s0" .BT -.\" --- POSIX Character Classes -.ES -.fi -\*(CDIn regular expressions, within character ranges -(\*(FC[\*(FR...\*(FC]\*(FR), -the notation \*(FC[[:\*(FIclass\*(FC:]]\*(FR defines character classes \*(CR(not \*(MK\fP)\*(CD: -.sp .5 -.TS -center, tab(~); -lp8 lp8 lp8 lp8. -\*(FCalnum\*(FR~alphanumeric~\*(FClower\*(FR~lower-case -\*(FCalpha\*(FR~alphabetic~\*(FCprint\*(FR~printable -\*(FCblank\*(FR~space or tab~\*(FCpunct\*(FR~punctuation -\*(FCcntrl\*(FR~control~\*(FCspace\*(FR~whitespace -\*(FCdigit\*(FR~decimal~\*(FCupper\*(FR~upper-case -\*(FCgraph\*(FR~non-spaces~\*(FCxdigit\*(FR~hexadecimal -.TE -.fi -.sp .5 -\*(CB\*(FRRecognition of these character classes is disabled -when \*(FC\-\-traditional\*(FR is supplied.\*(CL -.EB "\s+2\f(HBPOSIX CHARACTER CLASSES\*(FR\s0" - -.\" --- Records -.ES -.fi -\*(CDNormally, records are separated by newline characters. -Assigning values to the built-in variable \*(FCRS\*(FR -controls how records are separated. -If \*(FCRS\fP is any single character, that character separates records. -\*(CLOtherwise, \*(FCRS\fP is a regular expression. -\*(CR(Not \*(NK.)\*(CL -Text in the input that matches this -regular expression separates the record. -\*(CB\*(GK sets \*(FCRT\*(FR to the value of the -input text that matched the regular expression. -The value of \*(FCIGNORECASE\fP -also affects how records are separated when -\*(FCRS\fP is a regular expression.\*(CD -If \*(FCRS\fP is set to the null string, -then records are separated by one or more blank lines. -When \*(FCRS\fP is set to the null string, -the newline character always acts as -a field separator, in addition to whatever value -\*(FCFS\fP may have. -\*(CB\*(MK does not apply exceptional rules to \*(FCFS\fP -when \*(FCRS = "\^"\fP.\*(CX -.EB "\s+2\f(HBRECORDS\*(FR\s0" - -.\" --- Fields -.ES -.fi -\*(CDAs each input record is read, \*(AK splits the record into -\*(FIfields\*(FR, using the value of the \*(FCFS\fP -variable as the field separator. -If \*(FCFS\fP is a single character, -fields are separated by that character. -\*(CLIf \*(FCFS\fP is the null string, -then each individual character becomes a separate field.\*(CD -Otherwise, \*(FCFS\fP is expected to be a full regular expression. -In the special case that \*(FCFS\fP -is a single space, fields are separated -by runs of spaces and/or tabs -\*(CLand/or newlines\*(CD. -Leading and trailing whitespace are ignored. -\*(CBThe value of \*(FCIGNORECASE\fP -also affects how fields are split when -\*(FCFS\fP is a regular expression.\*(CD -.sp .5 -\*(CBIf the \*(FCFIELDWIDTHS\fP -variable is set to a space-separated list of numbers, each field is -expected to have a fixed width, and \*(GK -splits up the record using the specified widths. -The value of \*(FCFS\fP is ignored. -Assigning a new value to \*(FCFS\fP -overrides the use of \*(FCFIELDWIDTHS\*(FR, -and restores the default behavior.\*(CD -.sp .5 -Each field in the input record may be referenced by its position, -\*(FC$1\*(FR, \*(FC$2\*(FR and so on. -\*(FC$0\fP is the whole record. -Fields may also be assigned new values. -.sp .5 -The variable \*(FCNF\fP -is set to the total number of fields in the input record. -.sp .5 -References to non-existent fields (i.e., fields after \*(FC$NF\*(FR) -produce the null-string. However, assigning to a non-existent field -(e.g., \*(FC$(NF+2) = 5\*(FR) increases the value of -\*(FCNF\*(FR, creates any intervening fields with the null string as their value, -and causes the value of \*(FC$0\fP -to be recomputed with the fields being separated by the -value of \*(FCOFS\*(FR. -References to negative numbered fields cause a fatal error. -Decreasing the value of \*(FCNF\fP causes the trailing fields to be lost -\*(CR(not \*(NK).\*(CX -.EB "\s+2\f(HBFIELDS\*(FR\s0" - -.BT - -.\" --- Pattern Elements -.ES -.fi -\*(CDAWK patterns may be one of the following. -.sp .5 -.nf - \*(FCBEGIN - END - \*(FIexpression - pat1\*(FC,\*(FIpat2\*(FR -.sp .5 -.fi -\*(FCBEGIN\fP and \*(FCEND\fP are special patterns that provide start-up -and clean-up actions respectively. They must have actions. There can -be multiple \*(FCBEGIN\fP and \*(FCEND\fP rules; they are merged and -executed as if there had just been one large rule. They may occur anywhere -in a program, including different source files. -.sp .5 -Expression patterns can be any expression, as described -under \fHExpressions\fP. -.sp .5 -The \*(FIpat1\*(FC,\*(FIpat2\*(FR pattern -is called a \*(FIrange pattern\*(FR. -It matches all input records starting with a record that matches -\*(FIpat1\*(FR, and continuing until a record that matches -\*(FIpat2\*(FR, inclusive. -It does not combine with any other pattern expression.\*(CX -.EB "\s+2\f(HBPATTERN ELEMENTS\*(FR\s0" - -.\" --- Action Statements -.ES -.fi -.in +.2i -.ti -.2i -\*(CD\*(FCbreak\*(FR -.br -break out of the nearest enclosing \*(FCdo\*(FR, \*(FCfor\*(FR, -or \*(FCwhile\*(FR loop. -.ti -.2i -\*(FCcontinue\*(FR -.br -skip the rest of the loop body. -Evaluate the \*(FIcondition\*(FR -part of the nearest enclosing \*(FCdo\*(FR or \*(FCwhile\*(FR loop, -or go to the \*(FIincr\*(FR part of a \*(FCfor\*(FR loop. -.ti -.2i -\*(FCdelete \*(FIarray\^\*(FC[\^\*(FIindex\^\*(FC]\*(FR -.br -delete element \*(FIindex\*(FR from array \*(FIarray\*(FR. -.ti -.2i -\*(CL\*(FCdelete \*(FIarray\^\*(FR -.br -delete all elements from array \*(FIarray\*(FR.\*(CD -.ti -.2i -\*(FCdo \*(FIstatement \*(FCwhile (\*(FIcondition\*(FC)\*(FR -.br -execute \*(FIstatement\*(FR while \*(FIcondition\*(FR is true. -The \*(FIstatement\*(FR is always executed at least once. -.ti -.2i -\*(FCexit\*(FR [ \*(FIexpression\*(FR ] -.br -terminate input record processing. -Execute the \*(FCEND\*(FR rule(s) if present. -If present, \*(FIexpression\*(FR becomes \*(AK's return value. -.ti -.2i -\*(FCfor (\*(FIinit\*(FC; \*(FIcond\*(FC; \*(FIincr\*(FC) \*(FIstatement\*(FR -.br -execute \*(FIinit\*(FR. -Evaluate \*(FIcond\*(FR. -If it is true, execute \*(FIstatement\*(FR. -Execute \*(FIincr\*(FR before going back to the top to -re-evaluate \*(FIcond\*(FR. -Any of the three may be omitted. -A missing \*(FIcond\*(FR is considered to be true. -.ti -.2i -\*(FCfor (\*(FIvar \*(FCin\*(FI array\*(FC) \*(FIstatement\*(FR -.br -execute \*(FIstatement\*(FR once for each subscript in \*(FIarray\*(FR, -with \*(FIvar\*(FR set to a different subscript each time through -the loop. -.ti -.2i -\*(CD\*(FCif (\*(FIcondition\*(FC) \*(FIstatement1\*(FR [ \*(FCelse\*(FI statement2\*(FR ] -.br -if \*(FIcondition\*(FR is true, execute \*(FIstatement1\*(FR, -otherwise execute \*(FIstatement2\*(FR. Each \*(FCelse\*(FR -matches the closest \*(FCif\*(FR. -.ti -.2i -\*(FCnext\*(FR see \fHInput Control.\fP -.ti -.2i -\*(CL\*(FCnextfile\*(FR \*(CR(not \*(MK) \*(CLsee \fHInput Control.\fP\*(CD -.ti -.2i -.\" --- Start switch statement -\*(CB\*(FCswitch (\*(FIexpression\*(FC) { -.br - case [\*(FIvalue\*(FC|\*(FIregular expression\*(FC] : \*(FIstatement(s)\*(FC -.br - default: \*(FIstatement(s)\*(FC -.br -}\*(FR -.br -switch on \*(FIexpression\*(FR, execute \*(FIcase\*(FR if matched, default if not. -For 3.1.x, requires \*(FC\-\^\-enable\-switch\*(FR option to \*(FCconfigure\*(FR.\*(CD -.ti -.2i -.\" --- End switch statement -\*(FCwhile (\*(FIcondition\*(FC) \*(FIstatement \*(FR -.br -while \*(FIcondition\*(FR is true, execute \*(FIstatement\*(FR. -.ti -.2i -\*(FC{ \*(FIstatements \*(FC}\*(FR -.br -a list of statements enclosed in braces can be used anywhere -that a single statement would otherwise be used.\*(CX -.in -.2i -.EB "\s+2\f(HBACTION STATEMENTS\*(FR\s0" - - -.BT - -.\" --- Escape Sequences -.ES -.fi -\*(CDWithin strings constants (\*(FC"..."\fP) and regexp -constants (\*(FC/.../\fP), escape sequences may be used to -generate otherwise unprintable characters. This table lists -the available escape sequences. -.sp .5 -.TS -center, tab(~); -lp8 lp8 lp8 lp8. -\*(FC\ea\fP~alert (bell)~\*(FC\er\fP~carriage return -\*(FC\eb\fP~backspace~\*(FC\et\fP~horizontal tab -\*(FC\ef\fP~form feed~\*(FC\ev\fP~vertical tab -\*(FC\en\fP~newline~\*(FC\e\e\fP~backslash -\*(FC\e\*(FIddd\*(FR~octal value \*(FIddd\fP~\*(CL\*(FC\ex\*(FIhh\*(FR~hex value \*(FIhh\fP\*(CD -\*(FC\e"\fP~double quote~\*(FC\e/\fP~forward slash\*(CX -.TE -.EB "\s+2\f(HBESCAPE SEQUENCES\*(FR\s0" -.sp .7 -.\" --- Variables +.\" --- Variables (continued) .ES .fi .TS expand; l lw(2i). -\*(CD\*(FCARGC\fP T{ -number of command line arguments. -T} -\*(CB\*(FCARGIND\fP T{ -index in \*(FCARGV\fP of current data file.\*(CD -T} -\*(FCARGV\fP T{ -array of command line arguments. Indexed from -0 to \*(FCARGC\fP \- 1. Dynamically changing the -contents of \*(FCARGV\fP can control the files used -for data. -T} -\*(CL\*(FCBINMODE\fP T{ -controls ``binary'' mode for all file I/O. Values of 1, 2, or 3, -indicate input, output, or all files, respectively, should use binary -I/O. \*(CR(Not \*(NK.) \*(CLApplies only to non-POSIX systems. -\*(CBFor \*(GK, string values of \*(FC"r"\fP, or \*(FC"w"\fP specify -that input files, or output files, respectively, should use binary I/O. -String values of \*(FC"rw"\fP or \*(FC"wr"\fP specify that all files -should use binary I/O. Any other string value is treated as \*(FC"rw"\fP, -but generates a warning message.\*(CD -T} \*(FCCONVFMT\fP T{ -conversion format for numbers, default value +Conversion format for numbers, default value is \*(FC"%.6g"\*(FR. T} \*(FCENVIRON\fP T{ -array containing the current environment. -The array is indexed by the environment +Array containing the current environment. +it is indexed by the environment variables, each element being the value of that variable. T} \*(CB\*(FCERRNO\fP T{ -string describing the error if a +String describing the error if a \*(FCgetline\*(FR redirection or read fails, or if \*(FCclose()\*(FR fails. T} \*(FCFIELDWIDTHS\fP T{ -white-space separated list of fieldwidths. Used +Whitespace separated list of field widths. Used to parse the input into fields of fixed width, instead of the value of \*(FCFS\fP.\*(CD T} \*(FCFILENAME\fP T{ -name of the current input file. If no files given +Name of the current input file. If no files given on the command line, \*(FCFILENAME\fP is ``\-''. \*(FCFILENAME\fP is undefined inside the \*(FCBEGIN\fP rule (unless set by \*(FCgetline\fP). T} \*(FCFNR\fP T{ -record number in current input file. +Record number in current input file. +T} +\*(CB\*(FCFPAT\fP T{ +Regular expression describing field contents. +Used to parse the input based on the fields +instead of the field separator.\*(CD T} \*(FCFS\fP T{ -input field separator, a space by default +Input field separator, a space by default (see \fHFields\fP above). T} \*(CB\*(FCIGNORECASE\fP T{ -if non-zero, all regular expression and string +If non-zero, all regular expression and string operations ignore case. Array subscripting is \*(FInot\*(FR affected. @@ -900,124 +586,64 @@ function are affected. T} \*(CB\*(FCLINT\fP T{ -provides dynamic control of the \*(FC\-\^\-lint\fP +Provides dynamic control of the \*(FC\-\^\-lint\fP option from within an AWK program. When true, \*(GK prints lint warnings. When assigned the string value \*(FC"fatal"\*(FR, -lint warnings become fatal errors, exactly like -\*(FC\-\-lint=fatal\*(FR. +lint warnings become fatal errors. Any other true value just prints warnings.\*(CD T} \*(FCNF\fP T{ -number of fields in the current input record. +Number of fields in the current input record. T} \*(FCNR\fP T{ -total number of input records seen so far.\*(CX +Total number of input records seen so far.\*(CX T} -.TE -.EB "\s+2\f(HBVARIABLES\*(FR\s0" -.BT - -.\" --- Variables (continued) -.ES -.fi -.TS -expand; -l lw(2i). \*(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 +Output format for numbers, \*(FC"%.6g"\*(FR, by default. T} \*(FCOFS\fP T{ -output field separator, a space by default. +Output field separator, a space by default. T} \*(FCORS\fP T{ -output record separator, a newline by default. +Output record separator, a newline by default. T} \*(CB\*(FCPROCINFO\fP T{ -elements of this array provide access to info +Elements of this array provide access to information about the running AWK program. See \*(AM for details.\*(CD T} \*(FCRLENGTH\fP T{ -length of the string matched by \*(FCmatch()\*(FR; +Length of the string matched by \*(FCmatch()\*(FR; \-1 if no match. T} \*(FCRS\fP T{ -input record separator, a newline by default +Input record separator, a newline by default (see \fHRecords\fP above). T} \*(FCRSTART\fP T{ -index of the first character matched by +Index of the first character matched by \*(FCmatch()\*(FR; 0 if no match. T} \*(CB\*(FCRT\fP T{ -record terminator. \*(GK sets \*(FCRT\fP to the input +Record terminator. \*(GK sets \*(FCRT\fP to the input text that matched the character or regular expression specified by \*(FCRS\*(FR.\*(CD T} \*(FCSUBSEP\fP T{ -character(s) used to separate multiple subscripts +Character(s) used to separate multiple subscripts in array elements, by default \*(FC"\e034"\*(FR. (See \fHArrays\fP below). T} \*(CB\*(FCTEXTDOMAIN\fP T{ -the application's text domain for internationalization; -used to find the localized -translations for the program's strings.\*(CX +The internationalization text domain, +for finding the localized +translations of the program's strings.\*(CX T} .TE .EB "\s+2\f(HBVARIABLES (continued)\*(FR\s0" -.\" --- Conversions and Comparisons -.ES -.fi -\*(CDVariables and fields may be (floating point) numbers, strings or both. -Context determines how the value of a variable is interpreted. If used in -a numeric expression, it will be treated as a number, if used as a string -it will be treated as a string. -.sp .5 -To force a variable to be treated as a number, add 0 to it; to force it -to be treated as a string, concatenate it with the null string. -.sp .5 -When a string must be converted to a number, the conversion is accomplished -using \*(FIstrtod\*(FR(3). -A number is converted to a string by using the value of \*(FCCONVFMT\fP -as a format string for \*(FIsprintf\*(FR(3), -with the numeric value of the variable as the argument. -However, even though all numbers in AWK are floating-point, -integral values are \*(FIalways\fP converted as integers. -.sp .5 -Comparisons are performed as follows: -If two variables are numeric, they are compared numerically. -If one value is numeric and the other has a string value that is a -``numeric string,'' then comparisons are also done numerically. -Otherwise, the numeric value is converted to a string, and a string -comparison is performed. -Two strings are compared, of course, as strings. -.sp .5 -Note that string constants, such as \*(FC"57"\fP, are \*(FInot\fP -numeric strings, they are string constants. The idea of ``numeric string'' -only applies to fields, \*(FCgetline\fP input, -\*(FCFILENAME\*(FR, \*(FCARGV\fP elements, \*(FCENVIRON\fP -elements and the elements of an array created by -\*(FCsplit()\fP that are numeric strings. -The basic idea is that \*(FIuser input\*(FR, -and only user input, that looks numeric, -should be treated that way. -\*(CRNote that the POSIX standard applies the concept of -``numeric string'' everywhere, even to string constants. -However, this is -clearly incorrect, and none of the three free \*(AK\*(FRs do this.\*(CD -(Fortunately, this is fixed in the next version of the standard.) -.sp .5 -Uninitialized variables have the numeric value 0 and the string value -\*(FC"\^"\fP -(the null, or empty, string).\*(CX -.EB "\s+2\f(HBCONVERSIONS AND COMPARISONS\*(FR\s0" - .BT .\" --- Arrays @@ -1062,7 +688,14 @@ element from an array. \*(CLSpecifying just the array name without a subscript in the \*(FCdelete\fP -statement deletes the entire contents of an array.\*(CX +statement deletes the entire contents of an array. +.sp .5 +\*(CB\*(GK provides true multidimensional arrays. +Such arrays need not be ``rectangular'' as in C or C++. For example: +.sp .5 +.nf + \*(FCa[1] = 5; a[2][1] = 6; a[2][2] = 7\*(FR\*(CX +.fi .EB "\s+2\f(HBARRAYS\*(FR\s0" .\" --- Expressions @@ -1082,6 +715,7 @@ \*(CB\*(FCgensub()\fP,\*(CD \*(FCgsub()\fP, \*(FCmatch()\fP, +\*(CB\*(FCpatsplit()\fP,\*(CD \*(FCsplit()\fP, and \*(FCsub()\fP, @@ -1093,65 +727,558 @@ .TS expand; l lw(1.8i). -\*(FC(\&...)\*(FR grouping -\*(FC$\fP field reference +\*(FC(\&...)\*(FR Grouping +\*(FC$\fP Field reference \*(FC++ \-\^\-\fP T{ -increment and decrement, +Increment and decrement, prefix and postfix T} -\*(FC^\fP \*(CL\*(FC**\*(FR\*(CD exponentiation -\*(FC+ \- !\fP unary plus, unary minus, and logical negation -\*(FC* / %\fP multiplication, division, and modulus -\*(FC+ \-\fP addition and subtraction -\*(FIspace\fP string concatenation -\*(FC< >\fP less than, greater than -\*(FC<= >=\fP less than or equal, greater than or equal -\*(FC!= ==\fP not equal, equal -\*(FC~ !~\fP regular expression match, negated match -\*(FCin\fP array membership -\*(FC&&\fP logical AND, short circuit -\*(FC||\fP logical OR, short circuit -\*(FC?\^:\fP in-line conditional expression +\*(FC^\fP \*(CL\*(FC**\*(FR\*(CD Exponentiation +\*(FC+ \- !\fP Unary plus, unary minus, and logical negation +\*(FC* / %\fP Multiplication, division, and modulus +\*(FC+ \-\fP Addition and subtraction +\*(FIspace\fP String concatenation +\*(FC< >\fP Less than, greater than +\*(FC<= >=\fP Less than or equal, greater than or equal +\*(FC!= ==\fP Not equal, equal +\*(FC~ !~\fP Regular expression match, negated match +\*(FCin\fP Array membership +\*(FC&&\fP Logical AND, short circuit +\*(FC||\fP Logical OR, short circuit +\*(FC?\^:\fP In-line conditional expression .T& l s l lw(1.8i). \*(FC=\0+=\0\-=\0*=\0/=\0%=\0^=\0\*(CL**=\*(CD\fP - assignment operators\*(CX + Assignment operators\*(CX .TE .EB "\s+2\f(HBEXPRESSIONS\*(FR\s0" .BT -.\" --- Input Control +.\" --- Conversions and Comparisons .ES .fi -.TS -expand; -l lw(1.8i). -\*(FCgetline\fP T{ -set \*(FC$0\fP from next record; -set \*(FCNF\*(FR, \*(FCNR\*(FR, \*(FCFNR\*(FR. -T} -\*(FCgetline < \*(FIfile\*(FR set \*(FC$0\fP from next record of \*(FIfile\*(FR; set \*(FCNF\*(FR. -\*(FCgetline \*(FIv\*(FR T{ -set \*(FIv\fP from next input record; -set \*(FCNR\*(FR, \*(FCFNR\*(FR. -T} -\*(FCgetline \*(FIv \*(FC< \*(FIfile\*(FR set \*(FIv\fP from next record of \*(FIfile\*(FR. -\*(FIcmd \*(FC| getline\*(FR pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR. -\*(FIcmd \*(FC| getline \*(FIv\*(FR pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR. -\*(CB\*(FIcmd \*(FC|& getline\*(FR co-process pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR. -.TE -.fi -.in +.2i -.ti -.2i -\*(FIcmd \*(FC|& getline \*(FIv\*(FR -.br -co-process pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR. -.ti -.2i -\*(CD\*(FCnext\fP -.br -stop processing the current input +\*(CDVariables and fields may be (floating point) numbers, strings or both. +Context determines how a variable's value is interpreted. If used in +a numeric expression, it will be treated as a number, if used as a string +it will be treated as a string. +.sp .5 +To force a variable to be treated as a number, add 0 to it; to force it +to be treated as a string, concatenate it with the null string. +.sp .5 +When a string must be converted to a number, the conversion is accomplished +using \*(FIstrtod\*(FR(3). +A number is converted to a string by using the value of \*(FCCONVFMT\fP +as a format string for \*(FIsprintf\*(FR(3), +with the numeric value of the variable as the argument. +However, even though all numbers in AWK are floating-point, +integral values are \*(FIalways\fP converted as integers. +.sp .5 +Comparisons are performed as follows: +If two variables are numeric, they are compared numerically. +If one value is numeric and the other has a string value that is a +``numeric string,'' then comparisons are also done numerically. +Otherwise, the numeric value is converted to a string, and a string +comparison is performed. +Two strings are compared, of course, as strings. +.sp .5 +Note that string constants, such as \*(FC"57"\fP, are \*(FInot\fP +numeric strings, they are string constants. The idea of ``numeric string'' +only applies to fields, \*(FCgetline\fP input, +\*(FCFILENAME\*(FR, \*(FCARGV\fP elements, \*(FCENVIRON\fP +elements and the elements of an array created by \*(FCsplit()\fP +\*(CBor \*(FCpatsplit()\fP\*(CD that are numeric strings. +The basic idea is that \*(FIuser input\*(FR, +and only user input, that looks numeric, +should be treated that way.\*(CD +.sp .5 +Uninitialized variables have the numeric value 0 and the string value +\*(FC"\^"\fP +(the null, or empty, string).\*(CX +.EB "\s+2\f(HBCONVERSIONS AND COMPARISONS\*(FR\s0" + +.\" --- Pattern Elements +.ES +.fi +\*(CDAWK patterns may be one of the following. +.sp .5 +.nf + \*(FCBEGIN + END + \*(CBBEGINFILE + ENDFILE\*(CD + \*(FIexpression + pat1\*(FC,\*(FIpat2\*(FR +.sp .5 +.fi +\*(FCBEGIN\fP and \*(FCEND\fP are special patterns that provide start-up +and clean-up actions respectively. They must have actions. There can +be multiple \*(FCBEGIN\fP and \*(FCEND\fP rules; they are merged and +executed as if there had just been one large rule. They may occur anywhere +in a program, including different source files. +.sp .5 +\*(CB\*(FCBEGINFILE\*(FR and \*(FCENDFILE\*(FR are special patterns that +execute before the first record of each file and after the last record +of each file, respectively. In the \*(FCBEGINFILE\*(FR rule, the \*(FCERRNO\*(FR +variable is non-null if there is a problem with the file; the code should use +\*(FCnextfile\*(FR to skip the file if desired. Otherwise \*(GK exits with +its usual fatal error. The actions for multiple +\*(FCBEGINFILE\*(FR and \*(FCENDFILE\*(FR patterns are merged.\*(CD +.sp .5 +Expression patterns can be any expression, as described +under \fHExpressions\fP. +.sp .5 +The \*(FIpat1\*(FC,\*(FIpat2\*(FR pattern +is called a \*(FIrange pattern\*(FR. +It matches all input records starting with a record that matches +\*(FIpat1\*(FR, and continuing until a record that matches +\*(FIpat2\*(FR, inclusive. +It does not combine with any other pattern expression.\*(CX +.EB "\s+2\f(HBPATTERN ELEMENTS\*(FR\s0" + +.BT + +.\" --- Action Statements +.ES +.fi +.in +.2i +.ti -.2i +\*(CD\*(FCbreak\*(FR +.br +Break out of the nearest enclosing +\*(CB\*(FCswitch\fP statement, or\*(CD +\*(FCdo\*(FR, \*(FCfor\*(FR, or \*(FCwhile\*(FR loop. +.ti -.2i +\*(FCcontinue\*(FR +.br +Skip the rest of the loop body. +Evaluate the \*(FIcondition\*(FR +part of the nearest enclosing \*(FCdo\*(FR or \*(FCwhile\*(FR loop, +or go to the \*(FIincr\*(FR part of a \*(FCfor\*(FR loop. +.ti -.2i +\*(FCdelete \*(FIarray\^\*(FC[\^\*(FIindex\^\*(FC]\*(FR +.br +Delete element \*(FIindex\*(FR from array \*(FIarray\*(FR. +.ti -.2i +\*(CL\*(FCdelete \*(FIarray\^\*(FR +.br +Delete all elements from array \*(FIarray\*(FR.\*(CD +.ti -.2i +\*(FCdo \*(FIstatement \*(FCwhile (\*(FIcondition\*(FC)\*(FR +.br +Execute \*(FIstatement\*(FR while \*(FIcondition\*(FR is true. +The \*(FIstatement\*(FR is always executed at least once. +.ti -.2i +\*(FCexit\*(FR [ \*(FIexpression\*(FR ] +.br +Terminate input record processing. +Execute the \*(FCEND\*(FR rule(s) if present. +If present, \*(FIexpression\*(FR becomes \*(AK's return value. +.ti -.2i +\*(FCfor (\*(FIinit\*(FC; \*(FIcond\*(FC; \*(FIincr\*(FC) \*(FIstatement\*(FR +.br +Execute \*(FIinit\*(FR. +Evaluate \*(FIcond\*(FR. +If it is true, execute \*(FIstatement\*(FR. +Execute \*(FIincr\*(FR before going back to the top to +re-evaluate \*(FIcond\*(FR. +Any of the three may be omitted. +A missing \*(FIcond\*(FR is considered to be true. +.ti -.2i +\*(FCfor (\*(FIvar \*(FCin\*(FI array\*(FC) \*(FIstatement\*(FR +.br +Execute \*(FIstatement\*(FR once for each subscript in \*(FIarray\*(FR, +with \*(FIvar\*(FR set to a different subscript each time through +the loop. +.ti -.2i +\*(CD\*(FCif (\*(FIcondition\*(FC) \*(FIstatement1\*(FR [ \*(FCelse\*(FI statement2\*(FR ] +.br +If \*(FIcondition\*(FR is true, execute \*(FIstatement1\*(FR, +otherwise execute \*(FIstatement2\*(FR. Each \*(FCelse\*(FR +matches the closest \*(FCif\*(FR. +.ti -.2i +\*(FCnext\*(FR See \fHInput Control.\fP +.ti -.2i +\*(CL\*(FCnextfile\*(FR See \fHInput Control.\fP\*(CD +.in -.2i +.\" --- Start switch statement +\*(CB\*(FCswitch (\*(FIexpression\*(FC) { +.br +case \*(FIconstant\*(FC|\*(FIregular expression\*(FC: \*(FIstatement(s) +.br +\*(FCdefault: \*(FIstatement(s) +.br +\*(FC}\*(FR +.in +.2i +.br +Switch on \*(FIexpression\*(FR, +execute \*(FIcase\*(FR if matched, default if not. +The \*(FCdefault\fP label and associated statements are optional.\*(CD +.ti -.2i +.\" --- End switch statement +\*(FCwhile (\*(FIcondition\*(FC) \*(FIstatement \*(FR +.br +While \*(FIcondition\*(FR is true, execute \*(FIstatement\*(FR. +.ti -.2i +\*(FC{ \*(FIstatements \*(FC}\*(FR +.br +A list of statements enclosed in braces can be used anywhere +that a single statement would otherwise be used.\*(CX +.in -.2i +.EB "\s+2\f(HBACTION STATEMENTS\*(FR\s0" + +.\" --- Escape Sequences +.ES +.fi +\*(CDWithin strings constants (\*(FC"..."\fP) and regexp +constants (\*(FC/.../\fP), escape sequences may be used to +generate otherwise unprintable characters. This table lists +the available escape sequences. +.sp .5 +.TS +center, tab(~); +lp8 lp8 lp8 lp8. +\*(FC\ea\fP~alert (bell)~\*(FC\er\fP~carriage return +\*(FC\eb\fP~backspace~\*(FC\et\fP~horizontal tab +\*(FC\ef\fP~form feed~\*(FC\ev\fP~vertical tab +\*(FC\en\fP~newline~\*(FC\e\e\fP~backslash +\*(FC\e\*(FIddd\*(FR~octal value \*(FIddd\fP~\*(CL\*(FC\ex\*(FIhh\*(FR~hex value \*(FIhh\fP\*(CD +\*(FC\e"\fP~double quote~\*(FC\e/\fP~forward slash\*(CX +.TE +.EB "\s+2\f(HBESCAPE SEQUENCES\*(FR\s0" +.BT + +.\" --- Records +.ES +.fi +\*(CDNormally, records are separated by newline characters. +Assigning values to the built-in variable \*(FCRS\*(FR +controls how records are separated. +If \*(FCRS\fP is any single character, that character separates records. +\*(CLOtherwise, \*(FCRS\fP is a regular expression. +\*(CR(Not \*(NK.)\*(CL +Text in the input that matches this +regular expression separates the record. +\*(CB\*(GK sets \*(FCRT\*(FR to the value of the +input text that matched the regular expression. +The value of \*(FCIGNORECASE\fP +also affects how records are separated when +\*(FCRS\fP is a regular expression.\*(CD +If \*(FCRS\fP is set to the null string, +then records are separated by one or more blank lines. +When \*(FCRS\fP is set to the null string, +the newline character always acts as +a field separator, in addition to whatever value +\*(FCFS\fP may have. +\*(CB\*(MK does not apply exceptional rules to \*(FCFS\fP +when \*(FCRS = "\^"\fP.\*(CX +.EB "\s+2\f(HBRECORDS\*(FR\s0" + +.\" --- Fields +.ES +.fi +\*(CDAs each input record is read, \*(AK splits the record into +\*(FIfields\*(FR, using the value of the \*(FCFS\fP +variable as the field separator. +If \*(FCFS\fP is a single character, +fields are separated by that character. +\*(CLIf \*(FCFS\fP is the null string, +then each individual character becomes a separate field.\*(CD +Otherwise, \*(FCFS\fP is expected to be a full regular expression. +In the special case that \*(FCFS\fP +is a single space, fields are separated +by runs of spaces and/or tabs +\*(CLand/or newlines\*(CD. +Leading and trailing whitespace are ignored. +\*(CBThe value of \*(FCIGNORECASE\fP +also affects how fields are split when +\*(FCFS\fP is a regular expression.\*(CD +.sp .5 +\*(CBIf the \*(FCFIELDWIDTHS\fP +variable is set to a space-separated list of numbers, each field is +expected to have a fixed width, and \*(GK +splits up the record using the specified widths. +The value of \*(FCFS\fP is ignored. +Assigning a new value to \*(FCFS\fP or \*(FCFPAT\fP +overrides the use of \*(FCFIELDWIDTHS\*(FR. +and restores the default behavior. +.sp .5 +Similarly, if the +\*(FCFPAT\fP +variable is set to a string representing a regular expression, +each field is made up of text that matches that regular expression. In +this case, the regular expression describes the fields themselves, +instead of the text that separates the fields. +Assigning a new value to +\*(FCFS\fP +or +\*(FCFIELDWIDTHS\fP +overrides the use of +\*(FCFPAT\fP.\*(CD +.sp .5 +Each field in the input record may be referenced by its position, +\*(FC$1\*(FR, \*(FC$2\*(FR and so on. +\*(FC$0\fP is the whole record. +Fields may also be assigned new values. +.sp .5 +The variable \*(FCNF\fP +is set to the total number of fields in the input record. +.sp .5 +References to non-existent fields (i.e., fields after \*(FC$NF\*(FR) +produce the null-string. However, assigning to a non-existent field +(e.g., \*(FC$(NF+2) = 5\*(FR) increases the value of +\*(FCNF\*(FR, creates any intervening fields with the null string as their value, +and causes the value of \*(FC$0\fP +to be recomputed with the fields being separated by the +value of \*(FCOFS\*(FR. +References to negative numbered fields cause a fatal error. +Decreasing the value of \*(FCNF\fP causes the trailing fields to be lost +\*(CR(not \*(NK).\*(CX +.EB "\s+2\f(HBFIELDS\*(FR\s0" + +.\" --- Historical Features +.ES +.fi +\*(CDIt is possible to call the \*(FClength()\fP +built-in function not only with no argument, but even without parentheses. +Doing so, however, is poor practice, +and \*(GK +issues a warning about its use if \*(FC\-\^\-lint\fP +is specified on the command line.\*(CB +.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0" +.BT + +.\" --- Regular Expressions +.ES +.fi +\*(CDRegular expressions are the extended kind originally defined by +\*(FCegrep\fP. +\*(CB\*(GK supports additional GNU operators. +A \*(FIword-constituent\fP character is a letter, digit, or +underscore (\*(FC_\fP).\*(CD +.sp .5 +.TS +center, tab(~); +cp8 sp8 +cp8 sp8 +lp8|lp8. +.\" .vs 10 +_ +Summary of Regular Expressions +In Decreasing Precedence +_ +\*(FC(\^\*(FIr\*(FC)\*(FR~regular expression (for grouping) +\*(FIc\*(FR~if non-special char, matches itself +\*(FC\e\*(FI\^c\*(FR~turn off special meaning of \*(FIc\fP +\*(FC^\*(FR~beginning of string (note: \*(FInot\fP line) +\*(FC$\*(FR~end of string (note: \*(FInot\fP line) +\*(FC.\*(FR~any single character, including newline +\*(FC[\*(FR...\*(FC]\*(FR~any one character in ... or range +\*(FC[^\*(FR...\*(FC]\*(FR~any one character not in ... or range +\*(CB\*(FC\ey\*(FR~word boundary +\*(FC\eB\*(FR~middle of a word +\*(FC\e<\*(FR~beginning of a word +\*(FC\e>\*(FR~end of a word +\*(FC\es\*(FR~any whitespace character +\*(FC\eS\*(FR~any non-whitespace character +\*(FC\ew\*(FR~any word-constituent character +\*(FC\eW\*(FR~any non-word-constituent character +\*(FC\e`\*(FR~beginning of a string +\*(FC\e'\*(FR~end of a string\*(CD +\*(FIr\*(FC*\*(FR~zero or more occurrences of \*(FIr\*(FR +\*(FIr\*(FC+\*(FR~one or more occurrences of \*(FIr\*(FR +\*(FIr\*(FC?\*(FR~zero or one occurrences of \*(FIr\*(FR +\*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR~\*(FIn\fP to \*(FIm\fP occurrences of \*(FIr\*(FR \*(CR(POSIX: see note below)\*(CD +\*(FIr1\*(FC|\|\*(FIr2\*(FR~\*(FIr1\*(FR or \*(FIr2\*(FR +.TE +.sp .5 +.fi +\*(CRThe \*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR notation is called an +\*(FIinterval expression\fP. POSIX mandates it for AWK regexps, but +most \*(AKs don't implement it.\*(CX +.sp .5 +\*(CDIn regular expressions, within character ranges +(\*(FC[\*(FR...\*(FC]\*(FR), +the notation \*(FC[[:\*(FIclass\*(FC:]]\*(FR defines character classes\*(CD: +.sp .5 +.TS +center, tab(~); +lp8 lp8 lp8 lp8. +\*(FCalnum\*(FR~alphanumeric~\*(FClower\*(FR~lowercase +\*(FCalpha\*(FR~alphabetic~\*(FCprint\*(FR~printable +\*(FCblank\*(FR~space or tab~\*(FCpunct\*(FR~punctuation +\*(FCcntrl\*(FR~control~\*(FCspace\*(FR~whitespace +\*(FCdigit\*(FR~decimal~\*(FCupper\*(FR~uppercase +\*(FCgraph\*(FR~non-spaces~\*(FCxdigit\*(FR~hexadecimal\*(CX +.TE +.fi +.EB "\s+2\f(HBREGULAR EXPRESSIONS\*(FR\s0" + +.\" --- Environment Variables +.ES +.fi +\*(CDThe environment variable \*(FCAWKPATH\fP specifies a search path to use +when finding source files named with the \*(FC\-f\fP +option. +The default path is +\*(FC".:/usr/local/share/awk"\*(FR. +.\" if this variable does not exist. +.\" (The actual directory may vary, +.\" depending upon how \*(GK was built and installed.) +If a file name given to the \*(FC\-f\fP option contains a ``/'' character, +no path search is performed. +.sp .5 +.PP +For socket communication, +\*(FCGAWK_SOCK_RETRIES\fP +controls the number of retries, and +\*(FCGAWK_MSEC_SLEEP\fP controls +the interval between retries. +The interval is in milliseconds. On systems that do not support +\*(FIusleep\fP(3), +the value is rounded up to an integral number of seconds. +.sp .5 +If \*(FCPOSIXLY_CORRECT\fP exists +.\" in the environment, +then \*(GK +behaves exactly as if the \*(FC\-\^\-posix\fP option had been given.\*(CB +.EB "\s+2\f(HBENVIRONMENT VARIABLES (\*(GK\f(HB)\*(FR\s0" +.BT + +.\" --- Localization +.ES +.fi +\*(CDThere are several steps involved in producing and running a localizable +\*(AK program. +.sp .5 +1. Add a \*(FCBEGIN\*(FR action to assign a value to the +\*(FCTEXTDOMAIN\*(FR variable to set the text domain for +your program. +.sp .3 +.ti +5n +\*(FCBEGIN { TEXTDOMAIN = "myprog" }\*(FR +.sp .3 +This allows \*(GK to find the \*(FC\&.mo\*(FR +file associated with your program. +Without this step, \*(GK uses the \*(FCmessages\*(FR text domain, +which probably won't work. +.sp .5 +2. Mark all strings that should be translated with leading underscores. +.sp .5 +3. Use the +\*(FCbindtextdomain()\*(FR, +\*(FCdcgettext()\*(FR, +and/or +\*(FCdcngettext()\*(FR +functions in your program, as appropriate. +.sp .5 +4. Run +.sp .3 +.ti +3n +\*(FCgawk\0\-\^\-gen\-pot\0\-f\0myprog.awk\0>\0myprog.pot\*(FR +.sp .3 +to generate a \*(FC\&.pot\*(FR +file for your program. +.sp .5 +5. Provide appropriate translations, and build and install a corresponding +\*(FC\&.mo\*(FR file. +.sp .5 +The internationalization features are described in full detail in \*(AM.\*(CB +.EB "\s+2\f(HBLOCALIZATION (\*(GK\f(HB)\*(FR\s0" + +.\" --- Special Filenames +.ES +.fi +\*(CDAll three \*(FCawk\fP implementations +recognize certain special filenames internally +when doing I/O redirection from either \*(FCprint\fP +or \*(FCprintf\fP into a file or via \*(FCgetline\fP +from a file. +These filenames +provide access to open file descriptors inherited from the +parent process. They +may also be used on the command line to name data files. +The filenames are: +.sp .5 +.TS +expand; +l lw(2i). +\*(FC"\-"\fP standard input +\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD +\*(FC/dev/stdout\fP standard output +\*(FC/dev/stderr\fP standard error output +.TE +.sp .5 +.fi +\*(CBThe following names are specific to \*(GK. +.sp .5 +.in +.2i +.ti -.2i +\*(FC/dev/fd/\^\*(FIn\*(FR +.br +File associated with the open file descriptor \*(FIn\*(FR. +.ti -.2i +\*(FC/inet/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +.ti -.2i +\*(FC/inet4/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +.ti -.2i +\*(FC/inet6/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +Files for TCP/IP connections on local port \*(FIlport\*(FR to +remote host \*(FIrhost\*(FR on remote port \*(FIrport\*(FR. +Use a port of \*(FC0\*(FR to have the system pick a port. +Use \*(FC/inet4\fP to force an IPv4 connection, +and \*(FC/inet6\fP to force an IPv6 connection. +Plain \*(FC/inet\fP uses the system default (probably IPv4). +Usable only with the \*(FC|&\*(FR two-way I/O operator. +.ti -.2i +\*(FC/inet/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +.ti -.2i +\*(FC/inet4/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +.ti -.2i +\*(FC/inet6/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +Similar, but use UDP/IP instead of TCP/IP.\*(CL +.in -.2i +.EB "\s+2\f(HBSPECIAL FILENAMES\*(FR\s0" + +.BT + +.\" --- Input Control +.ES +.fi +.TS +expand; +l lw(1.8i). +\*(FCgetline\fP T{ +Set \*(FC$0\fP from next record; +set \*(FCNF\*(FR, \*(FCNR\*(FR, \*(FCFNR\*(FR. +T} +\*(FCgetline < \*(FIfile\*(FR Set \*(FC$0\fP from next record of \*(FIfile\*(FR; set \*(FCNF\*(FR. +\*(FCgetline \*(FIv\*(FR T{ +Set \*(FIv\fP from next input record; +set \*(FCNR\*(FR, \*(FCFNR\*(FR. +T} +\*(FCgetline \*(FIv \*(FC< \*(FIfile\*(FR Set \*(FIv\fP from next record of \*(FIfile\*(FR. +\*(FIcmd \*(FC| getline\*(FR Pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR. +\*(FIcmd \*(FC| getline \*(FIv\*(FR Pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR. +\*(CB\*(FIcmd \*(FC|& getline\*(FR Co-process pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR. +.TE +.fi +.in +.2i +.ti -.2i +\*(FIcmd \*(FC|& getline \*(FIv\*(FR +.br +Co-process pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR. +.ti -.2i +\*(CD\*(FCnext\fP +.br +Stop processing the current input record. Read next input record and start over with the first pattern in the program. Upon end of the input data, @@ -1160,17 +1287,13 @@ .ti -.2i \*(CL\*(FCnextfile\fP .br -stop processing the current input file. +Stop processing the current input file. The next input record comes from the next input file. \*(FCFILENAME\fP \*(CBand \*(FCARGIND\fP\*(CL are updated, \*(FCFNR\fP is reset to 1, and processing starts over with the first pattern in the AWK program. Upon end -of input data, execute any \*(FCEND\fP rule(s). -\*(CREarlier versions of \*(GK used -\*(FCnext file\*(FR, as two words. -This usage is no longer supported. -\*(CR\*(MK does not currently support \*(FCnextfile\*(FR.\*(CD +of input data, execute any \*(FCEND\fP rule(s).\*(CD .in -.2i .sp .5 .fi @@ -1186,7 +1309,7 @@ .ti -.2i \*(CL\*(FCfflush(\*(FR[\*(FIfile\^\*(FR]\*(FC)\*(FR .br -flush any buffers associated +Flush any buffers associated with the open output file or pipe \*(FIfile\*(FR.\*(CD \*(CBIf no \*(FIfile\fP, then flush standard output. If \*(FIfile\fP is null, then flush all open output files and pipes @@ -1194,22 +1317,22 @@ .ti -.2i \*(FCprint\fP .br -print the current record. Terminate output record +Print the current record. Terminate output record with \*(FCORS\fP. .ti -.2i \*(FCprint \*(FIexpr-list\*(FR .br -print expressions. Each expression is separated +Print expressions. Each expression is separated by the value of \*(FCOFS\fP. Terminate the output record with \*(FCORS\fP. .ti -.2i \*(FCprintf \*(FIfmt\*(FC, \*(FIexpr-list\*(FR .br -format and print (see \fHPrintf Formats\fP below). +Format and print (see \fHPrintf Formats\fP below). .ti -.2i \*(FCsystem(\*(FIcmd\*(FC)\*(FR .br -execute the command \*(FIcmd\*(FR, +Execute the command \*(FIcmd\*(FR, and return the exit status \*(CR(may not be available on non-POSIX systems)\*(CD. .sp .5 @@ -1220,25 +1343,23 @@ .ti -.2i \*(CD\*(FCprint "hello" > \*(FIfile\*(FR .br -print data to \*(FIfile\fP. The first time the file is written to, it +Print data to \*(FIfile\fP. The first time the file is written to, it is truncated. Subsequent commands append data. .ti -.2i \*(FCprint "hello" >> \*(FIfile\*(FR .br -append data to \*(FIfile\fP. The previous contents of \*(FIfile\*(FR are not lost. +Append data to \*(FIfile\fP. The previous contents of \*(FIfile\*(FR are not lost. .ti -.2i \*(FCprint "hello" | \*(FIcmd\*(FR .br -print data down a pipeline to \*(FIcmd\*(FR. +Print data down a pipeline to \*(FIcmd\*(FR. .ti -.2i \*(CB\*(FCprint "hello" |& \*(FIcmd\*(FR .br -print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX +Print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX .in -.2i .EB "\s+2\f(HBOUTPUT CONTROL\*(FR\s0" -.BT - .\" --- Closing Redirections .ES .fi @@ -1246,101 +1367,22 @@ .ti -.2i \*(CD\*(FCclose(\*(FIfile\*(FC)\*(FR .br -close input or output file, pipe \*(CBor co-process.\*(CD +Close input or output file, pipe \*(CBor co-process.\*(CD .ti -.2i \*(CB\*(FCclose(\*(FIcommand\*(FC, \*(FIhow\*(FC)\*(FR .br -close one end of co-process pipe. +Close one end of co-process pipe. Use \*(FC"to"\*(FR for the write end, or \*(FC"from"\*(FR for the read end.\*(CD .in -.2i .sp .5 -On success, \*(FCclose()\*(FR returns zero for a file, or the exit status for a process. -It returns \-1 if \*(FIfile\*(FR -was never opened, or -if there was a system problem. -\*(CB\*(FCERRNO\*(FR describes -the error.\*(CX -.EB "\s+2\f(HBCLOSING REDIRECTIONS\*(FR\s0" - -.\" --- Special Filenames -.ES -.fi -\*(CDWhen doing I/O redirection from either \*(FCprint\fP -or \*(FCprintf\fP into a file or via \*(FCgetline\fP -from a file, all three implementations of \*(FCawk\fP -recognize certain special filenames internally. These filenames -allow access to open file descriptors inherited from the -parent process (usually the shell). -These filenames may also be used on the command line to name data files. -The filenames are: -.sp .5 -.TS -expand; -l lw(2i). -\*(FC"\-"\fP standard input -\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD -\*(FC/dev/stdout\fP standard output -\*(FC/dev/stderr\fP standard error output -.TE -.sp .5 -.fi -\*(CBThe following names are specific to \*(GK. -.sp .5 -.in +.2i -.ti -.2i -\*(FC/dev/fd/\^\*(FIn\*(FR -.br -File associated with the open file descriptor \*(FIn\*(FR. -.ti -.2i -\*(FC/inet/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR -.br -File for TCP/IP connection on local port \*(FIlport\*(FR to -remote host \*(FIrhost\*(FR on remote port \*(FIrport\*(FR. -Use a port of \*(FC0\*(FR to have the system pick a port. -Usable only with the \*(FC|&\*(FR two-way I/O operator. -.ti -.2i -\*(FC/inet/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR -.br -Similar, but use UDP/IP instead of TCP/IP. -.ti -.2i -\*(CR\*(FC/inet/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR -.br -.\" Similar, but use raw IP sockets. -Reserved for future use.\*(CB -.in -.2i -.sp .5 -.fi -Other special filenames provide access to information about the running -\*(FCgawk\fP process. -Reading from these files returns a single record. -The filenames and what they return are:\*(FR -.sp .5 -.TS -expand; -l lw(2i). -\*(FC/dev/pid\fP process ID of current process -\*(FC/dev/ppid\fP parent process ID of current process -\*(FC/dev/pgrpid\fP process group ID of current process -\*(FC/dev/user\fP T{ -.nf -a single newline-terminated record. -The fields are separated with spaces. -\*(FC$1\fP is the return value of \*(FIgetuid\*(FR(2), -\*(FC$2\fP is the return value of \*(FIgeteuid\*(FR(2), -\*(FC$3\fP is the return value of \*(FIgetgid\*(FR(2) , and -\*(FC$4\fP is the return value of \*(FIgetegid\*(FR(2). -.fi -Any additional fields are the group IDs returned -by \*(FIgetgroups\*(FR(2). Multiple groups may not be -supported on all systems. -T} -.TE -.sp .5 -.fi -\*(CRThese filenames are now obsolete. -Use the \*(FCPROCINFO\fP array to obtain the information they provide.\*(CL -.EB "\s+2\f(HBSPECIAL FILENAMES\*(FR\s0" +On success, \*(FCclose()\*(FR returns zero for a file, or the exit status for a process. +It returns \-1 if \*(FIfile\*(FR +was never opened, or +if there was a system problem. +\*(CB\*(FCERRNO\*(FR describes +the error.\*(CX +.EB "\s+2\f(HBCLOSING REDIRECTIONS\*(FR\s0" .BT @@ -1352,23 +1394,23 @@ accept the following conversion specification formats: .sp .5 .nf -\*(FC%c\fP an \s-1ASCII\s+1 character -\*(FC%d\fP, \*(FC%i\fP a decimal number (the integer part) -\*(FC%e\fP a floating point number of the form +\*(FC%c\fP An \s-1ASCII\s+1 character +\*(FC%d\fP, \*(FC%i\fP A decimal number (the integer part) +\*(FC%e\fP A floating point number of the form \*(FC[\-]d.dddddde[+\^\-]dd\*(FR -\*(FC%E\fP like \*(FC%e\fP, but use \*(FCE\fP instead of \*(FCe\*(FR -\*(FC%f\fP a floating point number of the form +\*(FC%E\fP Like \*(FC%e\fP, but use \*(FCE\fP instead of \*(FCe\*(FR +\*(FC%f\fP A floating point number of the form \*(FC[\-]ddd.dddddd\*(FR -\*(FC%F\fP like \*(FC%f\fP, but use capital letters for infinity and +\*(FC%F\fP Like \*(FC%f\fP, but use capital letters for infinity and not-a-number values. -\*(FC%g\fP use \*(FC%e\fP or \*(FC%f\fP, whichever is shorter, with +\*(FC%g\fP Use \*(FC%e\fP or \*(FC%f\fP, whichever is shorter, with nonsignificant zeros suppressed -\*(FC%G\fP like \*(FC%g\fP, but use \*(FC%E\fP instead of \*(FC%e\*(FR -\*(FC%o\fP an unsigned octal integer -\*(FC%u\fP an unsigned decimal integer -\*(FC%s\fP a character string -\*(FC%x\fP an unsigned hexadecimal integer -\*(FC%X\fP like \*(FC%x\fP, but use \*(FCABCDEF\fP for 10\(en15 +\*(FC%G\fP Like \*(FC%g\fP, but use \*(FC%E\fP instead of \*(FC%e\*(FR +\*(FC%o\fP An unsigned octal integer +\*(FC%u\fP An unsigned decimal integer +\*(FC%s\fP A character string +\*(FC%x\fP An unsigned hexadecimal integer +\*(FC%X\fP Like \*(FC%x\fP, but use \*(FCABCDEF\fP for 10\(en15 \*(FC%%\fP A literal \*(FC%\fP; no argument is converted .sp .5 .fi @@ -1379,7 +1421,7 @@ expand; l lw(2.2i). \*(CB\*(FIcount\*(FC$\*(FR T{ -use the +Use the \*(FIcount\*(FR'th argument at this point in the formatting (a \*(FIpositional specifier\*(FR). @@ -1387,75 +1429,72 @@ format strings, not in the original text of an AWK program.\*(CD T} \*(FC\-\fP T{ -left-justify the expression within its field. +Left-justify the expression within its field. T} \*(FIspace\fP T{ -for numeric conversions, prefix positive values +For numeric conversions, prefix positive values with a space and negative values with a minus sign. T} \*(FC+\fP T{ -used before the \*(FIwidth\fP modifier means to always +Use before the \*(FIwidth\fP modifier to always supply a sign for numeric conversions, even if the data to be formatted is positive. The \*(FC+\fP overrides the space modifier. T} \*(FC#\fP T{ -use an ``alternate form'' for some control letters. +Use an ``alternate form'' for some control letters: T} - \*(FC%o\*(FR T{ -supply a leading zero. + \*(FC%o\*(FR T{ +Supply a leading zero. T} - \*(FC%x\*(FR, \*(FC%X\*(FR T{ -supply a leading \*(FC0x\*(FR or \*(FC0X\*(FR for a nonzero result. + \*(FC%x\*(FR, \*(FC%X\*(FR T{ +Supply a leading \*(FC0x\*(FR or \*(FC0X\*(FR for a nonzero result. T} - \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{ -the result always has a decimal point. + \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{ +The result always has a decimal point. T} - \*(FC%g\*(FR, \*(FC%G\*(FR T{ -trailing zeros are not removed. + \*(FC%g\*(FR, \*(FC%G\*(FR T{ +Trailing zeros are not removed. T} \*(FC0\fP T{ -pad output with zeros instead of spaces. +Pad output with zeros instead of spaces. This applies only to the numeric output formats. Only has an effect when the field width is wider than the value to be printed. T} \*(CB\*(FC'\*(FR T{ -use the locale's thousands separator for \*(FC%d\fP, \*(FC%i\fP, and \*(FC%u\fP.\*(CD +Use the locale's thousands separator for \*(FC%d\fP, \*(FC%i\fP, and \*(FC%u\fP.\*(CD T} \*(FIwidth\fP T{ -pad the field to this width. The field is normally +Pad the field to this width. The field is normally padded with spaces. If the \*(FC0\fP flag has been used, pad with zeros. T} \*(FC.\*(FIprec\*(FR T{ -precision. +Precision. The meaning of the \*(FIprec\*(FR varies by control letter: T} - \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR, - \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP T{ -the minimum number of digits to print. + \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR, + \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP T{ +The minimum number of digits to print. T} - \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{ -the number of digits to print to the right of the decimal point. + \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{ +The number of digits to print to the right of the decimal point. T} - \*(FC%g\*(FR, \*(FC%G\fP T{ -the maximum number of significant digits. + \*(FC%g\*(FR, \*(FC%G\fP T{ +The maximum number of significant digits. T} - \*(FC%s\fP T{ -the maximum number of characters to print. + \*(FC%s\fP T{ +The maximum number of characters to print. T} .TE .sp .5 .fi -.ig -The dynamic \*(FIwidth\fP and \*(FIprec\fP capabilities of the ANSI C -\*(FCprintf()\fP routines are supported. -.. -A \*(FC*\fP in place of either the \*(FIwidth\fP or \*(FIprec\fP -specifications causes their values to be taken from -the argument list to \*(FCprintf\fP or \*(FCsprintf()\*(FR. +Use a +\*(FC*\fP in place of either the \*(FIwidth\fP or \*(FIprec\fP +specifications to take their values from +the \*(FCprintf\fP or \*(FCsprintf()\*(FR argument list. \*(CBUse \*(FC*\*(FIn\*(FC$\*(FR to use positional specifiers with a dynamic width or precision.\*(CX .EB "\s+2\f(HBPRINTF FORMATS\*(FR\s0" @@ -1463,33 +1502,127 @@ .BT -.\" --- Builtin String Functions +.\" --- User-defined Functions +.ES +.fi +\*(CDFunctions in AWK are defined as follows: +.sp .5 +.nf + \*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC) + { + \*(FIstatements + \*(FC}\*(FR +.sp .5 +.fi +Functions are executed when they are called from within expressions +in either patterns or actions. Actual parameters supplied in the function +call instantiate the formal parameters declared in the function. +Arrays are passed by reference, other variables are passed by value. +.sp .5 +Local variables are declared as extra parameters +in the parameter list. The convention is to separate local variables from +real parameters by extra spaces in the parameter list. For example: +.sp .5 +.nf + \*(FC# a and b are local + function f(p, q, a, b) + { + \&..... + } +.sp .3 + /abc/ { ... ; f(1, 2) ; ... }\*(FR +.fi +.sp .5 +The left parenthesis in a function call is required +to immediately follow the function name +without any intervening whitespace. +This is to avoid a syntactic ambiguity with the concatenation operator. +This restriction does not apply to the built-in functions. +.sp .5 +Functions may call each other and may be recursive. +Function parameters used as local variables are initialized +to the null string and the number zero upon function invocation. +.sp .5 +\*(CBFunctions may be called indirectly. To do this, assign +the name of the function to be called, as a string, to a variable. +Then use the variable as if it were the name of a function, prefixed with +an ``at'' sign, like so:\*(FC +.nf +.sp .5 + function myfunc() + { + print "myfunc called" + } +.sp .3 + { + the_func = "myfunc" + @the_func() + } +.fi +.sp .5 +\*(FR\*(CDUse \*(FCreturn\fP to return a value from a function. The return value +is undefined if no value is provided, or if the function returns by +``falling off'' the end. +.sp .5 +\*(CLThe word +\*(FCfunc\fP +may be used in place of +\*(FCfunction\*(FR. +\*(CRThis usage is deprecated.\*(CX +.EB "\s+2\f(HBUSER-DEFINED FUNCTIONS\*(FR\s0" +.sp .6 +.\" --- Built-in Numeric Functions +.ES +.fi +.TS +expand; +l lw(2i). +\*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR The arctangent of \*(FIy/x\fP in radians. +\*(FCcos(\*(FIexpr\*(FC)\*(FR The cosine of \*(FIexpr\fP, which is in radians. +\*(FCexp(\*(FIexpr\*(FC)\*(FR The exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). +\*(FCint(\*(FIexpr\*(FC)\*(FR Truncate to integer. +\*(FClog(\*(FIexpr\*(FC)\*(FR The natural logarithm function (base \*(FIe\^\*(FR). +\*(FCrand()\fP A random number between 0 and 1 (0 \(<= \*(FIN\fP < 1). +\*(FCsin(\*(FIexpr\*(FC)\*(FR The sine of \*(FIexpr\fP, which is in radians. +\*(FCsqrt(\*(FIexpr\*(FC)\*(FR The square root function. +\&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR T{ +Use \*(FIexpr\fP as the new seed for the random number +generator. If no \*(FIexpr\fP, the time of day is used. +Return the random number +generator's previous seed.\*(CX +T} +.TE +.EB "\s+2\f(HBNUMERIC FUNCTIONS\*(FR\s0" +.BT + +.\" --- Built-in String Functions .ES .fi .in +.2i .ti -.2i -\*(CB\*(FCasort(\*(FIs\*(FC \*(FR[\*(FC, \*(FId\*(FR]\*(FC)\*(FR +\*(CB\*(FCasort(\*(FIs \*(FR[\*(FC,\*(FI d \*(FR[\*(FC,\*(FI comp\*(FR]]\*(FC)\*(FR .br -sorts the source array \*(FIs\*(FR, replacing the indices with numeric +Sort the source array \*(FIs\*(FR, replacing the indices with numeric values 1 through \*(FIn\*(FR (the number of elements in the array), -and returns the number of elements. -If destination \*(FId\*(FR is supplied, \*(FIs\*(FR is copied to \*(FId\*(FR, -\*(FId\*(FR is sorted, and \*(FIs\*(FR is unchanged.\*(CD +and return the number of elements. +If destination \*(FId\*(FR is supplied, copy \*(FIs\*(FR to \*(FId\*(FR, +sort \*(FId\*(FR, and leave \*(FIs\*(FR unchanged. +Use \*(FIcomp\*(FR to compare indices and elements.\*(CD .ti -.2i -\*(CB\*(FCasorti(\*(FIs\*(FC \*(FR[\*(FC, \*(FId\*(FR]\*(FC)\*(FR +\*(CB\*(FCasorti(\*(FIs \*(FR[\*(FC,\*(FI d \*(FR[\*(FC,\*(FI comp\*(FR]]\*(FC)\*(FR .br -like \*(FCasort()\*(FR, but sorting is done on the indices, not +Like \*(FCasort()\*(FR, but sort 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 +Search the target string \*(FIt\fP for matches of the regular expression \*(FIr\*(FR. If \*(FIh\fP is a string beginning with \*(FCg\fP or \*(FCG\*(FR, replace all matches of \*(FIr\fP with \*(FIs\*(FR. Otherwise, \*(FIh\fP is a number indicating which match of \*(FIr\fP to replace. -If \*(FIt\fP is not supplied, \*(FC$0\fP is used instead. Within the +If \*(FIt\fP is not supplied, use \*(FC$0\fP instead. Within the replacement text \*(FIs\*(FR, the sequence \*(FC\e\*(FIn\*(FR, where \*(FIn\fP is a digit from 1 to 9, may be used to indicate just the text that matched the \*(FIn\*(FRth parenthesized subexpression. @@ -1500,7 +1633,7 @@ .ti -.2i \*(FCgsub(\*(FIr\*(FC, \*(FIs \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR .br -for each substring matching the +For each substring matching the regular expression \*(FIr\fP in the string \*(FIt\*(FR, substitute the string \*(FIs\*(FR, and return the number of substitutions. If \*(FIt\fP is not supplied, use \*(FC$0\*(FR. An \*(FC&\fP in the @@ -1512,21 +1645,21 @@ .ti -.2i \*(FCindex(\*(FIs\*(FC, \*(FIt\*(FC)\*(FR .br -returns the index of the string +Return the index of the string \*(FIt\fP in the string \*(FIs\*(FR, or 0 if \*(FIt\fP is not present. .ti -.2i \*(FClength(\*(FR[\*(FIs\*(FR]\*(FC)\*(FR .br -returns the length of the string +Return the length of the string \*(FIs\*(FR, or the length of \*(FC$0\fP if \*(FIs\fP is not supplied. -\*(CBWith an array argument, returns the number of elements +\*(CLWith an array argument, return the number of elements in the array.\*(CD .ti -.2i \*(FCmatch(\*(FIs\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIa\*(FR]\*(CD\*(FC)\*(FR .br -returns the position in +Return the position in \*(FIs\fP where the regular expression \*(FIr\fP occurs, or 0 if -\*(FIr\fP is not present, and sets the values of variables +\*(FIr\fP is not present, and set the values of variables \*(FCRSTART\fP and \*(FCRLENGTH\*(FR. \*(CBIf \*(FIa\*(FR is supplied, the text matching all of \*(FIr\*(FR @@ -1540,90 +1673,84 @@ 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 +\*(CB\*(FCpatsplit(\*(FIs\*(FC, \*(FIa \*(FR[\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIseps \*(FR] \*(FR] \*(FC)\*(FR .br -splits the string -\*(FIs\fP into the array \*(FIa\fP using the regular expression \*(FIr\*(FR, -and returns the number of fields. If \*(FIr\fP is omitted, \*(FCFS\fP -is used instead. The array \*(FIa\fP is cleared first. +Split the string +\*(FIs\fP into the array \*(FIa\fP +and the array \*(FIseps\fP of separator strings +using the regular expression \*(FIr\*(FR, +and return the number of fields. +Element values are the portions of \*(FIs\fP that matched \*(FIr\fP. +The value of \*(FIseps\fP[\*(FIi\fP] is the separator that appeared in +front of \*(FIa\fP[\*(FIi\fP+1]. +If \*(FIr\fP is omitted, use \*(FCFPAT\fP instead. +Clear the arrays \*(FIa\fP and \*(FIseps\fP first. +Splitting behaves identically to field splitting with \*(FCFPAT\fP.\*(CD +.ti -.2i +\*(FCsplit(\*(FIs\*(FC, \*(FIa \*(FR[\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIseps \*(FR]\*(CD \*(FR] \*(FC)\*(FR +.br +Split the string +\*(FIs\fP into the array \*(FIa\fP \*(CBand the array \*(FIseps\fP of separator strings\*(CD +using the regular expression \*(FIr\*(FR, +and return the number of fields. If \*(FIr\fP is omitted, use \*(FCFS\fP +instead. +Clear the \*(FIa\fP \*(CBand \*(FIseps\fP\*(CD first. Splitting behaves identically to field splitting. (See \fHFields\fP, above.) .ti -.2i \*(FCsprintf(\*(FIfmt\*(FC, \*(FIexpr-list\*(FC)\*(FR .br -prints \*(FIexpr-list\fP -according to \*(FIfmt\*(FR, and returns the resulting string. +Print \*(FIexpr-list\fP +according to \*(FIfmt\*(FR, and return the result.\*(CX +.in -.2i +.EB "\s+2\f(HBSTRING FUNCTIONS\*(FR\s0" + +.BT + +.\" --- Built-in String Functions +.ES +.fi +.in +.2i .ti -.2i \*(CB\*(FCstrtonum(\*(FIs\*(FC)\*(FR .br -examines \*(FIs\*(FR, and returns its numeric value. +Examine \*(FIs\*(FR, and return its numeric value. If \*(FIs\*(FR begins with a leading \*(FC0\*(FR, \*(FCstrtonum()\*(FR assumes that \*(FIs\*(FR is an octal number. If \*(FIs\*(FR begins with a leading \*(FC0x\*(FR or \*(FC0X\*(FR, \*(FCstrtonum()\*(FR assumes that -\*(FIs\*(FR is a hexadecimal number.\*(CD +\*(FIs\*(FR is a hexadecimal number. Otherwise, the +number is treated as decimal.\*(CD .ti -.2i \*(FCsub(\*(FIr\*(FC, \*(FIs \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR .br -just like -\*(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 +Just like +\*(FCgsub()\*(FR, but replace only the first matching substring.\*(CX .ti -.2i \*(CD\*(FCsubstr(\*(FIs\*(FC, \*(FIi \*(FR[\*(FC, \*(FIn\*(FR]\*(FC)\*(FR .br -returns the at most +Return the at most \*(FIn\*(FR-character substring of \*(FIs\fP starting at \*(FIi\*(FR. -If \*(FIn\fP is omitted, the rest of \*(FIs\fP is used. +If \*(FIn\fP is omitted, use the rest of \*(FIs\fP. .ti -.2i \*(FCtolower(\*(FIstr\*(FC)\*(FR .br -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 +Return a copy of the string \*(FIstr\*(FR, +with all the uppercase characters in \*(FIstr\fP translated to their +corresponding lowercase counterparts. Non-alphabetic characters are left unchanged. .ti -.2i \*(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 -corresponding upper-case counterparts. Non-alphabetic characters are +Return a copy of the string \*(FIstr\*(FR, +with all the lowercase characters in \*(FIstr\fP translated to their +corresponding uppercase counterparts. Non-alphabetic characters are left unchanged.\*(CX .in -.2i .EB "\s+2\f(HBSTRING FUNCTIONS (continued)\*(FR\s0" .sp .6 -.\" --- Builtin Numeric Functions -.ES -.fi -.TS -expand; -l lw(2i). -\*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR the arctangent of \*(FIy/x\fP in radians. -\*(FCcos(\*(FIexpr\*(FC)\*(FR the cosine of \*(FIexpr\fP, which is in radians. -\*(FCexp(\*(FIexpr\*(FC)\*(FR the exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). -\*(FCint(\*(FIexpr\*(FC)\*(FR truncates to integer. -\*(FClog(\*(FIexpr\*(FC)\*(FR the natural logarithm function (base \*(FIe\^\*(FR). -\*(FCrand()\fP a random number between 0 and 1 (0 \(<= \*(FIN\fP < 1). -\*(FCsin(\*(FIexpr\*(FC)\*(FR the sine of \*(FIexpr\fP, which is in radians. -\*(FCsqrt(\*(FIexpr\*(FC)\*(FR the square root function. -\&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR T{ -uses \*(FIexpr\fP as a new seed for the random number -generator. If no \*(FIexpr\fP, the time of day is used. -Returns previous seed for the random number -generator.\*(CX -T} -.TE -.EB "\s+2\f(HBNUMERIC FUNCTIONS\*(FR\s0" -.sp .6 -.\" --- Builtin Time Functions +.\" --- Built-in Time Functions .ES .fi \*(CD\*(GK @@ -1635,14 +1762,15 @@ .ti -.2i \*(FCmktime(\*(FIdatespec\*(FC)\*(FR .br -turns \*(FIdatespec\fP into a time -stamp of the same form as returned by \*(FCsystime()\*(FR. +Convert \*(FIdatespec\fP into a time +stamp of the same form as returned by \*(FCsystime()\*(FR +and return it. The \*(FIdatespec\fP is a string of the form \*(FC"\*(FIYYYY MM DD HH MM SS[ DST]\*(FC"\*(FR. .ti -.2i \*(FCstrftime(\*(FR[\*(FIformat \*(FR[\*(FC, \*(FItimestamp\*(FR[\*(FC, \*(FIutc-flag\*(FR]]]\*(FC)\*(FR .br -formats \*(FItimestamp\fP +Format \*(FItimestamp\fP according to the specification in \*(FIformat\*(FR. The \*(FItimestamp\fP should be of the same form as returned by \*(FCsystime()\*(FR. @@ -1650,17 +1778,19 @@ is present and is non-zero or non-null, the result is in UTC, otherwise the result is in local time. If \*(FItimestamp\fP is missing, the current time of day is used. If -\*(FIformat\fP is missing, a default format equivalent to the output -of \*(FIdate\*(FR(1) is used. +\*(FIformat\fP is missing, use \*(FCPROCINFO["strftime"]\fP. +The default value is +equivalent to the output +of \*(FIdate\*(FR(1). .ti -.2i \*(FCsystime()\fP .br -returns the current time of day as the number of +Return the current time of day as the number of seconds since the Epoch.\*(CB .in -.2i .EB "\s+2\f(HBTIME FUNCTIONS (\*(GK\f(HB)\*(FR\s0" .sp .6 -.\" --- Builtin Bit Manipulation Functions +.\" --- Built-in Bit Manipulation Functions .ES .fi \*(CD\*(GK @@ -1671,38 +1801,36 @@ .ti -.2i \*(FCand(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR .br -returns the bitwise AND of the values provided by +Return the bitwise AND of the values provided by \*(FIv1\*(FR and \*(FIv2\*(FR. .ti -.2i \*(FCcompl(\*(FIval\*(FC)\*(FR .br -returns the bitwise complement of +Return the bitwise complement of \*(FIval\*(FR. .ti -.2i \*(FClshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR .br -returns the value of \*(FIval\*(FR, +Return the value of \*(FIval\*(FR, shifted left by \*(FIcount\*(FR bits. .ti -.2i \*(FCor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR .br -returns the bitwise OR of the values provided by +Return the bitwise OR of the values provided by \*(FIv1\*(FR and \*(FIv2\*(FR. .ti -.2i \*(FCrshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR .br -returns the value of \*(FIval\*(FR, +Return the value of \*(FIval\*(FR, shifted right by \*(FIcount\*(FR bits. .ti -.2i \*(FCxor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR .br -teturns the bitwise XOR of the values provided by +Return the bitwise XOR of the values provided by \*(FIv1\*(FR and \*(FIv2\*(FR.\*(CB .in -.2i .EB "\s+2\f(HBBIT MANIPULATION FUNCTIONS (\*(GK\f(HB)\*(FR\s0" - -.BT - +.sp .6 .\" --- Extensions .ES .fi @@ -1710,7 +1838,7 @@ .ti -.2i \*(CD\*(FCextension(\*(FIlib\*(FC, \*(FIfunc\*(FC)\*(FR .br -dynamically load the shared library +Dynamically load the shared library \*(FIlib\*(FR and call \*(FIfunc\*(FR @@ -1720,8 +1848,20 @@ \*(FIfunc\*(FR.\*(CB .in -.2i .EB "\s+2\f(HBDYNAMIC EXTENSIONS (\*(GK\f(HB)\*(FR\s0" +.BT -.\" --- Builtin Internationalization Functions +.\" --- Type Functions +.ES +.fi +.in +.2i +.ti -.2i +\*(CD\*(FCisarray(\*(FIx\*(FC)\*(FR +.br +Return true if \*(FIx\fP is an array, false otherwise.\*(CB +.in -.2i +.EB "\s+2\f(HBTYPE FUNCTIONS (\*(GK\f(HB)\*(FR\s0" +.sp .5 +.\" --- Built-in Internationalization Functions .ES .fi \*(CD\*(GK @@ -1731,11 +1871,11 @@ .ti -.2i \*(FCbindtextdomain(\*(FIdirectory \*(FR[\*(FC, \*(FIdomain\*(FR]\*(FC)\*(FR .br -specifies the directory where \*(GK looks for the \*(FC\&.mo\*(FR +Specify the directory where \*(GK looks for the \*(FC\&.mo\*(FR files, in case they will not or cannot be placed in the ``standard'' locations -(e.g., during testing.) -It returns the directory where \*(FIdomain\*(FR is ``bound.'' +(e.g., during testing). +Return the directory where \*(FIdomain\*(FR is ``bound.'' .sp .5 The default \*(FIdomain\*(FR is the value of \*(FCTEXTDOMAIN\*(FR. When \*(FIdirectory\*(FR is the null string (\*(FC"\^"\*(FR), @@ -1744,7 +1884,7 @@ .ti -.2i \*(FCdcgettext(\*(FIstring \*(FR[\*(FC, \*(FIdomain \*(FR[\*(FC, \*(FIcategory\*(FR]]\*(FC)\*(FR .br -returns the translation of \*(FIstring\*(FR in text domain +Return the translation of \*(FIstring\*(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. @@ -1756,12 +1896,12 @@ .ti -.2i \*(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 +Return the plural form used for \*(FInumber\*(FR of the translation of \*(FIstring1\*(FR and \*(FIstring2\*(FR in text domain \*(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. +The default for \*(FC"LC_MESSAGES"\*(FR +is \*(FIcat\*(FR. .sp .5 If you supply a value for \*(FIcat\*(FR, it must be a string equal to one of the known locale categories. @@ -1769,155 +1909,18 @@ to use the current domain.\*(CB .in -.2i .EB "\s+2\f(HBINTERNATIONALIZATION (\*(GK\f(HB)\*(FR\s0" - -.\" --- Localization -.ES -.fi -\*(CDThere are several steps involved in producing and running a localizable -\*(AK program. -.sp .5 -1. Add a \*(FCBEGIN\*(FR action to assign a value to the -\*(FCTEXTDOMAIN\*(FR variable to set the text domain for -your program. -.sp .5 -.ti +5n -\*(FCBEGIN { TEXTDOMAIN = "myprog" }\*(FR -.sp .5 -This allows \*(GK to find the \*(FC\&.mo\*(FR -file associated with your program. -Without this step, \*(GK uses the \*(FCmessages\*(FR text domain, -which probably won't work. -.sp .5 -2. Mark all strings that should be translated with leading underscores. -.sp .5 -3. Use the -\*(FCbindtextdomain()\*(FR, -\*(FCdcgettext()\*(FR, -and/or -\*(FCdcngettext()\*(FR -functions in your program, as appropriate. -.sp .5 -4. Run -.sp .5 -.ti +5n -\*(FCgawk \-\^\-gen\-po \-f myprog.awk > myprog.po\*(FR -.sp .5 -to generate a \*(FC\&.po\*(FR -file for your program. -.sp .5 -5. Provide appropriate translations, and build and install a corresponding -\*(FC\&.mo\*(FR file. -.sp .5 -The internationalization features are described in full detail in \*(AM.\*(CB -.EB "\s+2\f(HBLOCALIZATION (\*(GK\f(HB)\*(FR\s0" - - -.BT - -.\" --- User-defined Functions -.ES -.fi -\*(CDFunctions in AWK are defined as follows: -.sp .5 -.nf - \*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC) - { - \*(FIstatements - \*(FC}\*(FR -.sp .5 -.fi -Functions are executed when they are called from within expressions -in either patterns or actions. Actual parameters supplied in the function -call instantiate the formal parameters declared in the function. -Arrays are passed by reference, other variables are passed by value. -.sp .5 -Local variables are declared as extra parameters -in the parameter list. The convention is to separate local variables from -real parameters by extra spaces in the parameter list. For example: -.sp .5 -.nf - \*(FC# a and b are local - function f(p, q, a, b) - { - \&..... - } -.sp .3 - /abc/ { ... ; f(1, 2) ; ... }\*(FR -.fi -.sp .5 -The left parenthesis in a function call is required -to immediately follow the function name -without any intervening white space. -This is to avoid a syntactic ambiguity with the concatenation operator. -This restriction does not apply to the built-in functions. -.sp .5 -Functions may call each other and may be recursive. -Function parameters used as local variables are initialized -to the null string and the number zero upon function invocation. -.sp .5 -Use \*(FCreturn\fP to return a value from a function. The return value -is undefined if no value is provided, or if the function returns by -``falling off'' the end. -.sp .5 -\*(CLThe word -\*(FCfunc\fP -may be used in place of -\*(FCfunction\*(FR. -\*(CRNote: This usage is deprecated.\*(CX -.EB "\s+2\f(HBUSER-DEFINED FUNCTIONS\*(FR\s0" - -.\" --- Environment Variables -.ES -.fi -\*(CDThe environment variable \*(FCAWKPATH\fP specifies a search path to use -when finding source files named with the \*(FC\-f\fP -option. -The default path is -\*(FC".:/usr/local/share/awk"\*(FR. -.\" if this variable does not exist. -.\" (The actual directory may vary, -.\" depending upon how \*(GK was built and installed.) -If a file name given to the \*(FC\-f\fP option contains a ``/'' character, -no path search is performed. -.sp .5 -If \*(FCPOSIXLY_CORRECT\fP exists -.\" in the environment, -then \*(GK -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 -\*(CDIt 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 -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 - .\" --- FTP/HTTP Information .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR -File: \*(FC/gnu/gawk/gawk-3.1.8.tar.gz\fP +File: \*(FC/gnu/gawk/gawk-4.0.1.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. .in -.2i .nf -.sp .5 +.sp .4 \*(FChttp://www.cs.princeton.edu/~bwk/btl.mirror/ awk.tar.gz\fP .in +.2i @@ -1926,7 +1929,7 @@ GCC (the GNU Compiler Collection) works well. .in -.2i .nf -.sp .5 +.sp .4 ... Host: \*(FCftp.whidbey.net\*(FR ... File: \*(FC/pub/brennan/mawk1.3.3.tar.gz\fP ... \*(FChttp://www.skeeve.com/gawk/mawk1.3.3.tar.gz\fP @@ -1934,17 +1937,16 @@ File: \*(FC/mawk/mawk.tar.gz\fP .in +.2i .fi -Michael Brennan's \*(MK. Thomas Dickey is now -maintaining it.\*(CX +Michael Brennan's \*(MK. Thomas Dickey now +maintains it.\*(CX .in -.2i .EB "\s+2\f(HBFTP/HTTP INFORMATION\*(FR\s0" - - +.sp .5 .\" --- Copying Permissions .ES .fi \*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2007, 2009, 2010 Free Software Foundation, Inc. +2007, 2009, 2010, 2011 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 @@ -1962,9 +1964,11 @@ .EB "\s+2\f(HBCOPYING PERMISSIONS\*(FR\s0" .\" Need the BT here to get the final page number +.ig .ES \*(CX -.sp 28 +.sp 10 .EB "\s+2\f(HBNOTES\*(FR\s0" +.. .BT diff -Nru gawk-3.1.8+dfsg/doc/bc_notes gawk-4.0.1+dfsg/doc/bc_notes --- gawk-3.1.8+dfsg/doc/bc_notes 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/bc_notes 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,323 @@ +Op Codes +======== + Op_illegal, /* illegal entry == 0 */ + + /* binary operators */ + Op_times, + Op_times_i, all _i operators here are used to optimise arithmetic + Op_quotient, by converting push, push , op to just push, op_i + Op_quotient_i, + Op_mod, + Op_mod_i, + Op_plus, + Op_plus_i, + Op_minus, + Op_minus_i, + Op_exp, + Op_exp_i, + Op_concat, + + /* line range instruction pairs */ + Op_line_range, /* flags for Op_cond_pair */ + Op_cond_pair, /* conditional pair */ + + Op_subscript, calculate array subscript + + /* unary operators */ + Op_preincrement, + Op_predecrement, + Op_postincrement, + Op_postdecrement, + Op_unary_minus, + Op_field_spec, usage: push #, field_spec -> $# + + /* unary relationals */ + Op_not, + + /* assignments */ + Op_assign, simple assign + Op_assign_times, *= etc + Op_assign_quotient, + Op_assign_mod, + Op_assign_plus, + Op_assign_minus, + Op_assign_exp, + Op_assign_concat, optimised concatenation + + /* boolean binaries */ + Op_and, /* a left subexpression in && */ + Op_and_final, /* right subexpression of && */ + Op_or, + Op_or_final, + + /* binary relationals */ + Op_equal, + Op_notequal, + Op_less, + Op_greater, + Op_leq, + Op_geq, + Op_match, + Op_match_rec, /* match $0 */ + Op_nomatch, + + Op_rule, + + /* keywords */ + Op_K_case, + Op_K_default, + Op_K_break, + Op_K_continue, + Op_K_print, + Op_K_print_rec, + Op_K_printf, + Op_K_next, + Op_K_exit, + Op_K_return, + Op_K_delete, + Op_K_delete_loop, + Op_K_getline, + Op_K_nextfile, + + Op_builtin, + Op_in_array, /* boolean test of membership in array */ + + /* function call instruction pairs */ + Op_func_call, + + Op_push, /* variable */ + Op_push_i, /* number, string */ + Op_push_re, /* regex */ + Op_push_array, + Op_push_param, + Op_push_lhs, var assignment + Op_subscript_lhs, array assignment + Op_field_spec_lhs, field assignment + Op_no_op, /* jump target */ + Op_pop, /* pop an item from the runtime stack */ + Op_jmp, + Op_jmp_true, + Op_jmp_false, + Op_push_loop, /* break (continue) target for loop */ + Op_pop_loop, end of loop + Op_get_record, read next input line + Op_newfile, open next input file + Op_arrayfor_init, initialise array for loop + Op_arrayfor_incr, next in array for loop + Op_arrayfor_final, end of array loop + + Op_var_update, /* update value of NR, NF or FNR */ + Op_var_assign, + Op_field_assign, + + Op_ext_func, + Op_func, + + Op_exec_count, debugging etc + Op_breakpoint, + Op_lint, + Op_exit, /* end of instructions, contains final exit value */ + + /*--------- end proper opcodes -------*/ + + /* program structures */ + Op_K_do, + Op_K_for, + Op_K_arrayfor, + Op_K_while, + Op_K_switch, + Op_K_if, + Op_K_else, + Op_K_function, + Op_cond_exp, + Op_list, + Op_case_list, + + /* I/O redirection for print statements */ + Op_redirect_output, + Op_redirect_append, + Op_redirect_pipe, + Op_redirect_pipein, + Op_redirect_input, + Op_redirect_twoway, + + Op_final /* sentry value, not legal */ + + +INSTRUCTIONs +============ + +typedef struct exp_instruction { + struct exp_instruction *nexti; + union { + NODE *dn; + struct exp_instruction *di; + NODE *(*fptr) P((int)); + long dl; + char *name; + } d; + + union { + long xl; + NODE *xn; + void (*aptr) P((void)); + struct exp_instruction *xi; + struct break_point *bpt; + } x; + + short source_line; + OPCODE opcode; +} INSTRUCTION; + +#define lextok d.name +#define func_name d.name + +#define memory d.dn +#define builtin d.fptr +#define builtin_idx d.dl + +#define expr_count x.xl + +#define target_continue d.di +#define target_jmp d.di +#define target_break x.xi + +/* Op_rule */ +#define in_rule x.xl +#define source_file d.name + +/* Op_K_case, Op_K_default */ +#define target_stmt x.xi + +/* Op_case_list, Op_K_switch */ +#define case_val d.di +#define case_stmt x.xi +#define switch_dflt x.xi +#define switch_body d.di /* pretty printing and profiling */ + +/* Op_K_exit */ +#define target_exit x.xi + +/* Op_exit */ +#define exit_value d.dl + +/* Op_K_getline */ +#define into_var x.xl + +/* Op_K_getline, Op_K_print, Op_K_print_rec, Op_K_printf */ +#define redir_type d.dl + +/* Op_arrayfor_incr */ +#define array_var x.xn + +/* Op_line_range */ +#define triggered x.xl + +/* Op_cond_pair */ +#define line_range x.xi + +/* Op_func_call, Op_func */ +#define func_body x.xn + +/* Op_subscript */ +#define sub_count d.dl + +/* Op_push_lhs, Op_subscript_lhs, Op_field_spec_lhs */ +#define do_reference x.xl + +/* Op_list, Op_rule, Op_func */ +#define lasti d.di +#define firsti x.xi + +/* Op_rule, Op_func */ +#define last_line x.xl +#define first_line source_line + +/* Op_lint */ +#define lint_type d.dl + +/* Op_field_spec_lhs */ +#define target_assign d.di + +/* Op_field_assign */ +#define field_assign x.aptr + +/* Op_concat */ +#define var_concat d.dl + +/* Op_breakpoint */ +#define break_pt x.bpt + +/*------------------ pretty printing/profiling --------*/ + +/* Op_exec_count */ +#define exec_count d.dl + +/* Op_K_while */ +#define while_body d.di + +/* Op_K_do */ +#define doloop_cond d.di + +/* Op_K_for */ +#define forloop_cond d.di +#define forloop_body x.xi + +/* Op_K_if */ +#define branch_if d.di +#define branch_else x.xi + +/* Op_K_else */ +#define branch_end x.xi + +/* Op_line_range */ +#define condpair_left d.di +#define condpair_right x.xi + +Programs consist of a list of INSTRUCTIONs linked by nexti pointers. +Each source statement generates a list of INSTRUCTIONs which are then in turn linked to create the program list. + +The list for a given source statement is delimited by the lasti (last INSTRUCTION) pointer. +(The first INSTRUCTION in any rule is identified by the firsti pointer. This is only used in profiling (I think).) + +Each INSTRUCTION can be linked to a NODE via the d.dn (memory) pointer. + +The BEGIN rule(s) are prepended to the program list and the END rule(s) are appended to complete the program build process. + +At run-time, the "virtual machine" walks the program list using the nexti pointers. + +The list_xxx functions are used to create and manipulate these INSTRUCTION lists. + +list_create creates an INSTRUCTION with opcode Op_list and nexti and lasti pointers pointing to itself (an empty list). + +list_append adds a single INSTRUCTION to the end of an existing list and list_prepend does the same at the start of an existing list. +list_merge adds one list to the end of another (and frees the "header" INSTRUCTION of the added list); + +The list_append, list_prepend and list_merge functions reset the nexti and lasti pointers as needed. + + + +Run-time Stack +============== + +Stack is allocated in eval.c line 1040 with an initial 256 (NODE) entries. +If this stack fills, additional blocks of 256 entries are added. + +The various push operators add NODE entries to the stack for processing by subsequent operators. +Once a stack variable is used and no longer required, it is popped off and (if temporary) freed. +Current stack position is in stack_ptr. + +Most operators (eg builtin functions) expect all of their "arguments" to be on the stack. +Some operators (eg Op_plus_i etc) expect one operand on the stack and another in the NODE linked to the +operator via the d.dn (memory) pointer. + + +Debugger +======== +The dgawk debugger usage is described in README.DGAWK. I suggest that we make -DBCDEBUG a default setting (or remove the ifdefs) +so that the dump and trace commands are always available. + +dgawk operates in exactly the same way as gawk except that it offers the ability to dump the program list, to step through the program list, to set breakpoints and to view variables etc. + +dgawk uses exactly the same "virtual machine" as gawk so the results are identical. The only difference is that dgawk checks to see if any debug action is required before executing each INSTRUCTION. + diff -Nru gawk-3.1.8+dfsg/doc/gawk.1 gawk-4.0.1+dfsg/doc/gawk.1 --- gawk-3.1.8+dfsg/doc/gawk.1 2010-04-20 08:39:47.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/gawk.1 2012-03-28 19:47:53.000000000 +0000 @@ -3,14 +3,6 @@ .ds AN \s-1ANSI\s+1 .ds GN \s-1GNU\s+1 .ds AK \s-1AWK\s+1 -.de EX -.nf -.ft CW -.. -.de EE -.ft R -.fi -.. .ds EP \fIGAWK: Effective AWK Programming\fP .if !\n(.g \{\ . if !\w|\*(lq| \{\ @@ -22,7 +14,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Apr 20 2010" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Nov 10 2011" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -57,6 +49,14 @@ ] .I program-text file .\|.\|. +.sp +.B dgawk +[ \*(PX or \*(GN style options ] +.B \-f +.I program-file +[ +.B \-\^\- +] file .\|.\|. .SH DESCRIPTION .I Gawk is the \*(GN Project's implementation of the \*(AK programming language. @@ -64,14 +64,25 @@ the \*(PX 1003.1 Standard. This version in turn is based on the description in .IR "The AWK Programming Language" , -by Aho, Kernighan, and Weinberger, -with the additional features found in the System V Release 4 version -of \*(UX -.IR awk . +by Aho, Kernighan, and Weinberger. .I Gawk -also provides more recent Bell Laboratories +provides the additional features found in the current version +of \*(UX .I awk -extensions, and a number of \*(GN-specific extensions. +and a number of \*(GN-specific extensions. +.PP +The command line consists of options to +.I gawk +itself, the \*(AK program text (if not supplied via the +.B \-f +or +.B \-\^\-file +options), and values to be made +available in the +.B ARGC +and +.B ARGV +pre-defined \*(AK variables. .PP .I Pgawk is the profiling version of @@ -86,37 +97,28 @@ .B \-\^\-profile option, below. .PP -The command line consists of options to -.I gawk -itself, the \*(AK program text (if not supplied via the +.I Dgawk +is an +.I awk +debugger. Instead of running the program directly, it loads the +AWK source code and then prompts for debugging commands. +Unlike +.IR gawk " and " pgawk ", " dgawk +only processes AWK program source provided with the .B \-f -or -.B \-\^\-file -options), and values to be made -available in the -.B ARGC -and -.B ARGV -pre-defined \*(AK variables. +option. +The debugger is documented in \*(EP. .SH OPTION FORMAT .PP .I Gawk -options may be either traditional \*(PX one letter options, +options may be either traditional \*(PX-style one letter options, or \*(GN-style long options. \*(PX options start with a single \*(lq\-\*(rq, while long options start with \*(lq\-\^\-\*(rq. Long options are provided for both \*(GN-specific features and for \*(PX-mandated features. .PP -Following the \*(PX standard, -.IR gawk -specific -options are supplied via arguments to the -.B \-W -option. Multiple -.B \-W -options may be supplied -Each -.B \-W -option has a corresponding long option, as detailed below. +.IR Gawk - +specific options are typically used in long-option form. Arguments to long options are either joined with the option by an .B = @@ -124,10 +126,33 @@ next command line argument. Long options may be abbreviated, as long as the abbreviation remains unique. +.PP +Additionally, each long option has a corresponding short +option, so that the option's functionality may be used from +within +.B #! +executable scripts. .SH OPTIONS .PP .I Gawk -accepts the following options, listed by frequency. +accepts the following options. +Standard options are listed first, followed by options for +.I gawk +extensions, listed alphabetically by short option. +.TP +.PD 0 +.BI \-f " program-file" +.TP +.PD +.BI \-\^\-file " program-file" +Read the \*(AK program source from the file +.IR program-file , +instead of from the first command line argument. +Multiple +.B \-f +(or +.BR \-\^\-file ) +options may be used. .TP .PD 0 .BI \-F " fs" @@ -154,20 +179,7 @@ Such variable values are available to the .B BEGIN block of an \*(AK program. -.TP -.PD 0 -.BI \-f " program-file" -.TP -.PD -.BI \-\^\-file " program-file" -Read the \*(AK program source from the file -.IR program-file , -instead of from the first command line argument. -Multiple -.B \-f -(or -.BR \-\^\-file ) -options may be used. +.ig .TP .PD 0 .BI \-mf " NNN" @@ -193,25 +205,22 @@ (Current versions of the Bell Laboratories .I awk no longer accept them.) +.. .TP .PD 0 -.B \-O +.B \-b .TP .PD -.B \-\^\-optimize -Enable optimizations upon the internal representation of the program. -Currently, this includes just simple constant-folding. The -.I gawk -maintainer hopes to add additional optimizations over time. -.TP -.PD 0 -.B "\-W compat" -.TP -.PD 0 -.B "\-W traditional" +.B \-\^\-characters\-as\-bytes +Treat all input data as single-byte characters. In other words, +don't pay any attention to the locale information when attempting to +process strings as multibyte characters. +The +.B "\-\^\-posix" +option overrides this one. .TP .PD 0 -.B \-\^\-compat +.B \-c .TP .PD .B \-\^\-traditional @@ -222,21 +231,15 @@ behaves identically to \*(UX .IR awk ; none of the \*(GN-specific extensions are recognized. -The use of -.B \-\^\-traditional -is preferred over the other forms of this option. +.\" The use of +.\" .B \-\^\-traditional +.\" is preferred over the other forms of this option. See .BR "GNU EXTENSIONS" , below, for more information. .TP .PD 0 -.B "\-W copyleft" -.TP -.PD 0 -.B "\-W copyright" -.TP -.PD 0 -.B \-\^\-copyleft +.B \-C .TP .PD .B \-\^\-copyright @@ -244,7 +247,7 @@ the standard output and exit successfully. .TP .PD 0 -\fB\-W dump-variables\fR[\fB=\fIfile\fR] +\fB\-d\fR[\fIfile\fR] .TP .PD \fB\-\^\-dump-variables\fR[\fB=\fIfile\fR] @@ -270,7 +273,23 @@ and so on.) .TP .PD 0 -.BI "\-W exec " file +.BI "\-e " program-text +.TP +.PD +.BI \-\^\-source " program-text" +Use +.I program-text +as \*(AK program source code. +This option allows the easy intermixing of library functions (used via the +.B \-f +and +.B \-\^\-file +options) with source code entered on the command line. +It is intended primarily for medium to large \*(AK programs used +in shell scripts. +.TP +.PD 0 +.BI "\-E " file .TP .PD .BI \-\^\-exec " file" @@ -285,31 +304,26 @@ This option disables command-line variable assignments. .TP .PD 0 -.B "\-W gen\-po" +.B \-g .TP .PD -.B \-\^\-gen\-po +.B \-\^\-gen\-pot Scan and parse the \*(AK program, and generate a \*(GN -.B \&.po +.B \&.pot +(Portable Object Template) format file on standard output with entries for all localizable strings in the program. The program itself is not executed. See the \*(GN .I gettext distribution for more information on -.B \&.po +.B \&.pot files. .TP .PD 0 -.B "\-W help" -.TP -.PD 0 -.B "\-W usage" -.TP -.PD 0 -.B \-\^\-help +.B \-h .TP .PD -.B \-\^\-usage +.B \-\^\-help Print a relatively short summary of the available options on the standard output. (Per the @@ -317,7 +331,7 @@ these options cause an immediate, successful exit.) .TP .PD 0 -.BR "\-W lint" [ =\fIvalue\fR ] +.BR "\-L " [ \fIvalue\fR ] .TP .PD .BR \-\^\-lint [ =\fIvalue\fR ] @@ -334,21 +348,31 @@ actually invalid are issued. (This is not fully implemented yet.) .TP .PD 0 -.B "\-W lint\-old" +.B \-n .TP .PD -.B \-\^\-lint\-old -Provide warnings about constructs that are -not portable to the original version of Unix -.IR awk . +.B "\-\^\-non\-decimal\-data" +Recognize octal and hexadecimal values in input data. +.I "Use this option with great caution!" .TP .PD 0 -.B "\-W non\-decimal\-data" +.B \-N .TP .PD -.B "\-\^\-non\-decimal\-data" -Recognize octal and hexadecimal values in input data. -.I "Use this option with great caution!" +.B \-\^\-use\-lc\-numeric +This forces +.I gawk +to use the locale's decimal point character when parsing input data. +Although the POSIX standard requires this behavior, and +.I gawk +does so when +.B \-\^\-posix +is in effect, the default is to follow traditional behavior and use a +period as the decimal point, even in locales where the period is not the +decimal point character. This option overrides the default behavior, +without the full draconian strictness of the +.B \-\^\-posix +option. .ig .\" This option is left undocumented, on purpose. .TP @@ -363,7 +387,34 @@ .. .TP .PD 0 -.B "\-W posix" +.B \-O +.TP +.PD +.B \-\^\-optimize +Enable optimizations upon the internal representation of the program. +Currently, this includes just simple constant-folding. The +.I gawk +maintainer hopes to add additional optimizations over time. +.TP +.PD 0 +\fB\-p\fR[\fIprof_file\fR] +.TP +.PD +\fB\-\^\-profile\fR[\fB=\fIprof_file\fR] +Send profiling data to +.IR prof_file . +The default is +.BR awkprof.out . +When run with +.IR gawk , +the profile is just a \*(lqpretty printed\*(rq version of the program. +When run with +.IR pgawk , +the profile contains execution counts of each statement in the program +in the left margin and function call counts for each user-defined function. +.TP +.PD 0 +.B \-P .TP .PD .B \-\^\-posix @@ -411,24 +462,7 @@ .RE .TP .PD 0 -\fB\-W profile\fR[\fB=\fIprof_file\fR] -.TP -.PD -\fB\-\^\-profile\fR[\fB=\fIprof_file\fR] -Send profiling data to -.IR prof_file . -The default is -.BR awkprof.out . -When run with -.IR gawk , -the profile is just a \*(lqpretty printed\*(rq version of the program. -When run with -.IR pgawk , -the profile contains execution counts of each statement in the program -in the left margin and function call counts for each user-defined function. -.TP -.PD 0 -.B "\-W re\-interval" +.B \-r .TP .PD .B \-\^\-re\-interval @@ -444,50 +478,47 @@ and .I egrep consistent with each other. -However, their use is likely -to break old \*(AK programs, so -.I gawk -only provides them if they are requested with this option, or when -.B \-\^\-posix -is specified. +They are enabled by default, but this option remains for use with +.BR \-\^-traditional . .TP .PD 0 -.BI "\-W source " program-text +.B \-R .TP .PD -.BI \-\^\-source " program-text" -Use -.I program-text -as \*(AK program source code. -This option allows the easy intermixing of library functions (used via the -.B \-f -and -.B \-\^\-file -options) with source code entered on the command line. -It is intended primarily for medium to large \*(AK programs used -in shell scripts. +.BI \-\^\-command " file" +.I Dgawk +only. Read stored debugger commands from +.IR file . .TP .PD 0 -.B "\-W use\-lc\-numeric" +.BI \-S .TP .PD -.B \-\^\-use\-lc\-numeric -This forces +.BI \-\^\-sandbox +Runs .I gawk -to use the locale's decimal point character when parsing input data. -Although the POSIX standard requires this behavior, and -.I gawk -does so when -.B \-\^\-posix -is in effect, the default is to follow traditional behavior and use a -period as the decimal point, even in locales where the period is not the -decimal point character. This option overrides the default behavior, -without the full draconian strictness of the -.B \-\^\-posix -option. +in sandbox mode, disabling the +.B system() +function, input redirection with +.BR getline , +output redirection with +.BR print " and " printf , +and loading dynamic extensions. +Command execution (through pipelines) is also disabled. +This effectively blocks a script from accessing local resources +(except for the files specified on the command line). +.TP +.PD 0 +.B \-t +.TP +.PD +.B \-\^\-lint\-old +Provide warnings about constructs that are +not portable to the original version of Unix +.IR awk . .TP .PD 0 -.B "\-W version" +.B \-V .TP .PD .B \-\^\-version @@ -523,6 +554,7 @@ and optional function definitions. .RS .PP +\fB@include "\fIfilename\fB" \fIpattern\fB { \fIaction statements\fB }\fR .br \fBfunction \fIname\fB(\fIparameter list\fB) { \fIstatements\fB }\fR @@ -549,6 +581,11 @@ program that uses them. It also provides the ability to mix library functions with command line programs. .PP +In addition, lines beginning with +.B @include +may be used to include other source files into your program, +making library use even easier. +.PP The environment variable .B AWKPATH specifies a search path to use when finding source files named with @@ -580,7 +617,8 @@ and then proceeds to read each file named in the .B ARGV -array. +array (up to +.BR ARGV[ARGC] ). If there are no files named on the command line, .I gawk reads the standard input. @@ -606,6 +644,19 @@ .I gawk skips over it. .PP +For each input file, +if a +.B BEGINFILE +rule exists, +.I gawk +executes the associated code +before processing the contents of the file. Similarly, +.I gawk +executes +the code associated with +.B ENDFILE +after processing the file. +.PP For each record in the input, .I gawk tests to see if it matches any @@ -621,6 +672,27 @@ executes the code in the .B END block(s) (if any). +.SS Command Line Directories +.PP +According to POSIX, files named on the +.I awk +command line must be +text files. The behavior is ``undefined'' if they are not. Most versions +of +.I awk +treat a directory on the command line as a fatal error. +.PP +Starting with version 4.0 of +.IR gawk , +a directory on the command line +produces a warning, but is otherwise skipped. If either of the +.B \-\^\-posix +or +.B \-\^\-traditional +options is given, then +.I gawk +reverts to +treating directories on the command line as a fatal error. .SH VARIABLES, RECORDS AND FIELDS \*(AK variables are dynamic; they come into existence when they are first used. Their values are either floating-point numbers or strings, @@ -698,9 +770,23 @@ is ignored. Assigning a new value to .B FS +or +.B FPAT overrides the use of -.BR FIELDWIDTHS , -and restores the default behavior. +.BR FIELDWIDTHS . +.PP +Similarly, if the +.B FPAT +variable is set to a string representing a regular expression, +each field is made up of text that matches that regular expression. In +this case, the regular expression describes the fields themselves, +instead of the text that separates the fields. +Assigning a new value to +.B FS +or +.B FIELDWIDTHS +overrides the use of +.BR FPAT . .PP Each field in the input record may be referenced by its position, .BR $1 , @@ -815,12 +901,15 @@ The value is subject to translation in non-English locales. .TP .B FIELDWIDTHS -A white-space separated list of fieldwidths. When set, +A whitespace separated list of field widths. When set, .I gawk parses the input into fields of fixed width, instead of using the value of the .B FS variable as the field separator. +See +.BR Fields , +above. .TP .B FILENAME The name of the current input file. @@ -838,6 +927,20 @@ .B FNR The input record number in the current input file. .TP +.B FPAT +A regular expression describing the contents of the +fields in a record. +When set, +.I gawk +parses the input into fields, where the fields match the +regular expression, instead of using the +value of the +.B FS +variable as the field separator. +See +.BR Fields , +above. +.TP .B FS The input field separator, a space by default. See .BR Fields , @@ -850,7 +953,9 @@ has a non-zero value, then string comparisons and pattern matching in rules, field splitting with -.BR FS , +.B FS +and +.BR FPAT , record separating with .BR RS , regular expression @@ -863,6 +968,7 @@ .BR gsub() , .BR index() , .BR match() , +.BR patsplit() , .BR split() , and .B sub() @@ -888,17 +994,6 @@ .B IGNORECASE is zero, so all regular expression and string operations are normally case-sensitive. -Under Unix, the full ISO 8859-1 Latin-1 character set is used -when ignoring case. -As of -.I gawk -3.1.4, the case equivalencies are fully locale-aware, based on -the C -.B -facilities such as -.BR isalpha() , -and -.BR toupper() . .TP .B LINT Provides dynamic control of the @@ -946,6 +1041,10 @@ .IR getegid (2) system call. .TP +\fBPROCINFO["strftime"]\fP +The default time format string for +.BR strftime() . +.TP \fBPROCINFO["euid"]\fP the value of the .IR geteuid (2) @@ -954,7 +1053,11 @@ \fBPROCINFO["FS"]\fP \fB"FS"\fP if field splitting with .B FS -is in effect, or \fB"FIELDWIDTHS"\fP if field splitting with +is in effect, +\fB"FPAT"\fP if field splitting with +.B FPAT +is in effect, +or \fB"FIELDWIDTHS"\fP if field splitting with .B FIELDWIDTHS is in effect. .TP @@ -977,11 +1080,49 @@ .IR getuid (2) system call. .TP +\fBPROCINFO["sorted_in"]\fP +If this element exists in +.BR PROCINFO , +then its value controls the order in which array elements +are traversed in +.B for +loops. +Supported values are +\fB"@ind_str_asc"\fR, +\fB"@ind_num_asc"\fR, +\fB"@val_type_asc"\fR, +\fB"@val_str_asc"\fR, +\fB"@val_num_asc"\fR, +\fB"@ind_str_desc"\fR, +\fB"@ind_num_desc"\fR, +\fB"@val_type_desc"\fR, +\fB"@val_str_desc"\fR, +\fB"@val_num_desc"\fR, +and +\fB"@unsorted"\fR. +The value can also be the name of any comparison function defined +as follows: +.PP +.RS +\fBfunction cmp_func(i1, v1, i2, v2)\fR +.RE +.PP +where +.I i1 +and +.I i2 +are the indices, and +.I v1 +and +.I v2 +are the +corresponding values of the two elements being compared. +It should return a number less than, equal to, or greater than 0, +depending on how the elements of the array are to be ordered. +.TP \fBPROCINFO["version"]\fP the version of .IR gawk . -This is available from -version 3.1.4 and later. .RE .TP .B RS @@ -1044,7 +1185,7 @@ The special operator .B in may be used to test if an array has an index consisting of a particular -value. +value: .PP .RS .ft B @@ -1071,6 +1212,20 @@ .B delete statement may also be used to delete the entire contents of an array, just by specifying the array name without a subscript. +.PP +.I gawk +supports true multidimensional arrays. It does not require that +such arrays be ``rectangular'' as in C or C++. +For example: +.RS +.ft B +.nf +a[1] = 5 +a[2][1] = 6 +a[2][2] = 7 +.fi +.ft +.RE .SS Variable Typing And Conversion .PP Variables and fields @@ -1109,6 +1264,7 @@ .B b has a string value of \fB"12"\fR and not \fB"12.00"\fR. .PP +.BR NOTE : When operating in POSIX mode (such as with the .B \-\^\-posix command line option), @@ -1141,6 +1297,8 @@ .B ENVIRON elements and the elements of an array created by .B split() +or +.B patsplit() that are numeric strings. The basic idea is that .IR "user input" , @@ -1150,9 +1308,7 @@ Uninitialized variables have the numeric value 0 and the string value "" (the null, or empty, string). .SS Octal and Hexadecimal Constants -Starting with version 3.1 of -.I gawk , -you may use C-style octal and hexadecimal constants in your AWK +You may use C-style octal and hexadecimal constants in your AWK program source code. For example, the octal value .B 011 @@ -1164,7 +1320,7 @@ .SS String Constants .PP String constants in \*(AK are sequences of characters enclosed -between double quotes (\fB"\fR). Within strings, certain +between double quotes (like \fB"value"\fR). Within strings, certain .I "escape sequences" are recognized, as in C. These are: .PP @@ -1239,12 +1395,14 @@ .PP which prints the entire record. .PP -Comments begin with the \*(lq#\*(rq character, and continue until the +Comments begin with the +.B # +character, and continue until the end of the line. Blank lines may be used to separate statements. Normally, a statement ends with a newline, however, this is not the case for lines ending in -a \*(lq,\*(rq, +a comma, .BR { , .BR ? , .BR : , @@ -1257,7 +1415,7 @@ .B else also have their statements automatically continued on the following line. In other cases, a line can be continued by ending it with a \*(lq\e\*(rq, -in which case the newline will be ignored. +in which case the newline is ignored. .PP Multiple statements may be put on one line by separating them with a \*(lq;\*(rq. @@ -1271,6 +1429,8 @@ .nf .B BEGIN .B END +.B BEGINFILE +.B ENDFILE .BI / "regular expression" / .I "relational expression" .IB pattern " && " pattern @@ -1308,6 +1468,24 @@ .B END patterns cannot have missing action parts. .PP +.B BEGINFILE +and +.B ENDFILE +are additional special patterns whose bodies are executed +before reading the first record of each command line input file +and after reading the last record of each file. +Inside the +.B BEGINFILE +rule, the value of +.B ERRNO +will be the empty string if the file could be opened successfully. +Otherwise, there is some problem with the file and the code should +use +.B nextfile +to skip it. If that is not done, +.I gawk +produces its usual fatal error for files that cannot be opened. +.PP For .BI / "regular expression" / patterns, the associated statement is executed for each input record that matches @@ -1432,12 +1610,6 @@ is repeated at least .I n times. -.sp .5 -Interval expressions are only available if either -.B \-\^\-posix -or -.B \-\^\-re\-interval -is specified on the command line. .TP .B \ey matches the empty string at either the beginning or the @@ -1452,6 +1624,12 @@ .B \e> matches the empty string at the end of a word. .TP +.B \es +matches any whitespace character. +.TP +.B \eS +matches any nonwhitespace character. +.TP .B \ew matches any word-constituent character (letter, digit, or underscore). .TP @@ -1506,7 +1684,7 @@ is both.) .TP .B [:lower:] -Lower-case alphabetic characters. +Lowercase alphabetic characters. .TP .B [:print:] Printable characters (characters that are not control characters.) @@ -1519,7 +1697,7 @@ Space characters (such as space, tab, and formfeed, to name a few). .TP .B [:upper:] -Upper-case alphabetic characters. +Uppercase alphabetic characters. .TP .B [:xdigit:] Characters that are hexadecimal digits. @@ -1594,6 +1772,8 @@ .BR \eB , .BR \e< , .BR \e> , +.BR \es , +.BR \eS , .BR \ew , .BR \eW , .BR \e` , @@ -1613,7 +1793,6 @@ .I gawk provide all the facilities of \*(PX regular expressions and the \*(GN regular expression operators described above. -However, interval expressions are not supported. .TP .B \-\^\-posix Only \*(PX regular expressions are supported, the \*(GN operators are not special. @@ -1621,16 +1800,12 @@ .B \ew matches a literal .BR w ). -Interval expressions are allowed. .TP .B \-\^\-traditional Traditional Unix .I awk regular expressions are matched. The \*(GN operators -are not special, interval expressions are not available, and neither -are the \*(PX character classes -.RB ( [[:alnum:]] -and so on). +are not special, and interval expressions are not available. Characters described by octal and hexadecimal escape sequences are treated literally, even if they represent regular expression metacharacters. .TP @@ -1677,7 +1852,7 @@ .I space String concatenation. .TP -.B "| |&" +.B "| |&" Piped I/O for .BR getline , .BR print , @@ -1750,6 +1925,11 @@ \fBdelete \fIarray\^\fR \fBexit\fR [ \fIexpression\fR ] \fB{ \fIstatements \fB}\fR +\fBswitch (\fIexpression\fB) { +\fBcase \fIvalue\fB|\fIregex\fB : \fIstatement +\&.\^.\^. +\fR[ \fBdefault: \fIstatement \fR] +\fB}\fR .fi .RE .SS "I/O Statements" @@ -1842,13 +2022,13 @@ block(s), if any, are executed. .TP .B print -Prints the current record. +Print the current record. The output record is terminated with the value of the .B ORS variable. .TP .BI print " expr-list" -Prints expressions. +Print expressions. Each expression is separated by the value of the .B OFS variable. @@ -1857,7 +2037,7 @@ variable. .TP .BI print " expr-list" " >" file -Prints expressions on +Print expressions on .IR file . Each expression is separated by the value of the .B OFS @@ -1867,6 +2047,7 @@ .TP .BI printf " fmt, expr-list" Format and print. +See \fBThe \fIprintf \fBStatement\fR, below. .TP .BI printf " fmt, expr-list" " >" file Format and print on @@ -1883,12 +2064,11 @@ .IR file . If .I file -is missing, then standard output is flushed. +is missing, then flush standard output. If .I file is the null string, -then all open output files and pipes -have their buffers flushed. +then flush all open output files and pipes. .PP Additional output redirections are allowed for .B print @@ -1909,7 +2089,7 @@ below.) .PP The -.BR getline +.B getline command returns 1 on success, 0 on end of file, and \-1 on an error. Upon an error, .B ERRNO @@ -1941,7 +2121,7 @@ accept the following conversion specification formats: .TP "\w'\fB%g\fR, \fB%G\fR'u+2n" .B %c -An \s-1ASCII\s+1 character. +A single character. If the argument used for .B %c is numeric, it is treated as a character and printed. @@ -2054,9 +2234,9 @@ and .BR %X , supply a leading -.BR 0x +.B 0x or -.BR 0X +.B 0X for a nonzero result. For @@ -2105,8 +2285,8 @@ formats, it specifies the maximum number of significant digits. For the .BR %d , -.BR %o , .BR %i , +.BR %o , .BR %u , .BR %x , and @@ -2191,10 +2371,17 @@ .PP The following special filenames may be used with the .B |& -co-process operator for creating TCP/IP network connections. -.TP "\w'\fB/inet/tcp/\fIlport\fB/\fIrhost\fB/\fIrport\fR'u+2n" +co-process operator for creating TCP/IP network connections: +.TP +.PD 0 .BI /inet/tcp/ lport / rhost / rport -File for TCP/IP connection on local port +.TP +.PD 0 +.BI /inet4/tcp/ lport / rhost / rport +.TP +.PD +.BI /inet6/tcp/ lport / rhost / rport +Files for a TCP/IP connection on local port .I lport to remote host @@ -2204,69 +2391,37 @@ Use a port of .B 0 to have the system pick a port. +Use +.B /inet4 +to force an IPv4 connection, +and +.B /inet6 +to force an IPv6 connection. +Plain +.B /inet +uses the system default (most likely IPv4). .TP +.PD 0 .BI /inet/udp/ lport / rhost / rport -Similar, but use UDP/IP instead of TCP/IP. .TP -.BI /inet/raw/ lport / rhost / rport -.\" Similar, but use raw IP sockets. -Reserved for future use. -.PP -Other special filenames provide access to information about the running -.I gawk -process. -.B "These filenames are now obsolete." -Use the -.B PROCINFO -array to obtain the information they provide. -The filenames are: -.TP "\w'\fB/dev/stdout\fR'u+1n" -.B /dev/pid -Reading this file returns the process ID of the current process, -in decimal, terminated with a newline. -.TP -.B /dev/ppid -Reading this file returns the parent process ID of the current process, -in decimal, terminated with a newline. -.TP -.B /dev/pgrpid -Reading this file returns the process group ID of the current process, -in decimal, terminated with a newline. -.TP -.B /dev/user -Reading this file returns a single record terminated with a newline. -The fields are separated with spaces. -.B $1 -is the value of the -.IR getuid (2) -system call, -.B $2 -is the value of the -.IR geteuid (2) -system call, -.B $3 -is the value of the -.IR getgid (2) -system call, and -.B $4 -is the value of the -.IR getegid (2) -system call. -If there are any additional fields, they are the group IDs returned by -.IR getgroups (2). -Multiple groups may not be supported on all systems. +.PD 0 +.BI /inet4/udp/ lport / rhost / rport +.TP +.PD +.BI /inet6/udp/ lport / rhost / rport +Similar, but use UDP/IP instead of TCP/IP. .SS Numeric Functions .PP \*(AK has the following built-in arithmetic functions: .PP .TP "\w'\fBsrand(\fR[\fIexpr\^\fR]\fB)\fR'u+1n" .BI atan2( y , " x" ) -Returns the arctangent of +Return the arctangent of .I y/x in radians. .TP .BI cos( expr ) -Returns the cosine of +Return the cosine of .IR expr , which is in radians. .TP @@ -2274,19 +2429,19 @@ The exponential function. .TP .BI int( expr ) -Truncates to integer. +Truncate to integer. .TP .BI log( expr ) The natural logarithm function. .TP .B rand() -Returns a random number +Return a random number .IR N , between 0 and 1, such that 0 \(<= \fIN\fP < 1. .TP .BI sin( expr ) -Returns the sine of +Return the sine of .IR expr , which is in radians. .TP @@ -2294,11 +2449,11 @@ The square root function. .TP \&\fBsrand(\fR[\fIexpr\^\fR]\fB)\fR -Uses +Use .I expr -as a new seed for the random number generator. If no +as the new seed for the random number generator. If no .I expr -is provided, the time of day is used. +is provided, use the time of day. The return value is the previous seed for the random number generator. .SS String Functions @@ -2307,35 +2462,47 @@ has the following built-in string functions: .PP .TP "\w'\fBsprintf(\^\fIfmt\fB\^, \fIexpr-list\^\fB)\fR'u+1n" -\fBasort(\fIs \fR[\fB, \fId\fR]\fB)\fR -Returns the number of elements in the source +\fBasort(\fIs \fR[\fB, \fId\fR [\fB, \fIhow\fR] ]\fB)\fR +Return the number of elements in the source array .IR s . -The contents of +Sort +the contents of .I s -are sorted using +using .IR gawk\^ "'s" normal rules for -comparing values, and the indices of the -sorted values of +comparing values, and replace the indices of the +sorted values .I s -are replaced with sequential +with sequential integers starting with 1. If the optional destination array .I d is specified, then +first duplicate .I s -is first duplicated into +into .IR d , -and then -.I d -is sorted, leaving the indices of the +and then sort +.IR d , +leaving the indices of the source array .I s -unchanged. +unchanged. The optional string +.I how +controls the direction and the comparison mode. +Valid values for +.I how +are +any of the strings valid for +\fBPROCINFO["sorted_in"]\fR. +It can also be the name of a user-defined +comparison function as described in +\fBPROCINFO["sorted_in"]\fR. .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 +\fBasorti(\fIs \fR[\fB, \fId\fR [\fB, \fIhow\fR] ]\fB)\fR +Return the number of elements in the source array .IR s . The behavior is the same as that of @@ -2347,6 +2514,11 @@ 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. +The purpose of the optional string +.I how +is the same as described in +.B asort() +above. .TP \fBgensub(\fIr\fB, \fIs\fB, \fIh \fR[\fB, \fIt\fR]\fB)\fR Search the target string @@ -2370,9 +2542,9 @@ to replace. If .I t -is not supplied, +is not supplied, use .B $0 -is used instead. +instead. Within the replacement text .IR s , the sequence @@ -2417,7 +2589,7 @@ (This must be typed as \fB"\e\e&"\fP; see \*(EP for a fuller discussion of the rules for -.BR &'s +.BR & 's and backslashes in the replacement text of .BR sub() , .BR gsub() , @@ -2425,7 +2597,7 @@ .BR gensub() .) .TP .BI index( s , " t" ) -Returns the index of the string +Return the index of the string .I t in the string .IR s , @@ -2435,26 +2607,25 @@ (This implies that character indices start at one.) .TP \fBlength(\fR[\fIs\fR]\fB) -Returns the length of the string +Return the length of the string .IR s , or the length of .B $0 if .I s is not supplied. -Starting with version 3.1.5, -as a non-standard extension, with an array argument, +As a non-standard extension, with an array argument, .B length() returns the number of elements in the array. .TP \fBmatch(\fIs\fB, \fIr \fR[\fB, \fIa\fR]\fB)\fR -Returns the position in +Return the position in .I s where the regular expression .I r occurs, or 0 if .I r -is not present, and sets the values of +is not present, and set the values of .B RSTART and .BR RLENGTH . @@ -2489,21 +2660,77 @@ 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 +\fBpatsplit(\fIs\fB, \fIa \fR[\fB, \fIr\fR [\fB, \fIseps\fR] ]\fB)\fR +Split the string +.I s +into the array +.I a +and the separators array +.I seps +on the regular expression +.IR r , +and return the number of fields. +Element values are the portions of +.I s +that matched +.IR r . +The value of +.I seps[i] +is the separator that appeared in +front of +.IR a[i+1] . +If +.I r +is omitted, +.B FPAT +is used instead. +The arrays +.I a +and +.I seps +are cleared first. +Splitting behaves identically to field splitting with +.BR FPAT , +described above. +.TP +\fBsplit(\fIs\fB, \fIa \fR[\fB, \fIr\fR [\fB, \fIseps\fR] ]\fB)\fR +Split the string .I s into the array .I a +and the separators array +.I seps on the regular expression .IR r , -and returns the number of fields. If +and return the number of fields. If .I r is omitted, .B FS is used instead. -The array +The arrays .I a -is cleared first. +and +.I seps +are cleared first. +.I seps[i] +is the field separator matched by +.I r +between +.I a[i] +and +.IR a[i+1] . +If +.I r +is a single space, then leading whitespace in +.I s +goes into the extra array element +.I seps[0] +and trailing whitespace goes into the extra array element +.IR seps[n] , +where +.I n +is the return value of +.IR "split(s, a, r, seps)" . Splitting behaves identically to field splitting, described above. .TP .BI sprintf( fmt , " expr-list" ) @@ -2514,9 +2741,9 @@ and returns the resulting string. .TP .BI strtonum( str ) -Examines +Examine .IR str , -and returns its numeric value. +and return its numeric value. If .I str begins @@ -2537,14 +2764,15 @@ assumes that .I str is a hexadecimal number. +Otherwise, decimal is assumed. .TP \fBsub(\fIr\fB, \fIs \fR[\fB, \fIt\fR]\fB)\fR Just like .BR gsub() , -but only the first matching substring is replaced. +but replace only the first matching substring. .TP \fBsubstr(\fIs\fB, \fIi \fR[\fB, \fIn\fR]\fB)\fR -Returns the at most +Return the at most .IR n -character substring of .I s @@ -2552,28 +2780,26 @@ .IR i . If .I n -is omitted, the rest of -.I s -is used. +is omitted, use the rest of +.IR s . .TP .BI tolower( str ) -Returns a copy of the string +Return a copy of the string .IR str , -with all the upper-case characters in +with all the uppercase characters in .I str -translated to their corresponding lower-case counterparts. +translated to their corresponding lowercase counterparts. Non-alphabetic characters are left unchanged. .TP .BI toupper( str ) -Returns a copy of the string +Return a copy of the string .IR str , -with all the lower-case characters in +with all the lowercase characters in .I str -translated to their corresponding upper-case counterparts. +translated to their corresponding uppercase counterparts. Non-alphabetic characters are left unchanged. .PP -As of version 3.1.5, -.I gawk +.I Gawk is multibyte aware. This means that .BR index() , .BR length() , @@ -2590,10 +2816,11 @@ .PP .TP "\w'\fBsystime()\fR'u+1n" \fBmktime(\fIdatespec\fB)\fR -Turns +Turn .I datespec into a time stamp of the same form as returned by -.BR systime() . +.BR systime() , +and return the result. The .I datespec is a string of the form @@ -2604,7 +2831,7 @@ the day of the month from 1 to 31, the hour of the day from 0 to 23, the minute from 0 to 59, -and the second from 0 to 60, +the second from 0 to 60, and an optional daylight saving flag. The values of these numbers need not be within the ranges specified; for example, an hour of \-1 means 1 hour before midnight. @@ -2626,10 +2853,10 @@ returns \-1. .TP \fBstrftime(\fR[\fIformat \fR[\fB, \fItimestamp\fR[\fB, \fIutc-flag\fR]]]\fB)\fR -Formats +Format .I timestamp according to the specification in -.IR format. +.IR format . If .I utc-flag is present and is non-zero or non-null, the result @@ -2646,18 +2873,19 @@ is missing, a default format equivalent to the output of .IR date (1) is used. +The default format is available in +.BR PROCINFO["strftime"] . See the specification for the .B strftime() function in \*(AN C for the format conversions that are guaranteed to be available. .TP .B systime() -Returns the current time of day as the number of seconds since the Epoch +Return the current time of day as the number of seconds since the Epoch (1970-01-01 00:00:00 UTC on \*(PX systems). .SS Bit Manipulations Functions -Starting with version 3.1 of -.IR gawk , -the following bit manipulation functions are available. +.I Gawk +supplies the following bit manipulation functions. They work by converting double-precision floating point values to .B uintmax_t @@ -2701,15 +2929,20 @@ and .IR v2 . .PP +.SS Type Function +The following function is for use with multidimensional arrays. +.TP +\fBisarray(\fIx\fB)\fR +Return true if +.I x +is an array, false otherwise. .SS Internationalization Functions -Starting with version 3.1 of -.IR gawk , -the following functions may be used from within your AWK program for +The following functions may be used from within your AWK program for translating strings at run-time. For full details, see \*(EP. .TP \fBbindtextdomain(\fIdirectory \fR[\fB, \fIdomain\fR]\fB)\fR -Specifies the directory where +Specify the directory where .I gawk looks for the .B \&.mo @@ -2733,10 +2966,9 @@ .IR domain . .TP \fBdcgettext(\fIstring \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR -Returns the translation of +Return the translation of .I string -in -text domain +in text domain .I domain for locale category .IR category . @@ -2758,7 +2990,7 @@ if you want to use the current domain. .TP \fBdcngettext(\fIstring1 \fR, \fIstring2 \fR, \fInumber \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR -Returns the plural form used for +Return the plural form used for .I number of the translation of .I string1 @@ -2817,7 +3049,7 @@ .PP The left parenthesis in a function call is required to immediately follow the function name, -without any intervening white space. +without any intervening whitespace. This avoids a syntactic ambiguity with the concatenation operator. This restriction does not apply to the built-in functions listed above. .PP @@ -2831,6 +3063,31 @@ value is provided, or if the function returns by \*(lqfalling off\*(rq the end. .PP +As a +.I gawk +extension, functions may be called indirectly. To do this, assign +the name of the function to be called, as a string, to a variable. +Then use the variable as if it were the name of a function, prefixed with an +.B @ +sign, like so: +.RS +.ft B +.nf +function myfunc() +{ + print "myfunc called" + \&.\|.\|. +} + +{ .\|.\|. + the_func = "myfunc" + @the_func() # call through the_func to myfunc + .\|.\|. +} +.fi +.ft R +.RE +.PP If .B \-\^\-lint has been provided, @@ -2844,9 +3101,7 @@ may be used in place of .BR function . .SH DYNAMICALLY LOADING NEW FUNCTIONS -Beginning with version 3.1 of -.IR gawk , -you can dynamically add new built-in functions to the running +You can dynamically add new built-in functions to the running .I gawk interpreter. The full details are beyond the scope of this manual page; @@ -2860,16 +3115,12 @@ .I function in that object, to perform initialization. These should both be provided as strings. -Returns the value returned by +Return the value returned by .IR function . .PP -.ft B -This function is provided and documented in \*(EP, -but everything about this feature is likely to change -eventually. -We STRONGLY recommend that you do not use this feature -for anything that you aren't willing to redo. -.ft R +Using this feature at the C level is not pretty, but +it is unlikely to go away. Additional mechanisms may +be added at some point. .SH SIGNALS .I pgawk accepts two signals. @@ -2884,45 +3135,11 @@ causes .I pgawk to dump the profile and function call stack and then exit. -.SH EXAMPLES -.nf -Print and sort the login names of all users: - -.ft B - BEGIN { FS = ":" } - { print $1 | "sort" } - -.ft R -Count lines in a file: - -.ft B - { nlines++ } - END { print nlines } - -.ft R -Precede each line by its number in the file: - -.ft B - { print FNR, $0 } - -.ft R -Concatenate and line number (a variation on a theme): - -.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 String constants are sequences of characters enclosed in double quotes. In non-English speaking environments, it is possible to mark -strings in the \*(AK program as requiring translation to the native +strings in the \*(AK program as requiring translation to the local natural language. Such strings are marked in the \*(AK program with a leading underscore (\*(lq_\*(rq). For example, .sp @@ -2954,12 +3171,12 @@ .B BEGIN action to assign a value to the .B TEXTDOMAIN -variable to set the text domain to a name associated with your program. +variable to set the text domain to a name associated with your program: .sp .RS -.EX +.ft B BEGIN { TEXTDOMAIN = "myprog" } -.EE +.ft R .RE .sp This allows @@ -2986,7 +3203,7 @@ .TP 4. Run -.B "gawk \-\^\-gen\-po \-f myprog.awk > myprog.po" +.B "gawk \-\^\-gen\-pot \-f myprog.awk > myprog.pot" to generate a .B \&.po file for your program. @@ -3029,10 +3246,6 @@ accommodate applications that depended upon the old behavior. (This feature was agreed upon by both the Bell Laboratories and the \*(GN developers.) .PP -The -.B \-W -option for implementation specific features is from the \*(PX standard. -.PP When processing arguments, .I gawk uses the special option \*(lq\-\^\-\*(rq to signal the end of @@ -3062,7 +3275,7 @@ array; the .BR \ea , and -.BR \ev +.B \ev escape sequences (done originally in .I gawk and fed back into the Bell Laboratories version); the @@ -3073,10 +3286,10 @@ .B printf (done first in the Bell Laboratories version). .SH HISTORICAL FEATURES -There are two features of historical \*(AK implementations that +There is one feature of historical \*(AK implementations that .I gawk -supports. -First, it is possible to call the +supports: +It is possible to call the .B length() built-in function not only with no argument, but even without parentheses! Thus, @@ -3097,29 +3310,11 @@ .ft R .RE .PP -This feature is marked as \*(lqdeprecated\*(rq in the \*(PX standard, and +Using this feature is poor practice, and .I gawk issues a warning about its use if .B \-\^\-lint is specified on the command line. -.PP -The other feature is the use of either the -.B continue -or the -.B break -statements outside the body of a -.BR while , -.BR for , -or -.B do -loop. Traditional \*(AK implementations have treated such usage as -equivalent to the -.B next -statement. -.I Gawk -supports this usage if -.B \-\^\-traditional -has been specified. .SH GNU EXTENSIONS .I Gawk has a number of extensions to \*(PX @@ -3150,6 +3345,12 @@ .\" POSIX and language recognition issues .TP \(bu +There is no facility for doing file inclusion +.RI ( gawk 's +.B @include +mechanism). +.TP +\(bu The .B \ex escape sequence. @@ -3198,6 +3399,11 @@ .TP \(bu The +.B FPAT +variable and field splitting based on field values. +.TP +\(bu +The .B PROCINFO array is not available. .\" I/O stuff @@ -3214,6 +3420,13 @@ The .B |& operator for creating co-processes. +.TP +\(bu +The +.B BEGINFILE +and +.B ENDFILE +special patterns are not available. .\" Changes to standard awk functions .TP \(bu @@ -3224,6 +3437,11 @@ .BR split() . .TP \(bu +An optional fourth argument to +.B split() +to receive the separator texts. +.TP +\(bu The optional second argument to the .B close() function. @@ -3268,6 +3486,7 @@ .BR lshift() , .BR mktime() , .BR or() , +.BR patsplit() , .BR rshift() , .BR strftime() , .BR strtonum() , @@ -3333,7 +3552,7 @@ accepts the following additional options: .TP .PD 0 -.B \-Wparsedebug +.B \-Y .TP .PD .B \-\^\-parsedebug @@ -3347,34 +3566,6 @@ maintainers, and may not even be compiled into .IR gawk . .. -.PP -If -.I gawk -is -.I configured -with the -.B \-\^\-enable\-switch -option to the -.I configure -command, then it accepts an additional control-flow statement: -.RS -.nf -\fBswitch (\fIexpression\fB) { -\fBcase \fIvalue\fB|\fIregex\fB : \fIstatement -\&.\^.\^. -\fR[ \fBdefault: \fIstatement \fR] -\fB}\fR -.fi -.RE -.PP -If -.I gawk -is configured with the -.B \-\^\-disable\-directories-fatal -option, then it will silently skip directories named on the command line. -Otherwise, it will do so only if invoked with the -.B \-\^\-traditional -option. .SH ENVIRONMENT VARIABLES The .B AWKPATH @@ -3433,35 +3624,10 @@ exits because of a fatal error, the exit status is 2. On non-POSIX systems, this value may be mapped to .BR EXIT_FAILURE . -.SH SEE ALSO -.IR egrep (1), -.IR getpid (2), -.IR getppid (2), -.IR getpgrp (2), -.IR getuid (2), -.IR geteuid (2), -.IR getgid (2), -.IR getegid (2), -.IR getgroups (2) -.PP -.IR "The AWK Programming Language" , -Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger, -Addison-Wesley, 1988. ISBN 0-201-07981-X. -.PP -\*(EP, -Edition 3.0, published by the Free Software Foundation, 2001. -The current version of this document is available online at -.BR http://www.gnu.org/software/gawk/manual . -.SH BUGS -The -.B \-F -option is not necessary given the command line variable assignment feature; -it remains only for backwards compatibility. -.PP -Syntactically invalid single character programs tend to overflow -the parse stack, generating a rather unhelpful message. Such programs -are surprisingly difficult to diagnose in the completely general case, -and the effort to do so really is not worth it. +.SH VERSION INFORMATION +This man page documents +.IR gawk , +version 4.0. .SH AUTHORS The original version of \*(UX .I awk @@ -3484,27 +3650,25 @@ Arnold Robbins is the current maintainer. .PP The initial DOS port was done by Conrad Kwok and Scott Garfinkle. -Scott Deifik is the current DOS maintainer. Pat Rankin did the +Scott Deifik maintains the port to MS-DOS using DJGPP. +Eli Zaretskii maintains the port to MS-Windows using MinGW. +Pat Rankin did the port to VMS, and Michal Jaegermann did the port to the Atari ST. The port to OS/2 was done by Kai Uwe Rommel, with contributions and help from Darrel Hankerson. Andreas Buening now maintains the OS/2 port. -Fred Fish supplied support for the Amiga, +The late Fred Fish supplied support for the Amiga, and Martin Brown provided the BeOS port. Stephen Davies provided the original Tandem port, and Matthew Woehlke provided changes for Tandem's POSIX-compliant systems. -Ralf Wildenhues now maintains that port. +Dave Pitts provided the port to z/OS. .PP See the .I README file in the .I gawk -distribution for current information about maintainers +distribution for up-to-date information about maintainers and which ports are currently supported. -.SH VERSION INFORMATION -This man page documents -.IR gawk , -version 3.1.8. .SH BUG REPORTS If you find a bug in .IR gawk , @@ -3514,7 +3678,7 @@ .I gawk (from .BR "gawk \-\^\-version" ), -what C compiler you used to compile it, and a test program +which C compiler you used to compile it, and a test program and data that are as small as possible for reproducing the problem. .PP Before sending a bug report, please do the following things. First, verify that @@ -3542,12 +3706,79 @@ is an unreliable way to report bugs. Instead, please use the electronic mail addresses given above. .PP -If you're using a GNU/Linux system or BSD-based system, +If you're using a GNU/Linux or BSD-based system, you may wish to submit a bug report to the vendor of your distribution. That's fine, but please send a copy to the official email address as well, -since there's no guarantee that the bug will be forwarded to the +since there's no guarantee that the bug report will be forwarded to the .I gawk maintainer. +.SH BUGS +The +.B \-F +option is not necessary given the command line variable assignment feature; +it remains only for backwards compatibility. +.PP +Syntactically invalid single character programs tend to overflow +the parse stack, generating a rather unhelpful message. Such programs +are surprisingly difficult to diagnose in the completely general case, +and the effort to do so really is not worth it. +.SH SEE ALSO +.IR egrep (1), +.IR getpid (2), +.IR getppid (2), +.IR getpgrp (2), +.IR getuid (2), +.IR geteuid (2), +.IR getgid (2), +.IR getegid (2), +.IR getgroups (2), +.IR usleep (3) +.PP +.IR "The AWK Programming Language" , +Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger, +Addison-Wesley, 1988. ISBN 0-201-07981-X. +.PP +\*(EP, +Edition 4.0, shipped with the +.I gawk +source. +The current version of this document is available online at +.BR http://www.gnu.org/software/gawk/manual . +.SH EXAMPLES +.nf +Print and sort the login names of all users: + +.ft B + BEGIN { FS = ":" } + { print $1 | "sort" } + +.ft R +Count lines in a file: + +.ft B + { nlines++ } + END { print nlines } + +.ft R +Precede each line by its number in the file: + +.ft B + { print FNR, $0 } + +.ft R +Concatenate and line number (a variation on a theme): + +.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 ACKNOWLEDGEMENTS Brian Kernighan of Bell Laboratories provided valuable assistance during testing and debugging. @@ -3555,7 +3786,7 @@ .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009, -2010 +2010, 2011 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of diff -Nru gawk-3.1.8+dfsg/doc/general-program.eps gawk-4.0.1+dfsg/doc/general-program.eps --- gawk-3.1.8+dfsg/doc/general-program.eps 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/general-program.eps 2011-01-06 17:39:28.000000000 +0000 @@ -0,0 +1,153 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: general-program.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5c +%%CreationDate: Thu Jan 6 17:36:07 2011 +%%BoundingBox: 0 0 269 58 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 58 moveto 0 0 lineto 269 0 lineto 269 58 lineto closepath clip newpath +-194.8 247.1 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06299 0.06299 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +n 4961 3021 m 4706 3467 l 4965 3911 l 5478 3908 l 5733 3462 l 5474 3018 l + + cp gs col0 s gr +% Polyline +gs clippath +4544 3495 m 4695 3495 l 4695 3435 l 4544 3435 l 4544 3435 l 4664 3465 l 4544 3495 l cp +eoclip +n 4095 3465 m + 4680 3465 l gs col0 s gr gr + +% arrowhead +n 4544 3495 m 4664 3465 l 4544 3435 l 4544 3495 l cp gs 0.00 setgray ef gr col0 s +% Polyline +gs clippath +6164 3495 m 6315 3495 l 6315 3435 l 6164 3435 l 6164 3435 l 6284 3465 l 6164 3495 l cp +eoclip +n 5805 3465 m + 6300 3465 l gs col0 s gr gr + +% arrowhead +n 6164 3495 m 6284 3465 l 6164 3435 l 6164 3495 l cp gs 0.00 setgray ef gr col0 s +% Polyline +n 6405 3150 m 6330 3150 6330 3704 75 arcto 4 {pop} repeat + 6330 3779 7274 3779 75 arcto 4 {pop} repeat + 7349 3779 7349 3225 75 arcto 4 {pop} repeat + 7349 3150 6405 3150 75 arcto 4 {pop} repeat + cp gs col0 s gr +% Polyline +n 3165 3195 m 3105 3195 3105 3719 60 arcto 4 {pop} repeat + 3105 3779 3992 3779 60 arcto 4 {pop} repeat + 4052 3779 4052 3255 60 arcto 4 {pop} repeat + 4052 3195 3165 3195 60 arcto 4 {pop} repeat + cp gs col0 s gr +/Times-Roman ff 180.00 scf sf +6525 3510 m +gs 1 -1 sc (Results) col0 sh gr +/Times-Roman ff 180.00 scf sf +3375 3510 m +gs 1 -1 sc (Data) col0 sh gr +/Times-Roman ff 180.00 scf sf +4860 3510 m +gs 1 -1 sc (Program) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff -Nru gawk-3.1.8+dfsg/doc/general-program.fig gawk-4.0.1+dfsg/doc/general-program.fig --- gawk-3.1.8+dfsg/doc/general-program.fig 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/general-program.fig 2011-01-06 17:39:28.000000000 +0000 @@ -0,0 +1,25 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +2 3 0 1 0 7 50 -1 -1 0.000 0 0 0 0 0 7 + 4961 3021 4706 3467 4965 3911 5478 3908 5733 3462 5474 3018 + 4961 3021 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 4095 3465 4680 3465 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5805 3465 6300 3465 +2 4 0 1 0 7 50 -1 -1 0.000 0 0 5 0 0 5 + 7349 3779 7349 3150 6330 3150 6330 3779 7349 3779 +2 4 0 1 0 7 50 -1 -1 0.000 0 0 4 0 0 5 + 4052 3779 4052 3195 3105 3195 3105 3779 4052 3779 +4 0 0 50 -1 0 12 0.0000 4 150 630 6525 3510 Results\001 +4 0 0 50 -1 0 12 0.0000 4 150 420 3375 3510 Data\001 +4 0 0 50 -1 0 12 0.0000 4 195 750 4860 3510 Program\001 Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/doc/general-program.pdf and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/doc/general-program.pdf differ diff -Nru gawk-3.1.8+dfsg/doc/lflashlight-small.xpic gawk-4.0.1+dfsg/doc/lflashlight-small.xpic --- gawk-3.1.8+dfsg/doc/lflashlight-small.xpic 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/lflashlight-small.xpic 2000-12-12 07:50:21.000000000 +0000 @@ -0,0 +1,20 @@ +#! /usr/X11R6/bin/xpic +80 48 160 80 8 +1 75 144 48 160 56 0 0 +2 + 160 48 144 56 +1 76 112 48 136 56 0 0 +2 + 112 56 136 48 +1 77 112 72 136 80 0 0 +2 + 112 72 136 80 +5 78 128 48 144 80 0 0 +136 64 8 16 +3 79 80 56 112 72 0 0 +1 80 144 64 160 64 0 0 +2 + 144 64 160 64 +1 81 144 72 160 80 0 0 +2 + 144 72 160 80 diff -Nru gawk-3.1.8+dfsg/doc/process-flow.eps gawk-4.0.1+dfsg/doc/process-flow.eps --- gawk-3.1.8+dfsg/doc/process-flow.eps 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/process-flow.eps 2011-01-06 17:39:28.000000000 +0000 @@ -0,0 +1,191 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: process-flow.fig +%%Creator: fig2dev Version 3.2 Patchlevel 5c +%%CreationDate: Thu Jan 6 17:25:09 2011 +%%BoundingBox: 0 0 367 174 +%Magnification: 1.0000 +%%EndComments +%%BeginProlog +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +/pageheader { +save +newpath 0 174 moveto 0 0 lineto 367 0 lineto 367 174 lineto closepath clip newpath +-161.1 355.1 translate +1 -1 scale +$F2psBegin +10 setmiterlimit +0 slj 0 slc + 0.06299 0.06299 sc +} bind def +/pagefooter { +$F2psEnd +restore +} bind def +%%EndProlog +pageheader +% +% Fig objects follow +% +% +% here starts figure with depth 50 +% Polyline +0 slj +0 slc +7.500 slw +n 4819 3540 m 5460 4181 l 6101 3540 l 5460 2899 l 4819 3540 l + cp gs col0 s gr +% Polyline +gs clippath +4634 3585 m 4785 3585 l 4785 3525 l 4634 3525 l 4634 3525 l 4754 3555 l 4634 3585 l cp +eoclip +n 3960 3555 m + 4770 3555 l gs col0 s gr gr + +% arrowhead +n 4634 3585 m 4754 3555 l 4634 3525 l 4634 3585 l cp gs 0.00 setgray ef gr col0 s +% Polyline +gs clippath +6839 3585 m 6990 3585 l 6990 3525 l 6839 3525 l 6839 3525 l 6959 3555 l 6839 3585 l cp +eoclip +n 6165 3555 m + 6975 3555 l gs col0 s gr gr + +% arrowhead +n 6839 3585 m 6959 3555 l 6839 3525 l 6839 3585 l cp gs 0.00 setgray ef gr col0 s +% Polyline +n 2644 3240 m 2569 3240 2569 3802 75 arcto 4 {pop} repeat + 2569 3877 3835 3877 75 arcto 4 {pop} repeat + 3910 3877 3910 3315 75 arcto 4 {pop} repeat + 3910 3240 2644 3240 75 arcto 4 {pop} repeat + cp gs col0 s gr +% Polyline +n 7095 3240 m 7020 3240 7020 3806 75 arcto 4 {pop} repeat + 7020 3881 8294 3881 75 arcto 4 {pop} repeat + 8369 3881 8369 3315 75 arcto 4 {pop} repeat + 8369 3240 7095 3240 75 arcto 4 {pop} repeat + cp gs col0 s gr +% Polyline +gs clippath +5460 4904 m 5460 5055 l 5520 5055 l 5520 4904 l 5520 4904 l 5490 5024 l 5460 4904 l cp +eoclip +n 5490 4230 m + 5490 5040 l gs col0 s gr gr + +% arrowhead +n 5460 4904 m 5490 5024 l 5520 4904 l 5460 4904 l cp gs 0.00 setgray ef gr col0 s +% Polyline +n 5028 5067 m 4953 5067 4953 5550 75 arcto 4 {pop} repeat + 4953 5625 5905 5625 75 arcto 4 {pop} repeat + 5980 5625 5980 5142 75 arcto 4 {pop} repeat + 5980 5067 5028 5067 75 arcto 4 {pop} repeat + cp gs col0 s gr +% Polyline +gs clippath +4305 3736 m 4305 3585 l 4245 3585 l 4245 3736 l 4245 3736 l 4275 3616 l 4305 3736 l cp +eoclip +n 4905 5355 m 4275 5355 l + 4275 3600 l gs col0 s gr gr + +% arrowhead +n 4305 3736 m 4275 3616 l 4245 3736 l 4305 3736 l cp gs 0.00 setgray ef gr col0 s +/Times-Roman ff 180.00 scf sf +5265 3375 m +gs 1 -1 sc (More) col0 sh gr +/Times-Roman ff 180.00 scf sf +5265 3630 m +gs 1 -1 sc (Data) col0 sh gr +/Times-Roman ff 180.00 scf sf +5265 3885 m +gs 1 -1 sc ( ?) col0 sh gr +/Times-Roman ff 180.00 scf sf +6210 3465 m +gs 1 -1 sc (No) col0 sh gr +/Times-Roman ff 180.00 scf sf +5535 4455 m +gs 1 -1 sc (Yes) col0 sh gr +/Times-Roman ff 180.00 scf sf +2745 3645 m +gs 1 -1 sc (Initialization) col0 sh gr +/Times-Roman ff 180.00 scf sf +7290 3600 m +gs 1 -1 sc (Clean Up) col0 sh gr +/Times-Roman ff 180.00 scf sf +5130 5400 m +gs 1 -1 sc (Process) col0 sh gr +% here ends figure; +pagefooter +showpage +%%Trailer +%EOF diff -Nru gawk-3.1.8+dfsg/doc/process-flow.fig gawk-4.0.1+dfsg/doc/process-flow.fig --- gawk-3.1.8+dfsg/doc/process-flow.fig 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/process-flow.fig 2011-01-06 17:39:28.000000000 +0000 @@ -0,0 +1,37 @@ +#FIG 3.2 Produced by xfig version 3.2.5b +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +2 3 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 6 + 4819 3540 5460 4181 6101 3540 5460 2899 4819 3540 4819 3540 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 3960 3555 4770 3555 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 6165 3555 6975 3555 +2 4 0 1 0 7 50 -1 -1 0.000 0 0 5 0 0 5 + 2569 3240 2569 3877 3910 3877 3910 3240 2569 3240 +2 4 0 1 0 7 50 -1 -1 0.000 0 0 5 0 0 5 + 7020 3240 7020 3881 8369 3881 8369 3240 7020 3240 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5490 4230 5490 5040 +2 4 0 1 0 7 50 -1 -1 0.000 0 0 5 0 0 5 + 4953 5067 4953 5625 5980 5625 5980 5067 4953 5067 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 4905 5355 4275 5355 4275 3600 +4 0 0 50 -1 0 12 0.0000 4 150 480 5265 3375 More\001 +4 0 0 50 -1 0 12 0.0000 4 150 420 5265 3630 Data\001 +4 0 0 50 -1 0 12 0.0000 4 150 270 5265 3885 ?\001 +4 0 0 50 -1 0 12 0.0000 4 150 270 6210 3465 No\001 +4 0 0 50 -1 0 12 0.0000 4 150 330 5535 4455 Yes\001 +4 0 0 50 -1 0 12 0.0000 4 150 1035 2745 3645 Initialization\001 +4 0 0 50 -1 0 12 0.0000 4 195 810 7290 3600 Clean Up\001 +4 0 0 50 -1 0 12 0.0000 4 150 690 5130 5400 Process\001 Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/doc/process-flow.pdf and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/doc/process-flow.pdf differ diff -Nru gawk-3.1.8+dfsg/doc/rflashlight-small.xpic gawk-4.0.1+dfsg/doc/rflashlight-small.xpic --- gawk-3.1.8+dfsg/doc/rflashlight-small.xpic 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/rflashlight-small.xpic 2000-10-03 14:26:58.000000000 +0000 @@ -0,0 +1,26 @@ +#! /usr/X11R6/bin/xpic +80 48 160 80 8 +5 36 96 48 112 80 0 0 +104 64 8 16 +1 37 104 48 128 56 0 0 +2 + 104 48 128 56 +1 38 104 72 128 80 0 0 +2 + 104 80 128 72 +2 39 128 56 128 72 0 0 +2 + 128 56 128 72 +3 40 128 56 160 72 0 0 +1 41 80 72 80 72 0 0 +2 + 80 72 80 72 +1 42 80 72 96 80 0 0 +2 + 80 80 96 72 +1 43 80 64 96 64 0 0 +2 + 80 64 96 64 +1 45 80 48 96 56 0 0 +2 + 96 56 80 48 diff -Nru gawk-3.1.8+dfsg/doc/texinfo.tex gawk-4.0.1+dfsg/doc/texinfo.tex --- gawk-3.1.8+dfsg/doc/texinfo.tex 2010-04-20 08:46:24.000000000 +0000 +++ gawk-4.0.1+dfsg/doc/texinfo.tex 2012-03-28 19:47:54.000000000 +0000 @@ -1,13 +1,13 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% +% % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2009-03-28.05} +\def\texinfoversion{2012-01-19.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011 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 @@ -65,7 +65,6 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} - \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -93,14 +92,13 @@ \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ +\let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top -{\catcode`\'=\active -\global\let\ptexquoteright'}% Math-mode def from plain.tex. -\let\ptexraggedright=\raggedright +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. @@ -118,10 +116,11 @@ % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi -\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi -\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi @@ -160,15 +159,18 @@ \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! +\chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; +\chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. @@ -199,36 +201,7 @@ % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % -\def\finalout{\overfullrule=0pt} - -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). -% -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% -} +\def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, @@ -246,7 +219,7 @@ \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen - \ifx\eTeXversion\undefined\else % etex gives us more logging + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 @@ -257,6 +230,13 @@ \errorcontextlines16 }% +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + % 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. % @@ -267,7 +247,6 @@ \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} -% For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks @@ -577,7 +556,7 @@ } \def\inenvironment#1{% \ifx#1\empty - out of any environment% + outside of any environment% \else in environment \expandafter\string#1% \fi @@ -589,7 +568,7 @@ \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup @@ -599,85 +578,6 @@ \newhelp\EMsimple{Press RETURN to continue.} -%% Simple single-character @ commands - -% @@ prints an @ -% Kludge this until the fonts are right (grr). -\def\@{{\tt\char64}} - -% This is turned off because it was never documented -% and you can use @w{...} around a quote to suppress ligatures. -%% Define @` and @' to be the same as ` and ' -%% but suppressing ligatures. -%\def\`{{`}} -%\def\'{{'}} - -% Used to generate quoted braces. -\def\mylbrace {{\tt\char123}} -\def\myrbrace {{\tt\char125}} -\let\{=\mylbrace -\let\}=\myrbrace -\begingroup - % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux/toc files. - \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\! = 0 \catcode`\\ = \other - !gdef!lbracecmd[\{]% - !gdef!rbracecmd[\}]% - !gdef!lbraceatcmd[@{]% - !gdef!rbraceatcmd[@}]% -!endgroup - -% @comma{} to avoid , parsing problems. -\let\comma = , - -% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. -\let\, = \c -\let\dotaccent = \. -\def\ringaccent#1{{\accent23 #1}} -\let\tieaccent = \t -\let\ubaraccent = \b -\let\udotaccent = \d - -% Other special characters: @questiondown @exclamdown @ordf @ordm -% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. -\def\questiondown{?`} -\def\exclamdown{!`} -\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - -% Dotless i and dotless j, used for accents. -\def\imacro{i} -\def\jmacro{j} -\def\dotless#1{% - \def\temp{#1}% - \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi - \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi - \else \errmessage{@dotless can be used only with i or j}% - \fi\fi -} - -% The \TeX{} logo, as in plain, but resetting the spacing so that a -% period following counts as ending a sentence. (Idea found in latex.) -% -\edef\TeX{\TeX \spacefactor=1000 } - -% @LaTeX{} logo. Not quite the same results as the definition in -% latex.ltx, since we use a different font for the raised A; it's most -% convenient for us to use an explicitly smaller font, rather than using -% the \scriptstyle font (since we don't reset \scriptstyle and -% \scriptscriptstyle). -% -\def\LaTeX{% - L\kern-.36em - {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% - \kern-.15em - \TeX -} - % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and @@ -719,7 +619,7 @@ \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple - \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } @@ -801,15 +701,6 @@ \newdimen\mil \mil=0.001in -% Old definition--didn't work. -%\parseargdef\need{\par % -%% This method tries to make TeX break the page naturally -%% if the depth of the box does not fit. -%{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak -%\prevdepth=-1000pt -%}} - \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. @@ -873,7 +764,7 @@ % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion -% class. WHICH is `l' or `r'. +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} @@ -920,6 +811,36 @@ \temp } +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). This command +% is not documented, not supported, and doesn't work. +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} @@ -930,6 +851,7 @@ \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes @@ -1095,109 +1017,6 @@ } -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math outputs its argument in math mode. -% -% One complication: _ usually means subscripts, but it could also mean -% an actual _ character, as in @math{@var{some_variable} + 1}. So make -% _ active, and distinguish by seeing if the current family is \slfam, -% which is what @var uses. -{ - \catcode`\_ = \active - \gdef\mathunderscore{% - \catcode`\_=\active - \def_{\ifnum\fam=\slfam \_\else\sb\fi}% - } -} -% Another complication: we want \\ (and @\) to output a \ character. -% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -% this is not advertised and we don't care. Texinfo does not -% otherwise define @\. -% -% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -% -\def\math{% - \tex - \mathunderscore - \let\\ = \mathbackslash - \mathactive - % make the texinfo accent commands work in math mode - \let\"=\ddot - \let\'=\acute - \let\==\bar - \let\^=\hat - \let\`=\grave - \let\u=\breve - \let\v=\check - \let\~=\tilde - \let\dotaccent=\dot - $\finishmath -} -\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. - -% 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 sets the catcodes (such as @item or @section). -% -{ - \catcode`^ = \active - \catcode`< = \active - \catcode`> = \active - \catcode`+ = \active - \catcode`' = \active - \gdef\mathactive{% - \let^ = \ptexhat - \let< = \ptexless - \let> = \ptexgtr - \let+ = \ptexplus - \let' = \ptexquoteright - } -} - -% Some math mode symbols. -\def\bullet{$\ptexbullet$} -\def\geq{\ifmmode \ge\else $\ge$\fi} -\def\leq{\ifmmode \le\else $\le$\fi} -\def\minus{\ifmmode -\else $-$\fi} - -% @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in the cm -% typewriter fonts as three actual period characters; on the other hand, -% in other typewriter fonts three periods are wider than 1.5em. So do -% whichever is larger. -% -\def\dots{% - \leavevmode - \setbox0=\hbox{...}% get width of three periods - \ifdim\wd0 > 1.5em - \dimen0 = \wd0 - \else - \dimen0 = 1.5em - \fi - \hbox to \dimen0{% - \hskip 0pt plus.25fil - .\hskip 0pt plus1fil - .\hskip 0pt plus1fil - .\hskip 0pt plus.5fil - }% -} - -% @enddots{} is an end-of-sentence ellipsis. -% -\def\enddots{% - \dots - \spacefactor=\endofsentencespacefactor -} - -% @comma{} is so commas can be inserted into text without messing up -% Texinfo's parsing. -% -\let\comma = , - % @refill is a no-op. \let\refill=\relax @@ -1262,9 +1081,8 @@ \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -% can be set). So we test for \relax and 0 as well as \undefined, -% borrowed from ifpdf.sty. -\ifx\pdfoutput\undefined +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else @@ -1279,50 +1097,24 @@ % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. -% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html -% (and related messages, the final outcome is that it is up to the TeX -% user to double the backslashes and otherwise make the string valid, so -% that's what we do). - -% double active backslashes. -% -{\catcode`\@=0 \catcode`\\=\active - @gdef@activebackslashdouble{% - @catcode`@\=@active - @let\=@doublebackslash} -} - -% To handle parens, we must adopt a different approach, since parens are -% not active characters. hyperref.dtx (which has the same problem as -% us) handles it with this amazing macro to replace tokens, with minor -% changes for Texinfo. It is included here under the GPL by permission -% from the author, Heiko Oberdiek. -% -% #1 is the tokens to replace. -% #2 is the replacement. -% #3 is the control sequence with the string. -% -\def\HyPsdSubst#1#2#3{% - \def\HyPsdReplace##1#1##2\END{% - ##1% - \ifx\\##2\\% - \else - #2% - \HyReturnAfterFi{% - \HyPsdReplace##2\END - }% - \fi - }% - \xdef#3{\expandafter\HyPsdReplace#3#1\END}% -} -\long\def\HyReturnAfterFi#1\fi{\fi#1} - -% #1 is a control sequence in which to do the replacements. -\def\backslashparens#1{% - \xdef#1{#1}% redefine it as its expansion; the definition is simply - % \lastnode when called from \setref -> \pdfmkdest. - \HyPsdSubst{(}{\realbackslash(}{#1}% - \HyPsdSubst{)}{\realbackslash)}{#1}% +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\relax + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images @@ -1332,13 +1124,16 @@ \ifpdf % - % Color manipulation macros based on pdfcolor.tex. - \def\cmykDarkRed{0.28 1 1 0.35} - \def\cmykBlack{0 0 0 1} + % Color manipulation macros based on pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). - \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}} + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. @@ -1348,7 +1143,7 @@ \pdfsetcolor{#1}% } % - \def\maincolor{\cmykBlack} + \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} @@ -1381,29 +1176,31 @@ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. \let\pdfimgext=\empty \begingroup - \openin 1 #1.png \ifeof 1 - \openin 1 #1.jpg \ifeof 1 - \openin 1 #1.jpeg \ifeof 1 - \openin 1 #1.JPG \ifeof 1 - \openin 1 #1.pdf \ifeof 1 - \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% + \else \gdef\pdfimgext{JPG}% \fi - \else \gdef\pdfimgext{pdf}% + \else \gdef\pdfimgext{jpeg}% \fi - \else \gdef\pdfimgext{JPG}% + \else \gdef\pdfimgext{jpg}% \fi - \else \gdef\pdfimgext{jpeg}% + \else \gdef\pdfimgext{png}% \fi - \else \gdef\pdfimgext{jpg}% + \else \gdef\pdfimgext{PDF}% \fi - \else \gdef\pdfimgext{png}% + \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup @@ -1431,10 +1228,9 @@ % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive - \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% - \backslashparens\pdfdestname + \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % @@ -1443,8 +1239,8 @@ % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. - \def\urlcolor{\cmykDarkRed} - \def\linkcolor{\cmykDarkRed} + \def\urlcolor{\rgbDarkRed} + \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines @@ -1466,29 +1262,24 @@ % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. - \def\pdfoutlinedest{#3}% + \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else - % Doubled backslashes in the name. - {\activebackslashdouble \xdef\pdfoutlinedest{#3}% - \backslashparens\pdfoutlinedest}% + \txiescapepdf\pdfoutlinedest \fi % - % Also double the backslashes in the display string. - {\activebackslashdouble \xdef\pdfoutlinetext{#1}% - \backslashparens\pdfoutlinetext}% + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup - % Thanh's hack / proper braces in bookmarks - \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace - \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace - % % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% @@ -1542,15 +1333,26 @@ % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % - % xx to do this right, we have to translate 8-bit characters to - % their "best" equivalent, based on the @documentencoding. Right - % now, I guess we'll just let the pdf reader have its way. + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % \indexnofonts \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax @@ -1692,7 +1494,7 @@ % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) -\ifpdf \ifx\pdffontattr\undefined \else +\ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap @@ -1959,7 +1761,7 @@ % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. -\ifx\fontprefix\undefined +\ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. @@ -2102,8 +1904,8 @@ \font\reducedsy=cmsy10 \def\reducedecsize{1000} -% reset the current fonts -\textfonts +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts \rm } % end of 11pt text font size definitions @@ -2233,11 +2035,9 @@ \font\reducedsy=cmsy9 \def\reducedecsize{0900} -% reduce space between paragraphs -\divide\parskip by 2 - -% reset the current fonts -\textfonts +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts \rm } % end of 10pt text font size definitions @@ -2246,12 +2046,13 @@ % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % -\def\xword{10} \def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% - \wlog{doing @fonttextsize \textsizearg}% + %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. @@ -2305,7 +2106,7 @@ \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} + \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl @@ -2433,12 +2234,14 @@ % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% - \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% - \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } @@ -2457,22 +2260,26 @@ \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright +% \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright +% \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright -\let\markupsetuplqsamp \markupsetnoligaturesquoteleft \let\markupsetuplqkbd \markupsetnoligaturesquoteleft -% Allow an option to not replace quotes with a regular directed right -% quote/apostrophe (char 0x27), but instead use the undirected quote -% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -% the default, but it works for pasting with more pdf viewers (at least -% evince), the lilypond developers report. xpdf does work with the -% regular 0x27. +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax @@ -2496,33 +2303,84 @@ \else \char'22 \fi } +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 -%% Add scribe-like font environments, plus @l for inline lisp (usually sans -%% serif) and @ii for TeX italic +% Font commands. -% \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 - \ptexslash\fi\fi\fi} -\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} -% like \smartslanted except unconditionally uses \ttsl. +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ptexslash + \fi\fi\fi + \aftersmartic +} + +% like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. -\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} +\def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? -\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} \let\i=\smartitalic \let\slanted=\smartslanted -\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic @@ -2618,7 +2476,7 @@ \plainfrenchspacing #1% }% - \null + \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. @@ -2650,6 +2508,8 @@ } } +\def\codex #1{\tclose{#1}\endgroup} + \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% @@ -2663,7 +2523,6 @@ \discretionary{}{}{}}% {\_}% } -\def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in @@ -2683,10 +2542,156 @@ \allowcodebreaksfalse \else \errhelp = \EMsimple - \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } +% @uref (abbreviation for `urlref') takes an optional (comma-separated) +% second argument specifying the text to display and an optional third +% arg as text to display instead of (rather than in addition to) the url +% itself. First (mandatory) arg is the url. +% (This \urefnobreak definition isn't used now, leaving it for a while +% for comparison.) +\def\urefnobreak#1{\dourefnobreak #1,,,\finish} +\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \code{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% This \urefbreak definition is the active one. +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } +\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi + % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} @@ -2704,7 +2709,7 @@ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle option `\txiarg'}% + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} @@ -2732,92 +2737,253 @@ \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} -% @uref (abbreviation for `urlref') takes an optional (comma-separated) -% second argument specifying the text to display and an optional third -% arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. Perhaps eventually put in -% a hypertex \special here. +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % -\def\uref#1{\douref #1,,,\finish} -\def\douref#1,#2,#3,#4\finish{\begingroup - \unsepspaces - \pdfurl{#1}% - \setbox0 = \hbox{\ignorespaces #3}% - \ifdim\wd0 > 0pt - \unhbox0 % third arg given, show only that - \else - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it - \else - \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url - \fi - \else - \code{#1}% only url given, so show it - \fi +\def\dmn#1{\thinspace #1} + +% @l was never documented to mean ``switch to the Lisp font'', +% and it is not used as such in any manual I can find. We need it for +% Polish suppressed-l. --karl, 22sep96. +%\def\l#1{{\li #1}\null} + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi - \endlink -\endgroup} + \null % reset \spacefactor=1000 +} -% @url synonym for @uref, since that's how everyone uses it. +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. % -\let\url=\uref +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} -% rms does not like angle brackets --karl, 17may97. -% So now @email is just like @uref, unless we are pdf. +% @asis just yields its argument. Used with @table, for example. % -%\def\email#1{\angleleft{\tt #1}\angleright} -\ifpdf - \def\email#1{\doemail#1,,\finish} - \def\doemail#1,#2,#3\finish{\begingroup - \unsepspaces - \pdfurl{mailto:#1}% - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi - \endlink - \endgroup} -\else - \let\email=\uref -\fi +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% 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 sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} -% Typeset a dimension, e.g., `in' or `pt'. The only reason for the -% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) % -\def\dmn#1{\thinspace #1} - -% @l was never documented to mean ``switch to the Lisp font'', -% and it is not used as such in any manual I can find. We need it for -% Polish suppressed-l. --karl, 22sep96. -%\def\l#1{{\li #1}\null} +\edef\TeX{\TeX \spacefactor=1000 } -% @acronym for "FBI", "NATO", and the like. -% We print this one point size smaller, since it's intended for -% all-uppercase. +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). % -\def\acronym#1{\doacronym #1,,\finish} -\def\doacronym#1,#2,#3\finish{% - {\selectfonts\lsize #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% - \fi +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX } -% @abbr for "Comput. J." and the like. -% No font change, but don't do end-of-sentence spacing. +% Some math mode symbols. +\def\bullet{$\ptexbullet$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. % -\def\abbr#1{\doabbr #1,,\finish} -\def\doabbr#1,#2,#3\finish{% - {\plainfrenchspacing #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% } - -\message{glyphs,} +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % @@ -2839,7 +3005,7 @@ {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -2988,7 +3154,7 @@ % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % -\ifx\Orb\undefined +\ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi @@ -3016,8 +3182,9 @@ \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. @@ -3077,7 +3244,7 @@ \finishedtitlepagetrue } -%%% Macros to be used within @titlepage: +% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} @@ -3110,7 +3277,7 @@ } -%%% Set up page headings and footings. +% Set up page headings and footings. \let\thispage=\folio @@ -3204,10 +3371,14 @@ \def\headings #1 {\csname HEADINGS#1\endcsname} -\def\HEADINGSoff{% -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document @@ -3258,7 +3429,7 @@ % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). -\ifx\today\undefined +\ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month @@ -3319,7 +3490,7 @@ \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil + \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % @@ -3805,18 +3976,18 @@ \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi -%% Test to see if parskip is larger than space between lines of -%% table. If not, do nothing. -%% If so, set to same dimension as multitablelinespace. +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. \fi} @@ -4131,11 +4302,14 @@ \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 + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should define @lbrace and @rbrace commands a la @comma. + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts @@ -4188,7 +4362,7 @@ \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively - % preventing its expansion. This is used only for control% words, + % 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. @@ -4207,6 +4381,7 @@ \commondummiesnofonts % \definedummyletter\_% + \definedummyletter\-% % % Non-English letters. \definedummyword\AA @@ -4243,20 +4418,24 @@ \definedummyword\TeX % % Assorted special characters. + \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots + \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright - \definedummyword\expansion + \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4313,18 +4492,24 @@ \definedummyword\b \definedummyword\i \definedummyword\r + \definedummyword\sansserif \definedummyword\sc + \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\acronym + \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn + \definedummyword\dmn + \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file + \definedummyword\indicateurl \definedummyword\kbd \definedummyword\key \definedummyword\math @@ -4352,7 +4537,7 @@ \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% - % Hopefully, all control words can become @asis. + % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts @@ -4364,8 +4549,14 @@ % \def\ { }% \def\@{@}% - % how to handle braces? \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + % Unfortunately, texindex is not prepared to handle braces in the + % content at all. So for index sorting, we map @{ and @} to strings + % starting with |, since that ASCII character is between ASCII { and }. + \def\{{|a}% + \def\}{|b}% % % Non-English letters. \def\AA{AA}% @@ -4393,23 +4584,25 @@ % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% - \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% + \def\expansion{==>}% + \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% - \def\expansion{==>}% + \def\leq{<=}% \def\minus{-}% - \def\pounds{pounds}% \def\point{.}% + \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% @@ -4417,8 +4610,12 @@ \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% + \def\registeredsymbol{R}% \def\result{=>}% - \def\textdegree{degrees}% + \def\textdegree{o}% + % + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax + \else \indexlquoteignore \fi % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. @@ -4433,6 +4630,11 @@ \macrolist } +% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us +% ignore left quotes in the sort term. +{\catcode`\`=\active + \gdef\indexlquoteignore{\let`=\empty}} + \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? @@ -4690,7 +4892,6 @@ % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. -% % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% @@ -4727,10 +4928,17 @@ % columns. \vskip 0pt plus1pt % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% + % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } +\def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent @@ -4963,7 +5171,22 @@ \message{sectioning,} % Chapters, sections, etc. -% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 @@ -5042,8 +5265,8 @@ \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. -% To achive this, remember the "biggest" unnum. sec. we are currently in: -\chardef\unmlevel = \maxseclevel +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. @@ -5068,8 +5291,8 @@ % The heading type: \def\headtype{#1}% \if \headtype U% - \ifnum \absseclevel < \unmlevel - \chardef\unmlevel = \absseclevel + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: @@ -5081,10 +5304,10 @@ \fi\fi \fi % Check for numbered within unnumbered: - \ifnum \absseclevel > \unmlevel + \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else - \chardef\unmlevel = 3 + \chardef\unnlevel = 3 \fi \fi % Now print the heading: @@ -5170,7 +5393,8 @@ \global\let\subsubsection = \appendixsubsubsec } -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 @@ -5214,40 +5438,47 @@ \let\top\unnumbered % Sections. +% \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } -\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection -\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. -\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } -\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } -\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% @@ -5255,21 +5486,25 @@ } % Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% @@ -5319,14 +5554,13 @@ % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. -%%% Args are the skip and penalty (usually negative) +% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} -%%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) - \newskip\chapheadingskip +% Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will @@ -5336,9 +5570,8 @@ \chappager \ifodd\pageno \else \begingroup - \evenheadline={\hfil}\evenfootline={\hfil}% - \oddheadline={\hfil}\oddfootline={\hfil}% - \hbox to 0pt{}% + \headingsoff + \null \chappager \endgroup \fi @@ -5530,6 +5763,8 @@ % \def\sectionheading#1#2#3#4{% {% + \checkenv{}% should not be in an environment. + % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % @@ -5647,7 +5882,6 @@ % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: - % % @section sec-whatever % @deffn def-whatever \penalty 10001 @@ -5781,6 +6015,7 @@ \def\summarycontents{% \startcontents{\putwordShortTOC}% % + \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry @@ -5836,6 +6071,19 @@ % The last argument is the page number. % The arguments in between are the chapter number, section number, ... +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % @@ -5925,9 +6173,9 @@ \message{environments,} % @foo ... @end foo. -% @tex ... @end tex escapes into raw Tex temporarily. +% @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. -% But \@ or @@ will get a plain tex @ character. +% But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% @@ -5944,6 +6192,10 @@ \catcode`\'=\other \escapechar=`\\ % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc @@ -6047,6 +6299,12 @@ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \fi + % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop @@ -6060,7 +6318,7 @@ \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip - \comment % For explanation, see the end of \def\group. + \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi @@ -6146,41 +6404,42 @@ } % We often define two environments, @foo and @smallfoo. -% Let's do it by one command: -\def\makedispenv #1#2{ - \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} - \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } -% Define two synonyms: -\def\maketwodispenvs #1#2#3{ - \makedispenv{#1}{#3} - \makedispenv{#2}{#3} +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% } - -% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % -\maketwodispenvs {lisp}{example}{% +\maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return + \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % -\makedispenv {display}{% +\makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % -\makedispenv{format}{% +\makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble @@ -6199,7 +6458,7 @@ \envdef\flushright{% \let\nonarrowing = t% \nonfillstart - \advance\leftskip by 0pt plus 1fill + \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak @@ -6234,6 +6493,8 @@ % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % +\makedispenvdef{quotation}{\quotationstart} +% \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt @@ -6249,28 +6510,18 @@ \parsearg\quotationlabel } -\envdef\quotation{% - \setnormaldispenv - \quotationstart -} - -\envdef\smallquotation{% - \setsmalldispenv - \quotationstart -} -\let\Esmallquotation = \Equotation - % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par - \ifx\quotationauthor\undefined\else + \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } +\def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% @@ -6327,21 +6578,28 @@ % Setup for the @verbatim environment % -% Real tab expansion +% Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % -\def\starttabbox{\setbox0=\hbox\bgroup} +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup - \dimen0=\wd0 % the width so far, or since the previous tab - \divide\dimen0 by\tabw - \multiply\dimen0 by\tabw % compute previous multiple of \tabw - \advance\dimen0 by\tabw % advance to next multiple of \tabw - \wd0=\dimen0 \box0 \starttabbox + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup @@ -6350,15 +6608,16 @@ \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and - % make each space count - % must do in this order: + % make each space count. + % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } @@ -6415,6 +6674,7 @@ \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% @@ -6464,7 +6724,7 @@ % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % - % As a minor refinement, we avoid "club" headers by signalling + % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. @@ -6501,7 +6761,7 @@ #1#2 \endheader % common ending: \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil + \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx @@ -6531,13 +6791,36 @@ \def\domakedefun#1#2#3{% \envdef#1{% \startdefun + \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } -%%% Untyped functions: +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} @@ -6556,7 +6839,7 @@ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } -%%% Typed functions: +% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} @@ -6571,10 +6854,11 @@ % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Typed variables: +% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} @@ -6592,7 +6876,7 @@ \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -%%% Untyped variables: +% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } @@ -6603,7 +6887,8 @@ % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } -%%% Type: +% Types: + % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% @@ -6631,25 +6916,49 @@ % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% + \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % - % How we'll format the type name. Putting it in brackets helps + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % - % Figure out line sizes for the paragraph shape. + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent - % (plain.tex says that \dimen1 should be used only as global.) - \parshape 2 0in \dimen0 \defargsindent \dimen2 % - % Put the type name to the right margin. + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize @@ -6671,8 +6980,16 @@ % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt - \def\temp{#2}% return value type - \ifx\temp\empty\else \tclose{\temp} \fi + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm @@ -6790,7 +7107,7 @@ % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. -\ifx\eTeXversion\undefined +\ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% @@ -6801,25 +7118,30 @@ } \fi -\def\scanmacro#1{% - \begingroup - \newlinechar`\^^M - \let\xeatspaces\eatspaces - % Undo catcode changes of \startcontents and \doprintindex - % When called from @insertcopying or (short)caption, we need active - % backslash to get it printed correctly. Previously, we had - % \catcode`\\=\other instead. We'll see whether a problem appears - % with macro expansion. --kasal, 19aug04 - \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ - % ... and \example - \spaceisspace - % - % Append \endinput to make sure that TeX does not see the ending newline. - % I've verified that it is necessary both for e-TeX and for ordinary TeX - % --kasal, 29nov03 - \scantokens{#1\endinput}% - \endgroup -} +\def\scanmacro#1{\begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % + % ... and for \example: + \spaceisspace + % + % The \empty here causes a following catcode 5 newline to be eaten as + % part of reading whitespace after a control sequence. It does not + % eat a catcode 13 newline. There's no good way to handle the two + % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX + % would then have different behavior). See the Macro Details node in + % the manual for the workaround we recommend for macros and + % line-oriented commands. + % + \scantokens{#1\empty}% +\endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% @@ -6873,17 +7195,18 @@ % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active -% (as in normal texinfo). It is necessary to change the definition of \. - +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. - +% % It's necessary to have hard CRs when the macro is executed. This is -% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% +% +\def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other @@ -6896,13 +7219,13 @@ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } -\def\scanargctxt{% +\def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } -\def\macrobodyctxt{% +\def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other @@ -6910,32 +7233,56 @@ \usembodybackslash } -\def\macroargctxt{% +\def\macroargctxt{% used when scanning invocations \scanctxt - \catcode`\\=\other + \catcode`\\=0 } +% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" +% for the single characters \ { }. Thus, we end up with the "commands" +% that would be written @\ @{ @} in a Texinfo document. +% +% We already have @{ and @}. For @\, we define it here, and only for +% this purpose, to produce a typewriter backslash (so, the @\ that we +% define for @math can't be used with @macro calls): +% +\def\\{\normalbackslash}% +% +% We would like to do this for \, too, since that is what makeinfo does. +% But it is not possible, because Texinfo already has a command @, for a +% cedilla accent. Documents must use @comma{} instead. +% +% \anythingelse will almost certainly be an error of some kind. + % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. - +% {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} +\def\margbackslash#1{\char`\#1 } + \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist + \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments - \paramno=0% + \paramno=0\relax \else \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% @@ -6982,46 +7329,269 @@ % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} +% For macro processing make @ a letter so that we can make Texinfo private macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + % Parse the optional {params} list. Set up \paramno and \paramlist -% so \defmacro knows what to do. Define \macarg.blah for each blah -% in the params list, to be ##N where N is the position in that list. +% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH +% in the params list to some hook where the argument si to be expanded. If +% there are less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% % That gets used by \mbodybackslash (above). - +% % We need to get `macro parameter char #' into several definitions. -% The technique used is stolen from LaTeX: let \hash be something +% The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. - -\def\parsemargdef#1;{\paramno=0\def\paramlist{}% - \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +% +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime underwhich the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, you need that no macro has more than 256 arguments, otherwise an +% error is produced. +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% + % In case that there are 10 or more arguments we parse again the arguments + % list to set new definitions for the \macarg.BLAH macros corresponding to + % each BLAH argument. It was anyhow needed to parse already once this list + % in order to count the arguments, and as macros with at most 9 arguments + % are by far more frequent than macro with 10 or more arguments, defining + % twice the \macarg.BLAH macros does not cost too much processing power. + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx - \advance\paramno by 1% + \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) +% +\catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\catcode `\@=11\relax + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} + +% +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +\def\macargexpandinbody@{% + %% Define the named-macro outside of this group and then close this group. + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Save the token stack pointer into macro #1 +\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} +% Restore the token stack pointer from number in macro #1 +\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} +% newtoks that can be used non \outer . +\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} + +% Tailing missing arguments are set to empty +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} -% This defines the macro itself. There are six cases: recursive and -% nonrecursive macros of zero, one, and many arguments. +% This defines a Texinfo @macro. There are eight cases: recursive and +% nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. +% \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive @@ -7036,17 +7606,25 @@ \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else + \ifnum\paramno<10\relax % at most 9 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi \fi \else \ifcase\paramno @@ -7063,29 +7641,40 @@ \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \expandafter\noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% + \else % at most 9 + \ifnum\paramno<10\relax + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi \fi \fi} +\catcode `\@\texiatcatcode\relax + \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence -% as an argument (by \parsebrace or \parsearg) +% as an argument (by \parsebrace or \parsearg). +% \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else @@ -7095,7 +7684,8 @@ % @alias. % We need some trickery to remove the optional spaces around the equal -% sign. Just make them active and then expand them all to nothing. +% sign. Make them active and then expand them all to nothing. +% \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% @@ -7116,7 +7706,8 @@ % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in @@ -7177,11 +7768,32 @@ \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + + % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed @@ -7190,26 +7802,36 @@ \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} +% +\newbox\topbox +\newbox\printedrefnamebox +\newbox\printedmanualbox +% \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces - \def\printedmanual{\ignorespaces #5}% + % \def\printedrefname{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual\unskip}% - \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax - % Use the node name inside the square brackets. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1 > 0pt - % It is in another manual, so we don't have it. + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs - % We know the real title if we have the xref values. + % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. @@ -7227,9 +7849,8 @@ % etc. don't get their TeX definitions. \getfilename{#4}% % - % See comments at \activebackslashdouble. - {\activebackslashdouble \xdef\pdfxrefdest{#1}% - \backslashparens\pdfxrefdest}% + \edef\pdfxrefdest{#1}% + \txiescapepdf\pdfxrefdest % \leavevmode \startlink attr{/Border [0 0 0]}% @@ -7256,7 +7877,7 @@ \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". - \ifdim\wd0 = 0pt + \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname @@ -7264,21 +7885,46 @@ % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". - \ifdim \wd1 > 0pt + \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. - % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. - \ifdim \wd1 > 0pt - \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + % Cross-manual reference. Only include the "Section ``foo'' in" if + % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual} + % outputs simply "see The Foo Manual". + \ifdim \wd\printedmanualbox > 0pt + % What is the 7sp about? The idea is that we also want to omit + % the Section part if we would be printing "Top", since they are + % clearly trying to refer to the whole manual. But, this being + % TeX, we can't easily compare strings while ignoring the possible + % spaces before and after in the input. By adding the arbitrary + % 7sp, we make it much less likely that a real node name would + % happen to have the same width as "Top" (e.g., in a monospaced font). + % I hope it will never happen in practice. + % + % For the same basic reason, we retypeset the "Top" at every + % reference, since the current font is indeterminate. + % + \setbox\topbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp + \ifdim \wd2 = \wd\topbox \else + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + \cite{\printedmanual}% \else + % Reference in this manual. + % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of @@ -7290,7 +7936,7 @@ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% - % output the `[mynode]' via a macro so it can be overridden. + % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: @@ -7353,7 +7999,8 @@ \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue @@ -7517,7 +8164,7 @@ % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only. +% @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 @@ -7580,6 +8227,8 @@ % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut + % + % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 @@ -7667,7 +8316,7 @@ it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% - \ifx\epsfbox\undefined + \ifx\epsfbox\thisiundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% @@ -7683,7 +8332,7 @@ % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. -% #6 is just the usual extra ignored arg for parsing this stuff. +% #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example @@ -8132,7 +8781,7 @@ % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% - \gdef^^a0{~} + \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} @@ -8162,7 +8811,7 @@ \gdef^^b9{$^1$} \gdef^^ba{\ordm} % - \gdef^^bb{\guilletright} + \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} @@ -8254,7 +8903,7 @@ % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% - \gdef^^a0{~} + \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} @@ -8335,8 +8984,8 @@ \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} - \gdef^^ed{\'\i} - \gdef^^ee{\^\i} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} @@ -8427,7 +9076,7 @@ \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax - \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% @@ -8895,8 +9544,8 @@ % Prevent underfull vbox error messages. \vbadness = 10000 -% Don't be so finicky about underfull hboxes, either. -\hbadness = 2000 +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 @@ -9103,28 +9752,21 @@ \message{and turning on texinfo input format.} +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. -\catcode`\"=\other -\catcode`\~=\other -\catcode`\^=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode`\+=\other -\catcode`\$=\other -\def\normaldoublequote{"} -\def\normaltilde{~} -\def\normalcaret{^} -\def\normalunderscore{_} -\def\normalverticalbar{|} -\def\normalless{<} -\def\normalgreater{>} -\def\normalplus{+} -\def\normaldollar{$}%$ font-lock fix +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, @@ -9202,14 +9844,24 @@ % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. -\catcode`\\=\active -@def@normalbackslash{{@tt@backslashcurfont}} +\catcode`\\=\active % @ for escape char from now on. + +% The story here is that in math mode, the \char of \backslashcurfont +% ends up printing the roman \ from the math symbol font (because \char +% in math mode uses the \mathcode, and plain.tex sets +% \mathcode`\\="026E). It seems better for @backslashchar{} to always +% print a typewriter backslash, hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. +@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. + % On startup, @fixbackslash assigns: % @let \ = @normalbackslash - % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. +% catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} @@ -9217,16 +9869,16 @@ % the literal character `\'. % @def@normalturnoffactive{% - @let\=@normalbackslash @let"=@normaldoublequote - @let~=@normaltilde + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar - @let<=@normalless - @let>=@normalgreater - @let+=@normalplus - @let$=@normaldollar %$ font-lock fix + @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces @@ -9258,10 +9910,19 @@ % Say @foo, not \foo, in error messages. @escapechar = `@@ +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + % These look ok in all fonts, so just make them not special. -@catcode`@& = @other -@catcode`@# = @other -@catcode`@% = @other +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @@ -9272,12 +9933,8 @@ @markupsetuplqdefault @markupsetuprqdefault -@c Gnulib now utterly and painfully insists on no trailing whitespace. -@c So we have to nuke it. - @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) -@c eval: (add-hook 'write-file-hooks 'nuke-trailing-whitespace) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" diff -Nru gawk-3.1.8+dfsg/eval.c gawk-4.0.1+dfsg/eval.c --- gawk-3.1.8+dfsg/eval.c 2010-04-20 08:20:18.000000000 +0000 +++ gawk-4.0.1+dfsg/eval.c 2012-03-28 19:54:19.000000000 +0000 @@ -1,9 +1,9 @@ /* - * eval.c - gawk parse tree interpreter + * eval.c - gawk bytecode interpreter */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -25,31 +25,42 @@ #include "awk.h" -extern double pow P((double x, double y)); -extern double modf P((double x, double *yp)); -extern double fmod P((double x, double y)); - -static inline void make_scalar P((NODE *tree)); -static int eval_condition P((NODE *tree)); -static NODE *op_assign P((NODE *tree)); -static NODE *func_call P((NODE *tree)); -static NODE *match_op P((NODE *tree)); -static void pop_forloop P((void)); -static inline 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, - const char *func_name, char **varnames)); -static inline void pop_fcall_stack P((void)); -static void pop_fcall P((void)); -static int comp_func P((const void *p1, const void *p2)); +extern void after_beginfile(IOBUF **curfile); +extern double pow(double x, double y); +extern double modf(double x, double *yp); +extern double fmod(double x, double y); +NODE **fcall_list; +long fcall_count = 0; +int currule = 0; +IOBUF *curfile = NULL; /* current data file */ +int exiting = FALSE; + +#ifdef DEBUGGING +extern int pre_execute(INSTRUCTION **); +extern void post_execute(INSTRUCTION *); +#else +#define r_interpret interpret +#endif + +/* + * Flag which executable this is; done here because eval.c is compiled + * differently for each of them. + */ +enum exe_mode which_gawk = +#ifdef PROFILING + exe_profiling /* pgawk */ +#else +# ifdef DEBUGGING + exe_debugging /* dgawk */ +# else + exe_normal /* normal gawk */ +# endif +#endif + ; /* which_gawk */ #if __GNUC__ < 2 NODE *_t; /* used as a temporary in macros */ #endif -#ifdef MSDOS -double _msc51bug; /* to get around a bug in MSC 5.1 */ -#endif -NODE *ret_node; int OFSlen; int ORSlen; int OFMTidx; @@ -62,27 +73,13 @@ #define INCREMENT(n) /* nothing */ #endif -/* Macros and variables to save and restore function and loop bindings */ -/* - * the val variable allows return/continue/break-out-of-context to be - * caught and diagnosed - */ -#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 */ -static int func_tag_valid = FALSE; -static jmp_buf func_tag; -extern int exiting, exit_val; - /* This rather ugly macro is for VMS C */ #ifdef C #undef C #endif #define C(c) ((char)c) /* - * This table is used by the regexp routines to do case independant + * This table is used by the regexp routines to do case independent * matching. Basically, every ascii character maps to itself, except * uppercase letters map to lower case ones. This table has 256 * entries, for ISO 8859-1. Note also that if the system this @@ -254,111 +251,154 @@ * This table maps node types to strings for debugging. * KEEP IN SYNC WITH awk.h!!!! */ + static const char *const nodetypes[] = { "Node_illegal", - "Node_times", - "Node_quotient", - "Node_mod", - "Node_plus", - "Node_minus", - "Node_cond_pair", - "Node_subscript", - "Node_concat", - "Node_exp", - "Node_preincrement", - "Node_predecrement", - "Node_postincrement", - "Node_postdecrement", - "Node_unary_minus", - "Node_field_spec", - "Node_assign", - "Node_assign_times", - "Node_assign_quotient", - "Node_assign_mod", - "Node_assign_plus", - "Node_assign_minus", - "Node_assign_exp", - "Node_assign_concat", - "Node_and", - "Node_or", - "Node_equal", - "Node_notequal", - "Node_less", - "Node_greater", - "Node_leq", - "Node_geq", - "Node_match", - "Node_nomatch", - "Node_not", - "Node_rule_list", - "Node_rule_node", - "Node_statement_list", - "Node_switch_body", - "Node_case_list", - "Node_if_branches", - "Node_expression_list", - "Node_param_list", - "Node_K_if", - "Node_K_switch", - "Node_K_case", - "Node_K_default", - "Node_K_while", - "Node_K_for", - "Node_K_arrayfor", - "Node_K_break", - "Node_K_continue", - "Node_K_print", - "Node_K_print_rec", - "Node_K_printf", - "Node_K_next", - "Node_K_exit", - "Node_K_do", - "Node_K_return", - "Node_K_delete", - "Node_K_delete_loop", - "Node_K_getline", - "Node_K_function", - "Node_K_nextfile", - "Node_redirect_output", - "Node_redirect_append", - "Node_redirect_pipe", - "Node_redirect_pipein", - "Node_redirect_input", - "Node_redirect_twoway", - "Node_var_new", - "Node_var", - "Node_var_array", "Node_val", - "Node_builtin", - "Node_line_range", - "Node_in_array", - "Node_func", - "Node_func_call", - "Node_cond_exp", "Node_regex", "Node_dynregex", + "Node_var", + "Node_var_array", + "Node_var_new", + "Node_param_list", + "Node_func", "Node_hashnode", "Node_ahash", "Node_array_ref", - "Node_BINMODE", - "Node_CONVFMT", - "Node_FIELDWIDTHS", - "Node_FNR", - "Node_FS", - "Node_IGNORECASE", - "Node_LINT", - "Node_NF", - "Node_NR", - "Node_OFMT", - "Node_OFS", - "Node_ORS", - "Node_RS", - "Node_SUBSEP", - "Node_TEXTDOMAIN", + "Node_arrayfor", + "Node_frame", + "Node_instruction", "Node_final --- this should never appear", NULL }; + +/* + * This table maps Op codes to strings. + * KEEP IN SYNC WITH awk.h!!!! + */ + +static struct optypetab { + char *desc; + char *operator; +} optypes[] = { + { "Op_illegal", NULL }, + { "Op_times", " * " }, + { "Op_times_i", " * " }, + { "Op_quotient", " / " }, + { "Op_quotient_i", " / " }, + { "Op_mod", " % " }, + { "Op_mod_i", " % " }, + { "Op_plus", " + " }, + { "Op_plus_i", " + " }, + { "Op_minus", " - " }, + { "Op_minus_i", " - " }, + { "Op_exp", " ^ " }, + { "Op_exp_i", " ^ " }, + { "Op_concat", " " }, + { "Op_line_range", NULL }, + { "Op_cond_pair", ", " }, + { "Op_subscript", "[]" }, + { "Op_sub_array", "[]" }, + { "Op_preincrement", "++" }, + { "Op_predecrement", "--" }, + { "Op_postincrement", "++" }, + { "Op_postdecrement", "--" }, + { "Op_unary_minus", "-" }, + { "Op_field_spec", "$" }, + { "Op_not", "! " }, + { "Op_assign", " = " }, + { "Op_store_var", " = " }, + { "Op_store_sub", " = " }, + { "Op_store_field", " = " }, + { "Op_assign_times", " *= " }, + { "Op_assign_quotient", " /= " }, + { "Op_assign_mod", " %= " }, + { "Op_assign_plus", " += " }, + { "Op_assign_minus", " -= " }, + { "Op_assign_exp", " ^= " }, + { "Op_assign_concat", " " }, + { "Op_and", " && " }, + { "Op_and_final", NULL }, + { "Op_or", " || " }, + { "Op_or_final", NULL }, + { "Op_equal", " == " }, + { "Op_notequal", " != " }, + { "Op_less", " < " }, + { "Op_greater", " > " }, + { "Op_leq", " <= " }, + { "Op_geq", " >= " }, + { "Op_match", " ~ " }, + { "Op_match_rec", NULL }, + { "Op_nomatch", " !~ " }, + { "Op_rule", NULL }, + { "Op_K_case", "case" }, + { "Op_K_default", "default" }, + { "Op_K_break", "break" }, + { "Op_K_continue", "continue" }, + { "Op_K_print", "print" }, + { "Op_K_print_rec", "print" }, + { "Op_K_printf", "printf" }, + { "Op_K_next", "next" }, + { "Op_K_exit", "exit" }, + { "Op_K_return", "return" }, + { "Op_K_delete", "delete" }, + { "Op_K_delete_loop", NULL }, + { "Op_K_getline_redir", "getline" }, + { "Op_K_getline", "getline" }, + { "Op_K_nextfile", "nextfile" }, + { "Op_builtin", NULL }, + { "Op_sub_builtin", NULL }, + { "Op_in_array", " in " }, + { "Op_func_call", NULL }, + { "Op_indirect_func_call", NULL }, + { "Op_push", NULL }, + { "Op_push_arg", NULL }, + { "Op_push_i", NULL }, + { "Op_push_re", NULL }, + { "Op_push_array", NULL }, + { "Op_push_param", NULL }, + { "Op_push_lhs", NULL }, + { "Op_subscript_lhs", "[]" }, + { "Op_field_spec_lhs", "$" }, + { "Op_no_op", NULL }, + { "Op_pop", NULL }, + { "Op_jmp", NULL }, + { "Op_jmp_true", NULL }, + { "Op_jmp_false", NULL }, + { "Op_get_record", NULL }, + { "Op_newfile", NULL }, + { "Op_arrayfor_init", NULL }, + { "Op_arrayfor_incr", NULL }, + { "Op_arrayfor_final", NULL }, + { "Op_var_update", NULL }, + { "Op_var_assign", NULL }, + { "Op_field_assign", NULL }, + { "Op_after_beginfile", NULL }, + { "Op_after_endfile", NULL }, + { "Op_ext_func", NULL }, + { "Op_func", NULL }, + { "Op_exec_count", NULL }, + { "Op_breakpoint", NULL }, + { "Op_lint", NULL }, + { "Op_atexit", NULL }, + { "Op_stop", NULL }, + { "Op_token", NULL }, + { "Op_symbol", NULL }, + { "Op_list", NULL }, + { "Op_K_do", "do" }, + { "Op_K_for", "for" }, + { "Op_K_arrayfor", "for" }, + { "Op_K_while", "while" }, + { "Op_K_switch", "switch" }, + { "Op_K_if", "if" }, + { "Op_K_else", "else" }, + { "Op_K_function", "function" }, + { "Op_cond_exp", NULL }, + { "Op_final --- this should never appear", NULL }, + { NULL, NULL }, +}; + /* nodetype2str --- convert a node type into a printable value */ const char * @@ -373,6 +413,32 @@ return buf; } +/* opcode2str --- convert a opcode type into a printable value */ + +const char * +opcode2str(OPCODE op) +{ + if (op >= Op_illegal && op < Op_final) + return optypes[(int) op].desc; + fatal(_("unknown opcode %d"), (int) op); + return NULL; +} + +const char * +op2str(OPCODE op) +{ + if (op >= Op_illegal && op < Op_final) { + if (optypes[(int) op].operator != NULL) + return optypes[(int) op].operator; + else + fatal(_("opcode %s not an operator or keyword"), + optypes[(int) op].desc); + } else + fatal(_("unknown opcode %d"), (int) op); + return NULL; +} + + /* flags2str --- make a flags value readable */ const char * @@ -380,7 +446,6 @@ { static const struct flagtab values[] = { { MALLOC, "MALLOC" }, - { TEMP, "TEMP" }, { PERM, "PERM" }, { STRING, "STRING" }, { STRCUR, "STRCUR" }, @@ -391,6 +456,7 @@ { FUNC, "FUNC" }, { FIELD, "FIELD" }, { INTLSTR, "INTLSTR" }, + { NUMIND, "NUMIND" }, #ifdef WSTRCUR { WSTRCUR, "WSTRCUR" }, #endif @@ -435,545 +501,717 @@ return buffer; } -/* - * make_scalar --- make sure that tree is a scalar. - * - * tree is in a scalar context. If it is a variable, accomplish - * what's needed; otherwise, do nothing. - * - * Notice that nodes of type Node_var_new have undefined value in var_value - * (a.k.a. lnode)---even though awkgram.y:variable() initializes it, - * push_args() doesn't. Thus we have to initialize it. - */ - -static inline void -make_scalar(NODE *tree) -{ - switch (tree->type) { - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - array_vname(tree)); - - case Node_array_ref: - switch (tree->orig_array->type) { - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - array_vname(tree)); - case Node_var_new: - tree->orig_array->type = Node_var; - tree->orig_array->var_value = Nnull_string; - break; - case Node_var: - break; - default: - cant_happen(); - } - /* fall through */ - case Node_var_new: - tree->type = Node_var; - tree->var_value = Nnull_string; - default: - /* shut up GCC */ - break; - } -} +/* posix_compare --- compare strings using strcoll */ -/* - * interpret: - * Tree is a bunch of rules to run. Returns zero if it hit an exit() - * statement - */ -int -interpret(register NODE *volatile tree) +static int +posix_compare(NODE *s1, NODE *s2) { - jmp_buf volatile loop_tag_stack; /* shallow binding stack for loop_tag */ - static jmp_buf rule_tag; /* tag the rule currently being run, for NEXT - * and EXIT statements. It is static because - * there are no nested rules */ - register NODE *volatile t = NULL; /* temporary */ - NODE **volatile lhs; /* lhs == Left Hand Side for assigns, etc */ - NODE *volatile stable_tree; - int volatile traverse = TRUE; /* True => loop thru tree (Node_rule_list) */ - - /* avoid false source indications */ - source = NULL; - sourceline = 0; - - if (tree == NULL) - return 1; - sourceline = tree->source_line; - source = tree->source_file; - switch (tree->type) { - case Node_rule_node: - traverse = FALSE; /* False => one for-loop iteration only */ - /* FALL THROUGH */ - case Node_rule_list: - for (t = tree; t != NULL; t = t->rnode) { - if (traverse) - tree = t->lnode; - sourceline = tree->source_line; - source = tree->source_file; - INCREMENT(tree->exec_count); - switch (setjmp(rule_tag)) { - case 0: /* normal non-jump */ - /* test pattern, if any */ - if (tree->lnode == NULL || - eval_condition(tree->lnode)) { - /* using the lnode exec_count is kludgey */ - if (tree->lnode != NULL) - INCREMENT(tree->lnode->exec_count); - (void) interpret(tree->rnode); - } - break; - case TAG_CONTINUE: /* NEXT statement */ - pop_all_forloops(); - pop_fcall_stack(); - return 1; - case TAG_BREAK: /* EXIT statement */ - pop_all_forloops(); - pop_fcall_stack(); - return 0; - default: - cant_happen(); - } - if (! traverse) /* case Node_rule_node */ - break; /* don't loop */ - } - break; + int ret = 0; + char save1, save2; + size_t l = 0; - case Node_statement_list: - for (t = tree; t != NULL; t = t->rnode) - (void) interpret(t->lnode); - break; + save1 = s1->stptr[s1->stlen]; + s1->stptr[s1->stlen] = '\0'; - case Node_K_if: - INCREMENT(tree->exec_count); - if (eval_condition(tree->lnode)) { - INCREMENT(tree->rnode->exec_count); - (void) interpret(tree->rnode->lnode); - } else { - (void) interpret(tree->rnode->rnode); - } - break; + save2 = s2->stptr[s2->stlen]; + s2->stptr[s2->stlen] = '\0'; - case Node_K_switch: - { - NODE *switch_value; - NODE *switch_body; - NODE *case_list; - NODE *default_list; - NODE *case_stmt; - - int match_found = FALSE; - - PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - INCREMENT(tree->exec_count); - stable_tree = tree; - - switch_value = tree_eval(stable_tree->lnode); - switch_body = stable_tree->rnode; - case_list = switch_body->lnode; - default_list = switch_body->rnode; + if (gawk_mb_cur_max == 1) { + if (strlen(s1->stptr) == s1->stlen && strlen(s2->stptr) == s2->stlen) + ret = strcoll(s1->stptr, s2->stptr); + else { + char b1[2], b2[2]; + char *p1, *p2; + size_t i; - for (; case_list != NULL; case_list = case_list->rnode) { - case_stmt = case_list->lnode; + if (s1->stlen < s2->stlen) + l = s1->stlen; + else + l = s2->stlen; - /* - * Once a match is found, all cases will be processed as they fall through, - * so continue to execute statements until a break is reached. - */ - if (! match_found) { - if (case_stmt->type == Node_K_default) - ; /* do nothing */ - else if (case_stmt->lnode->type == Node_regex) { - NODE *t1; - Regexp *rp; - /* see comments in match_op() code about this. */ - int kludge_need_start = 0; - - t1 = force_string(switch_value); - rp = re_update(case_stmt->lnode); - - if (avoid_dfa(tree, t1->stptr, t1->stlen)) - kludge_need_start = RE_NEED_START; - match_found = (research(rp, t1->stptr, 0, t1->stlen, kludge_need_start) >= 0); - if (t1 != switch_value) - free_temp(t1); - } else - match_found = (cmp_nodes(switch_value, case_stmt->lnode) == 0); - } - - /* If a match was found, execute the statements associated with the case. */ - if (match_found) { - INCREMENT(case_stmt->exec_count); - switch (setjmp(loop_tag)) { - case 0: /* Normal non-jump */ - (void) interpret(case_stmt->rnode); - break; - case TAG_CONTINUE: /* continue statement */ - free_temp(switch_value); - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - longjmp(loop_tag, TAG_CONTINUE); - break; - case TAG_BREAK: /* break statement */ - free_temp(switch_value); - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - return 1; - default: - cant_happen(); - } + b1[1] = b2[1] = '\0'; + for (i = ret = 0, p1 = s1->stptr, p2 = s2->stptr; + ret == 0 && i < l; + p1++, p2++) { + b1[0] = *p1; + b2[0] = *p2; + ret = strcoll(b1, b2); } - } - - free_temp(switch_value); - /* - * If a default section was found, execute the statements associated with it - * and execute any trailing case statements if the default falls through. + * Either worked through the strings or ret != 0. + * In either case, ret will be the right thing to return. */ - if (! match_found && default_list != NULL) { - for (case_list = default_list; - case_list != NULL; case_list = case_list->rnode) { - case_stmt = case_list->lnode; - - INCREMENT(case_stmt->exec_count); - switch (setjmp(loop_tag)) { - case 0: /* Normal non-jump */ - (void) interpret(case_stmt->rnode); - break; - case TAG_CONTINUE: /* continue statement */ - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - longjmp(loop_tag, TAG_CONTINUE); - break; - case TAG_BREAK: /* break statement */ - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - return 1; - default: - cant_happen(); - } - } - } - - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - } - break; - - case Node_K_while: - PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); + } +#if MBS_SUPPORT + else { + /* Similar logic, using wide characters */ + (void) force_wstring(s1); + (void) force_wstring(s2); - stable_tree = tree; - while (eval_condition(stable_tree->lnode)) { - INCREMENT(stable_tree->exec_count); - switch (setjmp(loop_tag)) { - case 0: /* normal non-jump */ - (void) interpret(stable_tree->rnode); - break; - case TAG_CONTINUE: /* continue statement */ - break; - case TAG_BREAK: /* break statement */ - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - return 1; - default: - cant_happen(); - } - } - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - break; + if (wcslen(s1->wstptr) == s1->wstlen && wcslen(s2->wstptr) == s2->wstlen) + ret = wcscoll(s1->wstptr, s2->wstptr); + else { + wchar_t b1[2], b2[2]; + wchar_t *p1, *p2; + size_t i; - case Node_K_do: - PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - stable_tree = tree; - do { - INCREMENT(stable_tree->exec_count); - switch (setjmp(loop_tag)) { - case 0: /* normal non-jump */ - (void) interpret(stable_tree->rnode); - break; - case TAG_CONTINUE: /* continue statement */ - break; - case TAG_BREAK: /* break statement */ - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - return 1; - default: - cant_happen(); - } - } while (eval_condition(stable_tree->lnode)); - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - break; + if (s1->wstlen < s2->wstlen) + l = s1->wstlen; + else + l = s2->wstlen; - case Node_K_for: - PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - (void) interpret(tree->forloop->init); - stable_tree = tree; - while (eval_condition(stable_tree->forloop->cond)) { - INCREMENT(stable_tree->exec_count); - switch (setjmp(loop_tag)) { - case 0: /* normal non-jump */ - (void) interpret(stable_tree->lnode); - /* fall through */ - case TAG_CONTINUE: /* continue statement */ - (void) interpret(stable_tree->forloop->incr); - break; - case TAG_BREAK: /* break statement */ - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - return 1; - default: - cant_happen(); + b1[1] = b2[1] = L'\0'; + for (i = ret = 0, p1 = s1->wstptr, p2 = s2->wstptr; + ret == 0 && i < l; + p1++, p2++) { + b1[0] = *p1; + b2[0] = *p2; + ret = wcscoll(b1, b2); } } - RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); - break; + /* + * Either worked through the strings or ret != 0. + * In either case, ret will be the right thing to return. + */ + } +#endif - case Node_K_arrayfor: - { - Func_ptr after_assign = NULL; - NODE **list = NULL; - NODE *volatile array; - NODE *volatile save_array; - volatile size_t i, num_elems; - size_t j; - volatile int retval = 0; - int sort_indices = whiny_users; - -#define hakvar forloop->init -#define arrvar forloop->incr - /* get the array */ - save_array = tree->arrvar; - array = get_array(save_array); - - /* sanity: do nothing if empty */ - if (array->var_array == NULL || array->table_size == 0) - break; /* from switch */ - - /* allocate space for array */ - num_elems = array->table_size; - emalloc(list, NODE **, num_elems * sizeof(NODE *), "for_loop"); - - /* populate it */ - for (i = j = 0; i < array->array_size; i++) { - NODE *t = array->var_array[i]; - - if (t == NULL) - continue; - - for (; t != NULL; t = t->ahnext) { - list[j++] = dupnode(t); - assert(list[j-1] == t); - } - } + s1->stptr[s1->stlen] = save1; + s2->stptr[s2->stlen] = save2; + return ret; +} - if (sort_indices) - 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); - stable_tree = tree; - for (i = 0; i < num_elems; i++) { - INCREMENT(stable_tree->exec_count); - unref(*((NODE **) lhs)); - *lhs = make_string(list[i]->ahname_str, list[i]->ahname_len); - if (after_assign) - (*after_assign)(); - switch (setjmp(loop_tag)) { - case 0: - (void) interpret(stable_tree->lnode); - case TAG_CONTINUE: - break; +/* cmp_nodes --- compare two nodes, returning negative, 0, positive */ - case TAG_BREAK: - retval = 1; - goto done; +int +cmp_nodes(NODE *t1, NODE *t2) +{ + int ret = 0; + size_t len1, len2; + int l, ldiff; - default: - cant_happen(); - } - } + if (t1 == t2) + return 0; - 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 %ld to %ld during loop execution"), - array_vname(save_array), (long) num_elems, (long) array->table_size); - - if (retval == 1) - return 1; - break; - } -#undef hakvar -#undef arrvar + if (t1->flags & MAYBE_NUM) + (void) force_number(t1); + if (t2->flags & MAYBE_NUM) + (void) force_number(t2); + if ((t1->flags & NUMBER) && (t2->flags & NUMBER)) { + if (t1->numbr == t2->numbr) + ret = 0; + /* don't subtract, in case one or both are infinite */ + else if (t1->numbr < t2->numbr) + ret = -1; + else + ret = 1; + return ret; + } - case Node_K_break: - INCREMENT(tree->exec_count); - if (! loop_tag_valid) { - /* - * Old AT&T nawk treats break outside of loops like - * next. New ones catch it at parse time. Allow it if - * do_traditional is on, and complain if lint. - */ - static short warned = FALSE; + (void) force_string(t1); + (void) force_string(t2); + len1 = t1->stlen; + len2 = t2->stlen; + ldiff = len1 - len2; + if (len1 == 0 || len2 == 0) + return ldiff; - if (do_lint && ! warned) { - lintwarn(_("`break' outside a loop is not portable")); - warned = TRUE; - } - if (! do_traditional || do_posix) - fatal(_("`break' outside a loop is not allowed")); - longjmp(rule_tag, TAG_CONTINUE); - } else - longjmp(loop_tag, TAG_BREAK); - break; + if (do_posix) + return posix_compare(t1, t2); - case Node_K_continue: - INCREMENT(tree->exec_count); - if (! loop_tag_valid) { - /* - * Old AT&T nawk treats continue outside of loops like - * next. New ones catch it at parse time. Allow it if - * do_traditional is on, and complain if lint. - */ - static short warned = FALSE; + l = (ldiff <= 0 ? len1 : len2); + if (IGNORECASE) { + const unsigned char *cp1 = (const unsigned char *) t1->stptr; + const unsigned char *cp2 = (const unsigned char *) t2->stptr; - if (do_lint && ! warned) { - lintwarn(_("`continue' outside a loop is not portable")); - warned = TRUE; - } - if (! do_traditional || do_posix) - fatal(_("`continue' outside a loop is not allowed")); - longjmp(rule_tag, TAG_CONTINUE); +#if MBS_SUPPORT + if (gawk_mb_cur_max > 1) { + ret = strncasecmpmbs((const unsigned char *) cp1, + (const unsigned char *) cp2, l); } else - longjmp(loop_tag, TAG_CONTINUE); - break; - - case Node_K_print: - INCREMENT(tree->exec_count); - do_print(tree); - break; +#endif + /* Could use tolower() here; see discussion above. */ + for (ret = 0; l-- > 0 && ret == 0; cp1++, cp2++) + ret = casetable[*cp1] - casetable[*cp2]; + } else + ret = memcmp(t1->stptr, t2->stptr, l); + return (ret == 0 ? ldiff : ret); +} - 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); - break; +#if defined(PROFILING) || defined(DEBUGGING) +static void +push_frame(NODE *f) +{ + static long max_fcall; - case Node_K_delete: - INCREMENT(tree->exec_count); - do_delete(tree->lnode, tree->rnode); - break; + /* NB: frame numbering scheme as in GDB. frame_ptr => frame #0. */ - case Node_K_delete_loop: - INCREMENT(tree->exec_count); - do_delete_loop(tree->lnode, tree->rnode); - break; + fcall_count++; + if (fcall_list == NULL) { + max_fcall = 10; + emalloc(fcall_list, NODE **, (max_fcall + 1) * sizeof(NODE *), "push_frame"); + } else if (fcall_count == max_fcall) { + max_fcall *= 2; + erealloc(fcall_list, NODE **, (max_fcall + 1) * sizeof(NODE *), "push_frame"); + } - case Node_K_next: - INCREMENT(tree->exec_count); - if (in_begin_rule) - fatal(_("`next' cannot be called from a BEGIN rule")); - else if (in_end_rule) - fatal(_("`next' cannot be called from an END rule")); + if (fcall_count > 1) + memmove(fcall_list + 2, fcall_list + 1, (fcall_count - 1) * sizeof(NODE *)); + fcall_list[1] = f; +} - /* could add a lint check here for in a loop or function */ - longjmp(rule_tag, TAG_CONTINUE); - break; +static void +pop_frame() +{ +#ifdef DEBUGGING + extern void frame_popped(); +#endif + if (fcall_count > 1) + memmove(fcall_list + 1, fcall_list + 2, (fcall_count - 1) * sizeof(NODE *)); + fcall_count--; + assert(fcall_count >= 0); +#ifdef DEBUGGING + frame_popped(); +#endif +} +#else /* not PROFILING or DEBUGGING */ +#define push_frame(p) /* nothing */ +#define pop_frame() /* nothing */ +#endif - case Node_K_nextfile: - INCREMENT(tree->exec_count); - if (in_begin_rule) - fatal(_("`nextfile' cannot be called from a BEGIN rule")); - else if (in_end_rule) - fatal(_("`nextfile' cannot be called from an END rule")); - /* 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). - */ - pop_all_forloops(); - pop_fcall_stack(); +#ifdef PROFILING - do_nextfile(); - break; +/* dump_fcall_stack --- print a backtrace of the awk function calls */ - case Node_K_exit: - INCREMENT(tree->exec_count); - /* - * In A,K,&W, p. 49, it says that an exit statement "... - * causes the program to behave as if the end of input had - * occurred; no more input is read, and the END actions, if - * any are executed." This implies that the rest of the rules - * are not done. So we immediately break out of the main loop. - */ - exiting = TRUE; - if (tree->lnode != NULL) { - t = tree_eval(tree->lnode); - exit_val = (int) force_number(t); -#ifdef VMS - if (exit_val == 0) - exit_val = EXIT_SUCCESS; - else if (exit_val == 1) - exit_val = EXIT_FAILURE; - /* else - just pass anything else on through */ -#endif - free_temp(t); - } - longjmp(rule_tag, TAG_BREAK); - break; +void +dump_fcall_stack(FILE *fp) +{ + NODE *f, *func; + long i = 0; - case Node_K_return: - INCREMENT(tree->exec_count); - t = tree_eval(tree->lnode); - if ((t->flags & (PERM|TEMP)) != 0) - ret_node = t; - else { - ret_node = copynode(t); /* don't do a dupnode here */ - ret_node->flags |= TEMP; - } - longjmp(func_tag, TAG_RETURN); - break; + if (fcall_count == 0) + return; + fprintf(fp, _("\n\t# Function Call Stack:\n\n")); - default: - /* - * Appears to be an expression statement. Throw away the - * value. - */ - if (do_lint && (tree->type == Node_var || tree->type == Node_var_new)) - lintwarn(_("statement has no effect")); - INCREMENT(tree->exec_count); - t = tree_eval(tree); - if (t) /* stopme() returns NULL */ - free_temp(t); - break; + /* current frame */ + func = frame_ptr->func_node; + fprintf(fp, "\t# %3ld. %s\n", i, func->lnode->param); + + /* outer frames except main */ + for (i = 1; i < fcall_count; i++) { + f = fcall_list[i]; + func = f->func_node; + fprintf(fp, "\t# %3ld. %s\n", i, func->lnode->param); } - return 1; + + fprintf(fp, "\t# %3ld. -- main --\n", fcall_count); } -/* - * calc_exp_posint --- calculate x^n for positive integral n, - * using exponentiation by squaring without recursion. - */ +#endif /* PROFILING */ -static AWKNUM -calc_exp_posint(AWKNUM x, long n) +/* set_IGNORECASE --- update IGNORECASE as appropriate */ + +void +set_IGNORECASE() { - AWKNUM mult = 1; + static short warned = FALSE; - while (n > 1) { - if ((n % 2) == 1) - mult *= x; - x *= x; - n /= 2; + if ((do_lint || do_traditional) && ! warned) { + warned = TRUE; + lintwarn(_("`IGNORECASE' is a gawk extension")); + } + load_casetable(); + if (do_traditional) + IGNORECASE = FALSE; + 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 & (NUMCUR|NUMBER)) != 0) + IGNORECASE = (force_number(IGNORECASE_node->var_value) != 0.0); + else + IGNORECASE = FALSE; /* shouldn't happen */ + + set_RS(); /* set_RS() calls set_FS() if need be, for us */ +} + +/* set_BINMODE --- set translation mode (OS/2, DOS, others) */ + +void +set_BINMODE() +{ + static short warned = FALSE; + char *p; + NODE *v; + + if ((do_lint || do_traditional) && ! warned) { + warned = TRUE; + lintwarn(_("`BINMODE' is a gawk extension")); + } + if (do_traditional) + BINMODE = 0; + else if ((BINMODE_node->var_value->flags & NUMBER) != 0) { + BINMODE = (int) force_number(BINMODE_node->var_value); + /* Make sure the value is rational. */ + if (BINMODE < 0) + BINMODE = 0; + else if (BINMODE > 3) + BINMODE = 3; + } + else if ((BINMODE_node->var_value->flags & STRING) != 0) { + v = BINMODE_node->var_value; + p = v->stptr; + + /* + * Allow only one of the following: + * "0", "1", "2", "3", + * "r", "w", "rw", "wr" + * ANYTHING ELSE goes to 3. So there. + */ + switch (v->stlen) { + case 1: + switch (p[0]) { + case '0': + case '1': + case '2': + case '3': + BINMODE = p[0] - '0'; + break; + case 'r': + BINMODE = 1; + break; + case 'w': + BINMODE = 2; + break; + default: + BINMODE = 3; + goto bad_value; + break; + } + break; + case 2: + switch (p[0]) { + case 'r': + BINMODE = 3; + if (p[1] != 'w') + goto bad_value; + break; + case 'w': + BINMODE = 3; + if (p[1] != 'r') + goto bad_value; + break; + break; + default: + bad_value: + lintwarn(_("BINMODE value `%s' is invalid, treated as 3"), p); + break; + } + } + } + else + BINMODE = 3; /* shouldn't happen */ +} + +/* set_OFS --- update OFS related variables when OFS assigned to */ + +void +set_OFS() +{ + OFS = force_string(OFS_node->var_value)->stptr; + OFSlen = OFS_node->var_value->stlen; + OFS[OFSlen] = '\0'; +} + +/* set_ORS --- update ORS related variables when ORS assigned to */ + +void +set_ORS() +{ + ORS = force_string(ORS_node->var_value)->stptr; + ORSlen = ORS_node->var_value->stlen; + ORS[ORSlen] = '\0'; +} + +/* fmt_ok --- is the conversion format a valid one? */ + +NODE **fmt_list = NULL; +static int fmt_ok(NODE *n); +static int fmt_index(NODE *n); + +static int +fmt_ok(NODE *n) +{ + NODE *tmp = force_string(n); + const char *p = tmp->stptr; +#if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1 + static const char float_formats[] = "efgEG"; +#else + static const char float_formats[] = "efgEFG"; +#endif +#if defined(HAVE_LOCALE_H) + static const char flags[] = " +-#'"; +#else + static const char flags[] = " +-#"; +#endif + + if (*p++ != '%') + return 0; + while (*p && strchr(flags, *p) != NULL) /* flags */ + p++; + while (*p && isdigit((unsigned char) *p)) /* width - %*.*g is NOT allowed */ + p++; + if (*p == '\0' || (*p != '.' && ! isdigit((unsigned char) *p))) + return 0; + if (*p == '.') + p++; + while (*p && isdigit((unsigned char) *p)) /* precision */ + p++; + if (*p == '\0' || strchr(float_formats, *p) == NULL) + return 0; + if (*++p != '\0') + return 0; + return 1; +} + +/* fmt_index --- track values of OFMT and CONVFMT to keep semantics correct */ + +static int +fmt_index(NODE *n) +{ + int ix = 0; + static int fmt_num = 4; + static int fmt_hiwater = 0; + + if (fmt_list == NULL) + emalloc(fmt_list, NODE **, fmt_num*sizeof(*fmt_list), "fmt_index"); + (void) force_string(n); + while (ix < fmt_hiwater) { + if (cmp_nodes(fmt_list[ix], n) == 0) + return ix; + ix++; + } + /* not found */ + n->stptr[n->stlen] = '\0'; + if (do_lint && ! fmt_ok(n)) + lintwarn(_("bad `%sFMT' specification `%s'"), + n == CONVFMT_node->var_value ? "CONV" + : n == OFMT_node->var_value ? "O" + : "", n->stptr); + + if (fmt_hiwater >= fmt_num) { + fmt_num *= 2; + erealloc(fmt_list, NODE **, fmt_num * sizeof(*fmt_list), "fmt_index"); + } + fmt_list[fmt_hiwater] = dupnode(n); + return fmt_hiwater++; +} + +/* set_OFMT --- track OFMT correctly */ + +void +set_OFMT() +{ + OFMTidx = fmt_index(OFMT_node->var_value); + OFMT = fmt_list[OFMTidx]->stptr; +} + +/* set_CONVFMT --- track CONVFMT correctly */ + +void +set_CONVFMT() +{ + CONVFMTidx = fmt_index(CONVFMT_node->var_value); + CONVFMT = fmt_list[CONVFMTidx]->stptr; +} + +/* set_LINT --- update LINT as appropriate */ + +void +set_LINT() +{ +#ifndef NO_LINT + int old_lint = do_lint; + + if ((LINT_node->var_value->flags & (STRING|STRCUR)) != 0) { + if ((LINT_node->var_value->flags & MAYBE_NUM) == 0) { + 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 { + 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 */ + + if (! do_lint) + lintfunc = warning; + + /* explicitly use warning() here, in case lintfunc == r_fatal */ + 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 */ + +void +set_TEXTDOMAIN() +{ + int len; + + TEXTDOMAIN = force_string(TEXTDOMAIN_node->var_value)->stptr; + len = TEXTDOMAIN_node->var_value->stlen; + TEXTDOMAIN[len] = '\0'; + /* + * Note: don't call textdomain(); this value is for + * the awk program, not for gawk itself. + */ +} + +/* update_ERRNO_saved --- update the value of ERRNO based on argument */ + +void +update_ERRNO_saved(int errcode) +{ + char *cp; + + if (errcode) { + cp = strerror(errcode); + cp = gettext(cp); + } else + cp = ""; + unref(ERRNO_node->var_value); + ERRNO_node->var_value = make_string(cp, strlen(cp)); +} + +/* update_ERRNO --- update the value of ERRNO based on errno */ + +void +update_ERRNO() +{ + update_ERRNO_saved(errno); +} + +/* update_NR --- update the value of NR */ + +void +update_NR() +{ + if (NR_node->var_value->numbr != NR) { + unref(NR_node->var_value); + NR_node->var_value = make_number((AWKNUM) NR); + } +} + +/* update_NF --- update the value of NF */ + +void +update_NF() +{ + if (NF == -1 || NF_node->var_value->numbr != NF) { + if (NF == -1) + (void) get_field(UNLIMITED - 1, NULL); /* parse record */ + unref(NF_node->var_value); + NF_node->var_value = make_number((AWKNUM) NF); + } +} + +/* update_FNR --- update the value of FNR */ + +void +update_FNR() +{ + if (FNR_node->var_value->numbr != FNR) { + unref(FNR_node->var_value); + FNR_node->var_value = make_number((AWKNUM) FNR); + } +} + + + +NODE *frame_ptr; /* current frame */ +STACK_ITEM *stack_ptr = NULL; +STACK_ITEM *stack_bottom; +STACK_ITEM *stack_top; +static unsigned long STACK_SIZE = 256; /* initial size of stack */ +int max_args = 0; /* maximum # of arguments to printf, print, sprintf, + * or # of array subscripts, or adjacent strings + * to be concatenated. + */ +NODE **args_array = NULL; + +/* grow_stack --- grow the size of runtime stack */ + +/* N.B. stack_ptr points to the topmost occupied location + * on the stack, not the first free location. + */ + +STACK_ITEM * +grow_stack() +{ + if (stack_ptr == NULL) { + char *val; + + if ((val = getenv("GAWK_STACKSIZE")) != NULL) { + if (isdigit((unsigned char) *val)) { + unsigned long n = 0; + for (; *val && isdigit((unsigned char) *val); val++) + n = (n * 10) + *val - '0'; + if (n >= 1) + STACK_SIZE = n; + } + } + + emalloc(stack_bottom, STACK_ITEM *, STACK_SIZE * sizeof(STACK_ITEM), "grow_stack"); + stack_ptr = stack_bottom - 1; + stack_top = stack_bottom + STACK_SIZE - 1; + + /* initialize frame pointer */ + getnode(frame_ptr); + frame_ptr->type = Node_frame; + frame_ptr->stack = NULL; + frame_ptr->func_node = NULL; /* in main */ + frame_ptr->vname = NULL; + return stack_ptr; + } + + STACK_SIZE *= 2; + erealloc(stack_bottom, STACK_ITEM *, STACK_SIZE * sizeof(STACK_ITEM), "grow_stack"); + stack_top = stack_bottom + STACK_SIZE - 1; + stack_ptr = stack_bottom + STACK_SIZE / 2; + return stack_ptr; +} + +/* + * r_get_lhs: + * This returns a POINTER to a node pointer (var's value). + * used to store the var's new value. + */ + +NODE ** +r_get_lhs(NODE *n, int reference) +{ + int isparam = FALSE; + + if (n->type == Node_param_list) { + if ((n->flags & FUNC) != 0) + fatal(_("can't use function name `%s' as variable or array"), + n->vname); + isparam = TRUE; + n = GET_PARAM(n->param_cnt); + } + + switch (n->type) { + case Node_var_array: + fatal(_("attempt to use array `%s' in a scalar context"), + array_vname(n)); + case Node_array_ref: + if (n->orig_array->type == Node_var_array) + fatal(_("attempt to use array `%s' in a scalar context"), + array_vname(n)); + n->orig_array->type = Node_var; + n->orig_array->var_value = Nnull_string; + /* fall through */ + case Node_var_new: + n->type = Node_var; + n->var_value = Nnull_string; + break; + + case Node_var: + break; + + default: + cant_happen(); + } + + if (do_lint && reference && var_uninitialized(n)) + lintwarn((isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'")), + n->vname); + return &n->var_value; +} + + +/* r_get_field --- get the address of a field node */ + +static inline NODE ** +r_get_field(NODE *n, Func_ptr *assign, int reference) +{ + long field_num; + NODE **lhs; + + if (assign) + *assign = NULL; + if (do_lint) { + if ((n->flags & NUMBER) == 0) { + lintwarn(_("attempt to field reference from non-numeric value")); + if (n->stlen == 0) + lintwarn(_("attempt to field reference from null string")); + } + } + + field_num = (long) force_number(n); + if (field_num < 0) + fatal(_("attempt to access field %ld"), field_num); + + if (field_num == 0 && field0_valid) { /* short circuit */ + lhs = &fields_arr[0]; + if (assign) + *assign = reset_record; + } else + lhs = get_field(field_num, assign); + if (do_lint && reference && (*lhs == Null_field || *lhs == Nnull_string)) + lintwarn(_("reference to uninitialized field `$%ld'"), + field_num); + return lhs; +} + + +/* + * calc_exp_posint --- calculate x^n for positive integral n, + * using exponentiation by squaring without recursion. + */ + +static AWKNUM +calc_exp_posint(AWKNUM x, long n) +{ + AWKNUM mult = 1; + + while (n > 1) { + if ((n % 2) == 1) + mult *= x; + x *= x; + n /= 2; } return mult * x; } @@ -994,1593 +1232,1547 @@ return (AWKNUM) pow((double) x1, (double) x2); } -/* r_tree_eval --- evaluate a subtree */ -NODE * -r_tree_eval(register NODE *tree, int iscond) +/* setup_frame --- setup new frame for function call */ + +static INSTRUCTION * +setup_frame(INSTRUCTION *pc) { - register NODE *r, *t1, *t2; /* return value & temporary subtrees */ - register NODE **lhs; - register int di; - AWKNUM x, x1, x2; -#ifdef _CRAY - long lx2; -#endif + NODE *r = NULL; + NODE *m; + NODE *f; + NODE **sp = NULL; + char **varnames; + int pcount, arg_count, i; + + f = pc->func_body; + pcount = f->lnode->param_cnt; + varnames = f->parmlist; + arg_count = (pc + 1)->expr_count; -#ifndef TREE_EVAL_MACRO - if (tree == NULL) - cant_happen(); - if (tree->type == Node_val) { - if (tree->stref <= 0) - cant_happen(); - return ((tree->flags & INTLSTR) != 0 - ? r_force_string(tree) - : tree); - } else if (tree->type == Node_var) { - if (tree->var_value->stref <= 0) - cant_happen(); - if (! var_uninitialized(tree)) - return tree->var_value; + /* check for extra args */ + if (arg_count > pcount) { + warning( + _("function `%s' called with more arguments than declared"), + f->vname); + do { + r = POP(); + if (r->type == Node_val) + DEREF(r); + } while (--arg_count > pcount); } -#endif - - if (tree->type == Node_param_list) { - if ((tree->flags & FUNC) != 0) - fatal(_("can't use function name `%s' as variable or array"), - tree->vname); - tree = stack_ptr[tree->param_cnt]; + if (pcount > 0) { + emalloc(sp, NODE **, pcount * sizeof(NODE *), "setup_frame"); + memset(sp, 0, pcount * sizeof(NODE *)); + } - if (tree == NULL) { - if (do_lint) - lintwarn(_("reference to uninitialized argument `%s'"), - tree->vname); - return Nnull_string; + for (i = 0; i < pcount; i++) { + getnode(r); + memset(r, 0, sizeof(NODE)); + sp[i] = r; + if (i >= arg_count) { + /* local variable */ + r->type = Node_var_new; + r->vname = varnames[i]; + continue; } - if (do_lint && var_uninitialized(tree)) - lintwarn(_("reference to uninitialized argument `%s'"), - tree->vname); - } + m = PEEK(arg_count - i - 1); /* arguments in reverse order on runtime stack */ - make_scalar(tree); + if (m->type == Node_param_list) + m = GET_PARAM(m->param_cnt); + + switch (m->type) { + case Node_var_new: + case Node_var_array: + r->type = Node_array_ref; + r->orig_array = r->prev_array = m; + break; - switch (tree->type) { - case Node_var: - if (do_lint && var_uninitialized(tree)) - lintwarn(_("reference to uninitialized variable `%s'"), - tree->vname); - return tree->var_value; - - case Node_and: - return tmp_number((AWKNUM) (eval_condition(tree->lnode) - && eval_condition(tree->rnode))); - - case Node_or: - return tmp_number((AWKNUM) (eval_condition(tree->lnode) - || eval_condition(tree->rnode))); - - case Node_not: - return tmp_number((AWKNUM) ! eval_condition(tree->lnode)); - - /* Builtins */ - case Node_builtin: - 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) != NULL)); - - case Node_func_call: - return func_call(tree); - - /* unary operations */ - case Node_NR: - case Node_FNR: - case Node_NF: - case Node_FIELDWIDTHS: - case Node_FS: - case Node_RS: - case Node_field_spec: - case Node_subscript: - case Node_IGNORECASE: - case Node_OFS: - case Node_ORS: - case Node_OFMT: - case Node_CONVFMT: - case Node_BINMODE: - case Node_LINT: - case Node_SUBSEP: - case Node_TEXTDOMAIN: - lhs = get_lhs(tree, (Func_ptr *) NULL, TRUE); - return *lhs; - - case Node_unary_minus: - t1 = tree_eval(tree->subnode); - x = -force_number(t1); - free_temp(t1); - return tmp_number(x); - - case Node_cond_exp: - if (eval_condition(tree->lnode)) - return tree_eval(tree->rnode->lnode); - return tree_eval(tree->rnode->rnode); - - case Node_match: - case Node_nomatch: - case Node_regex: - case Node_dynregex: - return match_op(tree); + case Node_array_ref: + r->type = Node_array_ref; + r->orig_array = m->orig_array; + r->prev_array = m; + break; - case Node_concat: - { - NODE **treelist; - NODE **strlist; - NODE *save_tree; - register NODE **treep; - register NODE **strp; - register size_t len; - register size_t supposed_len; - char *str; - register char *dest; - int alloc_count, str_count; - int i; + case Node_var: + /* Untyped (Node_var_new) variable as param became a + * scalar during evaluation of expression for a + * subsequent param. + */ + r->type = Node_var; + r->var_value = Nnull_string; + break; - /* - * This is an efficiency hack for multiple adjacent string - * concatenations, to avoid recursion and string copies. - * - * Node_concat trees grow downward to the left, so - * descend to lowest (first) node, accumulating nodes - * to evaluate to strings as we go. - */ + case Node_val: + r->type = Node_var; + r->var_value = m; + break; - /* - * But first, no arbitrary limits. Count the number of - * nodes and malloc the treelist and strlist arrays. - * There will be alloc_count + 1 items to concatenate. We - * also leave room for an extra pointer at the end to - * use as a sentinel. Thus, start alloc_count at 2. - */ - save_tree = tree; - for (alloc_count = 2; tree != NULL && tree->type == Node_concat; - tree = tree->lnode) - alloc_count++; - tree = save_tree; - emalloc(treelist, NODE **, sizeof(NODE *) * alloc_count, "tree_eval"); - emalloc(strlist, NODE **, sizeof(NODE *) * alloc_count, "tree_eval"); - - /* Now, here we go. */ - treep = treelist; - while (tree != NULL && tree->type == Node_concat) { - *treep++ = tree->rnode; - tree = tree->lnode; + default: + cant_happen(); } - *treep = tree; - /* - * Now, evaluate to strings in LIFO order, accumulating - * the string length, so we can do a single malloc at the - * end. - * - * Evaluate the expressions first, then get their - * lengthes, in case one of the expressions has a - * side effect that changes one of the others. - * See test/nasty.awk. - * - * dupnode the results a la do_print, to give us - * more predicable behavior; compare gawk 3.0.6 to - * nawk/mawk on test/nasty.awk. - */ - strp = strlist; - supposed_len = len = 0; - while (treep >= treelist) { - NODE *n; - - /* Here lies the wumpus's brother. R.I.P. */ - n = force_string(tree_eval(*treep--)); - *strp = dupnode(n); - free_temp(n); - supposed_len += (*strp)->stlen; - strp++; - } - *strp = NULL; - - str_count = strp - strlist; - strp = strlist; - for (i = 0; i < str_count; i++) { - len += (*strp)->stlen; - strp++; - } - if (do_lint && supposed_len != len) - lintwarn(_("concatenation: side effects in one expression have changed the length of another!")); - emalloc(str, char *, len+2, "tree_eval"); - str[len] = str[len+1] = '\0'; /* for good measure */ - dest = str; - strp = strlist; - while (*strp != NULL) { - memcpy(dest, (*strp)->stptr, (*strp)->stlen); - dest += (*strp)->stlen; - unref(*strp); - strp++; - } - r = make_str_node(str, len, ALREADY_MALLOCED); - r->flags |= TEMP; - - free(strlist); - free(treelist); - } - return r; - - /* assignments */ - case Node_assign_concat: - { - Func_ptr after_assign = NULL; - NODE *l, *r, *t; + r->vname = varnames[i]; + } + stack_adj(-arg_count); /* adjust stack pointer */ - /* - * Note that something lovely like this: - * - * BEGIN { a = "a"; a = a (a = "b"); print a } - * - * is not defined. It could print `ab' or `bb'. - * Gawk 3.1.3 prints `ab', so we do that too, simply - * by evaluating the LHS first. Ugh. - * - * Thanks to mary1john@earthlink.net for pointing - * out this issue. - */ - lhs = get_lhs(tree->lnode, &after_assign, FALSE); - *lhs = force_string(*lhs); - l = *lhs; + if (pc->opcode == Op_indirect_func_call) { + r = POP(); /* indirect var */ + DEREF(r); + } - /* - * This is a hack. We temporarily increase the reference count - * on l in case evaluating r might change the original value - * of l. We have to be careful about reducing it afterwards. - * In particular, if the lhs changed during evaluation of the - * rhs, we have to compensate. - * - * See test/nasty.awk. - */ - t = dupnode(l); - r = force_string(tree_eval(tree->rnode)); + frame_ptr->vname = source; /* save current source */ - if (l != *lhs) { - /* - * Something happened to the original - * during the evaluation of the rhs. - */ - unref(*lhs); - *lhs = l; - } - else - unref(t); + push_frame(frame_ptr); - /* - * Don't clobber string constants! - * - * Also check stref; see test/strcat1.awk, - * the test for l->stref == 1 can't be an - * assertion. - * - * Thanks again to mary1john@earthlink.net for pointing - * out this issue. - */ - if (l != r && (l->flags & PERM) == 0 && l->stref == 1) { - size_t nlen = l->stlen + r->stlen + 2; + /* save current frame in stack */ + PUSH(frame_ptr); - erealloc(l->stptr, char *, nlen, "interpret"); - memcpy(l->stptr + l->stlen, r->stptr, r->stlen); - l->stlen += r->stlen; - l->stptr[l->stlen] = '\0'; - free_wstr(l); - } else { - char *nval; - size_t nlen = l->stlen + r->stlen + 2; + /* setup new frame */ + getnode(frame_ptr); + frame_ptr->type = Node_frame; + frame_ptr->stack = sp; + frame_ptr->prev_frame_size = (stack_ptr - stack_bottom); /* size of the previous stack frame */ + frame_ptr->func_node = f; + frame_ptr->vname = NULL; + frame_ptr->reti = pc; /* on return execute pc->nexti */ - emalloc(nval, char *, nlen, "interpret"); - memcpy(nval, l->stptr, l->stlen); - memcpy(nval + l->stlen, r->stptr, r->stlen); - unref(*lhs); - *lhs = make_str_node(nval, l->stlen + r->stlen, ALREADY_MALLOCED); - } - (*lhs)->flags &= ~(NUMCUR|NUMBER); - free_temp(r); + return f->code_ptr; +} - if (after_assign) - (*after_assign)(); - return *lhs; - } - 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); - if (after_assign) - (*after_assign)(); - return *lhs; - } - - /* other assignment types are easier because they are numeric */ - case Node_preincrement: - case Node_predecrement: - case Node_postincrement: - case Node_postdecrement: - case Node_assign_exp: - case Node_assign_times: - case Node_assign_quotient: - case Node_assign_mod: - case Node_assign_plus: - case Node_assign_minus: - return op_assign(tree); - default: - break; /* handled below */ - } +/* restore_frame --- clean up the stack and update frame */ - /* - * Evaluate subtrees in order to do binary operation, then keep going. - * Use dupnode to make sure that these values don't disappear out - * from under us during recursive subexpression evaluation. - */ - t1 = dupnode(tree_eval(tree->lnode)); - t2 = dupnode(tree_eval(tree->rnode)); +static INSTRUCTION * +restore_frame(NODE *fp) +{ + NODE *r; + NODE **sp; + int n; + NODE *func; + INSTRUCTION *ri; - switch (tree->type) { - case Node_geq: - case Node_leq: - case Node_greater: - case Node_less: - case Node_notequal: - case Node_equal: - di = cmp_nodes(t1, t2); - unref(t1); - unref(t2); - switch (tree->type) { - case Node_equal: - return tmp_number((AWKNUM) (di == 0)); - case Node_notequal: - return tmp_number((AWKNUM) (di != 0)); - case Node_less: - return tmp_number((AWKNUM) (di < 0)); - case Node_greater: - return tmp_number((AWKNUM) (di > 0)); - case Node_leq: - return tmp_number((AWKNUM) (di <= 0)); - case Node_geq: - return tmp_number((AWKNUM) (di >= 0)); - default: - cant_happen(); - } - break; - default: - break; /* handled below */ + func = frame_ptr->func_node; + n = func->lnode->param_cnt; + sp = frame_ptr->stack; + + for (; n > 0; n--) { + r = *sp++; + if (r->type == Node_var) /* local variable */ + DEREF(r->var_value); + else if (r->type == Node_var_array) /* local array */ + assoc_clear(r); + freenode(r); } + if (frame_ptr->stack != NULL) + efree(frame_ptr->stack); + ri = frame_ptr->reti; /* execution in calling frame + * resumes from ri->nexti. + */ + freenode(frame_ptr); + pop_frame(); - x1 = force_number(t1); - x2 = force_number(t2); - unref(t1); - unref(t2); - switch (tree->type) { - case Node_exp: - return tmp_number(calc_exp(x1, x2)); - - case Node_times: - return tmp_number(x1 * x2); - - case Node_quotient: - if (x2 == 0) - fatal(_("division by zero attempted")); -#ifdef _CRAY - /* special case for integer division, put in for Cray */ - lx2 = x2; - if (lx2 == 0) - return tmp_number(x1 / x2); - lx = (long) x1 / lx2; - if (lx * x2 == x1) - return tmp_number((AWKNUM) lx); - else -#endif - return tmp_number(x1 / x2); + /* restore frame */ + frame_ptr = fp; + /* restore source */ + source = fp->vname; + fp->vname = NULL; - case Node_mod: - if (x2 == 0) - fatal(_("division by zero attempted in `%%'")); -#ifdef HAVE_FMOD - return tmp_number(fmod(x1, x2)); -#else /* ! HAVE_FMOD */ - (void) modf(x1 / x2, &x); - return tmp_number(x1 - x * x2); -#endif /* ! HAVE_FMOD */ + return ri->nexti; +} - case Node_plus: - return tmp_number(x1 + x2); - case Node_minus: - return tmp_number(x1 - x2); +/* free_arrayfor --- free 'for (var in array)' related data */ - default: - fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type)); +static inline void +free_arrayfor(NODE *r) +{ + if (r->var_array != NULL) { + size_t num_elems = r->table_size; + NODE **list = r->var_array; + while (num_elems > 0) + unref(list[--num_elems]); + efree(list); } - return (NODE *) 0; + freenode(r); } -/* eval_condition --- is TREE true or false? Returns 0==false, non-zero==true */ -static int -eval_condition(register NODE *tree) +/* unwind_stack --- pop items off the run-time stack; + * 'n' is the # of items left in the stack. + */ + +INSTRUCTION * +unwind_stack(long n) { - register NODE *t1; - register int ret; + NODE *r; + INSTRUCTION *cp = NULL; + STACK_ITEM *sp; - if (tree == NULL) /* Null trees are the easiest kinds */ - return TRUE; - if (tree->type == Node_line_range) { - /* - * Node_line_range is kind of like Node_match, EXCEPT: the - * lnode field (more properly, the condpair field) is a node - * of a Node_cond_pair; whether we evaluate the lnode of that - * node or the rnode depends on the triggered word. More - * precisely: if we are not yet triggered, we tree_eval the - * lnode; if that returns true, we set the triggered word. - * If we are triggered (not ELSE IF, note), we tree_eval the - * rnode, clear triggered if it succeeds, and perform our - * action (regardless of success or failure). We want to be - * able to begin and end on a single input record, so this - * isn't an ELSE IF, as noted above. - */ - if (! tree->triggered) { - if (! eval_condition(tree->condpair->lnode)) - return FALSE; - else - tree->triggered = TRUE; + if (stack_empty()) + return NULL; + + sp = stack_bottom + n; + + if (stack_ptr < sp) + return NULL; + + while ((r = POP()) != NULL) { + switch (r->type) { + case Node_frame: + cp = restore_frame(r); + break; + case Node_arrayfor: + free_arrayfor(r); + break; + case Node_val: + DEREF(r); + break; + case Node_instruction: + freenode(r); + break; + default: + if (in_main_context()) + fatal(_("unwind_stack: unexpected type `%s'"), + nodetype2str(r->type)); + /* else + * Node_var_array, + * Node_param_list, + * Node_var (e.g: trying to use scalar for array) + * Node_regex/Node_dynregex + * ? + */ + break; } - /* Else we are triggered */ - if (eval_condition(tree->condpair->rnode)) - tree->triggered = FALSE; - return TRUE; - } - /* - * Could just be J.random expression. in which case, null and 0 are - * false, anything else is true - */ + if (stack_ptr < sp) + break; + } + return cp; +} - t1 = m_tree_eval(tree, TRUE); - if (t1->flags & MAYBE_NUM) - (void) force_number(t1); - if (t1->flags & NUMBER) - ret = (t1->numbr != 0.0); - else - ret = (t1->stlen != 0); - free_temp(t1); - return ret; -} -/* cmp_nodes --- compare two nodes, returning negative, 0, positive */ +/* pop_fcall --- pop off the innermost frame */ +#define pop_fcall() unwind_stack(frame_ptr->prev_frame_size) -int -cmp_nodes(register NODE *t1, register NODE *t2) -{ - register int ret; - register size_t len1, len2; - register int l; - int ldiff; +/* pop the run-time stack */ +#define pop_stack() (void) unwind_stack(0) - if (t1 == t2) - return 0; - if (t1->flags & MAYBE_NUM) - (void) force_number(t1); - if (t2->flags & MAYBE_NUM) - (void) force_number(t2); - if ((t1->flags & NUMBER) && (t2->flags & NUMBER)) { - if (t1->numbr == t2->numbr) - return 0; - /* don't subtract, in case one or both are infinite */ - else if (t1->numbr < t2->numbr) - return -1; - else - return 1; - } - (void) force_string(t1); - (void) force_string(t2); - len1 = t1->stlen; - len2 = t2->stlen; - ldiff = len1 - len2; - if (len1 == 0 || len2 == 0) - return ldiff; - l = (ldiff <= 0 ? len1 : len2); - if (IGNORECASE) { - const unsigned char *cp1 = (const unsigned char *) t1->stptr; - const unsigned char *cp2 = (const unsigned char *) t2->stptr; -#ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) { - mbstate_t mbs; - memset(&mbs, 0, sizeof(mbstate_t)); - ret = strncasecmpmbs((const char *) cp1, mbs, - (const char *) cp2, mbs, l); - } else -#endif - /* Could use tolower() here; see discussion above. */ - for (ret = 0; l-- > 0 && ret == 0; cp1++, cp2++) - ret = casetable[*cp1] - casetable[*cp2]; - } else - ret = memcmp(t1->stptr, t2->stptr, l); - return (ret == 0 ? ldiff : ret); -} +/* + * This generated compiler warnings from GCC 4.4. Who knows why. + * +#define eval_condition(t) (((t)->flags & MAYBE_NUM) && force_number(t), \ + ((t)->flags & NUMBER) ? ((t)->numbr != 0.0) : ((t)->stlen != 0)) +*/ -/* op_assign --- do +=, -=, etc. */ -static NODE * -op_assign(register NODE *tree) +static inline int +eval_condition(NODE *t) { - AWKNUM rval, lval; - NODE **lhs; - NODE *tmp; - Func_ptr after_assign = NULL; - int post = FALSE; + if ((t->flags & MAYBE_NUM) != 0) + force_number(t); - /* - * 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; + if ((t->flags & NUMBER) != 0) + return (t->numbr != 0.0); - lhs = get_lhs(tree->lnode, &after_assign, TRUE); - lval = force_number(*lhs); - unref(*lhs); + return (t->stlen != 0); +} - switch(tree->type) { - case Node_postincrement: - post = TRUE; - /* fall through */ - case Node_preincrement: - case Node_assign_plus: - *lhs = make_number(lval + rval); - break; +/* cmp_scalar -- compare two nodes on the stack */ - case Node_postdecrement: - post = TRUE; - /* fall through */ - case Node_predecrement: - case Node_assign_minus: - *lhs = make_number(lval - rval); - break; +static inline int +cmp_scalar() +{ + NODE *t1, *t2; + int di; - case Node_assign_exp: - *lhs = make_number(calc_exp(lval, rval)); - break; + t2 = POP_SCALAR(); + t1 = TOP(); + if (t1->type == Node_var_array) { + DEREF(t2); + fatal(_("attempt to use array `%s' in a scalar context"), array_vname(t1)); + } + di = cmp_nodes(t1, t2); + DEREF(t1); + DEREF(t2); + return di; +} - case Node_assign_times: - *lhs = make_number(lval * rval); - break; +/* op_assign --- assignment operators excluding = */ + +static void +op_assign(OPCODE op) +{ + NODE **lhs; + NODE *r = NULL; + AWKNUM x1, x2; +#ifndef HAVE_FMOD + AWKNUM x; +#endif - case Node_assign_quotient: - if (rval == (AWKNUM) 0) + lhs = POP_ADDRESS(); + x1 = force_number(*lhs); + TOP_NUMBER(x2); + unref(*lhs); + switch (op) { + case Op_assign_plus: + r = *lhs = make_number(x1 + x2); + break; + case Op_assign_minus: + r = *lhs = make_number(x1 - x2); + break; + case Op_assign_times: + r = *lhs = make_number(x1 * x2); + break; + case Op_assign_quotient: + if (x2 == (AWKNUM) 0) { + decr_sp(); fatal(_("division by zero attempted in `/='")); - { -#ifdef _CRAY - long ltemp; - - /* special case for integer division, put in for Cray */ - ltemp = rval; - if (ltemp == 0) { - *lhs = make_number(lval / rval); - break; } - ltemp = (long) lval / ltemp; - if (ltemp * lval == rval) - *lhs = make_number((AWKNUM) ltemp); - else -#endif /* _CRAY */ - *lhs = make_number(lval / rval); - } + r = *lhs = make_number(x1 / x2); break; - - case Node_assign_mod: - if (rval == (AWKNUM) 0) + case Op_assign_mod: + if (x2 == (AWKNUM) 0) { + decr_sp(); fatal(_("division by zero attempted in `%%='")); + } #ifdef HAVE_FMOD - *lhs = make_number(fmod(lval, rval)); -#else /* ! HAVE_FMOD */ - { - AWKNUM t1, t2; - - (void) modf(lval / rval, &t1); - t2 = lval - rval * t1; - *lhs = make_number(t2); - } -#endif /* ! HAVE_FMOD */ + r = *lhs = make_number(fmod(x1, x2)); +#else /* ! HAVE_FMOD */ + (void) modf(x1 / x2, &x); + x = x1 - x2 * x; + r = *lhs = make_number(x); +#endif /* ! HAVE_FMOD */ + break; + case Op_assign_exp: + r = *lhs = make_number((AWKNUM) calc_exp((double) x1, (double) x2)); break; - default: - cant_happen(); + break; } - if (after_assign) - (*after_assign)(); - - /* for postincrement or postdecrement, return the old value */ - return (post ? tmp_number(lval) : *lhs); + UPREF(r); + REPLACE(r); } -/* - * 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 */ +/* PUSH_CODE --- push a code onto the runtime stack */ + +void +PUSH_CODE(INSTRUCTION *cp) +{ + NODE *r; + getnode(r); + r->type = Node_instruction; + r->code_ptr = cp; + PUSH(r); +} -/* pop_forloop --- pop one for loop off the stack */ +/* POP_CODE --- pop a code off the runtime stack */ -static void -pop_forloop() +INSTRUCTION * +POP_CODE() { - int i, curloop; - struct loop_info *loop; + NODE *r; + INSTRUCTION *cp; + r = POP(); + cp = r->code_ptr; + freenode(r); + return cp; +} - assert(nloops_active > 0); - curloop = --nloops_active; /* 0-based indexing */ - loop = & loop_stack[curloop]; +/* Implementation of BEGINFILE and ENDFILE requires saving an execution + * state and the ability to return to that state. The state is + * defined by the instruction triggering the BEGINFILE/ENDFILE rule, the + * run-time stack, the rule and the source file. The source line is available in + * the instruction and hence is not considered a part of the execution state. + */ - for (i = 0; i < loop->nelems; i++) - unref(loop->elems[i]); - free(loop->elems); +typedef struct exec_state { + struct exec_state *next; - loop->elems = NULL; - loop->varname = NULL; - loop->nelems = 0; -} + INSTRUCTION *cptr; /* either getline (Op_K_getline) or the + * implicit "open-file, read-record" loop (Op_newfile). + */ -/* pop_forloops --- pop the for loops stack all the way */ + int rule; /* rule for the INSTRUCTION */ -static inline void -pop_all_forloops() -{ - while (nloops_active > 0) - pop_forloop(); /* decrements nloops_active for us */ -} + long stack_size; /* For this particular usage, it is sufficient to save + * only the size of the call stack. We do not + * store the actual stack pointer to avoid problems + * in case the stack gets realloc-ed. + */ -/* push_forloop --- add a single for loop to the stack */ + const char *source; /* source file for the INSTRUCTION */ +} EXEC_STATE; + +static EXEC_STATE exec_state_stack; + +/* push_exec_state --- save an execution state on stack */ static void -push_forloop(const char *varname, NODE **elems, size_t nelems) +push_exec_state(INSTRUCTION *cp, int rule, char *src, STACK_ITEM *sp) { -#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++; + EXEC_STATE *es; + + emalloc(es, EXEC_STATE *, sizeof(EXEC_STATE), "push_exec_state"); + es->rule = rule; + es->cptr = cp; + es->stack_size = (sp - stack_bottom) + 1; + es->source = src; + es->next = exec_state_stack.next; + exec_state_stack.next = es; } -/* - * 2/2004: - * N.B. The code that uses fcalls[] *always* uses indexing. - * This avoids severe problems in case fcalls gets realloc()'ed - * during recursive tree_eval()'s or whatever, so that we don't - * have to carefully reassign pointers into the array. The - * minor speed gain from using a pointer was offset too much - * by the hassles to get the code right and commented. - * - * Thanks and a tip of the hatlo to Brian Kernighan. - */ -static struct fcall { - const char *fname; /* function name */ - size_t count; /* how many args */ - NODE *arglist; /* list thereof */ - NODE **prevstack; /* function stack frame of previous function */ - NODE **stack; /* function stack frame of current function */ -} *fcalls = NULL; +/* pop_exec_state --- pop one execution state off the stack */ + +static INSTRUCTION * +pop_exec_state(int *rule, char **src, long *sz) +{ + INSTRUCTION *cp; + EXEC_STATE *es; + + es = exec_state_stack.next; + if (es == NULL) + return NULL; + cp = es->cptr; + if (rule != NULL) + *rule = es->rule; + if (src != NULL) + *src = (char *) es->source; + if (sz != NULL) + *sz = es->stack_size; + exec_state_stack.next = es->next; + efree(es); + return cp; +} -static long fcall_list_size = 0; -static long curfcall = -1; /* - * get_curfunc_arg_count --- return number actual parameters - * - * This is for use by dynamically loaded C extension functions. + * r_interpret: + * code is a list of instructions to run. returns the exit value + * from the awk code. */ -size_t -get_curfunc_arg_count(void) + + /* N.B.: + * 1) reference counting done for both number and string values. + * 2) TEMP flag no longer needed (consequence of the above; valref = 0 + * is the replacement). + * 3) Stack operations: + * Use REPLACE[_XX] if last stack operation was TOP[_XX], + * PUSH[_XX] if last operation was POP[_XX] instead. + * 4) UPREF and DREF -- see awk.h + */ + + +int +r_interpret(INSTRUCTION *code) { - NODE *argp; - size_t argc; + INSTRUCTION *pc; /* current instruction */ + NODE *r = NULL; + NODE *m; + INSTRUCTION *ni; + NODE *t1, *t2; + NODE *f; /* function definition */ + NODE **lhs; + AWKNUM x, x1, x2; + int di, pre = FALSE; + Regexp *rp; +#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) + int last_was_stopme = FALSE; /* builtin stopme() called ? */ +#endif + int stdio_problem = FALSE; - assert(curfcall >= 0); - /* count the # of expressions in argument expression list */ - for (argc = 0, argp = fcalls[curfcall].arglist; - argp != NULL; argp = argp->rnode) - argc++; + if (args_array == NULL) + emalloc(args_array, NODE **, (max_args + 2)*sizeof(NODE *), "r_interpret"); + else + erealloc(args_array, NODE **, (max_args + 2)*sizeof(NODE *), "r_interpret"); - return argc; -} +/* array subscript */ +#define mk_sub(n) (n == 1 ? POP_STRING() : concat_exp(n, TRUE)) -/* pop_fcall --- pop off a single function call */ +#ifdef DEBUGGING +#define JUMPTO(x) do { post_execute(pc); pc = (x); goto top; } while(FALSE) +#else +#define JUMPTO(x) do { pc = (x); goto top; } while(FALSE) +#endif -static void -pop_fcall() -{ - NODE *n, **sp; - int count; + pc = code; - assert(curfcall >= 0); - stack_ptr = fcalls[curfcall].prevstack; + /* N.B.: always use JUMPTO for next instruction, otherwise bad things + * may happen. DO NOT add a real loop (for/while) below to + * replace ' forever {'; this catches failure to use JUMPTO to execute + * next instruction (e.g. continue statement). + */ - sp = fcalls[curfcall].stack; + /* loop until hit Op_stop instruction */ - for (count = fcalls[curfcall].count; count > 0; count--) { - n = *sp++; - /* - * If, while setting the value of an argument in push_args, - * the recursively evaluating code exits, this argument - * could never have been set to a value. So check for NULL, - * first. - */ - if (n == NULL) - continue; - if (n->type == Node_var) /* local variable */ - unref(n->var_value); - else if (n->type == Node_var_array) /* local array */ - assoc_clear(n); - freenode(n); - } - if (fcalls[curfcall].stack) { - free((char *) fcalls[curfcall].stack); - fcalls[curfcall].stack = NULL; - } - curfcall--; -} + /* forever { */ +top: + if (pc->source_line > 0) + sourceline = pc->source_line; + +#ifdef DEBUGGING + if (! pre_execute(&pc)) + goto top; +#endif -/* pop_fcall_stack --- pop off all function args, don't leak memory */ + switch (pc->opcode) { + case Op_rule: + currule = pc->in_rule; /* for sole use in Op_K_next, Op_K_nextfile, Op_K_getline* */ + /* fall through */ + case Op_func: + case Op_ext_func: + source = pc->source_file; + break; -static inline void -pop_fcall_stack() -{ - while (curfcall >= 0) - pop_fcall(); -} + case Op_atexit: + /* avoid false source indications */ + source = NULL; + sourceline = 0; + (void) nextfile(&curfile, TRUE); /* close input data file */ + /* + * This used to be: + * + * if (close_io() != 0 && ! exiting && exit_val == 0) + * exit_val = 1; + * + * Other awks don't care about problems closing open files + * and pipes, in that it doesn't affect their exit status. + * So we no longer do either. + */ + (void) close_io(& stdio_problem); + /* + * However, we do want to exit non-zero if there was a problem + * with stdout/stderr, so we reinstate a slightly different + * version of the above: + */ + if (stdio_problem && ! exiting && exit_val == 0) + exit_val = 1; + break; + + case Op_stop: + return 0; -/* push_args --- push function arguments onto the stack */ + case Op_push_i: + m = pc->memory; + PUSH((m->flags & INTLSTR) != 0 ? format_val(CONVFMT, CONVFMTidx, m): m); + break; + + case Op_push: + case Op_push_arg: + { + NODE *save_symbol; + int isparam = FALSE; + + save_symbol = m = pc->memory; + if (m->type == Node_param_list) { + if ((m->flags & FUNC) != 0) + fatal(_("can't use function name `%s' as variable or array"), + m->vname); + isparam = TRUE; + save_symbol = m = GET_PARAM(m->param_cnt); + if (m->type == Node_array_ref) + m = m->orig_array; + } + + switch (m->type) { + case Node_var: + if (do_lint && var_uninitialized(m)) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); + m = m->var_value; + UPREF(m); + PUSH(m); + break; + + case Node_var_new: + m->type = Node_var; + m->var_value = Nnull_string; + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); + PUSH(Nnull_string); + break; + + case Node_var_array: + if (pc->opcode == Op_push_arg) + PUSH(m); + else + fatal(_("attempt to use array `%s' in a scalar context"), + array_vname(save_symbol)); + break; + + default: + cant_happen(); + } + } + break; -static void -push_args(int count, - NODE *argp, - NODE **oldstack, - const char *func_name, - char **varnames) -{ - NODE *arg, *r, **sp; - int i; + case Op_push_param: /* function argument */ + m = pc->memory; + if (m->type == Node_param_list) + m = GET_PARAM(m->param_cnt); + if (m->type == Node_var) { + m = m->var_value; + UPREF(m); + PUSH(m); + break; + } + /* else + fall through */ + case Op_push_array: + PUSH(pc->memory); + break; - if (fcall_list_size == 0) { /* first time */ - emalloc(fcalls, struct fcall *, 10 * sizeof(struct fcall), - "push_args"); - fcall_list_size = 10; - } + case Op_push_lhs: + lhs = get_lhs(pc->memory, pc->do_reference); + PUSH_ADDRESS(lhs); + break; - if (++curfcall >= fcall_list_size) { - fcall_list_size *= 2; - erealloc(fcalls, struct fcall *, - fcall_list_size * sizeof(struct fcall), "push_args"); - } + case Op_subscript: + t2 = mk_sub(pc->sub_count); + t1 = POP_ARRAY(); + r = *assoc_lookup(t1, t2, TRUE); + DEREF(t2); + if (r->type == Node_val) + UPREF(r); + PUSH(r); + break; - if (count > 0) { - size_t nbytes = count * sizeof(NODE *); + case Op_sub_array: + t2 = mk_sub(pc->sub_count); + t1 = POP_ARRAY(); + r = in_array(t1, t2); + if (r == NULL) { + getnode(r); + r->type = Node_var_array; + r->var_array = NULL; + r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ + r->parent_array = t1; + *assoc_lookup(t1, t2, FALSE) = r; + } else if (r->type != Node_var_array) + fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"), + array_vname(t1), (int) t2->stlen, t2->stptr); + DEREF(t2); + PUSH(r); + break; - emalloc(fcalls[curfcall].stack, NODE **, nbytes, "push_args"); - memset(fcalls[curfcall].stack, 0, nbytes); /* Make sure these are all NULL pointers. */ - } else - fcalls[curfcall].stack = NULL; - fcalls[curfcall].count = count; - fcalls[curfcall].fname = func_name; /* not used, for debugging, just in case */ - fcalls[curfcall].arglist = argp; - fcalls[curfcall].prevstack = oldstack; + case Op_subscript_lhs: + t2 = mk_sub(pc->sub_count); + t1 = POP_ARRAY(); + lhs = assoc_lookup(t1, t2, pc->do_reference); + if ((*lhs)->type == Node_var_array) + fatal(_("attempt to use array `%s[\"%.*s\"]' in a scalar context"), + array_vname(t1), (int) t2->stlen, t2->stptr); + DEREF(t2); + PUSH_ADDRESS(lhs); + break; - sp = fcalls[curfcall].stack; + case Op_field_spec: + t1 = TOP_SCALAR(); + lhs = r_get_field(t1, (Func_ptr *) 0, TRUE); + decr_sp(); + DEREF(t1); + /* This used to look like this: + PUSH(dupnode(*lhs)); + but was changed to bypass an apparent bug in the z/OS C compiler. + Please do not remerge. */ + r = dupnode(*lhs); /* can't use UPREF here */ + PUSH(r); + break; - /* for each calling arg. add NODE * on stack */ - for (i = 0; i < count; i++) { - getnode(r); - memset(r, 0, sizeof(*r)); - *sp++ = r; - if (argp == NULL) { - /* local variable */ - r->type = Node_var_new; - r->var_value = Nnull_string; - r->vname = varnames[i]; - r->rnode = NULL; - continue; - } - arg = argp->lnode; - /* call by reference for arrays; see below also */ - if (arg->type == Node_param_list) - arg = fcalls[curfcall].prevstack[arg->param_cnt]; + case Op_field_spec_lhs: + t1 = TOP_SCALAR(); + lhs = r_get_field(t1, &pc->target_assign->field_assign, pc->do_reference); + decr_sp(); + DEREF(t1); + PUSH_ADDRESS(lhs); + break; - if (arg->type == Node_var_array || arg->type == Node_var_new) { - r->type = Node_array_ref; - r->orig_array = arg; - r->prev_array = arg; - } else if (arg->type == Node_array_ref) { - *r = *arg; - r->prev_array = arg; - } else { - NODE *n = tree_eval(arg); + case Op_lint: + if (do_lint) { + switch (pc->lint_type) { + case LINT_assign_in_cond: + lintwarn(_("assignment used in conditional context")); + break; - r->type = Node_var; - r->lnode = dupnode(n); - r->rnode = (NODE *) NULL; - free_temp(n); - } - r->vname = varnames[i]; - argp = argp->rnode; - } + case LINT_no_effect: + lintwarn(_("statement has no effect")); + break; - 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 = fcalls[curfcall].prevstack[arg->param_cnt]; - if (arg->type != Node_var_array && - arg->type != Node_array_ref && - arg->type != Node_var_new) - free_temp(tree_eval(arg)); - } while ((argp = argp->rnode) != NULL); - } + default: + cant_happen(); + } + } + break; - stack_ptr = fcalls[curfcall].stack; -} + case Op_K_break: + case Op_K_continue: + case Op_jmp: + JUMPTO(pc->target_jmp); + + case Op_jmp_false: + r = POP_SCALAR(); + di = eval_condition(r); + DEREF(r); + if (! di) + JUMPTO(pc->target_jmp); + break; -/* func_call --- call a function, call by reference for arrays */ + case Op_jmp_true: + r = POP_SCALAR(); + di = eval_condition(r); + DEREF(r); + if (di) + JUMPTO(pc->target_jmp); + break; -NODE **stack_ptr; + case Op_and: + case Op_or: + t1 = POP_SCALAR(); + di = eval_condition(t1); + DEREF(t1); + if ((pc->opcode == Op_and && di) + || (pc->opcode == Op_or && ! di)) + break; + r = make_number((AWKNUM) di); + PUSH(r); + ni = pc->target_jmp; + JUMPTO(ni->nexti); + + case Op_and_final: + case Op_or_final: + t1 = TOP_SCALAR(); + r = make_number((AWKNUM) eval_condition(t1)); + DEREF(t1); + REPLACE(r); + break; -static NODE * -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; - int volatile save_loop_tag_valid = FALSE; - NODE *save_ret_node; - extern NODE *ret_node; - size_t current_nloops_active = 0; - - /* 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 */ - 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); + case Op_not: + t1 = TOP_SCALAR(); + r = make_number((AWKNUM) ! eval_condition(t1)); + DEREF(t1); + REPLACE(r); + break; - tree->funcbody = f; /* save for next call */ - } + case Op_equal: + r = make_number((AWKNUM) (cmp_scalar() == 0)); + REPLACE(r); + break; -#ifdef FUNC_TRACE - fprintf(stderr, "function `%s' called\n", name->stptr); -#endif - push_args(f->lnode->param_cnt, arg_list, stack_ptr, name->stptr, - f->parmlist); + case Op_notequal: + r = make_number((AWKNUM) (cmp_scalar() != 0)); + REPLACE(r); + break; - /* - * Execute function body, saving context, as a return statement - * will longjmp back here. - * - * Have to save and restore the loop_tag stuff so that a return - * inside a loop in a function body doesn't scrog any loops going - * on in the main program. We save the necessary info in variables - * local to this function so that function nesting works OK. - * We also only bother to save the loop stuff if we're in a loop - * when the function is called. - */ - if (loop_tag_valid) { - int junk = 0; + case Op_less: + r = make_number((AWKNUM) (cmp_scalar() < 0)); + REPLACE(r); + break; - save_loop_tag_valid = (volatile int) loop_tag_valid; - PUSH_BINDING(loop_tag_stack, loop_tag, junk); - loop_tag_valid = FALSE; - } - PUSH_BINDING(func_tag_stack, func_tag, func_tag_valid); - current_nloops_active = nloops_active; - save_ret_node = ret_node; - ret_node = Nnull_string; /* default return value */ - INCREMENT(f->exec_count); /* count function calls */ - if (setjmp(func_tag) == 0) - (void) interpret(f->rnode); - - while (nloops_active > current_nloops_active) - pop_forloop(); - - r = ret_node; - ret_node = (NODE *) save_ret_node; - RESTORE_BINDING(func_tag_stack, func_tag, func_tag_valid); - pop_fcall(); - - /* Restore the loop_tag stuff if necessary. */ - if (save_loop_tag_valid) { - int junk = 0; + case Op_greater: + r = make_number((AWKNUM) (cmp_scalar() > 0)); + REPLACE(r); + break; - loop_tag_valid = (int) save_loop_tag_valid; - RESTORE_BINDING(loop_tag_stack, loop_tag, junk); - } + case Op_leq: + r = make_number((AWKNUM) (cmp_scalar() <= 0)); + REPLACE(r); + break; - return r; -} + case Op_geq: + r = make_number((AWKNUM) (cmp_scalar() >= 0)); + REPLACE(r); + break; -#ifdef PROFILING -/* dump_fcall_stack --- print a backtrace of the awk function calls */ + case Op_plus_i: + x2 = force_number(pc->memory); + goto plus; + + case Op_plus: + POP_NUMBER(x2); +plus: + TOP_NUMBER(x1); + r = make_number(x1 + x2); + REPLACE(r); + break; -void -dump_fcall_stack(FILE *fp) -{ - int i; + case Op_minus_i: + x2 = force_number(pc->memory); + goto minus; + + case Op_minus: + POP_NUMBER(x2); +minus: + TOP_NUMBER(x1); + r = make_number(x1 - x2); + REPLACE(r); + break; - if (curfcall < 0) - return; + case Op_times_i: + x2 = force_number(pc->memory); + goto times; + + case Op_times: + POP_NUMBER(x2); +times: + TOP_NUMBER(x1); + r = make_number(x1 * x2); + REPLACE(r); + break; - fprintf(fp, _("\n\t# Function Call Stack:\n\n")); - for (i = curfcall; i >= 0; i--) - fprintf(fp, "\t# %3d. %s\n", i+1, fcalls[i].fname); - fprintf(fp, _("\t# -- main --\n")); -} -#endif /* PROFILING */ + case Op_exp_i: + x2 = force_number(pc->memory); + goto exponent; + + case Op_exp: + POP_NUMBER(x2); +exponent: + TOP_NUMBER(x1); + x = calc_exp(x1, x2); + r = make_number(x); + REPLACE(r); + break; -/* - * r_get_lhs: - * This returns a POINTER to a node pointer. get_lhs(ptr) is the current - * value of the var, or where to store the var's new value - * - * For the special variables, don't unref their current value if it's - * the same as the internal copy; perhaps the current one is used in - * a concatenation or some other expression somewhere higher up in the - * call chain. Ouch. - */ + case Op_quotient_i: + x2 = force_number(pc->memory); + goto quotient; + + case Op_quotient: + POP_NUMBER(x2); +quotient: + if (x2 == 0) + fatal(_("division by zero attempted")); + + TOP_NUMBER(x1); + x = x1 / x2; + r = make_number(x); + REPLACE(r); + break; + + case Op_mod_i: + x2 = force_number(pc->memory); + goto mod; + + case Op_mod: + POP_NUMBER(x2); +mod: + if (x2 == 0) + fatal(_("division by zero attempted in `%%'")); -NODE ** -r_get_lhs(register NODE *ptr, Func_ptr *assign, int reference) -{ - register NODE **aptr = NULL; - register NODE *n; + TOP_NUMBER(x1); +#ifdef HAVE_FMOD + x = fmod(x1, x2); +#else /* ! HAVE_FMOD */ + (void) modf(x1 / x2, &x); + x = x1 - x * x2; +#endif /* ! HAVE_FMOD */ + r = make_number(x); + REPLACE(r); + break; + + case Op_preincrement: + pre = TRUE; + case Op_postincrement: + x2 = 1.0; +post: + lhs = TOP_ADDRESS(); + x1 = force_number(*lhs); + unref(*lhs); + r = *lhs = make_number(x1 + x2); + if (pre) + UPREF(r); + else + r = make_number(x1); + REPLACE(r); + pre = FALSE; + break; + + case Op_predecrement: + pre = TRUE; + case Op_postdecrement: + x2 = -1.0; + goto post; + + case Op_unary_minus: + TOP_NUMBER(x1); + r = make_number(-x1); + REPLACE(r); + break; - if (assign) - *assign = NULL; /* for safety */ - if (ptr->type == Node_param_list) { - if ((ptr->flags & FUNC) != 0) - fatal(_("can't use function name `%s' as variable or array"), ptr->vname); - ptr = stack_ptr[ptr->param_cnt]; - } + case Op_store_sub: + /* array[sub] assignment optimization, + * see awkgram.y (optimize_assignment) + */ + t1 = get_array(pc->memory, TRUE); /* array */ + t2 = mk_sub(pc->expr_count); /* subscript */ + lhs = assoc_lookup(t1, t2, FALSE); + if ((*lhs)->type == Node_var_array) + fatal(_("attempt to use array `%s[\"%.*s\"]' in a scalar context"), + array_vname(t1), (int) t2->stlen, t2->stptr); + DEREF(t2); + unref(*lhs); + *lhs = POP_SCALAR(); + break; - make_scalar(ptr); + case Op_store_var: + /* simple variable assignment optimization, + * see awkgram.y (optimize_assignment) + */ + + lhs = get_lhs(pc->memory, FALSE); + unref(*lhs); + *lhs = POP_SCALAR(); + break; - switch (ptr->type) { - case Node_var: - if (do_lint && reference && var_uninitialized(ptr)) - lintwarn(_("reference to uninitialized variable `%s'"), - ptr->vname); - - aptr = &(ptr->var_value); -#ifdef GAWKDEBUG - if (ptr->var_value->stref <= 0) - cant_happen(); -#endif - break; + case Op_store_field: + { + /* field assignment optimization, + * see awkgram.y (optimize_assignment) + */ - case Node_FIELDWIDTHS: - aptr = &(FIELDWIDTHS_node->var_value); - if (assign != NULL) - *assign = set_FIELDWIDTHS; - break; + Func_ptr assign; + t1 = TOP_SCALAR(); + lhs = r_get_field(t1, &assign, FALSE); + decr_sp(); + DEREF(t1); + unref(*lhs); + *lhs = POP_SCALAR(); + assert(assign != NULL); + assign(); + } + break; - case Node_RS: - aptr = &(RS_node->var_value); - if (assign != NULL) - *assign = set_RS; - break; + case Op_assign_concat: + /* x = x ... string concatenation optimization */ + lhs = get_lhs(pc->memory, FALSE); + t1 = force_string(*lhs); + t2 = POP_STRING(); + + free_wstr(*lhs); + + if (t1 != t2 && t1->valref == 1 && (t1->flags & PERM) == 0) { + size_t nlen = t1->stlen + t2->stlen; + erealloc(t1->stptr, char *, nlen + 2, "r_interpret"); + memcpy(t1->stptr + t1->stlen, t2->stptr, t2->stlen); + t1->stlen = nlen; + t1->stptr[nlen] = '\0'; + } else { + size_t nlen = t1->stlen + t2->stlen; + char *p; + + emalloc(p, char *, nlen + 2, "r_interpret"); + memcpy(p, t1->stptr, t1->stlen); + memcpy(p + t1->stlen, t2->stptr, t2->stlen); + unref(*lhs); + t1 = *lhs = make_str_node(p, nlen, ALREADY_MALLOCED); + } + t1->flags &= ~(NUMCUR|NUMBER); + DEREF(t2); + break; - case Node_FS: - aptr = &(FS_node->var_value); - if (assign != NULL) - *assign = set_FS; - break; + case Op_assign: + lhs = POP_ADDRESS(); + r = TOP_SCALAR(); + unref(*lhs); + *lhs = r; + UPREF(r); + REPLACE(r); + break; - case Node_FNR: - if (FNR_node->var_value->numbr != FNR) { - unref(FNR_node->var_value); - FNR_node->var_value = make_number((AWKNUM) FNR); - } - aptr = &(FNR_node->var_value); - if (assign != NULL) - *assign = set_FNR; - break; + /* numeric assignments */ + case Op_assign_plus: + case Op_assign_minus: + case Op_assign_times: + case Op_assign_quotient: + case Op_assign_mod: + case Op_assign_exp: + op_assign(pc->opcode); + break; - case Node_NR: - if (NR_node->var_value->numbr != NR) { - unref(NR_node->var_value); - NR_node->var_value = make_number((AWKNUM) NR); - } - aptr = &(NR_node->var_value); - if (assign != NULL) - *assign = set_NR; - break; + case Op_var_update: /* update value of NR, FNR or NF */ + pc->update_var(); + break; - case Node_NF: - if (NF == -1 || NF_node->var_value->numbr != NF) { - if (NF == -1) - (void) get_field(UNLIMITED-1, assign); /* parse record */ - unref(NF_node->var_value); - NF_node->var_value = make_number((AWKNUM) NF); - } - aptr = &(NF_node->var_value); - if (assign != NULL) - *assign = set_NF; - break; + case Op_var_assign: + case Op_field_assign: + if (pc->assign_ctxt == Op_sub_builtin + && TOP()->numbr == 0.0 /* top of stack has a number == 0 */ + ) { + /* There wasn't any substitutions. If the target is a FIELD, + * this means no field re-splitting or $0 reconstruction. + * Skip the set_FOO routine if the target is a special variable. + */ - case Node_IGNORECASE: - aptr = &(IGNORECASE_node->var_value); - if (assign != NULL) - *assign = set_IGNORECASE; - break; + break; + } else if ((pc->assign_ctxt == Op_K_getline + || pc->assign_ctxt == Op_K_getline_redir) + && TOP()->numbr <= 0.0 /* top of stack has a number <= 0 */ + ) { + /* getline returned EOF or error */ - case Node_BINMODE: - aptr = &(BINMODE_node->var_value); - if (assign != NULL) - *assign = set_BINMODE; - break; + break; + } - case Node_LINT: - aptr = &(LINT_node->var_value); - if (assign != NULL) - *assign = set_LINT; - break; + if (pc->opcode == Op_var_assign) + pc->assign_var(); + else + pc->field_assign(); + break; - case Node_OFMT: - aptr = &(OFMT_node->var_value); - if (assign != NULL) - *assign = set_OFMT; - break; + case Op_concat: + r = concat_exp(pc->expr_count, pc->concat_flag & CSUBSEP); + PUSH(r); + break; - case Node_CONVFMT: - aptr = &(CONVFMT_node->var_value); - if (assign != NULL) - *assign = set_CONVFMT; - break; + case Op_K_case: + if ((pc + 1)->match_exp) { + /* match a constant regex against switch expression instead of $0. */ + m = POP(); /* regex */ + t2 = TOP_SCALAR(); /* switch expression */ + (void) force_string(t2); + rp = re_update(m); + di = (research(rp, t2->stptr, 0, t2->stlen, + avoid_dfa(m, t2->stptr, t2->stlen)) >= 0); + } else { + t1 = POP_SCALAR(); /* case value */ + t2 = TOP_SCALAR(); /* switch expression */ + di = (cmp_nodes(t2, t1) == 0); + DEREF(t1); + } - case Node_ORS: - aptr = &(ORS_node->var_value); - if (assign != NULL) - *assign = set_ORS; - break; + if (di) { /* match found */ + decr_sp(); + DEREF(t2); + JUMPTO(pc->target_jmp); + } + break; - case Node_OFS: - aptr = &(OFS_node->var_value); - if (assign != NULL) - *assign = set_OFS; - break; + case Op_K_delete: + t1 = POP_ARRAY(); + do_delete(t1, pc->expr_count); + stack_adj(-pc->expr_count); + break; - case Node_SUBSEP: - aptr = &(SUBSEP_node->var_value); - if (assign != NULL) - *assign = set_SUBSEP; - break; + case Op_K_delete_loop: + t1 = POP_ARRAY(); + lhs = POP_ADDRESS(); /* item */ + do_delete_loop(t1, lhs); + break; - case Node_TEXTDOMAIN: - aptr = &(TEXTDOMAIN_node->var_value); - if (assign != NULL) - *assign = set_TEXTDOMAIN; - break; + case Op_in_array: + t1 = POP_ARRAY(); + t2 = mk_sub(pc->expr_count); + di = (in_array(t1, t2) != NULL); + DEREF(t2); + PUSH(make_number((AWKNUM) di)); + break; - case Node_field_spec: + case Op_arrayfor_init: { - int field_num; + NODE **list = NULL; + NODE *array, *sort_str; + size_t num_elems = 0; + static NODE *sorted_in = NULL; + const char *how_to_sort = "@unsorted"; - n = tree_eval(ptr->lnode); - if (do_lint) { - if ((n->flags & NUMBER) == 0) { - lintwarn(_("attempt to field reference from non-numeric value")); - if (n->stlen == 0) - lintwarn(_("attempt to reference from null string")); - } - } - field_num = (int) force_number(n); - free_temp(n); - if (field_num < 0) - fatal(_("attempt to access field %d"), field_num); - if (field_num == 0 && field0_valid) { /* short circuit */ - aptr = &fields_arr[0]; - if (assign != NULL) - *assign = reset_record; - } else - aptr = get_field(field_num, assign); - if (do_lint && reference && (*aptr == Null_field || *aptr == Nnull_string)) - lintwarn(_("reference to uninitialized field `$%d'"), - field_num); - break; - } + /* get the array */ + array = POP_ARRAY(); - case Node_subscript: - n = get_array(ptr->lnode); - aptr = assoc_lookup(n, concat_exp(ptr->rnode), reference); - break; + /* sanity: check if empty */ + if (array->var_array == NULL || array->table_size == 0) + goto arrayfor; - case Node_builtin: -#if 1 - /* in gawk for a while */ - fatal(_("assignment is not allowed to result of builtin function")); -#else - /* - * This is how Christos at Deshaw did it. - * Does this buy us anything? - */ - if (ptr->builtin == NULL) - fatal(_("assignment is not allowed to result of builtin function")); - ptr->callresult = (*ptr->builtin)(ptr->subnode); - aptr = &ptr->callresult; - break; -#endif + num_elems = array->table_size; - default: - fprintf(stderr, "type = %s\n", nodetype2str(ptr->type)); - fflush(stderr); - cant_happen(); - } - return aptr; -} + if (sorted_in == NULL) /* do this once */ + sorted_in = make_string("sorted_in", 9); -/* match_op --- do ~ and !~ */ + sort_str = NULL; + /* + * If posix, or if there's no PROCINFO[], + * there's no ["sorted_in"], so no sorting + */ + if (! do_posix && PROCINFO_node != NULL) + sort_str = in_array(PROCINFO_node, sorted_in); -static NODE * -match_op(register NODE *tree) -{ - register NODE *t1; - register Regexp *rp; - int i; - int match = TRUE; - int kludge_need_start = 0; /* FIXME: --- see below */ + if (sort_str != NULL) { + sort_str = force_string(sort_str); + if (sort_str->stlen > 0) + how_to_sort = sort_str->stptr; + } - if (tree->type == Node_nomatch) - match = FALSE; - if (tree->type == Node_regex) - t1 = *get_field(0, (Func_ptr *) 0); - else { - t1 = force_string(tree_eval(tree->lnode)); - tree = tree->rnode; - } - rp = re_update(tree); - /* - * FIXME: - * - * Any place where research() is called with a last parameter of - * zero, we need to use the avoid_dfa test. This appears here and - * in the code for Node_K_switch. - * - * 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 = RE_NEED_START; - i = research(rp, t1->stptr, 0, t1->stlen, kludge_need_start); - i = (i == -1) ^ (match == TRUE); - free_temp(t1); - return tmp_number((AWKNUM) i); -} + list = assoc_list(array, how_to_sort, SORTED_IN); -/* set_IGNORECASE --- update IGNORECASE as appropriate */ + /* + * Actual array for use in lint warning + * in Op_arrayfor_incr + */ + list[num_elems] = array; -void -set_IGNORECASE() -{ - static short warned = FALSE; +arrayfor: + getnode(r); + r->type = Node_arrayfor; + r->var_array = list; + r->table_size = num_elems; /* # of elements in list */ + r->array_size = -1; /* current index */ + PUSH(r); - if ((do_lint || do_traditional) && ! warned) { - warned = TRUE; - lintwarn(_("`IGNORECASE' is a gawk extension")); - } - load_casetable(); - if (do_traditional) - IGNORECASE = FALSE; - 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 & (NUMCUR|NUMBER)) != 0) - IGNORECASE = (force_number(IGNORECASE_node->var_value) != 0.0); - else - IGNORECASE = FALSE; /* shouldn't happen */ - - set_RS(); /* set_RS() calls set_FS() if need be, for us */ -} + if (num_elems == 0) + JUMPTO(pc->target_jmp); /* Op_arrayfor_final */ + } + break; -/* set_BINMODE --- set translation mode (OS/2, DOS, others) */ + case Op_arrayfor_incr: + r = TOP(); /* Node_arrayfor */ + if (++r->array_size == r->table_size) { + NODE *array; + array = r->var_array[r->table_size]; /* actual array */ + if (do_lint && array->table_size != r->table_size) + lintwarn(_("for loop: array `%s' changed size from %ld to %ld during loop execution"), + array_vname(array), (long) r->table_size, (long) array->table_size); + JUMPTO(pc->target_jmp); /* Op_arrayfor_final */ + } -void -set_BINMODE() -{ - static short warned = FALSE; - char *p; - NODE *v; + t1 = r->var_array[r->array_size]; + lhs = get_lhs(pc->array_var, FALSE); + unref(*lhs); + *lhs = make_string(t1->ahname_str, t1->ahname_len); + break; - if ((do_lint || do_traditional) && ! warned) { - warned = TRUE; - lintwarn(_("`BINMODE' is a gawk extension")); - } - if (do_traditional) - BINMODE = 0; - else if ((BINMODE_node->var_value->flags & NUMBER) != 0) { - BINMODE = (int) force_number(BINMODE_node->var_value); - /* Make sure the value is rational. */ - if (BINMODE < 0) - BINMODE = 0; - else if (BINMODE > 3) - BINMODE = 3; - } - else if ((BINMODE_node->var_value->flags & STRING) != 0) { - v = BINMODE_node->var_value; - p = v->stptr; + case Op_arrayfor_final: + r = POP(); + assert(r->type == Node_arrayfor); + free_arrayfor(r); + break; - /* - * Allow only one of the following: - * "0", "1", "2", "3", - * "r", "w", "rw", "wr" - * ANYTHING ELSE goes to 3. So there. - */ - switch (v->stlen) { - case 1: - switch (p[0]) { - case '0': - case '1': - case '2': - case '3': - BINMODE = p[0] - '0'; - break; - case 'r': - BINMODE = 1; - break; - case 'w': - BINMODE = 2; - break; - default: - BINMODE = 3; - goto bad_value; - break; - } + case Op_builtin: + r = pc->builtin(pc->expr_count); +#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) + if (! r) + last_was_stopme = TRUE; + else +#endif + PUSH(r); break; - case 2: - switch (p[0]) { - case 'r': - BINMODE = 3; - if (p[1] != 'w') - goto bad_value; - break; - case 'w': - BINMODE = 3; - if (p[1] != 'r') - goto bad_value; - break; + + case Op_sub_builtin: /* sub, gsub and gensub */ + r = do_sub(pc->expr_count, pc->sub_flags); + PUSH(r); + break; + + case Op_K_print: + do_print(pc->expr_count, pc->redir_type); + break; + + case Op_K_printf: + do_printf(pc->expr_count, pc->redir_type); break; - default: - bad_value: - lintwarn(_("BINMODE value `%s' is invalid, treated as 3"), p); + + case Op_K_print_rec: + do_print_rec(pc->expr_count, pc->redir_type); + break; + + case Op_push_re: + m = pc->memory; + if (m->type == Node_dynregex) { + r = POP_STRING(); + unref(m->re_exp); + m->re_exp = r; + } + PUSH(m); + break; + + case Op_match_rec: + m = pc->memory; + t1 = *get_field(0, (Func_ptr *) 0); +match_re: + rp = re_update(m); + /* + * Any place where research() is called with a last parameter of + * zero, we need to use the avoid_dfa test. This appears here and + * in the code for Op_K_case. + * + * A new or improved dfa that distinguishes beginning/end of + * string from beginning/end of line will allow us to get rid of + * this hack. + * + * The avoid_dfa() function is in re.c; it is not very smart. + */ + + di = research(rp, t1->stptr, 0, t1->stlen, + avoid_dfa(m, t1->stptr, t1->stlen)); + di = (di == -1) ^ (pc->opcode != Op_nomatch); + if(pc->opcode != Op_match_rec) { + decr_sp(); + DEREF(t1); + } + r = make_number((AWKNUM) di); + PUSH(r); + break; + + case Op_nomatch: + /* fall through */ + case Op_match: + m = pc->memory; + t1 = TOP_STRING(); + if (m->type == Node_dynregex) { + unref(m->re_exp); + m->re_exp = t1; + decr_sp(); + t1 = TOP_STRING(); + } + goto match_re; break; + + case Op_indirect_func_call: + { + int arg_count; + + f = NULL; + arg_count = (pc + 1)->expr_count; + t1 = PEEK(arg_count); /* indirect var */ + assert(t1->type == Node_val); /* @a[1](p) not allowed in grammar */ + (void) force_string(t1); + if (t1->stlen > 0) { + /* retrieve function definition node */ + f = pc->func_body; + if (f != NULL && strcmp(f->vname, t1->stptr) == 0) + /* indirect var hasn't been reassigned */ + goto func_call; + f = lookup(t1->stptr); } + + if (f == NULL || f->type != Node_func) + fatal(_("function called indirectly through `%s' does not exist"), pc->func_name); + pc->func_body = f; /* save for next call */ + + goto func_call; } - } - else - BINMODE = 3; /* shouldn't happen */ -} -/* set_OFS --- update OFS related variables when OFS assigned to */ + case Op_func_call: + /* retrieve function definition node */ + f = pc->func_body; + if (f == NULL) { + f = lookup(pc->func_name); + if (f == NULL || f->type != Node_func) + fatal(_("function `%s' not defined"), pc->func_name); + pc->func_body = f; /* save for next call */ + } -void -set_OFS() -{ - OFS = force_string(OFS_node->var_value)->stptr; - OFSlen = OFS_node->var_value->stlen; - OFS[OFSlen] = '\0'; -} + /* save current frame along with source */ -/* set_ORS --- update ORS related variables when ORS assigned to */ +func_call: + ni = setup_frame(pc); + + if (ni->opcode == Op_ext_func) { + /* dynamically set source and line numbers for an extension builtin. */ + ni->source_file = source; + ni->source_line = sourceline; + ni->nexti->source_line = sourceline; /* Op_builtin */ + ni->nexti->nexti->source_line = sourceline; /* Op_K_return */ + } -void -set_ORS() -{ - ORS = force_string(ORS_node->var_value)->stptr; - ORSlen = ORS_node->var_value->stlen; - ORS[ORSlen] = '\0'; -} + /* run the function instructions */ + JUMPTO(ni); /* Op_func or Op_ext_func */ -/* fmt_ok --- is the conversion format a valid one? */ + case Op_K_return: + m = POP_SCALAR(); /* return value */ -NODE **fmt_list = NULL; -static int fmt_ok P((NODE *n)); -static int fmt_index P((NODE *n)); + ni = pop_fcall(); + + /* put the return value back on stack */ + PUSH(m); + + JUMPTO(ni); + + case Op_K_getline_redir: + if ((currule == BEGINFILE || currule == ENDFILE) + && pc->into_var == FALSE + && pc->redir_type == redirect_input) + fatal(_("`getline' invalid inside `%s' rule"), ruletab[currule]); + r = do_getline_redir(pc->into_var, pc->redir_type); + PUSH(r); + break; -static int -fmt_ok(NODE *n) -{ - NODE *tmp = force_string(n); - const char *p = tmp->stptr; -#if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1 - static const char float_formats[] = "efgEG"; -#else - static const char float_formats[] = "efgEFG"; -#endif -#if defined(HAVE_LOCALE_H) - static const char flags[] = " +-#'"; -#else - static const char flags[] = " +-#"; -#endif + case Op_K_getline: /* no redirection */ + if (! currule || currule == BEGINFILE || currule == ENDFILE) + fatal(_("non-redirected `getline' invalid inside `%s' rule"), + ruletab[currule]); + + do { + int ret; + ret = nextfile(& curfile, FALSE); + if (ret <= 0) + r = do_getline(pc->into_var, curfile); + else { + + /* Save execution state so that we can return to it + * from Op_after_beginfile or Op_after_endfile. + */ + + push_exec_state(pc, currule, source, stack_ptr); + + if (curfile == NULL) + JUMPTO((pc + 1)->target_endfile); + else + JUMPTO((pc + 1)->target_beginfile); + } + } while (r == NULL); /* EOF */ - if (*p++ != '%') - return 0; - while (*p && strchr(flags, *p) != NULL) /* flags */ - p++; - while (*p && isdigit(*p)) /* width - %*.*g is NOT allowed */ - p++; - if (*p == '\0' || (*p != '.' && ! isdigit(*p))) - return 0; - if (*p == '.') - p++; - while (*p && isdigit(*p)) /* precision */ - p++; - if (*p == '\0' || strchr(float_formats, *p) == NULL) - return 0; - if (*++p != '\0') - return 0; - return 1; -} + PUSH(r); + break; -/* fmt_index --- track values of OFMT and CONVFMT to keep semantics correct */ + case Op_after_endfile: + /* Find the execution state to return to */ + ni = pop_exec_state(& currule, & source, NULL); -static int -fmt_index(NODE *n) -{ - register int ix = 0; - static int fmt_num = 4; - static int fmt_hiwater = 0; + assert(ni->opcode == Op_newfile || ni->opcode == Op_K_getline); + JUMPTO(ni); - if (fmt_list == NULL) - emalloc(fmt_list, NODE **, fmt_num*sizeof(*fmt_list), "fmt_index"); - (void) force_string(n); - while (ix < fmt_hiwater) { - if (cmp_nodes(fmt_list[ix], n) == 0) - return ix; - ix++; - } - /* not found */ - n->stptr[n->stlen] = '\0'; - if (do_lint && ! fmt_ok(n)) - lintwarn(_("bad `%sFMT' specification `%s'"), - n == CONVFMT_node->var_value ? "CONV" - : n == OFMT_node->var_value ? "O" - : "", n->stptr); + case Op_after_beginfile: + after_beginfile(& curfile); - if (fmt_hiwater >= fmt_num) { - fmt_num *= 2; - erealloc(fmt_list, NODE **, fmt_num * sizeof(*fmt_list), "fmt_index"); - } - fmt_list[fmt_hiwater] = dupnode(n); - return fmt_hiwater++; -} + /* Find the execution state to return to */ + ni = pop_exec_state(& currule, & source, NULL); -/* set_OFMT --- track OFMT correctly */ + assert(ni->opcode == Op_newfile || ni->opcode == Op_K_getline); + if (ni->opcode == Op_K_getline + || curfile == NULL /* skipping directory argument */ + ) + JUMPTO(ni); -void -set_OFMT() -{ - OFMTidx = fmt_index(OFMT_node->var_value); - OFMT = fmt_list[OFMTidx]->stptr; -} + break; /* read a record, Op_get_record */ -/* set_CONVFMT --- track CONVFMT correctly */ + case Op_newfile: + { + int ret; -void -set_CONVFMT() -{ - CONVFMTidx = fmt_index(CONVFMT_node->var_value); - CONVFMT = fmt_list[CONVFMTidx]->stptr; -} + ret = nextfile(& curfile, FALSE); -/* set_LINT --- update LINT as appropriate */ + if (ret < 0) /* end of input */ + JUMPTO(pc->target_jmp); /* end block or Op_atexit */ -void -set_LINT() -{ -#ifndef NO_LINT - int old_lint = do_lint; + if (ret == 0) /* read a record */ + JUMPTO((pc + 1)->target_get_record); - if ((LINT_node->var_value->flags & (STRING|STRCUR)) != 0) { - if ((LINT_node->var_value->flags & MAYBE_NUM) == 0) { - const char *lintval; - size_t lintlen; + /* ret > 0 */ + /* Save execution state for use in Op_after_beginfile or Op_after_endfile. */ - 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 { - if (force_number(LINT_node->var_value) != 0.0) - do_lint = LINT_ALL; - else - do_lint = FALSE; - lintfunc = warning; + push_exec_state(pc, currule, source, stack_ptr); + + if (curfile == NULL) /* EOF */ + JUMPTO(pc->target_endfile); + /* else + execute beginfile block */ } - } 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 */ + break; + + case Op_get_record: + { + int errcode = 0; - if (! do_lint) - lintfunc = warning; + ni = pc->target_newfile; + if (curfile == NULL) { + /* from non-redirected getline, e.g.: + * { + * while (getline > 0) ; + * } + */ - /* explicitly use warning() here, in case lintfunc == r_fatal */ - if (old_lint != do_lint && old_lint && do_lint == FALSE) - warning(_("turning off `--lint' due to assignment to `LINT'")); -#endif /* ! NO_LINT */ -} + ni = ni->target_jmp; /* end_block or Op_atexit */ + JUMPTO(ni); + } -/* set_TEXTDOMAIN --- update TEXTDOMAIN variable when TEXTDOMAIN assigned to */ + if (inrec(curfile, & errcode) != 0) { + if (errcode > 0 && (do_traditional || ! pc->has_endfile)) + fatal(_("error reading input file `%s': %s"), + curfile->name, strerror(errcode)); + + JUMPTO(ni); + } /* else + prog (rule) block */ + } + break; -void -set_TEXTDOMAIN() -{ - int len; + case Op_K_nextfile: + { + int ret; - TEXTDOMAIN = force_string(TEXTDOMAIN_node->var_value)->stptr; - len = TEXTDOMAIN_node->var_value->stlen; - TEXTDOMAIN[len] = '\0'; - /* - * Note: don't call textdomain(); this value is for - * the awk program, not for gawk itself. - */ -} + if (currule != Rule && currule != BEGINFILE) + fatal(_("`nextfile' cannot be called from a `%s' rule"), + ruletab[currule]); -/* - * assign_val --- do mechanics of assignment, for calling from multiple - * places. - */ + ret = nextfile(& curfile, TRUE); /* skip current file */ -NODE * -assign_val(NODE **lhs_p, NODE *rhs) -{ - if (rhs != *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); - if ((*lhs_p)->type != Node_val) - (*lhs_p)->funcbody = NULL; - } - return *lhs_p; -} + if (currule == BEGINFILE) { + long stack_size; -/* update_ERRNO_saved --- update the value of ERRNO based on argument */ + ni = pop_exec_state(& currule, & source, & stack_size); -void -update_ERRNO_saved(int errcode) -{ - char *cp; + assert(ni->opcode == Op_K_getline || ni->opcode == Op_newfile); - cp = strerror(errcode); - cp = gettext(cp); - unref(ERRNO_node->var_value); - ERRNO_node->var_value = make_string(cp, strlen(cp)); -} + /* pop stack returning to the state of Op_K_getline or Op_newfile. */ + unwind_stack(stack_size); -/* update_ERRNO --- update the value of ERRNO based on errno */ + if (ret == 0) { + /* There was an error opening the file; + * don't run ENDFILE block(s). + */ -void -update_ERRNO() -{ - update_ERRNO_saved(errno); -} + JUMPTO(ni); + } else { + /* do run ENDFILE block(s) first. */ + + /* Execution state to return to in Op_after_endfile. */ + push_exec_state(ni, currule, source, stack_ptr); -/* comp_func --- array index comparison function for qsort */ + JUMPTO(pc->target_endfile); + } + } /* else + Start over with the first rule. */ -static int -comp_func(const void *p1, const void *p2) -{ - size_t len1, len2; - const char *str1, *str2; - const NODE *t1, *t2; - int cmp1; + /* empty the run-time stack to avoid memory leak */ + pop_stack(); - t1 = *((const NODE *const *) p1); - t2 = *((const NODE *const *) p2); + /* Push an execution state for Op_after_endfile to return to */ + push_exec_state(pc->target_newfile, currule, source, stack_ptr); -/* - t1 = force_string(t1); - t2 = force_string(t2); -*/ - len1 = t1->ahname_len; - str1 = t1->ahname_str; + JUMPTO(pc->target_endfile); + } + break; + + case Op_K_exit: + /* exit not allowed in user-defined comparison functions for "sorted_in"; + * This is done so that END blocks aren't executed more than once. + */ + if (! currule) + fatal(_("`exit' cannot be called in the current context")); + + exiting = TRUE; + POP_NUMBER(x1); + exit_val = (int) x1; +#ifdef VMS + if (exit_val == 0) + exit_val = EXIT_SUCCESS; + else if (exit_val == 1) + exit_val = EXIT_FAILURE; + /* else + just pass anything else on through */ +#endif + + if (currule == BEGINFILE || currule == ENDFILE) { + + /* Find the rule of the saved execution state (Op_K_getline/Op_newfile). + * This is needed to prevent multiple execution of any END rules: + * gawk 'BEGINFILE { exit(1) } \ + * END { while (getline > 0); }' in1 in2 + */ + + (void) pop_exec_state(& currule, & source, NULL); + } + + pop_stack(); /* empty stack, don't leak memory */ + + /* Jump to either the first END block instruction + * or to Op_atexit. + */ + + if (currule == END) + ni = pc->target_atexit; + else + ni = pc->target_end; + JUMPTO(ni); + + case Op_K_next: + if (currule != Rule) + fatal(_("`next' cannot be called from a `%s' rule"), ruletab[currule]); + + pop_stack(); + JUMPTO(pc->target_jmp); /* Op_get_record, read next record */ + + case Op_pop: +#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) + if (last_was_stopme) + last_was_stopme = FALSE; + else +#endif + { + r = POP_SCALAR(); + DEREF(r); + } + break; + + case Op_line_range: + if (pc->triggered) /* evaluate right expression */ + JUMPTO(pc->target_jmp); + /* else + evaluate left expression */ + break; + + case Op_cond_pair: + { + int result; + INSTRUCTION *ip; + + t1 = TOP_SCALAR(); /* from right hand side expression */ + di = (eval_condition(t1) != 0); + DEREF(t1); + + ip = pc->line_range; /* Op_line_range */ + + if (! ip->triggered && di) { + /* not already triggered and left expression is TRUE */ + decr_sp(); + ip->triggered = TRUE; + JUMPTO(ip->target_jmp); /* evaluate right expression */ + } + + result = ip->triggered || di; + ip->triggered ^= di; /* update triggered flag */ + r = make_number((AWKNUM) result); /* final value of condition pair */ + REPLACE(r); + JUMPTO(pc->target_jmp); + } + + case Op_exec_count: + INCREMENT(pc->exec_count); + break; + + case Op_no_op: + case Op_K_do: + case Op_K_while: + case Op_K_for: + case Op_K_arrayfor: + case Op_K_switch: + case Op_K_default: + case Op_K_if: + case Op_K_else: + case Op_cond_exp: + break; + + default: + fatal(_("Sorry, don't know how to interpret `%s'"), opcode2str(pc->opcode)); + } + + JUMPTO(pc->nexti); + +/* } forever */ - len2 = t2->ahname_len; - str2 = t2->ahname_str; + /* not reached */ + return 0; - /* Array indexes are strings, compare as such, always! */ - cmp1 = memcmp(str1, str2, len1 < len2 ? len1 : len2); - /* if prefixes are equal, size matters */ - return (cmp1 != 0 ? cmp1 : - len1 < len2 ? -1 : (len1 > len2)); +#undef mk_sub +#undef JUMPTO } diff -Nru gawk-3.1.8+dfsg/eval_d.c gawk-4.0.1+dfsg/eval_d.c --- gawk-3.1.8+dfsg/eval_d.c 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/eval_d.c 2012-03-28 19:47:54.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * eval_p.c - compile eval.c with debugging turned on. + */ + +/* + * Copyright (C) 2001 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 + */ + +#define DEBUGGING 1 +#include "eval.c" diff -Nru gawk-3.1.8+dfsg/ext.c gawk-4.0.1+dfsg/ext.c --- gawk-3.1.8+dfsg/ext.c 2010-04-13 19:21:40.000000000 +0000 +++ gawk-4.0.1+dfsg/ext.c 2012-03-28 19:52:50.000000000 +0000 @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 1995 - 2001, 2003-2010 the Free Software Foundation, Inc. + * Copyright (C) 1995 - 2001, 2003-2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -33,86 +33,111 @@ #include -#ifdef __GNUC__ -static unsigned long long dummy; /* fake out gcc for dynamic loading? */ -#endif - -extern int errcount; - /* do_ext --- load an extension */ NODE * -do_ext(NODE *tree) +do_ext(int nargs) { NODE *obj; NODE *fun; - NODE *(*func) P((NODE *, void *)); + NODE *tmp = NULL; + NODE *(*func)(NODE *, void *); void *dl; int flags = RTLD_LAZY; + int fatal_error = FALSE; + int *gpl_compat; +#if 0 static short warned = FALSE; - -#ifdef __GNUC__ - AWKNUM junk; - - junk = (AWKNUM) dummy; #endif + if (do_sandbox) + fatal(_("extensions are not allowed in sandbox mode")); + +#if 0 + /* already done in parser */ if (do_lint && ! warned) { warned = TRUE; lintwarn(_("`extension' is a gawk extension")); } +#endif - if (do_traditional || do_posix) { - errcount++; + if (do_traditional || do_posix) error(_("`extension' is a gawk extension")); - } - obj = tree_eval(tree->lnode); - force_string(obj); + fun = POP_STRING(); + obj = POP_STRING(); #ifdef RTLD_GLOBAL flags |= RTLD_GLOBAL; #endif - if ((dl = dlopen(obj->stptr, flags)) == NULL) - fatal(_("extension: cannot open `%s' (%s)\n"), obj->stptr, + if ((dl = dlopen(obj->stptr, flags)) == NULL) { + /* fatal needs `obj', and we need to deallocate it! */ + msg(_("fatal: extension: cannot open `%s' (%s)\n"), obj->stptr, dlerror()); + fatal_error = TRUE; + goto done; + } + + /* Per the GNU Coding standards */ + gpl_compat = (int *) dlsym(dl, "plugin_is_GPL_compatible"); + if (gpl_compat == NULL) { + msg(_("fatal: extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), + obj->stptr, dlerror()); + fatal_error = TRUE; + goto done; + } - fun = tree_eval(tree->rnode->lnode); - force_string(fun); - func = (NODE *(*) P((NODE *, void *))) dlsym(dl, fun->stptr); - if (func == NULL) - fatal(_("extension: library `%s': cannot call function `%s' (%s)\n"), + func = (NODE *(*)(NODE *, void *)) dlsym(dl, fun->stptr); + if (func == NULL) { + msg(_("fatal: extension: library `%s': cannot call function `%s' (%s)\n"), obj->stptr, fun->stptr, dlerror()); - free_temp(obj); - free_temp(fun); + fatal_error = TRUE; + goto done; + } - return (*func)(tree, dl); + tmp = (*func)(obj, dl); + if (tmp == NULL) + tmp = Nnull_string; +done: + DEREF(obj); + DEREF(fun); + if (fatal_error) + gawk_exit(EXIT_FATAL); + return tmp; } + /* make_builtin --- register name to be called as func with a builtin body */ void -make_builtin(char *name, NODE *(*func) P((NODE *)), int count) +make_builtin(const char *name, NODE *(*func)(int), int count) { - NODE *p, *b, *f; - char **vnames, *parm_names, *sp; + NODE *p, *symbol, *f; + INSTRUCTION *b, *r; + const char *sp; + char *pname; + char **vnames = NULL; char c, buf[200]; - int space_needed, i; + size_t space_needed; + int i; sp = name; if (sp == NULL || *sp == '\0') - fatal(_("extension: missing function name")); + fatal(_("extension: missing function name")); - while ((c = *sp++) != '\0') - if ((sp == &name[1] && c != '_' && ! isalpha(c)) - || (sp > &name[1] && ! is_identchar(c))) + while ((c = *sp++) != '\0') { + if ((sp == &name[1] && c != '_' && ! isalpha((unsigned char) c)) + || (sp > &name[1] && ! is_identchar((unsigned char) c))) fatal(_("extension: illegal character `%c' in function name `%s'"), c, name); + } f = lookup(name); + if (f != NULL) { if (f->type == Node_func) { - if (f->rnode->type != Node_builtin) /* user-defined function */ + INSTRUCTION *pc = f->code_ptr; + if (pc->opcode != Op_ext_func) /* user-defined function */ fatal(_("extension: can't redefine function `%s'"), name); else { /* multiple extension() calls etc. */ @@ -120,133 +145,158 @@ lintwarn(_("extension: function `%s' already defined"), name); return; } - } else { - if (check_special(name) >= 0) - fatal(_("extension: can't use gawk built-in `%s' as function name"), name); + } else /* variable name etc. */ fatal(_("extension: function name `%s' previously defined"), name); + } else if (check_special(name) >= 0) + fatal(_("extension: can't use gawk built-in `%s' as function name"), name); + /* count parameters, create artificial list of param names */ + + if (count < 0) + fatal(_("make_builtin: negative argument count for function `%s'"), + name); + + if (count > 0) { + sprintf(buf, "p%d", count); + space_needed = strlen(buf) + 1; + emalloc(vnames, char **, count * sizeof(char *), "make_builtin"); + for (i = 0; i < count; i++) { + emalloc(pname, char *, space_needed, "make_builtin"); + sprintf(pname, "p%d", i); + vnames[i] = pname; } } - /* count parameters, create artificial list of param names */ - space_needed = 0; - for (i = 0; i < count; i++) { - sprintf(buf, "p%d", i); - space_needed += strlen(buf) + 1; - } - emalloc(parm_names, char *, space_needed, "make_builtin"); - emalloc(vnames, char **, count * sizeof(char *), "make_builtin"); - sp = parm_names; - for (i = 0; i < count; i++) { - sprintf(sp, "p%d",i); - vnames[i] = sp; - sp += strlen(sp) + 1; - } getnode(p); p->type = Node_param_list; p->flags |= FUNC; - p->rnode = NULL; - p->param = name; + /* get our own copy for name */ + p->param = estrdup(name, strlen(name)); p->param_cnt = count; -#if 0 - /* setting these blows away the param_cnt. dang unions! */ - p->source_line = __LINE__; - p->source_file = __FILE__; -#endif - getnode(b); - b->type = Node_builtin; + /* actual source and line numbers set at runtime for these instructions */ + b = bcalloc(Op_builtin, 1, __LINE__); b->builtin = func; - b->subnode = p; - b->source_line = __LINE__; - b->source_file = __FILE__; + b->expr_count = count; + b->nexti = bcalloc(Op_K_return, 1, __LINE__); + r = bcalloc(Op_ext_func, 1, __LINE__); + r->source_file = __FILE__; + r->nexti = b; + + /* NB: extension sub must return something */ + + symbol = mk_symbol(Node_func, p); + symbol->parmlist = vnames; + symbol->code_ptr = r; + r->func_body = symbol; + (void) install_symbol(p->param, symbol); +} - f = node(p, Node_func, b); - f->parmlist = vnames; - install(name, f); + +/* get_curfunc_arg_count --- return number actual parameters */ + +size_t +get_curfunc_arg_count() +{ + size_t argc; + INSTRUCTION *pc; + + pc = (INSTRUCTION *) frame_ptr->reti; /* Op_func_call instruction */ + argc = (pc + 1)->expr_count; /* # of arguments supplied */ + return argc; } -/* get_argument --- Get the n'th argument of a dynamically linked function */ + +/* get_argument --- get the n'th argument of a dynamically linked function */ NODE * -get_argument(NODE *tree, int i) +get_argument(int i) { - extern NODE **stack_ptr; + int pcount; + NODE *t, *f; int actual_args; - - actual_args = get_curfunc_arg_count(); - if (i < 0 || i >= tree->param_cnt || i >= actual_args) + INSTRUCTION *pc; + + f = frame_ptr->func_node; + pcount = f->lnode->param_cnt; + + pc = (INSTRUCTION *) frame_ptr->reti; /* Op_func_call instruction */ + actual_args = (pc + 1)->expr_count; /* # of arguments supplied */ + + if (i < 0 || i >= pcount || i >= actual_args) return NULL; - tree = stack_ptr[i]; - if (tree->type == Node_array_ref) - tree = tree->orig_array; - if (tree->type == Node_var_new || tree->type == Node_var_array) - return tree; + t = GET_PARAM(i); - return tree->lnode; + if (t->type == Node_array_ref) + return t->orig_array; /* Node_var_new or Node_var_array */ + if (t->type == Node_var_new || t->type == Node_var_array) + return t; + return t->var_value; } + /* get_actual_argument --- get a scalar or array, allowed to be optional */ NODE * -get_actual_argument(NODE *tree, unsigned int i, int optional, int want_array) +get_actual_argument(int i, int optional, int want_array) { /* optional : if TRUE and i th argument not present return NULL, else fatal. */ - NODE *t; - - t = get_argument(tree, i); + NODE *t, *f; + int pcount; + char *fname; + + t = get_argument(i); + + f = frame_ptr->func_node; + pcount = f->lnode->param_cnt; + fname = f->lnode->param; if (t == NULL) { - if (i >= tree->param_cnt) /* must be fatal */ + if (i >= pcount) /* must be fatal */ fatal(_("function `%s' defined to take no more than %d argument(s)"), - tree->param, tree->param_cnt); + fname, pcount); if (! optional) fatal(_("function `%s': missing argument #%d"), - tree->param, i + 1); + fname, i + 1); return NULL; } - if (t->type == Node_var_new) - return (want_array ? get_array(t) : tree_eval(t)); + if (t->type == Node_var_new) { + if (want_array) + return get_array(t, FALSE); + else { + t->type = Node_var; + t->var_value = Nnull_string; + return Nnull_string; + } + } if (want_array) { if (t->type != Node_var_array) fatal(_("function `%s': argument #%d: attempt to use scalar as an array"), - tree->param, i + 1); + fname, i + 1); } else { if (t->type != Node_val) fatal(_("function `%s': argument #%d: attempt to use array as a scalar"), - tree->param, i + 1); + fname, i + 1); } return t; } -/* set_value --- set the return value of a dynamically linked function */ - -void -set_value(NODE *tree) -{ - extern NODE *ret_node; - - if (tree) - ret_node = tree; - else - ret_node = Nnull_string; -} #else /* do_ext --- dummy version if extensions not available */ NODE * -do_ext(NODE *tree) +do_ext(int nargs) { const char *emsg = _("Operation Not Supported"); unref(ERRNO_node->var_value); - ERRNO_node->var_value = make_string((char *) emsg, strlen(emsg)); - return tmp_number((AWKNUM) -1); + ERRNO_node->var_value = make_string(emsg, strlen(emsg)); + return make_number((AWKNUM) -1); } #endif diff -Nru gawk-3.1.8+dfsg/extension/ChangeLog gawk-4.0.1+dfsg/extension/ChangeLog --- gawk-3.1.8+dfsg/extension/ChangeLog 2010-05-06 17:56:10.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/ChangeLog 2012-03-28 20:02:17.000000000 +0000 @@ -1,63 +1,9 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * Release 3.1.7: Release tar file made. - -Mon May 18 21:31:34 2009 Arnold D. Robbins - - * rwarray.c (write_value, read_value): Use htonl / ntohl to write / - read the code for double / string. Test read-in code for != 0 - to handle stuff written before this change. - -Sat May 16 22:52:34 2009 Arnold D. Robbins - - * rwarray.c (do_reada, read_elem, read_value): Made the code - actually work. - -Fri May 15 16:01:06 2009 Arnold D. Robbins - - * rwarray.c, rwarray.awk: New files. - * steps: Updated. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Sun Jun 26 09:03:32 2005 Arnold D. Robbins - - * filefuncs.c (do_stat): Check return value from readlink() - for error. Pass in `sizeof(buf) - 1' to leave room for trailing - zero byte. From: Glenn Zazulia . - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon Jun 21 17:02:37 2004 Arnold D. Robbins - - More from John Haque. - - * testarg.c, testarg.awk: New files. - * arrayparm.c (do_mkarray): Change call of `get_curfunc_parm_count' - to `get_curfunc_arg_count'. - * filefuncs.c (do_chdir, do_stat): Ditto. - * fork.c (do_fork, do_waitpid): Ditto. - * ordchr.c (do_ord, do_chr): Ditto. - * readfile.c (do_readfile): Ditto. - * steps: Updated. - -Mon Jun 14 14:01:16 2004 Arnold D. Robbins - - ChangeLog started. - - Changes from John Haque and ADR to rationalize extension functions. - - * extension/filefuncs.c: Revised for new functionality. See - corresponding entry in main ChangeLog. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/extension/ChangeLog.0 gawk-4.0.1+dfsg/extension/ChangeLog.0 --- gawk-3.1.8+dfsg/extension/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/ChangeLog.0 2011-05-23 19:04:18.000000000 +0000 @@ -0,0 +1,91 @@ +Mon May 23 22:03:46 2011 John Haque + + * testarg.awk, testarg.c: Updated. + +Thu Mar 31 22:58:19 2011 Arnold D. Robbins + + * filefuncs.c (do_stat): Fix a comment. Also in doc. + +Thu Jan 13 20:37:02 2011 Andrew J. Schorr + + * filefuncs.c (do_stat): Malloc the buffer to read the contents + of the link. From mail of June 21, 2005. + +Sun Jan 2 21:08:17 2011 Arnold D. Robbins + + * filefuncs.c: Synched with code in gawk.texi, copyright dates + updated. + +Sat Dec 18 20:22:44 2010 Arnold D. Robbins + + * pcext.def: Removed, since we don't support MSFT compilers. + +Wed Nov 24 20:08:13 2010 Arnold D. Robbins + + * arrayparm.c, dl.c, filefuncs.c, fork.c, ordchr.c, readfile.c, + rwarray.c, testarg.c, xreadlink.c: Define `plugin_is_GPL_compatible' + per GNU Coding standards. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Mon May 18 21:31:34 2009 Arnold D. Robbins + + * rwarray.c (write_value, read_value): Use htonl / ntohl to write / + read the code for double / string. Test read-in code for != 0 + to handle stuff written before this change. + +Sat May 16 22:52:34 2009 Arnold D. Robbins + + * rwarray.c (do_reada, read_elem, read_value): Made the code + actually work. + +Fri May 15 16:01:06 2009 Arnold D. Robbins + + * rwarray.c, rwarray.awk: New files. + * steps: Updated. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Sun Jun 26 09:03:32 2005 Arnold D. Robbins + + * filefuncs.c (do_stat): Check return value from readlink() + for error. Pass in `sizeof(buf) - 1' to leave room for trailing + zero byte. From: Glenn Zazulia . + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Jun 21 17:02:37 2004 Arnold D. Robbins + + More from John Haque. + + * testarg.c, testarg.awk: New files. + * arrayparm.c (do_mkarray): Change call of `get_curfunc_parm_count' + to `get_curfunc_arg_count'. + * filefuncs.c (do_chdir, do_stat): Ditto. + * fork.c (do_fork, do_waitpid): Ditto. + * ordchr.c (do_ord, do_chr): Ditto. + * readfile.c (do_readfile): Ditto. + * steps: Updated. + +Mon Jun 14 14:01:16 2004 Arnold D. Robbins + + ChangeLog started. + + Changes from John Haque and ADR to rationalize extension functions. + + * extension/filefuncs.c: Revised for new functionality. See + corresponding entry in main ChangeLog. diff -Nru gawk-3.1.8+dfsg/extension/Makefile.pc gawk-4.0.1+dfsg/extension/Makefile.pc --- gawk-3.1.8+dfsg/extension/Makefile.pc 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/Makefile.pc 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -# Makefile for gawk extensions Mar 2003 - -# - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT] -# - for Microsoft C 7 [16bit ececutable for DOS] - -# see README.pc for comments - -#------------------------------------------------------------------------ -# Some makes do not define MAKE (and ndmake does not allow a define). -# Define MAK to be your make command. -#MAKE = dmake -MAK = $(MAKE) $(MAKEFILE) -#MAK = $(MAKE) -#MAKEFILE = -f Makefile -#MAK = make45 $(MAKEFILE) - -VCCFLAGS=-nologo -O2 -DWIN32 -DWIN32_EXTENSION -D__STDC__=0 -DGAWK -I.. -DHAVE_CONFIG_H -DDYNAMIC -VCLDFLAGS=-LD ../gawk.lib -VCCC=cl -nologo - -MWCFLAGS=-O -shared -DWIN32 -DWIN32_EXTENSION -DGAWK -I.. -DHAVE_CONFIG_H -DDYNAMIC -MWLDFLAGS=-s -Wl,--enable-stdcall-fixup -L.. -lgawk -MWCC=gcc - -# this DEFFILE will work provided the exported function is always called -# dlload -DEFFILE=pcext.def - - -default: - @echo "Enter $(MAK) target " - @echo " where 'target' is chosen from " - @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " - @echo " vcWin32 . Windows32 exe [Microsoft Visual C] " - -.SUFFIXES: .c .dll - -.c.dll: - $(CC) $(CFLAGS) $< -o$@ $(LDFLAGS) $(DEFFILE) - - -# dl.c, fork.c, and filefuncs.c don't compile cleanly... -all : readfile.dll ordchr.dll arrayparm.dll - -vcWin32: - $(MAK) CFLAGS="$(VCCFLAGS)" LDFLAGS="$(VCLDFLAGS)" CC="$(VCCC)" all - -mingw32: - $(MAK) CFLAGS="$(MWCFLAGS)" LDFLAGS="$(MWLDFLAGS)" CC="$(MWCC)" all - -clean: - -rm *.dll - -rm *.o - -rm *.obj - -rm *.lib diff -Nru gawk-3.1.8+dfsg/extension/arrayparm.c gawk-4.0.1+dfsg/extension/arrayparm.c --- gawk-3.1.8+dfsg/extension/arrayparm.c 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/arrayparm.c 2012-03-28 19:47:54.000000000 +0000 @@ -10,7 +10,7 @@ */ /* - * Copyright (C) 2001, 2003, 2004 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2003, 2004, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -32,6 +32,8 @@ #include "awk.h" +int plugin_is_GPL_compatible; + /* do_mkarray --- turn a variable into an array */ /* @@ -41,8 +43,7 @@ */ static NODE * -do_mkarray(tree) -NODE *tree; +do_mkarray(int args) { int ret = -1; NODE *var, *sub, *val; @@ -51,13 +52,9 @@ if (do_lint && get_curfunc_arg_count() > 3) lintwarn("mkarray: called with too many arguments"); - var = get_argument(tree, 0); - if (var == NULL) - var = stack_ptr[0]; - - var = get_array(var); - sub = get_argument(tree, 1); - val = get_argument(tree, 2); + var = get_array_argument(0, FALSE); + sub = get_scalar_argument(1, FALSE); + val = get_scalar_argument(2, FALSE); printf("var->type = %s\n", nodetype2str(var->type)); printf("sub->type = %s\n", nodetype2str(sub->type)); @@ -69,12 +66,8 @@ *elemval = dupnode(val); ret = 0; - /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ @@ -86,5 +79,5 @@ { make_builtin("mkarray", do_mkarray, 3); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/dl.c gawk-4.0.1+dfsg/extension/dl.c --- gawk-3.1.8+dfsg/extension/dl.c 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/dl.c 2011-02-27 06:00:54.000000000 +0000 @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 1995 - 2001 the Free Software Foundation, Inc. + * Copyright (C) 1995 - 2001, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -29,11 +29,12 @@ #include "awk.h" #include +int plugin_is_GPL_compatible; + static void *sdl = NULL; static NODE * -zaxxon(tree) -NODE *tree; +zaxxon(int nargs) { NODE *obj; int i; @@ -42,11 +43,11 @@ /* * Print the arguments */ - printf("External linkage %s(", tree->param); + printf("External linkage zaxxon("); - for (i = 0; i < tree->param_cnt; i++) { + for (i = 0; i < nargs; i++) { - obj = get_argument(tree, i); + obj = get_scalar_argument(i, TRUE); if (obj == NULL) break; @@ -54,7 +55,6 @@ force_string(obj); printf(comma ? ", %s" : "%s", obj->stptr); - free_temp(obj); comma = 1; } @@ -63,7 +63,7 @@ /* * Do something useful */ - obj = get_argument(tree, 0); + obj = get_scalar_argument(0, FALSE); if (obj != NULL) { force_string(obj); @@ -75,14 +75,10 @@ dlclose(sdl); sdl = NULL; } - free_temp(obj); } /* Set the return value */ - set_value(tmp_number((AWKNUM) 3.14)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 3.14); } NODE * @@ -92,5 +88,5 @@ { sdl = dl; make_builtin("zaxxon", zaxxon, 4); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/filefuncs.c gawk-4.0.1+dfsg/extension/filefuncs.c --- gawk-3.1.8+dfsg/extension/filefuncs.c 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/filefuncs.c 2012-03-28 19:47:54.000000000 +0000 @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 2001, 2004, 2005 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2005, 2010, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -31,11 +31,12 @@ #include +int plugin_is_GPL_compatible; + /* do_chdir --- provide dynamically loaded chdir() builtin for gawk */ static NODE * -do_chdir(tree) -NODE *tree; +do_chdir(int nargs) { NODE *newdir; int ret = -1; @@ -43,25 +44,19 @@ if (do_lint && get_curfunc_arg_count() != 1) lintwarn("chdir: called with incorrect number of arguments"); - newdir = get_scalar_argument(tree, 0, FALSE); + newdir = get_scalar_argument(0, FALSE); (void) force_string(newdir); ret = chdir(newdir->stptr); if (ret < 0) update_ERRNO(); - free_temp(newdir); - - /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* format_mode --- turn a stat mode field into something readable */ static char * -format_mode(fmode) -unsigned long fmode; +format_mode(unsigned long fmode) { static char outbuf[12]; int i; @@ -165,10 +160,9 @@ /* do_stat --- provide a stat() function for gawk */ static NODE * -do_stat(tree) -NODE *tree; +do_stat(int nargs) { - NODE *file, *array; + NODE *file, *array, *tmp; struct stat sbuf; int ret; NODE **aptr; @@ -178,9 +172,9 @@ if (do_lint && get_curfunc_arg_count() > 2) lintwarn("stat: called with too many arguments"); - /* directory is first arg, array to hold results is second */ - file = get_scalar_argument(tree, 0, FALSE); - array = get_array_argument(tree, 1, FALSE); + /* file is first arg, array to hold results is second */ + file = get_scalar_argument(0, FALSE); + array = get_array_argument(1, FALSE); /* empty out the array */ assoc_clear(array); @@ -190,85 +184,102 @@ ret = lstat(file->stptr, & sbuf); if (ret < 0) { update_ERRNO(); - - set_value(tmp_number((AWKNUM) ret)); - - free_temp(file); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* fill in the array */ - aptr = assoc_lookup(array, tmp_string("name", 4), FALSE); + aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE); *aptr = dupnode(file); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("dev", 3), FALSE); + aptr = assoc_lookup(array, tmp = make_string("dev", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_dev); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("ino", 3), FALSE); + aptr = assoc_lookup(array, tmp = make_string("ino", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_ino); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("mode", 4), FALSE); + aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE); *aptr = make_number((AWKNUM) sbuf.st_mode); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("nlink", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("nlink", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_nlink); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("uid", 3), FALSE); + aptr = assoc_lookup(array, tmp = make_string("uid", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_uid); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("gid", 3), FALSE); + aptr = assoc_lookup(array, tmp = make_string("gid", 3), FALSE); *aptr = make_number((AWKNUM) sbuf.st_gid); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("size", 4), FALSE); + aptr = assoc_lookup(array, tmp = make_string("size", 4), FALSE); *aptr = make_number((AWKNUM) sbuf.st_size); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("blocks", 6), FALSE); + aptr = assoc_lookup(array, tmp = make_string("blocks", 6), FALSE); *aptr = make_number((AWKNUM) sbuf.st_blocks); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("atime", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("atime", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_atime); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("mtime", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("mtime", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_mtime); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("ctime", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("ctime", 5), FALSE); *aptr = make_number((AWKNUM) sbuf.st_ctime); + unref(tmp); /* for block and character devices, add rdev, major and minor numbers */ if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) { - aptr = assoc_lookup(array, tmp_string("rdev", 4), FALSE); + aptr = assoc_lookup(array, tmp = make_string("rdev", 4), FALSE); *aptr = make_number((AWKNUM) sbuf.st_rdev); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("major", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("major", 5), FALSE); *aptr = make_number((AWKNUM) major(sbuf.st_rdev)); + unref(tmp); - aptr = assoc_lookup(array, tmp_string("minor", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("minor", 5), FALSE); *aptr = make_number((AWKNUM) minor(sbuf.st_rdev)); + unref(tmp); } #ifdef HAVE_ST_BLKSIZE - aptr = assoc_lookup(array, tmp_string("blksize", 7), FALSE); + aptr = assoc_lookup(array, tmp = make_string("blksize", 7), FALSE); *aptr = make_number((AWKNUM) sbuf.st_blksize); + unref(tmp); #endif /* HAVE_ST_BLKSIZE */ - aptr = assoc_lookup(array, tmp_string("pmode", 5), FALSE); + aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE); pmode = format_mode(sbuf.st_mode); *aptr = make_string(pmode, strlen(pmode)); + unref(tmp); /* for symbolic links, add a linkval field */ if (S_ISLNK(sbuf.st_mode)) { - char buf[BUFSIZ*2]; + char *buf; int linksize; - linksize = readlink(file->stptr, buf, sizeof(buf) - 1); - if (linksize >= 0) { - /* should make this smarter */ - if (linksize >= sizeof(buf) - 1) - fatal("size of symbolic link too big"); + emalloc(buf, char *, sbuf.st_size + 2, "do_stat"); + if (((linksize = readlink(file->stptr, buf, + sbuf.st_size + 2)) >= 0) && + (linksize <= sbuf.st_size)) { + /* + * set the linkval field only if we are able to + * retrieve the entire link value successfully. + */ buf[linksize] = '\0'; - aptr = assoc_lookup(array, tmp_string("linkval", 7), FALSE); - *aptr = make_string(buf, linksize); + aptr = assoc_lookup(array, tmp = make_string("linkval", 7), FALSE); + *aptr = make_str_node(buf, linksize, ALREADY_MALLOCED); + unref(tmp); } } @@ -308,27 +319,20 @@ #endif } - aptr = assoc_lookup(array, tmp_string("type", 4), FALSE); + aptr = assoc_lookup(array, tmp = make_string("type", 4), FALSE); *aptr = make_string(type, strlen(type)); + unref(tmp); - free_temp(file); - - /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ NODE * -dlload(tree, dl) -NODE *tree; -void *dl; +dlload(NODE *tree, void *dl) { make_builtin("chdir", do_chdir, 1); make_builtin("stat", do_stat, 2); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/fork.c gawk-4.0.1+dfsg/extension/fork.c --- gawk-3.1.8+dfsg/extension/fork.c 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/fork.c 2012-03-28 19:47:54.000000000 +0000 @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2001, 2004 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -27,14 +27,16 @@ #include "awk.h" +int plugin_is_GPL_compatible; + /* do_fork --- provide dynamically loaded fork() builtin for gawk */ static NODE * -do_fork(tree) -NODE *tree; +do_fork(int nargs) { int ret = -1; NODE **aptr; + NODE *tmp; if (do_lint && get_curfunc_arg_count() > 0) lintwarn("fork: called with too many arguments"); @@ -46,26 +48,24 @@ else if (ret == 0) { /* update PROCINFO in the child */ - aptr = assoc_lookup(PROCINFO_node, tmp_string("pid", 3), FALSE); + aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3), FALSE); (*aptr)->numbr = (AWKNUM) getpid(); + unref(tmp); - aptr = assoc_lookup(PROCINFO_node, tmp_string("ppid", 4), FALSE); + aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 4), FALSE); (*aptr)->numbr = (AWKNUM) getppid(); + unref(tmp); } /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* do_waitpid --- provide dynamically loaded waitpid() builtin for gawk */ static NODE * -do_waitpid(tree) -NODE *tree; +do_waitpid(int nargs) { NODE *pidnode; int ret = -1; @@ -76,7 +76,7 @@ if (do_lint && get_curfunc_arg_count() > 1) lintwarn("waitpid: called with too many arguments"); - pidnode = get_argument(tree, 0); + pidnode = get_scalar_argument(0, FALSE); if (pidnode != NULL) { pidval = force_number(pidnode); pid = (int) pidval; @@ -88,10 +88,7 @@ lintwarn("wait: called with no arguments"); /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ @@ -103,5 +100,5 @@ { make_builtin("fork", do_fork, 0); make_builtin("waitpid", do_waitpid, 1); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/ordchr.c gawk-4.0.1+dfsg/extension/ordchr.c --- gawk-3.1.8+dfsg/extension/ordchr.c 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/ordchr.c 2012-03-28 19:47:54.000000000 +0000 @@ -8,7 +8,7 @@ */ /* - * Copyright (C) 2001, 2004 the Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -30,11 +30,12 @@ #include "awk.h" +int plugin_is_GPL_compatible; + /* do_ord --- return numeric value of first char of string */ static NODE * -do_ord(tree) -NODE *tree; +do_ord(int nargs) { NODE *str; int ret = -1; @@ -42,27 +43,22 @@ if (do_lint && get_curfunc_arg_count() > 1) lintwarn("ord: called with too many arguments"); - str = get_argument(tree, 0); + str = get_scalar_argument(0, FALSE); if (str != NULL) { (void) force_string(str); ret = str->stptr[0]; - free_temp(str); } else if (do_lint) lintwarn("ord: called with no arguments"); /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } /* do_chr --- turn numeric value into a string */ static NODE * -do_chr(tree) -NODE *tree; +do_chr(int nargs) { NODE *num; unsigned int ret = 0; @@ -74,23 +70,18 @@ if (do_lint && get_curfunc_arg_count() > 1) lintwarn("chr: called with too many arguments"); - num = get_argument(tree, 0); + num = get_scalar_argument(0, FALSE); if (num != NULL) { val = force_number(num); ret = val; /* convert to int */ - free_temp(num); ret &= 0xff; str[0] = ret; str[1] = '\0'; } else if (do_lint) lintwarn("chr: called with no arguments"); - /* Set the return value */ - set_value(tmp_string(str, 1)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_string(str, 1); } /* dlload --- load new builtins in this library */ @@ -103,5 +94,5 @@ make_builtin("ord", do_ord, 1); make_builtin("chr", do_chr, 1); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/pcext.def gawk-4.0.1+dfsg/extension/pcext.def --- gawk-3.1.8+dfsg/extension/pcext.def 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/pcext.def 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -EXPORTS -dlload @1 diff -Nru gawk-3.1.8+dfsg/extension/readfile.c gawk-4.0.1+dfsg/extension/readfile.c --- gawk-3.1.8+dfsg/extension/readfile.c 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/readfile.c 2012-03-28 19:47:54.000000000 +0000 @@ -10,7 +10,7 @@ */ /* - * Copyright (C) 2002, 2003, 2004 the Free Software Foundation, Inc. + * Copyright (C) 2002, 2003, 2004, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -37,11 +37,12 @@ #define O_BINARY 0 #endif +int plugin_is_GPL_compatible; + /* do_readfile --- read a file into memory */ NODE * -do_readfile(tree) -NODE *tree; +do_readfile(int nargs) { NODE *filename; int ret = -1; @@ -52,27 +53,24 @@ if (do_lint && get_curfunc_arg_count() > 1) lintwarn("readfile: called with too many arguments"); - filename = get_argument(tree, 0); + filename = get_scalar_argument(0, FALSE); if (filename != NULL) { (void) force_string(filename); ret = stat(filename->stptr, & sbuf); if (ret < 0) { update_ERRNO(); - free_temp(filename); goto done; } else if ((sbuf.st_mode & S_IFMT) != S_IFREG) { errno = EINVAL; ret = -1; update_ERRNO(); - free_temp(filename); goto done; } if ((fd = open(filename->stptr, O_RDONLY|O_BINARY)) < 0) { ret = -1; update_ERRNO(); - free_temp(filename); goto done; } @@ -83,24 +81,18 @@ (void) close(fd); ret = -1; update_ERRNO(); - free_temp(filename); goto done; } close(fd); - free_temp(filename); - set_value(tmp_string(text, sbuf.st_size)); - return tmp_number((AWKNUM) 0); + return make_string(text, sbuf.st_size); } else if (do_lint) lintwarn("filename: called with no arguments"); done: /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) ret); } @@ -113,5 +105,5 @@ { make_builtin("readfile", do_readfile, 1); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/rwarray.c gawk-4.0.1+dfsg/extension/rwarray.c --- gawk-3.1.8+dfsg/extension/rwarray.c 2009-05-18 18:30:12.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/rwarray.c 2012-03-28 19:47:54.000000000 +0000 @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 2009 the Free Software Foundation, Inc. + * Copyright (C) 2009, 2010, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -37,11 +37,15 @@ #define MAJOR 1 #define MINOR 0 +int plugin_is_GPL_compatible; + +static int write_array(int fd, NODE *array); static int write_elem(int fd, int index, NODE *item); static int write_chain(int fd, int index, NODE *item); static int write_value(int fd, NODE *val); -static NODE *read_elem(int fd, int *index, int *eof); +static int read_array(int fd, NODE *array); +static NODE *read_elem(int fd, int *index, NODE *array); static NODE *read_value(int fd); /* @@ -59,7 +63,7 @@ * Hash of index val: 4 bytes - network order * Length of index val: 4 bytes - network order * Index val as characters (N bytes) - * Value type 1 byte (0 = string, 1 = number) + * Value type 1 byte (0 = string, 1 = number, 2 = array) * IF string: * Length of value 4 bytes * Value as characters (N bytes) @@ -70,24 +74,20 @@ /* do_writea --- write an array */ static NODE * -do_writea(tree) -NODE *tree; +do_writea(int nargs) { NODE *file, *array; int ret; int fd; uint32_t major = MAJOR; uint32_t minor = MINOR; - uint32_t count; - uint32_t array_sz; - int i; if (do_lint && get_curfunc_arg_count() > 2) lintwarn("writea: called with too many arguments"); /* directory is first arg, array to dump is second */ - file = get_scalar_argument(tree, 0, FALSE); - array = get_array_argument(tree, 1, TRUE); + file = get_scalar_argument(0, FALSE); + array = get_array_argument(1, FALSE); /* open the file, if error, set ERRNO and return */ (void) force_string(file); @@ -107,20 +107,9 @@ if (write(fd, & minor, sizeof(minor)) != sizeof(minor)) goto done1; - count = htonl(array->table_size); - if (write(fd, & count, sizeof(count)) != sizeof(count)) - goto done1; - - array_sz = htonl(array->array_size); - if (write(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) + ret = write_array(fd, array); + if (ret != 0) goto done1; - - for (i = 0; i < array->array_size; i++) { - ret = write_chain(fd, i, array->var_array[i]); - if (ret != 0) - goto done1; - } - ret = 0; goto done0; @@ -130,16 +119,40 @@ unlink(file->stptr); done0: - free_temp(file); close(fd); /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); + return make_number((AWKNUM) ret); +} + + +/* write_array --- write out an array or a sub-array */ + +static int +write_array(int fd, NODE *array) +{ + int ret; + uint32_t count; + uint32_t array_sz; + int i; + + count = htonl(array->table_size); + if (write(fd, & count, sizeof(count)) != sizeof(count)) + return -1; + + array_sz = htonl(array->array_size); + if (write(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) + return -1; - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + for (i = 0; i < array->array_size; i++) { + ret = write_chain(fd, i, array->var_array[i]); + if (ret != 0) + return ret; + } + return 0; } + /* write_chain --- write out a whole hash chain */ /* @@ -188,13 +201,20 @@ return write_value(fd, item->ahvalue); } -/* write_value --- write a number or a string */ +/* write_value --- write a number or a string or a array */ static int write_value(int fd, NODE *val) { int code, len; + if (val->type == Node_var_array) { + code = htonl(2); + if (write(fd, & code, sizeof(code)) != sizeof(code)) + return -1; + return write_array(fd, val); + } + if ((val->flags & NUMBER) != 0) { code = htonl(1); if (write(fd, & code, sizeof(code)) != sizeof(code)) @@ -221,27 +241,21 @@ /* do_reada --- read an array */ static NODE * -do_reada(tree) -NODE *tree; +do_reada(int nargs) { NODE *file, *array; int ret; int fd; uint32_t major; uint32_t minor; - uint32_t count; - uint32_t array_sz; char magic_buf[30]; - int index; - NODE *new_elem; - int eof; if (do_lint && get_curfunc_arg_count() > 2) lintwarn("reada: called with too many arguments"); /* directory is first arg, array to dump is second */ - file = get_scalar_argument(tree, 0, FALSE); - array = get_array_argument(tree, 1, TRUE); + file = get_scalar_argument(0, FALSE); + array = get_array_argument(1, FALSE); (void) force_string(file); fd = open(file->stptr, O_RDONLY); @@ -277,13 +291,40 @@ assoc_clear(array); + ret = read_array(fd, array); + if (ret == 0) + goto done0; + +done1: + ret = -1; + update_ERRNO(); + +done0: + close(fd); + + /* Set the return value */ + return make_number((AWKNUM) ret); +} + + +/* read_array --- read in an array or sub-array */ + +static int +read_array(int fd, NODE *array) +{ + int i; + uint32_t count; + uint32_t array_sz; + int index; + NODE *new_elem; + if (read(fd, & count, sizeof(count)) != sizeof(count)) { - goto done1; + return -1; } array->table_size = ntohl(count); if (read(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) { - goto done1; + return -1; } array->array_size = ntohl(array_sz); @@ -291,47 +332,32 @@ array->var_array = (NODE **) malloc(array->array_size * sizeof(NODE *)); memset(array->var_array, '\0', array->array_size * sizeof(NODE *)); - while ((new_elem = read_elem(fd, & index, & eof)) != NULL) { - new_elem->ahnext = array->var_array[index]; - array->var_array[index] = new_elem; - } - - if (eof) { - ret = 0; - goto done0; + for (i = 0; i < array->table_size; i++) { + if ((new_elem = read_elem(fd, & index, array)) != NULL) { + new_elem->ahnext = array->var_array[index]; + array->var_array[index] = new_elem; + } else + break; } - -done1: - ret = -1; - update_ERRNO(); - -done0: - free_temp(file); - close(fd); - - /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); - - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + if (i != array->table_size) + return -1; + return 0; } + /* read_elem --- read in a single element */ static NODE * -read_elem(int fd, int *the_index, int *eof) +read_elem(int fd, int *the_index, NODE *array) { uint32_t hashval, indexval_len, index; NODE *item; + NODE *val; int ret; *the_index = 0; - *eof = FALSE; if ((ret = read(fd, & index, sizeof(index))) != sizeof(index)) { - if (ret == 0) { - *eof = TRUE; - } return NULL; } *the_index = index = ntohl(index); @@ -359,10 +385,20 @@ item->ahname_str[item->ahname_len] = '\0'; item->ahname_ref = 1; - item->ahvalue = read_value(fd); - if (item->ahvalue == NULL) { + item->ahvalue = val = read_value(fd); + if (val == NULL) { return NULL; } + if (val->type == Node_var_array) { + char *aname; + size_t aname_len; + + /* construct the sub-array name */ + aname_len = strlen(array->vname) + item->ahname_len + 4; + emalloc(aname, char *, aname_len + 2, "read_elem"); + sprintf(aname, "%s[\"%.*s\"]", array->vname, (int) item->ahname_len, item->ahname_str); + val->vname = aname; + } return item; } @@ -384,14 +420,15 @@ } code = ntohl(code); - /* - * Very very early versions of this did not write out the code using htonl. - * Thus this check for `!= 0' instead of '== 1'. - */ - if (code != 0) { + if (code == 2) { + val->type = Node_var_array; + if (read_array(fd, val) != 0) + return NULL; + } else if (code == 1) { if (read(fd, & val->numbr, sizeof(val->numbr)) != sizeof(val->numbr)) { return NULL; } + val->flags = NUMBER|NUMCUR|MALLOC; } else { if (read(fd, & len, sizeof(len)) != sizeof(len)) { @@ -421,5 +458,5 @@ make_builtin("writea", do_writea, 2); make_builtin("reada", do_reada, 2); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/steps gawk-4.0.1+dfsg/extension/steps --- gawk-3.1.8+dfsg/extension/steps 2009-05-16 19:22:44.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/steps 2010-11-03 18:03:35.000000000 +0000 @@ -5,14 +5,14 @@ # Mon Jun 21 17:03:37 IDT 2004 # Fri May 15 15:48:45 IDT 2009 -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. fork.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c -gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. rwarray.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. fork.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c +gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. rwarray.c ld -o dl.so -shared dl.o ld -o filefuncs.so -shared filefuncs.o ld -o fork.so -shared fork.o diff -Nru gawk-3.1.8+dfsg/extension/testarg.awk gawk-4.0.1+dfsg/extension/testarg.awk --- gawk-3.1.8+dfsg/extension/testarg.awk 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/testarg.awk 2011-05-23 19:03:28.000000000 +0000 @@ -1,6 +1,7 @@ BEGIN { - extension("./testarg.so", "dlload") - check_arg(x, a); - check_arg(y, b, z); - check_arg(p, q, r, s); + extension("./testarg.so", "dlload") + check_arg(x, a); + check_arg(y, b, z); + check_arg(u, v, u=1); + check_arg(p, q, r, s); } diff -Nru gawk-3.1.8+dfsg/extension/testarg.c gawk-4.0.1+dfsg/extension/testarg.c --- gawk-3.1.8+dfsg/extension/testarg.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/testarg.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,31 +1,48 @@ #include "awk.h" +int plugin_is_GPL_compatible; + static NODE * -do_check_arg(tree) -NODE *tree; +do_check_arg(int nargs) { - int ret = 0, argc; - NODE *arg1, *arg2, *arg3; - - argc = get_curfunc_arg_count(); - printf("arg count: defined = %d, supplied = %d\n", tree->param_cnt, argc); + int ret = 0, argc; + NODE *arg1, *arg2, *arg3; - arg1 = get_scalar_argument(tree, 0, FALSE); - arg2 = get_array_argument(tree, 1, FALSE); - arg3 = get_scalar_argument(tree, 2, TRUE); /* optional */ - if (argc > 3) { /* try to use an extra arg */ - NODE *arg4; - arg4 = get_array_argument(tree, 3, TRUE); - } - if (arg3 != NULL) - printf("3rd arg present\n\n"); - else - printf("no 3rd arg\n\n"); - /* Set the return value */ - set_value(tmp_number((AWKNUM) ret)); + argc = get_curfunc_arg_count(); + printf("arg count: defined = %d, supplied = %d\n", + nargs, argc); + + arg1 = get_scalar_argument(0, FALSE); + arg2 = get_array_argument(1, FALSE); + arg3 = get_scalar_argument(2, TRUE); /* optional */ + if (argc > 3) { + /* try to use an extra arg */ + NODE *arg4; + arg4 = get_array_argument(3, TRUE); + printf("Shouldn't see this line\n"); + } + if (arg3 != NULL) { + printf("3rd arg present\n"); + if (arg3->type != Node_val) + printf("3nd arg type = %s (*** NOT OK ***)\n", nodetype2str(arg3->type)); + } else + printf("no 3rd arg\n"); + + if (arg2 != NULL) { + if (arg2->type != Node_var_array) + printf("2nd arg type = %s (*** NOT OK ***)\n", nodetype2str(arg2->type)); + } else + printf("2nd arg missing (NULL) (*** NOT OK ***)\n"); + + if (arg1 != NULL) { + if (arg1->type != Node_val) + printf("1st arg type = %s (*** NOT OK ***)\n", nodetype2str(arg1->type)); + } else + printf("1st arg missing (NULL) (*** NOT OK ***)\n"); + printf("\n"); - /* Just to make the interpreter happy */ - return tmp_number((AWKNUM) 0); + /* Set the return value */ + return make_number((AWKNUM) ret); } /* dlload --- load new builtins in this library */ @@ -36,5 +53,5 @@ void *dl; { make_builtin("check_arg", do_check_arg, 3); - return tmp_number((AWKNUM) 0); + return make_number((AWKNUM) 0); } diff -Nru gawk-3.1.8+dfsg/extension/xreadlink.c gawk-4.0.1+dfsg/extension/xreadlink.c --- gawk-3.1.8+dfsg/extension/xreadlink.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/xreadlink.c 2011-02-27 06:00:54.000000000 +0000 @@ -1,6 +1,6 @@ /* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage - Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2004, 2005, 2011 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 @@ -45,6 +45,8 @@ #include "xalloc.h" +int plugin_is_GPL_compatible; + /* Call readlink to get the symbolic link value of FILE. SIZE is a hint as to how long the link is expected to be; typically it is taken from st_size. It need not be correct. diff -Nru gawk-3.1.8+dfsg/extension/xreadlink.h gawk-4.0.1+dfsg/extension/xreadlink.h --- gawk-3.1.8+dfsg/extension/xreadlink.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/extension/xreadlink.h 2011-02-27 06:00:54.000000000 +0000 @@ -1,6 +1,6 @@ /* readlink wrapper to return the link name in malloc'd storage - Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2004, 2011 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 diff -Nru gawk-3.1.8+dfsg/field.c gawk-4.0.1+dfsg/field.c --- gawk-3.1.8+dfsg/field.c 2010-01-28 16:06:55.000000000 +0000 +++ gawk-4.0.1+dfsg/field.c 2012-03-28 19:47:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -36,28 +36,28 @@ return c == ' ' || c == '\t'; } -typedef void (* Setfunc) P((long, char *, long, NODE *)); - -static long (*parse_field) P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static void rebuild_record P((void)); -static long re_parse_field P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static long def_parse_field P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static long posix_def_parse_field P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static long null_parse_field P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static long sc_parse_field P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static long fw_parse_field P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); -static void set_element P((long num, char * str, long len, NODE *arr)); -static void grow_fields_arr P((long num)); -static void set_field P((long num, char *str, long len, NODE *dummy)); -static void update_PROCINFO P((char *subscript, char *str)); +typedef void (* Setfunc)(long, char *, long, NODE *); +static long (*parse_field)(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static void rebuild_record(void); +static long re_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static long def_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static long posix_def_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static long null_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static long sc_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static long fw_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static long fpat_parse_field(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); +static void set_element(long num, char * str, long len, NODE *arr); +static void grow_fields_arr(long num); +static void set_field(long num, char *str, long len, NODE *dummy); static char *parse_extent; /* marks where to restart parse of record */ static long parse_high_water = 0; /* field number that we have parsed so far */ @@ -74,11 +74,11 @@ Regexp *FS_re_yes_case = NULL; Regexp *FS_re_no_case = NULL; Regexp *FS_regexp = NULL; +Regexp *FPAT_re_yes_case = NULL; +Regexp *FPAT_re_no_case = NULL; +Regexp *FPAT_regexp = NULL; NODE *Null_field = NULL; -/* using_FIELDWIDTHS --- static function, macro to avoid overhead */ -#define using_FIELDWIDTHS() (parse_field == fw_parse_field) - /* init_fields --- set up the fields array to start with */ void @@ -91,7 +91,7 @@ getnode(Null_field); *Null_field = *Nnull_string; Null_field->flags |= FIELD; - Null_field->flags &= ~(NUMCUR|NUMBER|MAYBE_NUM|PERM); + Null_field->flags &= ~(NUMCUR|NUMBER|MAYBE_NUM|PERM|MALLOC); field0_valid = TRUE; } @@ -100,8 +100,8 @@ static void grow_fields_arr(long num) { - register int t; - register NODE *n; + int t; + NODE *n; erealloc(fields_arr, NODE **, (num + 1) * sizeof(NODE *), "grow_fields_arr"); for (t = nf_high_water + 1; t <= num; t++) { @@ -121,7 +121,7 @@ long len, NODE *dummy ATTRIBUTE_UNUSED) /* just to make interface same as set_element */ { - register NODE *n; + NODE *n; if (num > nf_high_water) grow_fields_arr(num); @@ -141,12 +141,12 @@ * use explicit unsigned longs for lengths, in case * a size_t isn't big enough. */ - register unsigned long tlen; - register unsigned long ofslen; - register NODE *tmp; + unsigned long tlen; + unsigned long ofslen; + NODE *tmp; NODE *ofs; char *ops; - register char *cops; + char *cops; long i; assert(NF != -1); @@ -207,15 +207,13 @@ } } else { *n = *(fields_arr[i]); - n->flags &= ~(MALLOC|TEMP|PERM|STRING); + n->flags &= ~(MALLOC|PERM|STRING); } n->stptr = cops; unref(fields_arr[i]); fields_arr[i] = n; -#ifdef MBS_SUPPORT assert((n->flags & WSTRCUR) == 0); -#endif } cops += fields_arr[i]->stlen + ofslen; } @@ -273,7 +271,7 @@ getnode(n); n->stptr = databuf; n->stlen = cnt; - n->stref = 1; + n->valref = 1; n->type = Node_val; n->stfmt = -1; n->flags = (STRING|STRCUR|MAYBE_NUM|FIELD); @@ -288,7 +286,7 @@ void reset_record() { - register int i; + int i; NODE *n; (void) force_string(fields_arr[0]); @@ -319,15 +317,16 @@ void set_NF() { - register int i; + int i; + long nf; NODE *n; assert(NF != -1); - NF = (long) force_number(NF_node->var_value); - - if (NF < 0) + nf = (long) force_number(NF_node->var_value); + if (nf < 0) fatal(_("NF set to negative value")); + NF = nf; if (NF > nf_high_water) grow_fields_arr(NF); @@ -365,14 +364,16 @@ Regexp *rp, Setfunc set, /* routine to set the value of the parsed field */ NODE *n, + NODE *sep_arr, /* array of field separators (maybe NULL) */ int in_middle) { - register char *scan = *buf; - register long nf = parse_high_water; - register char *field; - register char *end = scan + len; + char *scan = *buf; + long nf = parse_high_water; + char *field; + char *end = scan + len; int regex_flags = RE_NEED_START; -#ifdef MBS_SUPPORT + char *sep; +#if MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs; if (gawk_mb_cur_max > 1) @@ -387,16 +388,24 @@ if (len == 0) return nf; - if (RS_is_null && default_FS) + if (RS_is_null && default_FS) { + sep = scan; while (scan < end && (*scan == ' ' || *scan == '\t' || *scan == '\n')) scan++; + if (sep_arr != NULL && sep < scan) + set_element(nf, sep, (long)(scan - sep), sep_arr); + } + + if (rp == NULL) /* use FS */ + rp = FS_regexp; + field = scan; while (scan < end && research(rp, scan, 0, (end - scan), regex_flags) != -1 && nf < up_to) { regex_flags |= RE_NO_BOL; if (REEND(rp, scan) == RESTART(rp, scan)) { /* null match */ -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { mbclen = mbrlen(scan, end-scan, &mbs); if ((mbclen == 1) || (mbclen == (size_t) -1) @@ -417,6 +426,9 @@ } (*set)(++nf, field, (long)(scan + RESTART(rp, scan) - field), n); + if (sep_arr != NULL) + set_element(nf, scan + RESTART(rp, scan), + (long) (REEND(rp, scan) - RESTART(rp, scan)), sep_arr); scan += REEND(rp, scan); field = scan; if (scan == end) /* FS at end of record */ @@ -446,13 +458,15 @@ Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n, + NODE *sep_arr, /* array of field separators (maybe NULL) */ int in_middle ATTRIBUTE_UNUSED) { - register char *scan = *buf; - register long nf = parse_high_water; - register char *field; - register char *end = scan + len; + char *scan = *buf; + long nf = parse_high_water; + char *field; + char *end = scan + len; char sav; + char *sep; if (up_to == UNLIMITED) nf = 0; @@ -474,20 +488,31 @@ /* because it will be destroyed now: */ *end = ' '; /* sentinel character */ + sep = scan; for (; nf < up_to; scan++) { /* * special case: fs is single space, strip leading whitespace */ while (scan < end && (*scan == ' ' || *scan == '\t' || *scan == '\n')) scan++; + + if (sep_arr != NULL && scan > sep) + set_element(nf, sep, (long) (scan - sep), sep_arr); + if (scan >= end) break; + field = scan; + while (*scan != ' ' && *scan != '\t' && *scan != '\n') scan++; + (*set)(++nf, field, (long)(scan - field), n); + if (scan == end) break; + + sep = scan; } /* everything done, restore original char at *end */ @@ -514,12 +539,13 @@ Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n, + NODE *dummy ATTRIBUTE_UNUSED, /* sep_arr not needed here: hence dummy */ int in_middle ATTRIBUTE_UNUSED) { - register char *scan = *buf; - register long nf = parse_high_water; - register char *field; - register char *end = scan + len; + char *scan = *buf; + long nf = parse_high_water; + char *field; + char *end = scan + len; char sav; if (up_to == UNLIMITED) @@ -579,18 +605,19 @@ Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n, + NODE *sep_arr, /* array of field separators (maybe NULL) */ int in_middle ATTRIBUTE_UNUSED) { - register char *scan = *buf; - register long nf = parse_high_water; - register char *end = scan + len; + char *scan = *buf; + long nf = parse_high_water; + char *end = scan + len; if (up_to == UNLIMITED) nf = 0; if (len == 0) return nf; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { mbstate_t mbs; memset(&mbs, 0, sizeof(mbstate_t)); @@ -601,13 +628,18 @@ /* We treat it as a singlebyte character. */ mbclen = 1; } + if (sep_arr != NULL && nf > 0) + set_element(nf, scan, 0L, sep_arr); (*set)(++nf, scan, mbclen, n); scan += mbclen; } } else #endif - for (; nf < up_to && scan < end; scan++) + for (; nf < up_to && scan < end; scan++) { + if (sep_arr != NULL && nf > 0) + set_element(nf, scan, 0L, sep_arr); (*set)(++nf, scan, 1L, n); + } *buf = scan; return nf; @@ -628,15 +660,16 @@ Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n, + NODE *sep_arr, /* array of field separators (maybe NULL) */ int in_middle ATTRIBUTE_UNUSED) { - register char *scan = *buf; - register char fschar; - register long nf = parse_high_water; - register char *field; - register char *end = scan + len; + char *scan = *buf; + char fschar; + long nf = parse_high_water; + char *field; + char *end = scan + len; char sav; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs; if (gawk_mb_cur_max > 1) @@ -660,7 +693,7 @@ for (; nf < up_to;) { field = scan; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { while (*scan != fschar) { mbclen = mbrlen(scan, end-scan, &mbs); @@ -678,6 +711,8 @@ (*set)(++nf, field, (long)(scan - field), n); if (scan == end) break; + if (sep_arr != NULL) + set_element(nf, scan, 1L, sep_arr); scan++; if (scan == end) { /* FS at end of record */ (*set)(++nf, field, 0L, n); @@ -706,12 +741,13 @@ Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n, + NODE *dummy ATTRIBUTE_UNUSED, /* sep_arr not needed here: hence dummy */ int in_middle ATTRIBUTE_UNUSED) { - register char *scan = *buf; - register long nf = parse_high_water; - register char *end = scan + len; -#ifdef MBS_SUPPORT + char *scan = *buf; + long nf = parse_high_water; + char *end = scan + len; +#if MBS_SUPPORT int nmbc; size_t mbclen; size_t mbslen; @@ -727,7 +763,7 @@ if (len == 0) return nf; for (; nf < up_to && (len = FIELDWIDTHS[nf+1]) != -1; ) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT if (gawk_mb_cur_max > 1) { nmbc = 0; mbslen = 0; @@ -767,12 +803,20 @@ return nf; } +/* invalidate_field0 --- $0 needs reconstruction */ + +void +invalidate_field0() +{ + field0_valid = FALSE; +} + /* get_field --- return a particular $n */ /* assign is not NULL if this field is on the LHS of an assign */ NODE ** -get_field(register long requested, Func_ptr *assign) +get_field(long requested, Func_ptr *assign) { int in_middle = FALSE; /* @@ -783,11 +827,13 @@ if (! field0_valid) { /* first, parse remainder of input record */ if (NF == -1) { - NF = (*parse_field)(UNLIMITED-1, &parse_extent, + NF = (*parse_field)(UNLIMITED - 1, &parse_extent, fields_arr[0]->stlen - (parse_extent - fields_arr[0]->stptr), save_FS, FS_regexp, set_field, - (NODE *) NULL, in_middle); + (NODE *) NULL, + (NODE *) NULL, + in_middle); parse_high_water = NF; } rebuild_record(); @@ -799,8 +845,21 @@ /* assert(requested > 0); */ +#if 0 if (assign != NULL) field0_valid = FALSE; /* $0 needs reconstruction */ +#else + /* + * Keep things uniform. Also, mere intention of assigning something + * to $n should not make $0 invalid. Makes sense to invalidate $0 + * after the actual assignment is performed. Not a real issue in + * the interpreter otherwise, but causes problem in the + * debugger when watching or printing fields. + */ + + if (assign != NULL) + *assign = invalidate_field0; /* $0 needs reconstruction */ +#endif if (requested <= parse_high_water) /* already parsed this field */ return &fields_arr[requested]; @@ -816,7 +875,7 @@ in_middle = TRUE; parse_high_water = (*parse_field)(requested, &parse_extent, fields_arr[0]->stlen - (parse_extent - fields_arr[0]->stptr), - save_FS, FS_regexp, set_field, (NODE *) NULL, in_middle); + save_FS, NULL, set_field, (NODE *) NULL, (NODE *) NULL, in_middle); /* * if we reached the end of the record, set NF to the number of @@ -828,7 +887,18 @@ */ if (parse_extent == fields_arr[0]->stptr + fields_arr[0]->stlen) NF = parse_high_water; - if (requested == UNLIMITED-1) /* UNLIMITED-1 means set NF */ + else if (parse_field == fpat_parse_field) { + /* FPAT parsing is wierd, isolate the special cases */ + char *rec_start = fields_arr[0]->stptr; + char *rec_end = fields_arr[0]->stptr + fields_arr[0]->stlen; + + if ( parse_extent > rec_end + || (parse_extent > rec_start && parse_extent < rec_end && requested == UNLIMITED-1)) + NF = parse_high_water; + else if (parse_extent == rec_start) /* could be no match for FPAT */ + NF = 0; + } + if (requested == UNLIMITED - 1) /* UNLIMITED-1 means set NF */ requested = parse_high_water; } if (parse_high_water < requested) { /* requested beyond end of record */ @@ -850,55 +920,86 @@ static void set_element(long num, char *s, long len, NODE *n) { - register NODE *it; + NODE *it; + NODE **lhs; + NODE *sub; it = make_string(s, len); it->flags |= MAYBE_NUM; - *assoc_lookup(n, tmp_number((AWKNUM) (num)), FALSE) = it; + sub = make_number((AWKNUM) (num)); + lhs = assoc_lookup(n, sub, FALSE); + unref(sub); + unref(*lhs); + *lhs = it; } /* do_split --- implement split(), semantics are same as for field splitting */ NODE * -do_split(NODE *tree) +do_split(int nargs) { - NODE *src, *arr, *sep, *fs, *src2, *fs2, *tmp; + NODE *src, *arr, *sep, *fs, *tmp, *sep_arr = NULL; char *s; - long (*parseit) P((long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, int)); + long (*parseit)(long, char **, int, NODE *, + Regexp *, Setfunc, NODE *, NODE *, int); Regexp *rp = NULL; - src = force_string(tree_eval(tree->lnode)); + if (nargs == 4) { + static short warned1 = FALSE, warned2 = FALSE; + + if (do_traditional || do_posix) { + fatal(_("split: fourth argument is a gawk extension")); + } + sep_arr = POP_PARAM(); + if (sep_arr->type != Node_var_array) + fatal(_("split: fourth argument is not an array")); + if (do_lint && ! warned1) { + warned1 = TRUE; + lintwarn(_("split: fourth argument is a gawk extension")); + } + if (do_lint_old && ! warned2) { + warned2 = TRUE; + warning(_("split: fourth argument is a gawk extension")); + } + } - arr = get_param(tree->rnode->lnode); + sep = POP(); + arr = POP_PARAM(); if (arr->type != Node_var_array) fatal(_("split: second argument is not an array")); - sep = tree->rnode->rnode->lnode; + if (sep_arr != NULL) { + if (sep_arr == arr) + fatal(_("split: cannot use the same array for second and fourth args")); + + /* This checks need to be done before clearing any of the arrays */ + for (tmp = sep_arr->parent_array; tmp != NULL; tmp = tmp->parent_array) + if (tmp == arr) + fatal(_("split: cannot use a subarray of second arg for fourth arg")); + for (tmp = arr->parent_array; tmp != NULL; tmp = tmp->parent_array) + if (tmp == sep_arr) + fatal(_("split: cannot use a subarray of fourth arg for second arg")); + assoc_clear(sep_arr); + } + assoc_clear(arr); + src = TOP_STRING(); if (src->stlen == 0) { /* * Skip the work if first arg is the null string. */ - free_temp(src); - /* - * Evaluate sep if it may have side effects. - */ - if ((sep->re_flags & (FS_DFLT|CONSTANT)) == 0) - free_temp(tree_eval(sep->re_exp)); - /* - * And now we can safely turn off the array. - */ - assoc_clear(arr); - return tmp_number((AWKNUM) 0); + decr_sp(); + DEREF(src); + return make_number((AWKNUM) 0); } - if ((sep->re_flags & FS_DFLT) != 0 && ! using_FIELDWIDTHS() && ! RS_is_null) { + if ((sep->re_flags & FS_DFLT) != 0 && current_field_sep() != Using_FIELDWIDTHS && ! RS_is_null) { parseit = parse_field; fs = force_string(FS_node->var_value); rp = FS_regexp; } else { - fs = force_string(tree_eval(sep->re_exp)); + fs = sep->re_exp; + if (fs->stlen == 0) { static short warned = FALSE; @@ -922,25 +1023,73 @@ } } - /* - * 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); + s = src->stptr; + tmp = make_number((AWKNUM) (*parseit)(UNLIMITED, &s, (int) src->stlen, + fs, rp, set_element, arr, sep_arr, FALSE)); - fs2 = dupnode(fs); - free_temp(fs); + decr_sp(); + DEREF(src); + return tmp; +} + +/* + * do_patsplit --- implement patsplit(), semantics are same as for field + * splitting with FPAT. + */ + +NODE * +do_patsplit(int nargs) +{ + NODE *src, *arr, *sep, *fpat, *tmp, *sep_arr = NULL; + char *s; + Regexp *rp = NULL; + if (nargs == 4) { + sep_arr = POP_PARAM(); + if (sep_arr->type != Node_var_array) + fatal(_("patsplit: fourth argument is not an array")); + } + sep = POP(); + arr = POP_PARAM(); + if (arr->type != Node_var_array) + fatal(_("patsplit: second argument is not an array")); + + src = TOP_STRING(); + + fpat = sep->re_exp; + if (fpat->stlen == 0) + fatal(_("patsplit: third argument must be non-null")); + + if (sep_arr != NULL) { + if (sep_arr == arr) + fatal(_("patsplit: cannot use the same array for second and fourth args")); + + /* This checks need to be done before clearing any of the arrays */ + for (tmp = sep_arr->parent_array; tmp != NULL; tmp = tmp->parent_array) + if (tmp == arr) + fatal(_("patsplit: cannot use a subarray of second arg for fourth arg")); + for (tmp = arr->parent_array; tmp != NULL; tmp = tmp->parent_array) + if (tmp == sep_arr) + fatal(_("patsplit: cannot use a subarray of fourth arg for second arg")); + assoc_clear(sep_arr); + } assoc_clear(arr); - s = src2->stptr; - tmp = tmp_number((AWKNUM) (*parseit)(UNLIMITED, &s, (int) src2->stlen, - fs2, rp, set_element, arr, FALSE)); - unref(src2); - unref(fs2); + if (src->stlen == 0) { + /* + * Skip the work if first arg is the null string. + */ + tmp = make_number((AWKNUM) 0); + } else { + rp = re_update(sep); + s = src->stptr; + tmp = make_number((AWKNUM) fpat_parse_field(UNLIMITED, &s, + (int) src->stlen, fpat, rp, + set_element, arr, sep_arr, FALSE)); + } + + decr_sp(); /* 1st argument not POP-ed */ + DEREF(src); return tmp; } @@ -949,12 +1098,12 @@ void set_FIELDWIDTHS() { - register char *scan; + char *scan; char *end; - register int i; + int i; static int fw_alloc = 4; static short warned = FALSE; - extern unsigned long strtoul P((const char *, char **endptr, int base)); + int fatal_error = FALSE; if (do_lint && ! warned) { warned = TRUE; @@ -978,19 +1127,21 @@ FIELDWIDTHS[0] = 0; for (i = 1; ; i++) { unsigned long int tmp; - if (i + 1 >= fw_alloc) { + if (i + 2 >= fw_alloc) { fw_alloc *= 2; erealloc(FIELDWIDTHS, int *, fw_alloc * sizeof(int), "set_FIELDWIDTHS"); } + /* Initialize value to be end of list */ + FIELDWIDTHS[i] = -1; /* Ensure that there is no leading `-' sign. Otherwise, strtoul would accept it and return a bogus result. */ while (is_blank(*scan)) { ++scan; } - if (*scan == '-') - fatal(_("invalid FIELDWIDTHS value, near `%s'"), - scan); - + if (*scan == '-') { + fatal_error = TRUE; + break; + } if (*scan == '\0') break; @@ -1000,10 +1151,12 @@ errno = 0; tmp = strtoul(scan, &end, 10); if (errno != 0 - || (*end != '\0' && ! is_blank(*end)) - || !(0 < tmp && tmp <= INT_MAX)) - fatal(_("invalid FIELDWIDTHS value, near `%s'"), - scan); + || (*end != '\0' && ! is_blank(*end)) + || !(0 < tmp && tmp <= INT_MAX) + ) { + fatal_error = TRUE; + break; + } FIELDWIDTHS[i] = tmp; scan = end; /* Skip past any trailing blanks. */ @@ -1013,11 +1166,12 @@ if (*scan == '\0') break; } - if (i == 1) /* empty string! */ - i--; FIELDWIDTHS[i+1] = -1; - update_PROCINFO("FS", "FIELDWIDTHS"); + update_PROCINFO_str("FS", "FIELDWIDTHS"); + if (fatal_error) + fatal(_("invalid FIELDWIDTHS value, near `%s'"), + scan); } /* set_FS --- handle things when FS is assigned to */ @@ -1032,7 +1186,7 @@ int remake_re = TRUE; /* - * If changing the way fields are split, obey least-suprise + * If changing the way fields are split, obey least-surprise * semantics, and force $0 to be split totally. */ if (fields_arr != NULL) @@ -1053,7 +1207,7 @@ FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); /* FS = FS */ - if (! using_FIELDWIDTHS()) { + if (current_field_sep() == Using_FS) { return; } else { remake_re = FALSE; @@ -1066,11 +1220,15 @@ 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; - } + + /* If FS_re_no_case assignment is fatal (make_regexp in remake_re) + * FS_regexp will be NULL with a non-null FS_re_yes_case. + * refree() handles null argument; no need for `if (FS_regexp != NULL)' below. + * Please do not remerge. + */ + refree(FS_re_yes_case); + refree(FS_re_no_case); + FS_re_yes_case = FS_re_no_case = FS_regexp = NULL; choose_fs_function: @@ -1121,20 +1279,18 @@ } } 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; - } + 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, TRUE); - FS_re_no_case = make_regexp(buf, strlen(buf), TRUE, TRUE); + FS_re_yes_case = make_regexp(buf, strlen(buf), FALSE, TRUE, TRUE); + FS_re_no_case = make_regexp(buf, strlen(buf), TRUE, TRUE, 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, TRUE); - FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE, TRUE); + FS_re_yes_case = make_regexp(fs->stptr, fs->stlen, FALSE, TRUE, TRUE); + FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE, TRUE, TRUE); FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); } else FS_re_yes_case = FS_re_no_case = FS_regexp = NULL; @@ -1148,27 +1304,381 @@ if (fs->stlen == 1 && parse_field == re_parse_field) FS_regexp = FS_re_yes_case; - update_PROCINFO("FS", "FS"); + update_PROCINFO_str("FS", "FS"); } -/* using_fieldwidths --- is FS or FIELDWIDTHS in use? */ +/* current_field_sep --- return what field separator is */ -int -using_fieldwidths() +field_sep_type +current_field_sep() { - return using_FIELDWIDTHS(); + if (parse_field == fw_parse_field) + return Using_FIELDWIDTHS; + else if (parse_field == fpat_parse_field) + return Using_FPAT; + else + return Using_FS; } -/* update_PROCINFO --- update PROCINFO[sub] when FS or FIELDWIDTHS set */ +/* update_PROCINFO_str --- update PROCINFO[sub] with string value */ -static void -update_PROCINFO(char *subscript, char *str) +void +update_PROCINFO_str(const char *subscript, const char *str) +{ + NODE **aptr; + NODE *tmp; + + if (PROCINFO_node == NULL) + return; + tmp = make_string(subscript, strlen(subscript)); + aptr = assoc_lookup(PROCINFO_node, tmp, FALSE); + unref(tmp); + unref(*aptr); + *aptr = make_string(str, strlen(str)); +} + +/* update_PROCINFO_num --- update PROCINFO[sub] with numeric value */ + +void +update_PROCINFO_num(const char *subscript, AWKNUM val) { NODE **aptr; + NODE *tmp; if (PROCINFO_node == NULL) return; + tmp = make_string(subscript, strlen(subscript)); + aptr = assoc_lookup(PROCINFO_node, tmp, FALSE); + unref(tmp); + unref(*aptr); + *aptr = make_number(val); +} + +/* set_FPAT --- handle an assignment to FPAT */ + +void +set_FPAT() +{ + static short warned = FALSE; + static NODE *save_fpat = NULL; + int remake_re = TRUE; + NODE *fpat; + + if (do_lint && ! warned) { + warned = TRUE; + lintwarn(_("`FPAT' is a gawk extension")); + } + if (do_traditional) /* quick and dirty, does the trick */ + return; + + /* + * If changing the way fields are split, obey least-suprise + * semantics, and force $0 to be split totally. + */ + if (fields_arr != NULL) + (void) get_field(UNLIMITED - 1, 0); + + /* It's possible that only IGNORECASE changed, or FPAT = FPAT */ + /* + * This comparison can't use cmp_nodes(), which pays attention + * to IGNORECASE, and that's not what we want. + */ + if (save_fpat + && FPAT_node->var_value->stlen == save_fpat->stlen + && memcmp(FPAT_node->var_value->stptr, save_fpat->stptr, save_fpat->stlen) == 0) { + if (FPAT_regexp != NULL) + FPAT_regexp = (IGNORECASE ? FPAT_re_no_case : FPAT_re_yes_case); + + /* FPAT = FPAT */ + if (current_field_sep() == Using_FPAT) { + return; + } else { + remake_re = FALSE; + goto set_fpat_function; + } + } + + unref(save_fpat); + save_fpat = dupnode(FPAT_node->var_value); + refree(FPAT_re_yes_case); + refree(FPAT_re_no_case); + FPAT_re_yes_case = FPAT_re_no_case = FPAT_regexp = NULL; + +set_fpat_function: + fpat = force_string(FPAT_node->var_value); + parse_field = fpat_parse_field; + + if (remake_re) { + refree(FPAT_re_yes_case); + refree(FPAT_re_no_case); + FPAT_re_yes_case = FPAT_re_no_case = FPAT_regexp = NULL; + + FPAT_re_yes_case = make_regexp(fpat->stptr, fpat->stlen, FALSE, TRUE, TRUE); + FPAT_re_no_case = make_regexp(fpat->stptr, fpat->stlen, TRUE, TRUE, TRUE); + FPAT_regexp = (IGNORECASE ? FPAT_re_no_case : FPAT_re_yes_case); + } - aptr = assoc_lookup(PROCINFO_node, tmp_string(subscript, strlen(subscript)), FALSE); - assign_val(aptr, tmp_string(str, strlen(str))); + update_PROCINFO_str("FS", "FPAT"); +} + +/* + * increment_scan --- macro to move scan pointer ahead by one character. + * Implementation varies if doing MBS or not. + */ + +#if MBS_SUPPORT +#define increment_scan(scanp, len) incr_scan(scanp, len, & mbs) +#else +#define increment_scan(scanp, len) ((*scanp)++) +#endif + +#if MBS_SUPPORT +/* incr_scan --- MBS version of increment_scan() */ + +static void +incr_scan(char **scanp, size_t len, mbstate_t *mbs) +{ + size_t mbclen = 0; + + if (gawk_mb_cur_max > 1) { + mbclen = mbrlen(*scanp, len, mbs); + if ( (mbclen == 1) + || (mbclen == (size_t) -1) + || (mbclen == (size_t) -2) + || (mbclen == 0)) { + /* We treat it as a singlebyte character. */ + mbclen = 1; + } + *scanp += mbclen; + } else + (*scanp)++; +} +#endif + +/* + * fpat_parse_field --- parse fields using a regexp. + * + * This is called both from get_field() and from do_patsplit() + * via (*parse_field)(). This variation is for when FPAT is a regular + * expression -- use the value to find field contents. + * + * This was really hard to get right. It happens to bear many resemblances + * to issues I had with getting gsub right with null matches. When dealing + * with that I prototyped in awk and had the foresight to save the awk code + * over in the C file. Starting with that as a base, I finally got to this + * awk code to do what I needed, and then translated it into C. Fortunately + * the C code bears a closer correspondance to the awk code here than over + * by gsub. + * + * BEGIN { + * FALSE = 0 + * TRUE = 1 + * + * fpat[1] = "([^,]*)|(\"[^\"]+\")" + * fpat[2] = fpat[1] + * fpat[3] = fpat[1] + * fpat[4] = "aa+" + * fpat[5] = fpat[4] + * + * data[1] = "Robbins,,Arnold," + * data[2] = "Smith,,\"1234 A Pretty Place, NE\",Sometown,NY,12345-6789,USA" + * data[3] = "Robbins,Arnold,\"1234 A Pretty Place, NE\",Sometown,NY,12345-6789,USA" + * data[4] = "bbbaaacccdddaaaaaqqqq" + * data[5] = "bbbaaacccdddaaaaaqqqqa" # should get trailing qqqa + * + * for (i = 1; i in data; i++) { + * printf("Splitting: <%s>\n", data[i]) + * n = mypatsplit(data[i], fields, fpat[i], seps) + * print "n =", n + * for (j = 1; j <= n; j++) + * printf("fields[%d] = <%s>\n", j, fields[j]) + * for (j = 0; j in seps; j++) + * printf("seps[%s] = <%s>\n", j, seps[j]) + * } + * } + * + * function mypatsplit(string, array, pattern, seps, + * eosflag, non_empty, nf) # locals + * { + * delete array + * delete seps + * if (length(string) == 0) + * return 0 + * + * eosflag = non_empty = FALSE + * nf = 0 + * while (match(string, pattern)) { + * if (RLENGTH > 0) { # easy case + * non_empty = TRUE + * if (! (nf in seps)) { + * if (RSTART == 1) # match at front of string + * seps[nf] = "" + * else + * seps[nf] = substr(string, 1, RSTART - 1) + * } + * array[++nf] = substr(string, RSTART, RLENGTH) + * string = substr(string, RSTART+RLENGTH) + * if (length(string) == 0) + * break + * } else if (non_empty) { + * # last match was non-empty, and at the + * # current character we get a zero length match, + * # which we don't want, so skip over it + * non_empty = FALSE + * seps[nf] = substr(string, 1, 1) + * string = substr(string, 2) + * } else { + * # 0 length match + * if (! (nf in seps)) { + * if (RSTART == 1) + * seps[nf] = "" + * else + * seps[nf] = substr(string, 1, RSTART - 1) + * } + * array[++nf] = "" + * if (! non_empty && ! eosflag) { # prev was empty + * seps[nf] = substr(string, 1, 1) + * } + * if (RSTART == 1) { + * string = substr(string, 2) + * } else { + * string = substr(string, RSTART + 1) + * } + * non_empty = FALSE + * } + * if (length(string) == 0) { + * if (eosflag) + * break + * else + * eosflag = TRUE + * } + * } + * if (length(string) > 0) + * seps[nf] = string + * + * return length(array) + * } + */ +static long +fpat_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 ATTRIBUTE_UNUSED, + Regexp *rp, + Setfunc set, /* routine to set the value of the parsed field */ + NODE *n, + NODE *sep_arr, /* array of field separators (may be NULL) */ + int in_middle) +{ + char *scan = *buf; + long nf = parse_high_water; + char *start; + char *end = scan + len; + int regex_flags = RE_NEED_START; + int need_to_set_sep; + int non_empty; + int eosflag; +#if MBS_SUPPORT + mbstate_t mbs; + + if (gawk_mb_cur_max > 1) + memset(&mbs, 0, sizeof(mbstate_t)); +#endif + + if (up_to == UNLIMITED) + nf = 0; + + if (len == 0) + return nf; + + if (rp == NULL) /* use FPAT */ + rp = FPAT_regexp; + + if (in_middle) { + regex_flags |= RE_NO_BOL; + non_empty = rp->non_empty; + } else + non_empty = FALSE; + + eosflag = FALSE; + need_to_set_sep = TRUE; + start = scan; + while (research(rp, scan, 0, (end - scan), regex_flags) != -1 + && nf < up_to) { + + if (REEND(rp, scan) > RESTART(rp, scan)) { /* if (RLENGTH > 0) */ + non_empty = TRUE; + if (sep_arr != NULL && need_to_set_sep) { + if (RESTART(rp, scan) == 0) /* match at front */ + set_element(nf, start, 0L, sep_arr); + else + set_element(nf, + start, + (long) RESTART(rp, scan), + sep_arr); + } + /* field is text that matched */ + (*set)(++nf, + scan + RESTART(rp, scan), + (long)(REEND(rp, scan) - RESTART(rp, scan)), + n); + + scan += REEND(rp, scan); + if (scan >= end) + break; + need_to_set_sep = TRUE; + } else if (non_empty) { /* else if non_empty */ + /* + * last match was non-empty, and at the + * current character we get a zero length match, + * which we don't want, so skip over it + */ + non_empty = FALSE; + if (sep_arr != NULL) { + need_to_set_sep = FALSE; + set_element(nf, start, 1L, sep_arr); + } + increment_scan(& scan, end - scan); + } else { + /* 0 length match */ + if (sep_arr != NULL && need_to_set_sep) { + if (RESTART(rp, scan) == 0) /* RSTART == 1 */ + set_element(nf, start, 0L, sep_arr); + else + set_element(nf, start, + (long) RESTART(rp, scan), + sep_arr); + } + need_to_set_sep = TRUE; + (*set)(++nf, scan, 0L, n); + if (! non_empty && ! eosflag) { /* prev was empty */ + if (sep_arr != NULL) { + set_element(nf, start, 1L, sep_arr); + need_to_set_sep = FALSE; + } + } + if (RESTART(rp, scan) == 0) + increment_scan(& scan, end - scan); + else { + scan += RESTART(rp, scan); + } + non_empty = FALSE; + } + if (scan >= end) { /* length(string) == 0 */ + if (eosflag) + break; + else + eosflag = TRUE; + } + + start = scan; + } + if (scan < end) { + if (sep_arr != NULL) + set_element(nf, scan, (long) (end - scan), sep_arr); + } + + *buf = scan; + rp->non_empty = non_empty; + return nf; } diff -Nru gawk-3.1.8+dfsg/floatcomp.c gawk-4.0.1+dfsg/floatcomp.c --- gawk-3.1.8+dfsg/floatcomp.c 2010-01-28 16:06:58.000000000 +0000 +++ gawk-4.0.1+dfsg/floatcomp.c 2011-02-27 06:00:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -79,13 +79,7 @@ AWKNUM Floor(AWKNUM n) { - return floor(n -#if 0 -#ifdef _CRAY - * (1.0 + DBL_EPSILON) -#endif -#endif - ); + return floor(n); } /* Ceil --- do ceil(), also for Cray */ @@ -93,13 +87,7 @@ AWKNUM Ceil(AWKNUM n) { - return ceil(n -#if 0 -#ifdef _CRAY - * (1.0 + DBL_EPSILON) -#endif -#endif - ); + return ceil(n); } #ifdef HAVE_UINTMAX_T diff -Nru gawk-3.1.8+dfsg/gawkmisc.c gawk-4.0.1+dfsg/gawkmisc.c --- gawk-3.1.8+dfsg/gawkmisc.c 2010-04-20 08:15:00.000000000 +0000 +++ gawk-4.0.1+dfsg/gawkmisc.c 2011-02-27 06:00:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2004, 2010 + * Copyright (C) 1986, 1988, 1989, 1991-2004, 2010, 2011 * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -32,44 +32,26 @@ /* some old compilers don't grok #elif. sigh */ -#ifdef __EMX__ +#if defined(__EMX__) || defined(__DJGPP__) || defined(__MINGW32__) #include "pc/gawkmisc.pc" -#else /* not __EMX__ */ -#if defined(MSDOS) || defined(OS2) || defined(WIN32) -#include "gawkmisc.pc" -#else /* not MSDOS, not OS2, not WIN32 */ +#else /* not __DJGPP__, not __MINGW32__ */ #if defined(VMS) #include "vms/gawkmisc.vms" #else /* not VMS */ -#if defined(atarist) -#include "unsupported/atari/gawkmisc.atr" -#else /* not atarist */ -#if defined(TANDEM) -#include "tmiscc" -#else /* not TANDEM */ #include "posix/gawkmisc.c" -#endif /* not TANDEM */ -#endif /* not atarist */ #endif /* not VMS */ -#endif /* not MSDOS, not OS2, not WIN32 */ -#endif /* not __EMX__ */ +#endif /* not __DJGPP__, not __MINGW32__ */ /* xmalloc --- provide this so that other GNU library routines work */ -#if __STDC__ typedef void *pointer; -#else -typedef char *pointer; -#endif -extern pointer xmalloc P((size_t bytes)); /* get rid of gcc warning */ +extern pointer xmalloc(size_t bytes); /* get rid of gcc warning */ pointer xmalloc(size_t bytes) { pointer p; - emalloc(p, pointer, bytes, "xmalloc"); - return p; } diff -Nru gawk-3.1.8+dfsg/getopt.c gawk-4.0.1+dfsg/getopt.c --- gawk-3.1.8+dfsg/getopt.c 2010-04-12 19:49:55.000000000 +0000 +++ gawk-4.0.1+dfsg/getopt.c 2012-03-28 19:47:54.000000000 +0000 @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-1996,1998-2004,2008,2009,2010 + Copyright (C) 1987-1996,1998-2004,2008,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -17,9 +17,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ @@ -49,14 +48,22 @@ # endif #endif +/* !@#$%^&*() !!!!!!!! */ +#ifdef GAWK +#undef ELIDE_CODE +#endif + #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -/* Don't include stdlib.h for non-GNU C libraries because some of them - contain conflicting prototypes for getopt. */ +#if defined (__GNU_LIBRARY__) || defined (__CYGWIN__) || defined(DJGPP) +/* Don't include stdlib.h for + * non-GNU C libraries + * non-Cygwin + * non-DJGPP + * because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ @@ -74,7 +81,7 @@ # define _(msgid) gettext (msgid) #endif -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC # include #endif @@ -526,23 +533,29 @@ || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; + unsigned int namelen; const struct option *p; const struct option *pfound = NULL; + struct option_list + { + const struct option *p; + struct option_list *next; + int needs_free; + } *ambig_list = NULL; int exact = 0; - int ambig = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; + namelen = nameend - d->__nextchar; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) + if (!strncmp (p->name, d->__nextchar, namelen)) { - if ((unsigned int) (nameend - d->__nextchar) - == (unsigned int) strlen (p->name)) + if (namelen == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; @@ -560,19 +573,47 @@ || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) + { /* Second or later nonexact match found. */ - ambig = 1; + struct option_list *newp = malloc (sizeof (*newp)); + newp->p = p; + newp->needs_free = 1; + newp->next = ambig_list; + ambig_list = newp; + } } - if (ambig && !exact) + if (ambig_list != NULL && !exact) { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; + struct option_list first; + first.p = pfound; + first.next = ambig_list; + first.needs_free = 0; + ambig_list = &first; + +#if defined _LIBC + char *buf = NULL; + size_t buflen = 0; + + FILE *fp = open_memstream (&buf, &buflen); + if (fp != NULL) + { + fprintf (fp, + _("%s: option '%s' is ambiguous; possibilities:"), + argv[0], argv[d->optind]); + + do + { + fprintf (fp, " '--%s'", ambig_list->p->name); + ambig_list = ambig_list->next; + } + while (ambig_list != NULL); + + fputc_unlocked ('\n', fp); - if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), - argv[0], argv[d->optind]) >= 0) + if (__builtin_expect (fclose (fp) != EOF, 1)) { _IO_flockfile (stderr); @@ -586,9 +627,24 @@ free (buf); } + } #else - fprintf (stderr, _("%s: option '%s' is ambiguous\n"), + fprintf (stderr, + _("%s: option '%s' is ambiguous; possibilities:"), argv[0], argv[d->optind]); + do + { + struct option_list *tmp_next; + + fprintf (stderr, " '--%s'", ambig_list->p->name); + tmp_next = ambig_list->next; + if (ambig_list->needs_free) + free(ambig_list); + ambig_list = tmp_next; + } + while (ambig_list != NULL); + + fputc ('\n', stderr); #endif } d->__nextchar += strlen (d->__nextchar); @@ -611,7 +667,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; int n; #endif @@ -619,7 +675,7 @@ if (argv[d->optind - 1][1] == '-') { /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); @@ -632,7 +688,7 @@ else { /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], @@ -645,7 +701,7 @@ #endif } -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC if (n >= 0) { _IO_flockfile (stderr); @@ -678,7 +734,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; if (__asprintf (&buf, _("\ @@ -729,7 +785,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; int n; #endif @@ -737,7 +793,7 @@ if (argv[d->optind][1] == '-') { /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else @@ -748,7 +804,7 @@ else { /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else @@ -757,7 +813,7 @@ #endif } -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC if (n >= 0) { _IO_flockfile (stderr); @@ -795,19 +851,19 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; int n; #endif -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); #endif -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC if (n >= 0) { _IO_flockfile (stderr); @@ -838,6 +894,9 @@ int indfound = 0; int option_index; + if (longopts == NULL) + goto no_longs; + /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { @@ -850,7 +909,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; if (__asprintf (&buf, @@ -924,7 +983,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), @@ -964,7 +1023,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; if (__asprintf (&buf, _("\ @@ -1003,7 +1062,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; if (__asprintf (&buf, _("\ @@ -1045,6 +1104,8 @@ } return pfound->val; } + + no_longs: d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } @@ -1076,7 +1137,7 @@ { if (print_errors) { -#if defined _LIBC && defined USE_IN_LIBIO +#if defined _LIBC char *buf; if (__asprintf (&buf, _("\ diff -Nru gawk-3.1.8+dfsg/getopt.h gawk-4.0.1+dfsg/getopt.h --- gawk-3.1.8+dfsg/getopt.h 2010-04-12 19:50:06.000000000 +0000 +++ gawk-4.0.1+dfsg/getopt.h 2012-03-28 19:47:54.000000000 +0000 @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-1994,1996-1999,2001,2003,2004 + Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,9 +14,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ #ifndef _GETOPT_H @@ -158,9 +157,9 @@ additional functionality can be disable at runtime. This redirection helps to also do this at runtime. */ # ifdef __REDIRECT - extern int __REDIRECT (getopt, (int ___argc, char *const *___argv, + extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv, const char *__shortopts), - __posix_getopt) __THROW; + __posix_getopt); # else extern int __posix_getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; diff -Nru gawk-3.1.8+dfsg/getopt1.c gawk-4.0.1+dfsg/getopt1.c --- gawk-3.1.8+dfsg/getopt1.c 2010-04-12 19:50:25.000000000 +0000 +++ gawk-4.0.1+dfsg/getopt1.c 2012-03-28 19:47:54.000000000 +0000 @@ -13,9 +13,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ #ifdef HAVE_CONFIG_H #include @@ -46,6 +45,11 @@ #endif #endif +/* !@#$%^&*() !!!!!!!! */ +#ifdef GAWK +#undef ELIDE_CODE +#endif + #ifndef ELIDE_CODE diff -Nru gawk-3.1.8+dfsg/getopt_int.h gawk-4.0.1+dfsg/getopt_int.h --- gawk-3.1.8+dfsg/getopt_int.h 2010-04-12 19:50:32.000000000 +0000 +++ gawk-4.0.1+dfsg/getopt_int.h 2012-03-28 19:47:54.000000000 +0000 @@ -14,9 +14,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 diff -Nru gawk-3.1.8+dfsg/gettext.h gawk-4.0.1+dfsg/gettext.h --- gawk-3.1.8+dfsg/gettext.h 2007-01-12 10:20:58.000000000 +0000 +++ gawk-4.0.1+dfsg/gettext.h 2010-12-22 19:16:10.000000000 +0000 @@ -1,9 +1,9 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 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) + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -11,7 +11,7 @@ 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 + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -73,18 +73,32 @@ On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ /* ADR: BOGUS. Remove const. 19 Feb 2002 */ +# undef gettext # define gettext(Msgid) ((char *) (Msgid)) -# define dgettext(Domainname, Msgid) ((char *) (Msgid)) -# define dcgettext(Domainname, Msgid, Category) ((char *) (Msgid)) +# undef dgettext +# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) +# undef dcgettext +# define dcgettext(Domainname, Msgid, Category) \ + ((void) (Category), dgettext (Domainname, Msgid)) +# undef ngettext # define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2)) + ((N) == 1 \ + ? ((void) (Msgid2), (const char *) (Msgid1)) \ + : ((void) (Msgid1), (const char *) (Msgid2))) +# undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2)) + ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) +# undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2)) -# define textdomain(Domainname) ((char *) (Domainname)) -# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname)) -# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset)) + ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) +# undef textdomain +# define textdomain(Domainname) ((const char *) (Domainname)) +# undef bindtextdomain +# define bindtextdomain(Domainname, Dirname) \ + ((void) (Domainname), (const char *) (Dirname)) +# undef bind_textdomain_codeset +# define bind_textdomain_codeset(Domainname, Codeset) \ + ((void) (Domainname), (const char *) (Codeset)) #endif @@ -136,8 +150,8 @@ #endif static const char * pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) + const char *msg_ctxt_id, const char *msgid, + int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) @@ -155,9 +169,9 @@ #endif static const char * npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) + const char *msg_ctxt_id, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); @@ -174,7 +188,8 @@ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (__GNUC__ >= 3 || __GNUG__ >= 2 /* || __STDC_VERSION__ >= 199901L */ ) + (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include @@ -194,8 +209,8 @@ #endif static const char * dcpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - int category) + const char *msgctxt, const char *msgid, + int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; @@ -217,10 +232,10 @@ translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) - free (msg_ctxt_id); + free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) - return translation; + return translation; } return msgid; } @@ -239,9 +254,9 @@ #endif static const char * dcnpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) + const char *msgctxt, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; @@ -263,10 +278,10 @@ translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) - free (msg_ctxt_id); + free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) - return translation; + return translation; } return (n == 1 ? msgid : msgid_plural); } diff -Nru gawk-3.1.8+dfsg/hard-locale.h gawk-4.0.1+dfsg/hard-locale.h --- gawk-3.1.8+dfsg/hard-locale.h 2010-03-29 05:35:04.000000000 +0000 +++ gawk-4.0.1+dfsg/hard-locale.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* hard-locale.h -- Same as hard-locale.c. - * - * For gawk, put this in a header file, provides source code - * compatibility with GNU grep for dfa.c, so that dfa.c need - * not be continually modified by hand. - */ -/* hard-locale.c -- Determine whether a locale is hard. - Copyright 1997, 1998, 1999, 2010 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Return nonzero if the current CATEGORY locale is hard, i.e. if you - can't get away with assuming traditional C or POSIX behavior. */ -static int -hard_locale (int category) -{ -#if ! (defined ENABLE_NLS && HAVE_SETLOCALE) - return 0; -#else - - int hard = 1; - char const *p = setlocale (category, 0); - - if (p) - { -# if defined __GLIBC__ && __GLIBC__ >= 2 - if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) - hard = 0; -# else - char *locale = (char *) xmalloc (strlen (p) + 1); - strcpy (locale, p); - - /* Temporarily set the locale to the "C" and "POSIX" locales to - find their names, so that we can determine whether one or the - other is the caller's locale. */ - if (((p = setlocale (category, "C")) && strcmp (p, locale) == 0) - || ((p = setlocale (category, "POSIX")) && strcmp (p, locale) == 0)) - hard = 0; - - /* Restore the caller's locale. */ - setlocale (category, locale); - free(locale); -# endif - } - - return hard; - -#endif -} diff -Nru gawk-3.1.8+dfsg/io.c gawk-4.0.1+dfsg/io.c --- gawk-3.1.8+dfsg/io.c 2010-03-29 02:38:38.000000000 +0000 +++ gawk-4.0.1+dfsg/io.c 2012-03-28 19:47:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -23,16 +23,21 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +/* For OSF/1 to get struct sockaddr_storage */ +#if defined(__osf__) && !defined(_OSF_SOURCE) +#define _OSF_SOURCE +#endif + #include "awk.h" #ifdef HAVE_SYS_PARAM_H #undef RE_DUP_MAX /* avoid spurious conflict w/regex.h */ #include #endif /* HAVE_SYS_PARAM_H */ +#ifdef HAVE_SYS_IOCTL_H +#include +#endif /* HAVE_SYS_IOCTL_H */ -#ifndef O_RDONLY -#include -#endif #ifndef O_ACCMODE #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) #endif @@ -81,6 +86,16 @@ #endif /* HAVE_SOCKETS */ +#ifndef AF_UNSPEC +#define AF_UNSPEC 0 +#endif +#ifndef AF_INET +#define AF_INET 2 +#endif +#ifndef AF_INET6 +#define AF_INET6 10 +#endif + #ifdef HAVE_LIMITS_H #include #endif @@ -93,8 +108,6 @@ #define ENFILE EMFILE #endif -extern int MRL; - #ifdef HAVE_SOCKETS #ifndef SHUT_RD @@ -111,33 +124,23 @@ #endif /* HAVE_SOCKETS */ -#ifdef atarist -#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) +#if defined(__DJGPP__) || defined(__MINGW32__) #define PIPES_SIMULATED #endif typedef enum { CLOSE_ALL, CLOSE_TO, CLOSE_FROM } two_way_close_type; -/* For internal files, /dev/pid, etc. */ -#define INTERNAL_HANDLE (-42) - /* Several macros make the code a bit clearer: */ /* */ /* */ /* = */ -#define at_eof(iop) ((iop->flag & IOP_AT_EOF) != 0) -#define has_no_data(iop) (iop->dataend == NULL) -#define no_data_left(iop) (iop->off >= iop->dataend) -#define is_internal(iop) ((iop->flag & IOP_IS_INTERNAL) != 0) +#define at_eof(iop) (((iop)->flag & IOP_AT_EOF) != 0) +#define has_no_data(iop) ((iop)->dataend == NULL) +#define no_data_left(iop) ((iop)->off >= (iop)->dataend) /* The key point to the design is to split out the code that searches through */ /* a buffer looking for the record and the terminator into separate routines, */ /* with a higher-level routine doing the reading of data and buffer management. */ @@ -176,37 +179,32 @@ size_t rt_len; /* length of terminator */ }; -static IOBUF *nextfile P((int skipping)); -static int inrec P((IOBUF *iop)); -static int iop_close P((IOBUF *iop)); -struct redirect *redirect P((NODE *tree, int *errflg)); -static void close_one P((void)); -static int close_redir P((struct redirect *rp, int exitwarn, two_way_close_type how)); + +static int iop_close(IOBUF *iop); +struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg); +static void close_one(void); +static int close_redir(struct redirect *rp, int exitwarn, two_way_close_type how); #ifndef PIPES_SIMULATED -static int wait_any P((int interesting)); +static int wait_any(int interesting); #endif -static IOBUF *gawk_popen P((const char *cmd, struct redirect *rp)); -static IOBUF *iop_open P((const char *file, const char *how, IOBUF *buf, int *isdir)); -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 str2mode P((const char *mode)); -static void spec_setup P((IOBUF *iop, int len)); -static IOBUF *specfdopen P((IOBUF *iop, const char *name, const char *mode)); -static IOBUF *pidopen P((IOBUF *iop, const char *name, const char *mode)); -static IOBUF *useropen P((IOBUF *iop, const char *name, const char *mode)); -static int two_way_open P((const char *str, struct redirect *rp)); -static int pty_vs_pipe P((const char *command)); - -static RECVALUE rs1scan P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)); -static RECVALUE rsnullscan P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)); -static RECVALUE rsrescan P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)); +static IOBUF *gawk_popen(const char *cmd, struct redirect *rp); +static IOBUF *iop_alloc(int fd, const char *name, IOBUF *buf, int do_openhooks); +static int gawk_pclose(struct redirect *rp); +static int str2mode(const char *mode); +static int two_way_open(const char *str, struct redirect *rp); +static int pty_vs_pipe(const char *command); +static void find_open_hook(IOBUF *iop); + +static RECVALUE rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state); +static RECVALUE rsnullscan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state); +static RECVALUE rsrescan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state); -static RECVALUE (*matchrec) P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)) = rs1scan; +static RECVALUE (*matchrec)(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) = rs1scan; -static int get_a_record P((char **out, IOBUF *iop, int *errcode)); +static int get_a_record(char **out, IOBUF *iop, int *errcode); -static void free_rp P((struct redirect *rp)); +static void free_rp(struct redirect *rp); +static int inetfile(const char *str, int *length, int *family); #if defined(HAVE_POPEN_H) #include "popen.h" @@ -227,9 +225,7 @@ extern NODE *ERRNO_node; extern NODE **fields_arr; -static jmp_buf filebuf; /* for do_nextfile() */ - -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__EMX__) || defined(__CYGWIN__) +#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__) || defined(__CYGWIN__) /* binmode --- convert BINMODE to string for fopen */ static const char * @@ -255,104 +251,144 @@ #ifdef VMS /* File pointers have an extra level of indirection, and there are cases where `stdin' can be null. That can crash gawk if fileno() is used as-is. */ -static int vmsrtl_fileno P((FILE *)); +static int vmsrtl_fileno(FILE *); static int vmsrtl_fileno(fp) FILE *fp; { return fileno(fp); } #undef fileno #define fileno(FP) (((FP) && *(FP)) ? vmsrtl_fileno(FP) : -1) #endif /* VMS */ -/* do_nextfile --- implement gawk "nextfile" extension */ - void -do_nextfile() +after_beginfile(IOBUF **curfile) { - (void) nextfile(TRUE); - longjmp(filebuf, 1); + IOBUF *iop; + + iop = *curfile; + assert(iop != NULL); + + if (iop->fd == INVALID_HANDLE) { + const char *fname; + int errcode; + + fname = iop->name; + errcode = iop->errcode; + iop->errcode = 0; + errno = 0; + update_ERRNO(); + iop_close(iop); + *curfile = NULL; + if (errcode == EISDIR && ! do_traditional) { + warning(_("command line argument `%s' is a directory: skipped"), fname); + return; /* read next file */ + } + fatal(_("cannot open file `%s' for reading (%s)"), + fname, strerror(errcode)); + } + + /* + * Open hooks could have been changed by BEGINFILE, + * so delay check until now. + */ + + find_open_hook(iop); } /* nextfile --- move to the next input data file */ -static IOBUF * -nextfile(int skipping) +int +nextfile(IOBUF **curfile, int skipping) { static long i = 1; static int files = FALSE; - NODE *arg; - static IOBUF *curfile = NULL; + NODE *arg, *tmp; static IOBUF mybuf; const char *fname; + int fd = INVALID_HANDLE; + int errcode; + IOBUF *iop = *curfile; - if (skipping) { - if (curfile != NULL) - iop_close(curfile); - curfile = NULL; - return NULL; + if (skipping) { /* for 'nextfile' call */ + errcode = 0; + if (iop != NULL) { + errcode = iop->errcode; + (void) iop_close(iop); + } + *curfile = NULL; + return (errcode == 0); } - if (curfile != NULL) { - if (at_eof(curfile)) { - (void) iop_close(curfile); - curfile = NULL; - } else - return curfile; + + if (iop != NULL) { + if (at_eof(iop)) { + assert(iop->fd != INVALID_HANDLE); + (void) iop_close(iop); + *curfile = NULL; + return 1; /* run endfile block */ + } else + return 0; } + for (; i < (long) (ARGC_node->lnode->numbr); i++) { - arg = *assoc_lookup(ARGV_node, tmp_number((AWKNUM) i), FALSE); - if (arg->stlen == 0) + tmp = make_number((AWKNUM) i); + (void) force_string(tmp); + arg = in_array(ARGV_node, tmp); + unref(tmp); + if (arg == NULL || arg->stlen == 0) continue; + arg = force_string(arg); arg->stptr[arg->stlen] = '\0'; if (! do_traditional) { unref(ARGIND_node->var_value); ARGIND_node->var_value = make_number((AWKNUM) i); } - if (! arg_assign(arg->stptr, FALSE)) { - int isdir = FALSE; + if (! arg_assign(arg->stptr, FALSE)) { files = TRUE; fname = arg->stptr; - curfile = iop_open(fname, binmode("r"), &mybuf, & isdir); - if (curfile == NULL) { -#if NO_DIRECTORY_FATAL - if (isdir) - continue; -#else - if (isdir && do_traditional) - continue; -#endif - if (whiny_users) { - warning(_("cannot open file `%s' for reading (%s)"), - fname, strerror(errno)); - continue; - } - goto give_up; - } - curfile->flag |= IOP_NOFREE_OBJ; + errno = 0; + fd = devopen(fname, binmode("r")); + errcode = errno; + if (! do_traditional) + update_ERRNO(); + /* This is a kludge. */ unref(FILENAME_node->var_value); FILENAME_node->var_value = dupnode(arg); FNR = 0; - i++; - break; + iop = *curfile = iop_alloc(fd, fname, &mybuf, FALSE); + if (fd == INVALID_HANDLE) + iop->errcode = errcode; + else + iop->errcode = 0; + iop->flag |= IOP_NOFREE_OBJ; + return ++i; /* run beginfile block */ } } + if (files == FALSE) { files = TRUE; /* no args. -- use stdin */ /* FNR is init'ed to 0 */ + errno = 0; + if (! do_traditional) + update_ERRNO(); unref(FILENAME_node->var_value); FILENAME_node->var_value = make_string("-", 1); + FILENAME_node->var_value->flags |= MAYBE_NUM; /* be pedantic */ fname = "-"; - curfile = iop_open(fname, binmode("r"), &mybuf, NULL); - if (curfile == NULL) - goto give_up; - curfile->flag |= IOP_NOFREE_OBJ; - } - return curfile; - -give_up: - fatal(_("cannot open file `%s' for reading (%s)"), - fname, strerror(errno)); - /* NOTREACHED */ - return (IOBUF *) 0; + iop = *curfile = iop_alloc(fileno(stdin), fname, &mybuf, FALSE); + iop->flag |= IOP_NOFREE_OBJ; + if (iop->fd == INVALID_HANDLE) { + errcode = errno; + errno = 0; + update_ERRNO(); + (void) iop_close(iop); + *curfile = NULL; + fatal(_("cannot open file `%s' for reading (%s)"), + fname, strerror(errcode)); + } + return ++i; /* run beginfile block */ + } + + return -1; /* end of input, run end block or Op_atexit */ } /* set_FNR --- update internal FNR from awk variable */ @@ -373,23 +409,24 @@ /* inrec --- This reads in a record from the input file */ -static int -inrec(IOBUF *iop) +int +inrec(IOBUF *iop, int *errcode) { char *begin; - register int cnt; + int cnt; int retval = 0; - if (at_eof(iop) && no_data_left(iop)) + if (at_eof(iop) && no_data_left(iop)) cnt = EOF; else if ((iop->flag & IOP_CLOSED) != 0) cnt = EOF; - else - cnt = get_a_record(&begin, iop, NULL); + else + cnt = get_a_record(&begin, iop, errcode); if (cnt == EOF) { - cnt = 0; retval = 1; + if (*errcode > 0) + update_ERRNO_saved(*errcode); } else { NR += 1; FNR += 1; @@ -399,6 +436,32 @@ return retval; } +/* remap_std_file --- reopen a standard descriptor on /dev/null */ + +static int +remap_std_file(int oldfd) +{ + int newfd; + int ret = -1; + + /* + * Give OS-specific routines in gawkmisc.c chance to interpret + * "/dev/null" as appropriate for their platforms. + */ + newfd = os_devopen("/dev/null", O_RDWR); + if (newfd == INVALID_HANDLE) + newfd = open("/dev/null", O_RDWR); + if (newfd >= 0) { + /* dup2() will close oldfd for us first. */ + ret = dup2(newfd, oldfd); + if (ret == 0) + close(newfd); + } else + ret = 0; + + return ret; +} + /* iop_close --- close an open IOP */ static int @@ -408,31 +471,26 @@ if (iop == NULL) return 0; + if (iop->fd == INVALID_HANDLE) { /* from nextfile(...) above */ + assert(iop->buf == NULL); + assert((iop->flag & IOP_NOFREE_OBJ) != 0); + 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) - ret = 0; - else -#endif - /* save these for re-use; don't free the storage */ - if ((iop->flag & IOP_IS_INTERNAL) != 0) { - iop->off = iop->buf; - iop->end = iop->buf + strlen(iop->buf); - iop->count = 0; - return 0; - } - - /* Don't close standard files or else crufty code elsewhere will lose */ - /* FIXME: *DO* close it. Just reopen on an invalid handle. */ + /* + * Closing standard files can cause crufty code elsewhere to lose. + * So we remap the standard file to /dev/null. + * Thanks to Jim Meyering for the suggestion. + */ if (iop->fd == fileno(stdin) || iop->fd == fileno(stdout) || iop->fd == fileno(stderr)) - ret = 0; + ret = remap_std_file(iop->fd); else ret = close(iop->fd); @@ -442,75 +500,38 @@ if (ret == -1) warning(_("close of fd %d (`%s') failed (%s)"), iop->fd, iop->name, strerror(errno)); - if ((iop->flag & IOP_NO_FREE) == 0) { - /* - * Be careful -- $0 may still reference the buffer even though - * an explicit close is being done; in the future, maybe we - * can do this a bit better. - */ - if (iop->buf) { - if ((fields_arr[0]->stptr >= iop->buf) - && (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; - /* - * 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; + /* + * Be careful -- $0 may still reference the buffer even though + * an explicit close is being done; in the future, maybe we + * can do this a bit better. + */ + if (iop->buf) { + if ((fields_arr[0]->stptr >= iop->buf) + && (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; + /* + * 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. + */ } - if ((iop->flag & IOP_NOFREE_OBJ) == 0) - free((char *) iop); + efree(iop->buf); + iop->buf = NULL; } + if ((iop->flag & IOP_NOFREE_OBJ) == 0) + efree(iop); return ret == -1 ? 1 : 0; } -/* do_input --- the main input processing loop */ - -void -do_input() -{ - 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; - } -} - /* redflags2str --- turn redirection flags into a string, for debugging */ const char * @@ -537,72 +558,79 @@ /* redirect --- Redirection for printf and print commands */ struct redirect * -redirect(NODE *tree, int *errflg) +redirect(NODE *redir_exp, int redirtype, int *errflg) { - register NODE *tmp; - register struct redirect *rp; - register char *str; + struct redirect *rp; + char *str; int tflag = 0; int outflag = 0; const char *direction = "to"; const char *mode; int fd; const char *what = NULL; - int isdir = FALSE; int new_rp = FALSE; + int len; /* used with /inet */ + static struct redirect *save_rp = NULL; /* hold onto rp that should + * be freed for reuse + */ - switch (tree->type) { - case Node_redirect_append: + if (do_sandbox) + fatal(_("redirection not allowed in sandbox mode")); + + switch (redirtype) { + case redirect_append: tflag = RED_APPEND; /* FALL THROUGH */ - case Node_redirect_output: + case redirect_output: outflag = (RED_FILE|RED_WRITE); tflag |= outflag; - if (tree->type == Node_redirect_output) + if (redirtype == redirect_output) what = ">"; else what = ">>"; break; - case Node_redirect_pipe: + case redirect_pipe: tflag = (RED_PIPE|RED_WRITE); what = "|"; break; - case Node_redirect_pipein: + case redirect_pipein: tflag = (RED_PIPE|RED_READ); what = "|"; break; - case Node_redirect_input: + case redirect_input: tflag = (RED_FILE|RED_READ); what = "<"; break; - case Node_redirect_twoway: + case redirect_twoway: tflag = (RED_READ|RED_WRITE|RED_TWOWAY); what = "|&"; break; default: - fatal(_("invalid tree type %s in redirect()"), - nodetype2str(tree->type)); - break; + cant_happen(); } - tmp = tree_eval(tree->subnode); - if (do_lint && (tmp->flags & STRCUR) == 0) + if (do_lint && (redir_exp->flags & STRCUR) == 0) lintwarn(_("expression in `%s' redirection only has numeric value"), what); - tmp = force_string(tmp); - str = tmp->stptr; + redir_exp = force_string(redir_exp); + str = redir_exp->stptr; if (str == NULL || *str == '\0') fatal(_("expression for `%s' redirection has null string value"), what); - if (do_lint - && (STREQN(str, "0", tmp->stlen) || STREQN(str, "1", tmp->stlen))) - lintwarn(_("filename `%s' for `%s' redirection may be result of logical expression"), str, what); + if (do_lint && (strncmp(str, "0", redir_exp->stlen) == 0 + || strncmp(str, "1", redir_exp->stlen) == 0)) + lintwarn(_("filename `%s' for `%s' redirection may be result of logical expression"), + str, what); + /* + * XXX: Use /inet4 and /inet6 with plain /inet being whatever + * we get back from the system. + */ #ifdef HAVE_SOCKETS - if (STREQN(str, "/inet/", 6)) { + if (inetfile(str, & len, NULL)) { tflag |= RED_SOCKET; - if (STREQN(str + 6, "tcp/", 4)) + if (strncmp(str + len, "tcp/", 4) == 0) tflag |= RED_TCP; /* use shutdown when closing */ } #endif /* HAVE_SOCKETS */ @@ -617,15 +645,15 @@ * we've gotten EOF from a child input pipeline, it's * good bet that the child has died. So recover it. */ - if ((rp->flag & RED_EOF) && tree->type == Node_redirect_pipein) { + if ((rp->flag & RED_EOF) && redirtype == redirect_pipein) { if (rp->pid != -1) wait_any(0); } #endif /* PIPES_SIMULATED */ /* now check for a match */ - if (strlen(rp->value) == tmp->stlen - && memcmp(rp->value, str, tmp->stlen) == 0 + if (strlen(rp->value) == redir_exp->stlen + && memcmp(rp->value, str, redir_exp->stlen) == 0 && ((rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)) == tflag || (outflag != 0 && (rp->flag & (RED_FILE|RED_WRITE)) == outflag))) { @@ -636,7 +664,7 @@ if (do_lint && rpflag != newflag) lintwarn( _("unnecessary mixing of `>' and `>>' for file `%.*s'"), - (int) tmp->stlen, rp->value); + (int) redir_exp->stlen, rp->value); break; } @@ -644,11 +672,14 @@ if (rp == NULL) { new_rp = TRUE; - emalloc(rp, struct redirect *, sizeof(struct redirect), - "redirect"); - emalloc(str, char *, tmp->stlen+1, "redirect"); - memcpy(str, tmp->stptr, tmp->stlen); - str[tmp->stlen] = '\0'; + if (save_rp != NULL) { + rp = save_rp; + efree(rp->value); + } else + emalloc(rp, struct redirect *, sizeof(struct redirect), "redirect"); + emalloc(str, char *, redir_exp->stlen + 1, "redirect"); + memcpy(str, redir_exp->stptr, redir_exp->stlen); + str[redir_exp->stlen] = '\0'; rp->value = str; rp->flag = tflag; rp->fp = NULL; @@ -657,73 +688,79 @@ rp->status = 0; } else str = rp->value; /* get \0 terminated string */ + save_rp = rp; while (rp->fp == NULL && rp->iop == NULL) { - if (! new_rp && rp->flag & RED_EOF) + if (! new_rp && rp->flag & RED_EOF) { /* * encountered EOF on file or pipe -- must be cleared * by explicit close() before reading more */ + save_rp = NULL; return rp; + } mode = NULL; errno = 0; - switch (tree->type) { - case Node_redirect_output: + switch (redirtype) { + case redirect_output: mode = binmode("w"); if ((rp->flag & RED_USED) != 0) mode = (rp->mode[1] == 'b') ? "ab" : "a"; break; - case Node_redirect_append: + case redirect_append: mode = binmode("a"); break; - case Node_redirect_pipe: + case redirect_pipe: /* synchronize output before new pipe */ (void) flush_io(); os_restore_mode(fileno(stdin)); if ((rp->fp = popen(str, binmode("w"))) == NULL) fatal(_("can't open pipe `%s' for output (%s)"), - str, strerror(errno)); + str, strerror(errno)); + /* set close-on-exec */ os_close_on_exec(fileno(rp->fp), str, "pipe", "to"); rp->flag |= RED_NOBUF; break; - case Node_redirect_pipein: + case redirect_pipein: direction = "from"; if (gawk_popen(str, rp) == NULL) fatal(_("can't open pipe `%s' for input (%s)"), str, strerror(errno)); break; - case Node_redirect_input: + case redirect_input: direction = "from"; - rp->iop = iop_open(str, binmode("r"), NULL, & isdir); - if (isdir) { + fd = devopen(str, binmode("r")); + if (fd == INVALID_HANDLE && errno == EISDIR) { *errflg = EISDIR; - free_rp(rp); + /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } + rp->iop = iop_alloc(fd, str, NULL, TRUE); break; - case Node_redirect_twoway: + case redirect_twoway: direction = "to/from"; if (! two_way_open(str, rp)) { #ifdef HAVE_SOCKETS - if (STREQN(str, "/inet/", 6)) { + if (inetfile(str, NULL, NULL)) { *errflg = errno; - free_temp(tmp); - free_rp(rp); + /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } else #endif fatal(_("can't open two way pipe `%s' for input/output (%s)"), - str, strerror(errno)); + str, strerror(errno)); } break; default: cant_happen(); } + if (mode != NULL) { errno = 0; fd = devopen(str, mode); + if (fd > INVALID_HANDLE) { if (fd == fileno(stdin)) rp->fp = stdin; @@ -747,7 +784,7 @@ if (rp->fp == NULL) close(fd); } - if (rp->fp != NULL && isatty(fd)) + if (rp->fp != NULL && os_isatty(fd)) rp->flag |= RED_NOBUF; /* Move rp to the head of the list. */ @@ -761,6 +798,7 @@ } } } + if (rp->fp == NULL && rp->iop == NULL) { /* too many files open -- close one and try again */ if (errno == EMFILE || errno == ENFILE) @@ -788,8 +826,9 @@ */ if (errflg != NULL) *errflg = errno; - if (tree->type == Node_redirect_output - || tree->type == Node_redirect_append) { + if (redirtype == redirect_output + || redirtype == redirect_append + ) { /* multiple messages make life easier for translators */ if (*direction == 'f') fatal(_("can't redirect from `%s' (%s)"), @@ -798,14 +837,12 @@ fatal(_("can't redirect to `%s' (%s)"), str, strerror(errno)); } else { - free_temp(tmp); - free_rp(rp); + /* do not free rp, saving it for reuse (save_rp = rp) */ return NULL; } } } } - free_temp(tmp); if (new_rp) { /* @@ -818,7 +855,7 @@ rp->next = red_head; red_head = rp; } - + save_rp = NULL; return rp; } @@ -841,8 +878,8 @@ static void close_one() { - register struct redirect *rp; - register struct redirect *rplast = NULL; + struct redirect *rp; + struct redirect *rplast = NULL; static short warned = FALSE; @@ -878,27 +915,29 @@ /* do_close --- completely close an open file or pipe */ NODE * -do_close(NODE *tree) +do_close(int nargs) { NODE *tmp, *tmp2; - register struct redirect *rp; + struct redirect *rp; two_way_close_type how = CLOSE_ALL; /* default */ - tmp = force_string(tree_eval(tree->lnode)); /* 1st arg: redir to close */ - - if (tree->rnode != NULL) { + if (nargs == 2) { /* 2nd arg if present: "to" or "from" for two-way pipe */ /* DO NOT use _() on the strings here! */ - tmp2 = force_string(tree->rnode->lnode); + tmp2 = POP_STRING(); if (strcasecmp(tmp2->stptr, "to") == 0) how = CLOSE_TO; else if (strcasecmp(tmp2->stptr, "from") == 0) how = CLOSE_FROM; - else + else { + DEREF(tmp2); fatal(_("close: second argument must be `to' or `from'")); - free_temp(tmp2); + } + DEREF(tmp2); } + tmp = POP_STRING(); /* 1st arg: redir to close */ + for (rp = red_head; rp != NULL; rp = rp->next) { if (strlen(rp->value) == tmp->stlen && memcmp(rp->value, tmp->stptr, tmp->stlen) == 0) @@ -919,12 +958,12 @@ ERRNO_node->var_value = make_string(cp, strlen(cp)); } - free_temp(tmp); - return tmp_number((AWKNUM) -1.0); + DEREF(tmp); + return make_number((AWKNUM) -1.0); } - free_temp(tmp); + DEREF(tmp); fflush(stdout); /* synchronize regular output */ - tmp = tmp_number((AWKNUM) close_redir(rp, FALSE, how)); + tmp = make_number((AWKNUM) close_redir(rp, FALSE, how)); rp = NULL; /* * POSIX says close() returns 0 on success, non-zero otherwise. @@ -933,8 +972,8 @@ * This whole business is a mess. */ if (do_posix) { - free_temp(tmp); - return tmp_number((AWKNUM) 0); + unref(tmp); + return make_number((AWKNUM) 0); } return tmp; } @@ -1001,7 +1040,7 @@ /* close_redir --- close an open file or pipe */ static int -close_redir(register struct redirect *rp, int exitwarn, two_way_close_type how) +close_redir(struct redirect *rp, int exitwarn, two_way_close_type how) { int status = 0; @@ -1082,7 +1121,7 @@ int flush_io() { - register struct redirect *rp; + struct redirect *rp; int status = 0; errno = 0; @@ -1120,8 +1159,8 @@ int close_io(int *stdio_problem) { - register struct redirect *rp; - register struct redirect *next; + struct redirect *rp; + struct redirect *next; int status = 0; errno = 0; @@ -1198,8 +1237,8 @@ /* socketopen --- open a socket and set it into connected state */ static int -socketopen(int type, const char *localpname, const char *remotepname, - const char *remotehostname) +socketopen(int family, int type, const char *localpname, + const char *remotepname, const char *remotehostname) { struct addrinfo *lres, *lres0; struct addrinfo lhints; @@ -1215,6 +1254,7 @@ memset (&lhints, '\0', sizeof (lhints)); lhints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; lhints.ai_socktype = type; + lhints.ai_family = family; lerror = getaddrinfo (NULL, localpname, &lhints, &lres); if (lerror) { @@ -1241,7 +1281,7 @@ rres0 = rres; socket_fd = INVALID_HANDLE; while (rres != NULL) { - socket_fd = socket (rres->ai_family, + socket_fd = socket(rres->ai_family, rres->ai_socktype, rres->ai_protocol); if (socket_fd < 0 || socket_fd == INVALID_HANDLE) goto nextrres; @@ -1265,17 +1305,8 @@ goto nextrres; if (! any_remote_host) { /* not ANY => create a client */ - if (type != SOCK_RAW) { - if (connect(socket_fd, rres->ai_addr, - rres->ai_addrlen) == 0) - break; - } else { - /* /inet/raw client not ready yet */ - fatal(_("/inet/raw client not ready yet, sorry")); - if (geteuid() != 0) - /* FIXME: is this second fatal ever reached? */ - fatal(_("only root may use `/inet/raw'.")); - } + if (connect(socket_fd, rres->ai_addr, rres->ai_addrlen) == 0) + break; } else { /* remote host is ANY => create a server */ if (type == SOCK_STREAM) { int clientsocket_fd = INVALID_HANDLE; @@ -1306,11 +1337,6 @@ readle) == 0) break; #endif - } else { - /* /inet/raw server not ready yet */ - fatal(_("/inet/raw server not ready yet, sorry")); - if (geteuid() != 0) - fatal(_("only root may use `/inet/raw'.")); } } @@ -1335,13 +1361,6 @@ /* devopen --- handle /dev/std{in,out,err}, /dev/fd/N, regular files */ /* - * This separate version is still needed for output, since file and pipe - * output is done with stdio. iop_open() handles input with IOBUFs of - * more "special" files. Those files are not handled here since it makes - * no sense to use them for output. - */ - -/* * Strictly speaking, "name" is not a "const char *" because we temporarily * change the string. */ @@ -1353,11 +1372,12 @@ char *cp; char *ptr; int flag = 0; - extern unsigned long strtoul P((const char *, char **endptr, int base)); + int len; + int family; flag = str2mode(mode); - if (STREQ(name, "-")) + if (strcmp(name, "-") == 0) return fileno(stdin); openfd = INVALID_HANDLE; @@ -1370,25 +1390,28 @@ return openfd; } - if (STREQN(name, "/dev/", 5)) { + if (strncmp(name, "/dev/", 5) == 0) { cp = (char *) name + 5; - if (STREQ(cp, "stdin") && (flag & O_ACCMODE) == O_RDONLY) + if (strcmp(cp, "stdin") == 0 && (flag & O_ACCMODE) == O_RDONLY) openfd = fileno(stdin); - else if (STREQ(cp, "stdout") && (flag & O_ACCMODE) == O_WRONLY) + else if (strcmp(cp, "stdout") == 0 && (flag & O_ACCMODE) == O_WRONLY) openfd = fileno(stdout); - else if (STREQ(cp, "stderr") && (flag & O_ACCMODE) == O_WRONLY) + else if (strcmp(cp, "stderr") == 0 && (flag & O_ACCMODE) == O_WRONLY) openfd = fileno(stderr); - else if (STREQN(cp, "fd/", 3)) { + else if (strncmp(cp, "fd/", 3) == 0) { + struct stat sbuf; + cp += 3; openfd = (int) strtoul(cp, &ptr, 10); - if (openfd <= INVALID_HANDLE || ptr == cp) + if (openfd <= INVALID_HANDLE || ptr == cp + || fstat(openfd, &sbuf) < 0) openfd = INVALID_HANDLE; } /* do not set close-on-exec for inherited fd's */ if (openfd != INVALID_HANDLE) return openfd; - } else if (STREQN(name, "/inet/", 6)) { + } else if (inetfile(name, & len, & family)) { #ifdef HAVE_SOCKETS /* /inet/protocol/localport/hostname/remoteport */ int protocol; @@ -1397,18 +1420,17 @@ char *localpname; char *localpnamelastcharp; - cp = (char *) name + 6; + cp = (char *) name + len; /* which protocol? */ - if (STREQN(cp, "tcp/", 4)) + if (strncmp(cp, "tcp/", 4) == 0) protocol = SOCK_STREAM; - else if (STREQN(cp, "udp/", 4)) + else if (strncmp(cp, "udp/", 4) == 0) protocol = SOCK_DGRAM; - else if (STREQN(cp, "raw/", 4)) - protocol = SOCK_RAW; - else + else { + protocol = SOCK_STREAM; /* shut up the compiler */ fatal(_("no (known) protocol supplied in special filename `%s'"), - name); - + name); + } cp += 4; /* which localport? */ @@ -1421,7 +1443,9 @@ */ if (*cp != '/' || cp == localpname) fatal(_("special file name `%s' is incomplete"), name); - /* We change the special file name temporarily because we + + /* + * We change the special file name temporarily because we * need a 0-terminated string here for conversion with atoi(). * By using atoi() the use of decimal numbers is enforced. */ @@ -1467,7 +1491,7 @@ char *cp, *end; unsigned long count = 0; char *ms2; - + first_time = FALSE; if ((cp = getenv("GAWK_SOCK_RETRIES")) != NULL) { count = strtoul(cp, &end, 10); @@ -1482,7 +1506,7 @@ */ if ((ms2 = getenv("GAWK_MSEC_SLEEP")) != NULL) { msleep = strtol(ms2, &end, 10); - if (end != cp && msleep < 0) + if (end == ms2 || msleep < 0) msleep = 1000; else msleep *= 1000; @@ -1491,7 +1515,7 @@ retries = def_retries; do { - openfd = socketopen(protocol, localpname, cp, hostname); + openfd = socketopen(family, protocol, localpname, cp, hostname); retries--; } while (openfd == INVALID_HANDLE && retries > 0 && usleep(msleep) == 0); } @@ -1506,206 +1530,31 @@ strictopen: if (openfd == INVALID_HANDLE) openfd = open(name, flag, 0666); - if (openfd != INVALID_HANDLE) { - if (os_isdir(openfd)) - fatal(_("file `%s' is a directory"), name); - - os_close_on_exec(openfd, name, "file", ""); - } - return openfd; -} - - -/* spec_setup --- setup an IOBUF for a special internal file */ - -static void -spec_setup(IOBUF *iop, int len) -{ - char *cp; - - emalloc(cp, char *, len+2, "spec_setup"); - iop->buf = cp; - iop->off = iop->buf; - iop->count = 0; - iop->size = len; - iop->end = iop->buf + len; - iop->dataend = iop->end; - iop->fd = -1; - iop->flag = IOP_IS_INTERNAL | IOP_AT_START | IOP_NO_FREE; -} - -/* specfdopen --- open an fd special file */ - -static IOBUF * -specfdopen(IOBUF *iop, const char *name, const char *mode) -{ - int fd; - IOBUF *tp; - - fd = devopen(name, mode); - if (fd == INVALID_HANDLE) - return NULL; - tp = iop_alloc(fd, name, iop); - if (tp == NULL) { - /* don't leak fd's */ - close(fd); - return NULL; - } - return tp; -} - -#ifdef GETPGRP_VOID -#define getpgrp_arg() /* nothing */ -#else -#define getpgrp_arg() getpid() -#endif - -/* pidopen --- "open" /dev/pid, /dev/ppid, and /dev/pgrpid */ - -static IOBUF * -pidopen(IOBUF *iop, const char *name, const char *mode ATTRIBUTE_UNUSED) -{ - char tbuf[BUFSIZ]; - int i; - const char *cp = name + 5; - - warning(_("use `PROCINFO[\"%s\"]' instead of `%s'"), cp, name); - - if (iop == NULL) { - iop = iop_alloc(INTERNAL_HANDLE, name, iop); - if (iop == NULL) - return NULL; - } - - if (name[6] == 'g') - sprintf(tbuf, "%d\n", (int) getpgrp(getpgrp_arg())); - else if (name[6] == 'i') - sprintf(tbuf, "%d\n", (int) getpid()); - else - sprintf(tbuf, "%d\n", (int) getppid()); - i = strlen(tbuf); - spec_setup(iop, i); - strcpy(iop->buf, tbuf); - return iop; -} - -/* useropen --- "open" /dev/user */ - -/* - * /dev/user creates a record as follows: - * $1 = getuid() - * $2 = geteuid() - * $3 = getgid() - * $4 = getegid() - * If multiple groups are supported, then $5 through $NF are the - * supplementary group set. - */ - -static IOBUF * -useropen(IOBUF *iop, const char *name ATTRIBUTE_UNUSED, const char *mode ATTRIBUTE_UNUSED) -{ - char tbuf[BUFSIZ], *cp; - int i; - - warning(_("use `PROCINFO[...]' instead of `/dev/user'")); - - if (iop == NULL) { - iop = iop_alloc(INTERNAL_HANDLE, name, iop); - if (iop == NULL) - return NULL; - } - - sprintf(tbuf, "%d %d %d %d", (int) getuid(), (int) geteuid(), (int) getgid(), (int) getegid()); +#ifdef __EMX__ + if (openfd == INVALID_HANDLE && errno == EACCES) { + /* on OS/2 directory access via open() is not permitted */ + struct stat buf; - cp = tbuf + strlen(tbuf); -#if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 - for (i = 0; i < ngroups; i++) { - *cp++ = ' '; - sprintf(cp, "%d", (int) groupset[i]); - cp += strlen(cp); + if (stat(name, &buf) == 0 && S_ISDIR(buf.st_mode)) + errno = EISDIR; } #endif - *cp++ = '\n'; - *cp++ = '\0'; - - i = strlen(tbuf); - spec_setup(iop, i); - strcpy(iop->buf, tbuf); - return iop; -} - -/* iop_open --- handle special and regular files for input */ - -static IOBUF * -iop_open(const char *name, const char *mode, IOBUF *iop, int *isdir) -{ - int openfd = INVALID_HANDLE; - int flag = 0; - static struct internal { - const char *name; - int compare; - IOBUF *(*fp) P((IOBUF *, const char *, const char *)); - } table[] = { - { "/dev/fd/", 8, specfdopen }, - { "/dev/stdin", 10, specfdopen }, - { "/dev/stdout", 11, specfdopen }, - { "/dev/stderr", 11, specfdopen }, - { "/inet/", 6, specfdopen }, - { "/dev/pid", 8, pidopen }, - { "/dev/ppid", 9, pidopen }, - { "/dev/pgrpid", 11, pidopen }, - { "/dev/user", 9, useropen }, - }; - int devcount = sizeof(table) / sizeof(table[0]); - - flag = str2mode(mode); - - if (STREQ(name, "-")) - openfd = fileno(stdin); - else if (do_traditional) - goto strictopen; - else if (STREQN(name, "/dev/", 5) || STREQN(name, "/inet/", 6)) { - int i; - - for (i = 0; i < devcount; i++) { - if (STREQN(name, table[i].name, table[i].compare)) { - if ((iop = (*table[i].fp)(iop, name, mode)) != NULL) - return iop; - else { - warning(_("could not open `%s', mode `%s'"), - name, mode); - return NULL; - } - } - } - /* not in table, fall through to regular code */ - } - -strictopen: - if (openfd == INVALID_HANDLE) - openfd = open(name, flag, 0666); if (openfd != INVALID_HANDLE) { if (os_isdir(openfd)) { - if (isdir) - *isdir = TRUE; (void) close(openfd); /* don't leak fds */ /* Set useful error number. */ errno = EISDIR; - return NULL; + return INVALID_HANDLE; } + + if (openfd > fileno(stderr)) + os_close_on_exec(openfd, name, "file", ""); } /* - * At this point, fd could still be INVALID_HANDLE. - * We pass it to `iop_alloc' anyway, in case an open hook - * can manage to open the file. + * XXX: FIXME: if fd is INVALID_HANDLE, see if an open hook + * can do something. */ - iop = iop_alloc(openfd, name, iop); - if (iop != NULL) { - if (iop->fd > fileno(stderr)) - os_close_on_exec(iop->fd, name, "file", ""); - } else if (openfd != INVALID_HANDLE) /* have an fd, but IOP is null */ - (void) close(openfd); /* avoid fd leak */ - return iop; + return openfd; } /* two_way_open --- open a two way communications channel */ @@ -1717,7 +1566,7 @@ #ifdef HAVE_SOCKETS /* case 1: socket */ - if (STREQN(str, "/inet/", 6)) { + if (inetfile(str, NULL, NULL)) { int fd, newfd; fd = devopen(str, "rw"); @@ -1734,7 +1583,7 @@ return FALSE; } os_close_on_exec(newfd, str, "socket", "to/from"); - rp->iop = iop_alloc(newfd, str, NULL); + rp->iop = iop_alloc(newfd, str, NULL, TRUE); if (rp->iop == NULL) { fclose(rp->fp); return FALSE; @@ -1744,36 +1593,7 @@ } #endif /* HAVE_SOCKETS */ -#ifdef HAVE_PORTALS - /* case 1.5: portal */ - if (STREQN(str, "/p/", 3)) { - int fd, newfd; - - fd = open(str, O_RDWR); - if (fd == INVALID_HANDLE) - return FALSE; - rp->fp = fdopen(fd, "w"); - if (rp->fp == NULL) { - close(fd); - return FALSE; - } - newfd = dup(fd); - if (newfd < 0) { - fclose(rp->fp); - return FALSE; - } - os_close_on_exec(newfd, str, "portal", "to/from"); - rp->iop = iop_alloc(newfd, str, NULL); - if (rp->iop == NULL) { - fclose(rp->fp); - return FALSE; - } - rp->flag |= RED_SOCKET; - return TRUE; - } -#endif /* HAVE_PORTALS */ - -#ifdef HAVE_TERMIOS_H +#if defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) /* case 2: use ptys for two-way communications to child */ if (! no_ptys && pty_vs_pipe(str)) { static int initialized = FALSE; @@ -1869,6 +1689,7 @@ got_the_pty: if ((slave = open(slavenam, O_RDWR)) < 0) { + close(master); fatal(_("could not open `%s', mode `%s'"), slavenam, "r+"); } @@ -1882,9 +1703,6 @@ 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); @@ -1919,6 +1737,12 @@ switch (pid = fork ()) { case 0: /* Child process */ + setsid(); + +#ifdef TIOCSCTTY + ioctl(slave, TIOCSCTTY, 0); +#endif + if (close(master) == -1) fatal(_("close of master pty failed (%s)"), strerror(errno)); if (close(1) == -1) @@ -1950,11 +1774,14 @@ } /* parent */ - if (close(slave)) + if (close(slave)) { + close(master); + (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ fatal(_("close of slave pty failed (%s)"), strerror(errno)); + } rp->pid = pid; - rp->iop = iop_alloc(master, str, NULL); + rp->iop = iop_alloc(master, str, NULL, TRUE); if (rp->iop == NULL) { (void) close(master); (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ @@ -1981,7 +1808,7 @@ first_pty_letter = '\0'; /* reset for next command */ return TRUE; } -#endif /* HAVE_TERMIOS_H */ +#endif /* defined(HAVE_TERMIOS_H) && ! defined(ZOS_USS) */ use_pipes: #ifndef PIPES_SIMULATED /* real pipes */ @@ -2024,13 +1851,20 @@ /* connect pipes to stdin and stdout */ close(1); /* close stdout */ - if (dup(ctop[1]) != 1) /* connect pipe input to stdout */ + if (dup(ctop[1]) != 1) { /* connect pipe input to stdout */ + close(save_stdin); close(save_stdout); + close(ptoc[0]); close(ptoc[1]); + close(ctop[0]); close(ctop[1]); fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno)); - + } close(0); /* close stdin */ - if (dup(ptoc[0]) != 0) /* connect pipe output to stdin */ + if (dup(ptoc[0]) != 0) { /* connect pipe output to stdin */ + close(save_stdin); close(save_stdout); + close(ptoc[0]); close(ptoc[1]); + close(ctop[0]); close(ctop[1]); fatal(_("moving pipe to stdin in child failed (dup: %s)"), strerror(errno)); - + } + /* none of these handles must be inherited by the child process */ (void) close(ptoc[0]); /* close pipe output, child will use stdin instead */ (void) close(ctop[1]); /* close pipe input, child will use stdout instead */ @@ -2045,13 +1879,19 @@ /* restore stdin and stdout */ close(1); - if (dup(save_stdout) != 1) + if (dup(save_stdout) != 1) { + close(save_stdin); close(save_stdout); + close(ptoc[1]); close(ctop[0]); fatal(_("restoring stdout in parent process failed\n")); + } close(save_stdout); close(0); - if (dup(save_stdin) != 0) + if (dup(save_stdin) != 0) { + close(save_stdin); + close(ptoc[1]); close(ctop[0]); fatal(_("restoring stdin in parent process failed\n")); + } close(save_stdin); if (pid < 0) { /* spawnl() failed */ @@ -2094,7 +1934,7 @@ /* parent */ rp->pid = pid; - rp->iop = iop_alloc(ctop[0], str, NULL); + rp->iop = iop_alloc(ctop[0], str, NULL, TRUE); if (rp->iop == NULL) { (void) close(ctop[0]); (void) close(ctop[1]); @@ -2144,7 +1984,7 @@ static int wait_any(int interesting) /* pid of interest, if any */ { - RETSIGTYPE (*hstat) P((int)), (*istat) P((int)), (*qstat) P((int)); + RETSIGTYPE (*hstat)(int), (*istat)(int), (*qstat)(int); int pid; int status = 0; struct redirect *redp; @@ -2153,11 +1993,11 @@ istat = signal(SIGINT, SIG_IGN); qstat = signal(SIGQUIT, SIG_IGN); for (;;) { -#ifdef HAVE_SYS_WAIT_H /* Posix compatible sys/wait.h */ +#ifdef HAVE_SYS_WAIT_H /* POSIX compatible sys/wait.h */ pid = wait(&status); #else pid = wait((union wait *)&status); -#endif /* NeXT */ +#endif if (interesting && pid == interesting) { break; } else if (pid != -1) { @@ -2183,7 +2023,7 @@ gawk_popen(const char *cmd, struct redirect *rp) { int p[2]; - register int pid; + int pid; #ifdef __EMX__ int save_stdout; #endif @@ -2191,7 +2031,7 @@ /* * used to wait for any children to synchronize input and output, * but this could cause gawk to hang when it is started in a pipeline - * and thus has a child process feeding it input (shell dependant) + * and thus has a child process feeding it input (shell dependent) */ /*(void) wait_any(0);*/ /* wait for outstanding processes */ @@ -2201,12 +2041,16 @@ #ifdef __EMX__ save_stdout = dup(1); /* save stdout */ rp->iop = NULL; - if (save_stdout == -1) + if (save_stdout == -1) { + close(p[0]); close(p[1]); return rp->iop; /* failed */ - + } + close(1); /* close stdout */ - if (dup(p[1]) != 1) + if (dup(p[1]) != 1) { + close(p[0]); close(p[1]); fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno)); + } /* none of these handles must be inherited by the child process */ close(p[1]); /* close pipe input */ @@ -2218,8 +2062,10 @@ /* restore stdout */ close(1); - if (dup(save_stdout) != 1) + if (dup(save_stdout) != 1) { + close(p[0]); fatal(_("restoring stdout in parent process failed\n")); + } close(save_stdout); #else /* NOT __EMX__ */ @@ -2236,15 +2082,19 @@ } #endif /* NOT __EMX__ */ - if (pid == -1) + if (pid == -1) { + close(p[0]); close(p[1]); fatal(_("cannot create child process for `%s' (fork: %s)"), cmd, strerror(errno)); + } rp->pid = pid; #ifndef __EMX__ - if (close(p[1]) == -1) + if (close(p[1]) == -1) { + close(p[0]); fatal(_("close of pipe failed (%s)"), strerror(errno)); + } #endif os_close_on_exec(p[0], cmd, "pipe", "from"); - rp->iop = iop_alloc(p[0], cmd, NULL); + rp->iop = iop_alloc(p[0], cmd, NULL, TRUE); if (rp->iop == NULL) (void) close(p[0]); @@ -2275,8 +2125,6 @@ * except if popen() provides real pipes too */ -#if defined(VMS) || defined(OS2) || defined (MSDOS) || defined(WIN32) || defined(TANDEM) || defined(__EMX__) - /* gawk_popen --- open an IOBUF on a child process */ static IOBUF * @@ -2291,7 +2139,7 @@ if (current == NULL) return NULL; os_close_on_exec(fileno(current), cmd, "pipe", "from"); - rp->iop = iop_alloc(fileno(current), cmd, NULL); + rp->iop = iop_alloc(fileno(current), cmd, NULL, TRUE); if (rp->iop == NULL) { (void) pclose(current); current = NULL; @@ -2316,149 +2164,244 @@ rp->ifp = NULL; return (rval < 0 ? rval : aval); } -#else /* not (VMS || OS2 || MSDOS || TANDEM) */ -static struct pipeinfo { - char *command; - char *name; -} pipes[_NFILE]; +#endif /* PIPES_SIMULATED */ -/* gawk_popen --- open an IOBUF on a child process */ +/* do_getline --- read in a line, into var and with redirection */ -static IOBUF * -gawk_popen(const char *cmd, struct redirect *rp) +NODE * +do_getline_redir(int intovar, int redirtype) { - int current; - char *name; - static char cmdbuf[256]; - - /* get a name to use */ - if ((name = tempnam(".", "pip")) == NULL) - return NULL; - sprintf(cmdbuf, "%s > %s", cmd, name); - system(cmdbuf); - if ((current = open(name, O_RDONLY)) == INVALID_HANDLE) - return NULL; - pipes[current].name = name; - emalloc(pipes[current].command, char *, strlen(cmd)+1, "gawk_popen"); - strcpy(pipes[current].command, cmd); - os_close_on_exec(current, cmd, "pipe", "from"); - rp->iop = iop_alloc(current, name, NULL); - if (rp->iop == NULL) - (void) close(current); - return rp->iop; -} - -/* gawk_pclose --- close an open child pipe */ + struct redirect *rp = NULL; + IOBUF *iop; + int cnt = EOF; + char *s = NULL; + int errcode; + NODE *redir_exp = NULL; + NODE **lhs = NULL; + int redir_error = 0; + + if (intovar) + lhs = POP_ADDRESS(); + + assert(redirtype != 0); + redir_exp = TOP(); + rp = redirect(redir_exp, redirtype, &redir_error); + DEREF(redir_exp); + decr_sp(); + if (rp == NULL) { + if (redir_error) { /* failed redirect */ + if (! do_traditional) + update_ERRNO_saved(redir_error); + } + return make_number((AWKNUM) -1.0); + } + iop = rp->iop; + if (iop == NULL) /* end of input */ + return make_number((AWKNUM) 0.0); + + errcode = 0; + cnt = get_a_record(&s, iop, &errcode); + if (errcode != 0) { + if (! do_traditional && (errcode != -1)) + update_ERRNO_saved(errcode); + return make_number((AWKNUM) -1.0); + } -static int -gawk_pclose(struct redirect *rp) -{ - int cur = rp->iop->fd; - int rval = 0; + if (cnt == EOF) { + /* + * Don't do iop_close() here if we are + * reading from a pipe; otherwise + * gawk_pclose will not be called. + */ + if ((rp->flag & (RED_PIPE|RED_TWOWAY)) == 0) { + (void) iop_close(iop); + rp->iop = NULL; + } + rp->flag |= RED_EOF; /* sticky EOF */ + return make_number((AWKNUM) 0.0); + } - if (rp->iop != NULL) - rval = iop_close(rp->iop); - rp->iop = NULL; + if (lhs == NULL) /* no optional var. */ + set_record(s, cnt); + else { /* assignment to variable */ + unref(*lhs); + *lhs = make_string(s, cnt); + (*lhs)->flags |= MAYBE_NUM; + } - /* check for an open file */ - if (pipes[cur].name == NULL) - return -1; - unlink(pipes[cur].name); - free(pipes[cur].name); - pipes[cur].name = NULL; - free(pipes[cur].command); - return rval; + return make_number((AWKNUM) 1.0); } -#endif /* not (VMS || OS2 || MSDOS || TANDEM) */ - -#endif /* PIPES_SIMULATED */ -/* do_getline --- read in a line, into var and with redirection, as needed */ +/* do_getline --- read in a line, into var and without redirection */ NODE * -do_getline(NODE *tree) +do_getline(int intovar, IOBUF *iop) { - struct redirect *rp = NULL; - IOBUF *iop; int cnt = EOF; char *s = NULL; int errcode; - while (cnt == EOF) { - if (tree->rnode == NULL) { /* no redirection */ - iop = nextfile(FALSE); - if (iop == NULL) /* end of input */ - return tmp_number((AWKNUM) 0.0); - } else { - int redir_error = 0; + if (iop == NULL) { /* end of input */ + if (intovar) + (void) POP_ADDRESS(); + return make_number((AWKNUM) 0.0); + } - rp = redirect(tree->rnode, &redir_error); - if (rp == NULL && redir_error) { /* failed redirect */ - if (! do_traditional) - update_ERRNO_saved(redir_error); + errcode = 0; + cnt = get_a_record(&s, iop, &errcode); + if (errcode != 0) { + if (! do_traditional && (errcode != -1)) + update_ERRNO_saved(errcode); + if (intovar) + (void) POP_ADDRESS(); + return make_number((AWKNUM) -1.0); + } + + if (cnt == EOF) + return NULL; /* try next file */ + NR++; + FNR++; + + if (! intovar) /* no optional var. */ + set_record(s, cnt); + else { /* assignment to variable */ + NODE **lhs; + lhs = POP_ADDRESS(); + unref(*lhs); + *lhs = make_string(s, cnt); + (*lhs)->flags |= MAYBE_NUM; + } + return make_number((AWKNUM) 1.0); +} + + +static char **awkpath = NULL; /* array containing library search paths */ +static int max_pathlen; /* length of the longest item in awkpath */ + +/* init_awkpath --- split path(=$AWKPATH) into components */ - return tmp_number((AWKNUM) -1.0); +static void +init_awkpath(char *path) +{ + char *start, *end, *p; + int len, i; + static int max_path = 0; + +#define INC_PATH 5 + + max_pathlen = 0; + if (path == NULL || *path == '\0') + path = defpath; + + for (i = 0; i < max_path && awkpath[i]; i++) { + efree(awkpath[i]); + awkpath[i] = NULL; + } + + if (max_path == 0) { + max_path = INC_PATH; + emalloc(awkpath, char **, (max_path + 1) * sizeof(char *), "init_awkpath"); + memset(awkpath, 0, (max_path + 1) * sizeof(char *)); + } + + end = start = path; + i = 0; + while (*start) { + while (*end && *end != envsep) + end++; + len = end - start; + if (len > 0) { + emalloc(p, char *, len + 2, "init_awkpath"); + memcpy(p, start, len); + + /* add directory punctuation if necessary */ + if (! isdirpunct(*(end - 1))) + p[len++] = '/'; + p[len] = '\0'; + + if (i == max_path) { + max_path += INC_PATH; + erealloc(awkpath, char **, (max_path + 1) * sizeof(char *), "init_awkpath"); + memset(awkpath + i, 0, (INC_PATH + 1) * sizeof(char *)); } - iop = rp->iop; - if (iop == NULL) /* end of input */ - return tmp_number((AWKNUM) 0.0); + awkpath[i++] = p; + if (len > max_pathlen) + max_pathlen = len; } - errcode = 0; - cnt = get_a_record(&s, iop, &errcode); - if (errcode != 0) { - if (! do_traditional && (errcode != -1)) - update_ERRNO_saved(errcode); - return tmp_number((AWKNUM) -1.0); - } - if (cnt == EOF) { - if (rp != NULL) { - /* - * Don't do iop_close() here if we are - * reading from a pipe; otherwise - * gawk_pclose will not be called. - */ - if ((rp->flag & (RED_PIPE|RED_TWOWAY)) == 0) { - (void) iop_close(iop); - rp->iop = NULL; - } - rp->flag |= RED_EOF; /* sticky EOF */ - return tmp_number((AWKNUM) 0.0); - } else - continue; /* try another file */ - } - if (rp == NULL) { - NR++; - FNR++; - } - if (tree->lnode == NULL) /* no optional var. */ - set_record(s, cnt); - else { /* assignment to variable */ - Func_ptr after_assign = NULL; - NODE **lhs; + /* skip one or more envsep char */ + while (*end && *end == envsep) + end++; + start = end; + } + awkpath[i] = NULL; - lhs = get_lhs(tree->lnode, &after_assign, FALSE); - unref(*lhs); - *lhs = make_string(s, cnt); - (*lhs)->flags |= MAYBE_NUM; - /* we may have to regenerate $0 here! */ - if (after_assign != NULL) - (*after_assign)(); - } +#undef INC_PATH +} + +/* do_find_source --- search $AWKPATH for file, return NULL if not found */ + +static char * +do_find_source(const char *src, struct stat *stb, int *errcode) +{ + char *path; + int i; + + assert(errcode != NULL); + + /* some kind of path name, no search */ + if (ispath(src)) { + emalloc(path, char *, strlen(src) + 1, "do_find_source"); + strcpy(path, src); + if (stat(path, stb) == 0) + return path; + *errcode = errno; + efree(path); + return NULL; + } + + /* try current directory before path search */ + if (stat(src, stb) == 0) { + emalloc(path, char *, strlen(src) + 1, "do_find_source"); + strcpy(path, src); + return path; } - return tmp_number((AWKNUM) 1.0); + + if (awkpath == NULL) + init_awkpath(getenv("AWKPATH")); + + emalloc(path, char *, max_pathlen + strlen(src) + 1, "do_find_source"); + for (i = 0; awkpath[i] != NULL; i++) { + if (strcmp(awkpath[i], "./") == 0 || strcmp(awkpath[i], ".") == 0) { + *path = '\0'; + } else + strcpy(path, awkpath[i]); + strcat(path, src); + if (stat(path, stb) == 0) + return path; + } + + /* not found, give up */ + *errcode = errno; + efree(path); + return NULL; } -/* pathopen --- pathopen with default file extension handling */ +/* find_source --- find source file with default file extension handling */ -int -pathopen(const char *file) +char * +find_source(const char *src, struct stat *stb, int *errcode) { - int fd = do_pathopen(file); + char *path; + + *errcode = 0; + if (src == NULL || *src == '\0') + return NULL; + path = do_find_source(src, stb, errcode); #ifdef DEFAULT_FILETYPE - if (! do_traditional && fd <= INVALID_HANDLE) { + if (! do_traditional && path == NULL) { char *file_awk; int save = errno; #ifdef VMS @@ -2466,12 +2409,12 @@ #endif /* append ".awk" and try again */ - emalloc(file_awk, char *, strlen(file) + - sizeof(DEFAULT_FILETYPE) + 1, "pathopen"); - sprintf(file_awk, "%s%s", file, DEFAULT_FILETYPE); - fd = do_pathopen(file_awk); - free(file_awk); - if (fd <= INVALID_HANDLE) { + emalloc(file_awk, char *, strlen(src) + + sizeof(DEFAULT_FILETYPE) + 1, "find_source"); + sprintf(file_awk, "%s%s", src, DEFAULT_FILETYPE); + path = do_find_source(file_awk, stb, errcode); + efree(file_awk); + if (path == NULL) { errno = save; #ifdef VMS vaxc$errno = vms_save; @@ -2480,75 +2423,19 @@ } #endif /*DEFAULT_FILETYPE*/ - return fd; + return path; } -/* do_pathopen --- search $AWKPATH for source file */ +/* srcopen --- open source file */ -static int -do_pathopen(const char *file) +int +srcopen(SRCFILE *s) { - static const char *savepath = NULL; - static int first = TRUE; - const char *awkpath; - char *cp, *trypath; - int fd; - int len; - - if (STREQ(file, "-")) - return 0; - - if (do_traditional) - return devopen(file, "r"); - - if (first) { - first = FALSE; - if ((awkpath = getenv("AWKPATH")) != NULL && *awkpath) - savepath = awkpath; /* used for restarting */ - else - savepath = defpath; - } - awkpath = savepath; - - /* some kind of path name, no search */ - if (ispath(file)) - return devopen(file, "r"); - - /* no arbitrary limits: */ - len = strlen(awkpath) + strlen(file) + 2; - emalloc(trypath, char *, len, "do_pathopen"); - - do { - trypath[0] = '\0'; - - for (cp = trypath; *awkpath && *awkpath != envsep; ) - *cp++ = *awkpath++; - - if (cp != trypath) { /* nun-null element in path */ - /* add directory punctuation only if needed */ - if (! isdirpunct(*(cp-1))) - *cp++ = '/'; - /* append filename */ - strcpy(cp, file); - } else - strcpy(trypath, file); - if ((fd = devopen(trypath, "r")) > INVALID_HANDLE) { - free(trypath); - return fd; - } - - /* no luck, keep going */ - if(*awkpath == envsep && awkpath[1] != '\0') - awkpath++; /* skip colon */ - } while (*awkpath != '\0'); - free(trypath); - - /* - * You might have one of the awk paths defined, WITHOUT the current - * working directory in it. Therefore try to open the file in the - * current directory. - */ - return devopen(file, "r"); + if (s->stype == SRC_STDIN) + return (0); + if (s->stype == SRC_FILE || s->stype == SRC_INC) + return devopen(s->fullpath, "r"); + return INVALID_HANDLE; } #ifdef TEST @@ -2582,13 +2469,26 @@ open_hooks = oh; } +/* find_open_hook --- search the list of open hooks */ + +static void +find_open_hook(IOBUF *iop) +{ + struct open_hook *oh; + + /* walk through open hooks, stop at first one that responds */ + for (oh = open_hooks; oh != NULL; oh = oh->next) { + if ((iop->opaque = (*oh->open_func)(iop)) != NULL) + break; + } +} + /* iop_alloc --- allocate an IOBUF structure for an open fd */ static IOBUF * -iop_alloc(int fd, const char *name, IOBUF *iop) +iop_alloc(int fd, const char *name, IOBUF *iop, int do_openhooks) { struct stat sbuf; - struct open_hook *oh; int iop_malloced = FALSE; if (iop == NULL) { @@ -2600,21 +2500,19 @@ iop->fd = fd; iop->name = name; - /* walk through open hooks, stop at first one that responds */ - for (oh = open_hooks; oh != NULL; oh = oh->next) { - if ((iop->opaque = (*oh->open_func)(iop)) != NULL) - break; - } - - if (iop->fd == INTERNAL_HANDLE) + if (do_openhooks) + find_open_hook(iop); + else if (iop->fd == INVALID_HANDLE) return iop; + /* test reached if tried to find open hook and could not */ if (iop->fd == INVALID_HANDLE) { if (iop_malloced) - free(iop); + efree(iop); return NULL; } - if (isatty(iop->fd)) + + if (os_isatty(iop->fd)) iop->flag |= IOP_IS_TTY; iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf); iop->sbuf = sbuf; @@ -2648,33 +2546,33 @@ static void grow_iop_buffer(IOBUF *iop) { - size_t valid = iop->dataend - iop->off; - size_t off = iop->off - iop->buf; + size_t valid = iop->dataend - iop->off; + size_t off = iop->off - iop->buf; size_t newsize; /* * Lop off original extra two bytes, double the size, * add them back. */ - newsize = ((iop->size - 2) * 2) + 2; + newsize = ((iop->size - 2) * 2) + 2; /* Check for overflow */ if (newsize <= iop->size) fatal(_("could not allocate more input memory")); /* Make sure there's room for a disk block */ - if (newsize - valid < iop->readsize) - newsize += iop->readsize + 2; + if (newsize - valid < iop->readsize) + newsize += iop->readsize + 2; /* Check for overflow, again */ if (newsize <= iop->size) fatal(_("could not allocate more input memory")); 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; + 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; } /* Here are the routines. */ @@ -2686,23 +2584,23 @@ static RECVALUE rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) { - register char *bp; - register char rs; -#ifdef MBS_SUPPORT - size_t mbclen = 0; - mbstate_t mbs; -#endif - - memset(recm, '\0', sizeof(struct recmatch)); - rs = RS->stptr[0]; - *(iop->dataend) = rs; /* set sentinel */ - recm->start = iop->off; /* beginning of record */ - - bp = iop->off; - if (*state == INDATA) /* skip over data we've already seen */ - bp += iop->scanoff; + char *bp; + char rs; +#if MBS_SUPPORT + size_t mbclen = 0; + mbstate_t mbs; +#endif + + memset(recm, '\0', sizeof(struct recmatch)); + rs = RS->stptr[0]; + *(iop->dataend) = rs; /* set sentinel */ + recm->start = iop->off; /* beginning of record */ + + bp = iop->off; + if (*state == INDATA) /* skip over data we've already seen */ + bp += iop->scanoff; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT /* * From: Bruno Haible * To: Aharon Robbins , gnits@gnits.org @@ -2757,59 +2655,65 @@ * Bruno */ /* Thus, the check for \n here; big speedup ! */ - if (rs != '\n' && gawk_mb_cur_max > 1) { - int len = iop->dataend - bp; - int found = 0; - memset(&mbs, 0, sizeof(mbstate_t)); - do { - if (*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); + if (rs != '\n' && gawk_mb_cur_max > 1) { + int len = iop->dataend - bp; + int found = 0; + + memset(&mbs, 0, sizeof(mbstate_t)); + do { + if (*bp == rs) + found = 1; + if (is_valid_character(*bp)) + mbclen = 1; + else + 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); /* Check that newline found isn't the sentinel. */ - if (found && (bp - mbclen) < iop->dataend) { - /* + if (found && (bp - mbclen) < iop->dataend) { + /* * set len to what we have so far, in case this is * all there is */ - recm->len = bp - recm->start - mbclen; - recm->rt_start = bp - mbclen; - recm->rt_len = mbclen; - *state = NOSTATE; - return REC_OK; - } else { + recm->len = bp - recm->start - mbclen; + recm->rt_start = bp - mbclen; + recm->rt_len = mbclen; + *state = NOSTATE; + return REC_OK; + } else { /* also set len */ - recm->len = bp - recm->start; - *state = INDATA; - iop->scanoff = bp - iop->off; - return NOTERM; - } - } -#endif - while (*bp != rs) - bp++; - - /* set len to what we have so far, in case this is all there is */ - recm->len = bp - recm->start; - - if (bp < iop->dataend) { /* found it in the buffer */ - recm->rt_start = bp; - recm->rt_len = 1; - *state = NOSTATE; - return REC_OK; - } else { - *state = INDATA; - iop->scanoff = bp - iop->off; - return NOTERM; - } + recm->len = bp - recm->start; + *state = INDATA; + iop->scanoff = bp - iop->off; + return NOTERM; + } + } +#endif + while (*bp != rs) + bp++; + + /* set len to what we have so far, in case this is all there is */ + recm->len = bp - recm->start; + + if (bp < iop->dataend) { /* found it in the buffer */ + recm->rt_start = bp; + recm->rt_len = 1; + *state = NOSTATE; + return REC_OK; + } else { + *state = INDATA; + iop->scanoff = bp - iop->off; + return NOTERM; + } } /* = */ @@ -2818,78 +2722,78 @@ static RECVALUE rsrescan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) { - register char *bp; - size_t restart = 0, reend = 0; - Regexp *RSre = RS_regexp; + char *bp; + size_t restart = 0, reend = 0; + Regexp *RSre = RS_regexp; int regex_flags = RE_NEED_START; - memset(recm, '\0', sizeof(struct recmatch)); - recm->start = iop->off; + memset(recm, '\0', sizeof(struct recmatch)); + recm->start = iop->off; - bp = iop->off; - if (*state == INDATA) - bp += iop->scanoff; + bp = iop->off; + if (*state == INDATA) + bp += iop->scanoff; if ((iop->flag & IOP_AT_START) == 0) regex_flags |= RE_NO_BOL; again: - /* case 1, no match */ - if (research(RSre, bp, 0, iop->dataend - bp, regex_flags) == -1) { - /* set len, in case this all there is. */ - recm->len = iop->dataend - iop->off; - return NOTERM; - } - - /* ok, we matched within the buffer, set start and end */ - restart = RESTART(RSre, iop->off); - reend = REEND(RSre, iop->off); - - /* case 2, null regex match, grow buffer, try again */ - if (restart == reend) { - *state = INDATA; - iop->scanoff = reend + 1; - /* - * If still room in buffer, skip over null match - * and restart search. Otherwise, return. - */ - if (bp + iop->scanoff < iop->dataend) { - bp += iop->scanoff; - goto again; - } - recm->len = (bp - iop->off) + restart; - return NOTERM; - } + /* case 1, no match */ + if (research(RSre, bp, 0, iop->dataend - bp, regex_flags) == -1) { + /* set len, in case this all there is. */ + recm->len = iop->dataend - iop->off; + return NOTERM; + } - /* - * At this point, we have a non-empty match. - * - * First, fill in rest of data. The rest of the cases return - * a record and terminator. - */ - recm->len = restart; - recm->rt_start = bp + restart; - recm->rt_len = reend - restart; - *state = NOSTATE; + /* ok, we matched within the buffer, set start and end */ + restart = RESTART(RSre, iop->off); + reend = REEND(RSre, iop->off); + + /* case 2, null regex match, grow buffer, try again */ + if (restart == reend) { + *state = INDATA; + iop->scanoff = reend + 1; + /* + * If still room in buffer, skip over null match + * and restart search. Otherwise, return. + */ + if (bp + iop->scanoff < iop->dataend) { + bp += iop->scanoff; + goto again; + } + recm->len = (bp - iop->off) + restart; + return NOTERM; + } - /* - * 3. Match exactly at end: - * if re is a simple string match - * found a simple string match at end, return REC_OK - * else - * grow buffer, add more data, try again - * fi - */ - if (iop->off + reend >= iop->dataend) { - if (reisstring(RS->stptr, RS->stlen, RSre, iop->off)) - return REC_OK; - else - return TERMATEND; - } + /* + * At this point, we have a non-empty match. + * + * First, fill in rest of data. The rest of the cases return + * a record and terminator. + */ + recm->len = restart; + recm->rt_start = bp + restart; + recm->rt_len = reend - restart; + *state = NOSTATE; - /* - * 4. Match within xxx bytes of end & maybe islong re: - * return TERMNEAREND - */ + /* + * 3. Match exactly at end: + * if re is a simple string match + * found a simple string match at end, return REC_OK + * else + * grow buffer, add more data, try again + * fi + */ + if (iop->off + reend >= iop->dataend) { + if (reisstring(RS->stptr, RS->stlen, RSre, iop->off)) + return REC_OK; + else + return TERMATEND; + } + + /* + * 4. Match within xxx bytes of end & maybe islong re: + * return TERMNEAREND + */ /* * case 4, match succeeded, but there may be more in @@ -2915,15 +2819,15 @@ * then tested as flags here. Maybe one day. */ - /* succession of tests is easier to trace in GDB. */ - if (remaybelong(RS->stptr, RS->stlen)) { - char *matchend = iop->off + reend; - - if (iop->dataend - matchend < RS->stlen) - return TERMNEAREND; - } + /* succession of tests is easier to trace in GDB. */ + if (remaybelong(RS->stptr, RS->stlen)) { + char *matchend = iop->off + reend; - return REC_OK; + if (iop->dataend - matchend < RS->stlen) + return TERMNEAREND; + } + + return REC_OK; } /* = */ @@ -2932,71 +2836,75 @@ static RECVALUE rsnullscan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) { - register char *bp; + char *bp; - if (*state == NOSTATE || *state == INLEADER) - memset(recm, '\0', sizeof(struct recmatch)); + if (*state == NOSTATE || *state == INLEADER) + memset(recm, '\0', sizeof(struct recmatch)); - recm->start = iop->off; + recm->start = iop->off; - bp = iop->off; - if (*state != NOSTATE) - bp += iop->scanoff; - - /* set sentinel */ - *(iop->dataend) = '\n'; - - if (*state == INTERM) - goto find_longest_terminator; - else if (*state == INDATA) - goto scan_data; - /* else - fall into things from beginning, - either NOSTATE or INLEADER */ + bp = iop->off; + if (*state != NOSTATE) + bp += iop->scanoff; + + /* set sentinel */ + *(iop->dataend) = '\n'; + + if (*state == INTERM) + goto find_longest_terminator; + else if (*state == INDATA) + goto scan_data; + /* else + fall into things from beginning, + either NOSTATE or INLEADER */ /* skip_leading: */ - /* leading newlines are ignored */ - while (*bp == '\n' && bp < iop->dataend) - bp++; - - if (bp >= iop->dataend) { /* LOTS of leading newlines, sheesh. */ - *state = INLEADER; - iop->scanoff = bp - iop->off; - return NOTERM; - } + /* leading newlines are ignored */ + while (*bp == '\n' && bp < iop->dataend) + bp++; + + if (bp >= iop->dataend) { /* LOTS of leading newlines, sheesh. */ + *state = INLEADER; + iop->scanoff = bp - iop->off; + return NOTERM; + } - iop->off = recm->start = bp; /* real start of record */ + iop->off = recm->start = bp; /* real start of record */ scan_data: - while (*bp++ != '\n') - continue; + while (*bp++ != '\n') + continue; - if (bp >= iop->dataend) { /* no terminator */ - iop->scanoff = recm->len = bp - iop->off - 1; - *state = INDATA; - return NOTERM; - } - - /* found one newline before end of buffer, check next char */ - if (*bp != '\n') - goto scan_data; - - /* we've now seen at least two newlines */ - *state = INTERM; - recm->len = bp - iop->off - 1; - recm->rt_start = bp - 1; + if (bp >= iop->dataend) { /* no full terminator */ + iop->scanoff = recm->len = bp - iop->off - 1; + if (bp == iop->dataend) { /* half a terminator */ + recm->rt_start = bp - 1; + recm->rt_len = 1; + } + *state = INDATA; + return NOTERM; + } + + /* found one newline before end of buffer, check next char */ + if (*bp != '\n') + goto scan_data; + + /* we've now seen at least two newlines */ + *state = INTERM; + recm->len = bp - iop->off - 1; + recm->rt_start = bp - 1; find_longest_terminator: - /* find as many newlines as we can, to set RT */ - while (*bp == '\n' && bp < iop->dataend) - bp++; + /* find as many newlines as we can, to set RT */ + while (*bp == '\n' && bp < iop->dataend) + bp++; - recm->rt_len = bp - recm->rt_start; - iop->scanoff = bp - iop->off; + recm->rt_len = bp - recm->rt_start; + iop->scanoff = bp - iop->off; - if (bp >= iop->dataend) - return TERMATEND; + if (bp >= iop->dataend) + return TERMATEND; - return REC_OK; + return REC_OK; } /* = */ @@ -3007,92 +2915,78 @@ IOBUF *iop, /* input IOP */ int *errcode) /* pointer to error variable */ { - struct recmatch recm; - SCANSTATE state; - RECVALUE ret; - int retval; - NODE *rtval = NULL; - static RECVALUE (*lastmatchrec)P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)) = NULL; + struct recmatch recm; + SCANSTATE state; + RECVALUE ret; + int retval; + NODE *rtval = NULL; + static RECVALUE (*lastmatchrec)(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) = NULL; - if (at_eof(iop) && no_data_left(iop)) - return EOF; + if (at_eof(iop) && no_data_left(iop)) + return EOF; if (iop->get_record != NULL) return (*iop->get_record)(out, iop, errcode); - /* = */ - if (has_no_data(iop) || no_data_left(iop)) { - if (is_internal(iop)) { + /* = */ + if (has_no_data(iop) || no_data_left(iop)) { + iop->count = read(iop->fd, iop->buf, iop->readsize); + if (iop->count == 0) { iop->flag |= IOP_AT_EOF; return EOF; + } else if (iop->count == -1) { + iop->flag |= IOP_AT_EOF; + if (errcode != NULL) + *errcode = errno; + return EOF; + } else { + iop->dataend = iop->buf + iop->count; + iop->off = iop->buf; } - iop->count = read(iop->fd, iop->buf, iop->readsize); - if (iop->count == 0) { - iop->flag |= IOP_AT_EOF; - return EOF; - } else if (iop->count == -1) { - if (! do_traditional && errcode != NULL) { - *errcode = errno; - iop->flag |= IOP_AT_EOF; - return EOF; - } else - fatal(_("error reading input file `%s': %s"), - iop->name, strerror(errno)); - } else { - iop->dataend = iop->buf + iop->count; - iop->off = iop->buf; - } - } - - - - /* = */ - state = NOSTATE; - for (;;) { - size_t dataend_off; + } - ret = (*matchrec)(iop, & recm, & state); + /* = */ + state = NOSTATE; + for (;;) { + size_t dataend_off; + ret = (*matchrec)(iop, & recm, & state); iop->flag &= ~IOP_AT_START; + if (ret == REC_OK) + break; - if (ret == REC_OK) - break; + /* need to add more data to buffer */ + /* = */ + dataend_off = iop->dataend - iop->off; + memmove(iop->buf, iop->off, dataend_off); + iop->off = iop->buf; + iop->dataend = iop->buf + dataend_off; + + /* = */ + recm.start = iop->off; + if (recm.rt_start != NULL) + recm.rt_start = iop->off + recm.len; - /* need to add more data to buffer */ - /* = */ - dataend_off = iop->dataend - iop->off; - memmove(iop->buf, iop->off, dataend_off); - iop->off = iop->buf; - iop->dataend = iop->buf + dataend_off; - - /* = */ - recm.start = iop->off; - if (recm.rt_start != NULL) - recm.rt_start = iop->off + recm.len; - - /* = */ - if ((iop->flag & IOP_IS_INTERNAL) != 0) { - iop->flag |= IOP_AT_EOF; - break; - } 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) { - grow_iop_buffer(iop); - /* = */ - recm.start = iop->off; - if (recm.rt_start != NULL) - recm.rt_start = iop->off + recm.len; - - /* 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; + /* 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) { + grow_iop_buffer(iop); + /* = */ + recm.start = iop->off; + if (recm.rt_start != NULL) + recm.rt_start = iop->off + recm.len; + + /* 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; #ifdef SSIZE_MAX /* @@ -3102,92 +2996,84 @@ amt_to_read = min(amt_to_read, SSIZE_MAX); #endif - 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; - break; - } else - iop->dataend += iop->count; - } - - - } - - + iop->count = read(iop->fd, iop->dataend, amt_to_read); + if (iop->count == -1) { + *errcode = errno; + iop->flag |= IOP_AT_EOF; + break; + } else if (iop->count == 0) { + /* + * hit EOF before matching RS, so end + * the record and set RT to "" + */ + iop->flag |= IOP_AT_EOF; + break; + } else + iop->dataend += iop->count; + } + } - /* = */ + /* = */ - /* - * rtval is not a static pointer to avoid dangling pointer problems - * in case awk code assigns to RT. A remote possibility, to be sure, - * but Bitter Experience teaches us not to make ``that'll never - * happen'' kinds of assumptions. - */ - rtval = RT_node->var_value; + /* + * rtval is not a static pointer to avoid dangling pointer problems + * in case awk code assigns to RT. A remote possibility, to be sure, + * but Bitter Experience teaches us not to make ``that'll never + * happen'' kinds of assumptions. + */ + rtval = RT_node->var_value; - if (recm.rt_len == 0) { - set_RT_to_null(); + if (recm.rt_len == 0) { + set_RT_to_null(); lastmatchrec = NULL; } else { - assert(recm.rt_start != NULL); - /* - * Optimization. For rs1 case, don't set RT if - * character is same as last time. This knocks a - * chunk of time off something simple like - * - * gawk '{ print }' /some/big/file - * - * Similarly, for rsnull case, if length of new RT is - * shorter than current RT, just bump length down in RT. + assert(recm.rt_start != NULL); + /* + * Optimization. For rs1 case, don't set RT if + * character is same as last time. This knocks a + * chunk of time off something simple like + * + * gawk '{ print }' /some/big/file + * + * Similarly, for rsnull case, if length of new RT is + * shorter than current RT, just bump length down in RT. * * Make sure that matchrec didn't change since the last * check. (Ugh, details, details, details.) - */ + */ if (lastmatchrec == NULL || lastmatchrec != matchrec) { lastmatchrec = matchrec; set_RT(recm.rt_start, recm.rt_len); } else if (matchrec == rs1scan) { - if (rtval->stlen != 1 || rtval->stptr[0] != recm.rt_start[0]) - set_RT(recm.rt_start, recm.rt_len); - /* else - leave it alone */ - } else if (matchrec == rsnullscan) { - if (rtval->stlen <= recm.rt_len) - rtval->stlen = recm.rt_len; - else - set_RT(recm.rt_start, recm.rt_len); - } else - set_RT(recm.rt_start, recm.rt_len); - } - - if (recm.len == 0) { - *out = NULL; - retval = 0; - } else { - assert(recm.start != NULL); - *out = recm.start; - retval = recm.len; - } + if (rtval->stlen != 1 || rtval->stptr[0] != recm.rt_start[0]) + set_RT(recm.rt_start, recm.rt_len); + /* else + leave it alone */ + } else if (matchrec == rsnullscan) { + if (rtval->stlen >= recm.rt_len) { + rtval->stlen = recm.rt_len; + free_wstr(rtval); + } else + set_RT(recm.rt_start, recm.rt_len); + } else + set_RT(recm.rt_start, recm.rt_len); + } - iop->off += recm.len + recm.rt_len; + if (recm.len == 0) { + *out = NULL; + retval = 0; + } else { + assert(recm.start != NULL); + *out = recm.start; + retval = recm.len; + } - if (recm.len == 0 && recm.rt_len == 0 && at_eof(iop)) - return EOF; - else - return retval; + iop->off += recm.len + recm.rt_len; + if (recm.len == 0 && recm.rt_len == 0 && at_eof(iop)) + return EOF; + else + return retval; } /* set_RS --- update things as appropriate when RS is set */ @@ -3216,19 +3102,23 @@ save_rs = dupnode(RS_node->var_value); RS_is_null = FALSE; RS = force_string(RS_node->var_value); - if (RS_regexp != NULL) { - refree(RS_re_yes_case); - refree(RS_re_no_case); - RS_re_yes_case = RS_re_no_case = RS_regexp = NULL; - } + /* + * used to be if (RS_regexp != NULL) { refree(..); refree(..); ...; }. + * Please do not remerge the if condition; hinders memory deallocation + * in case of fatal error in make_regexp. + */ + refree(RS_re_yes_case); /* NULL argument is ok */ + refree(RS_re_no_case); + RS_re_yes_case = RS_re_no_case = RS_regexp = NULL; + if (RS->stlen == 0) { RS_is_null = TRUE; matchrec = rsnullscan; } else if (RS->stlen > 1) { static short warned = FALSE; - RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE, TRUE); - RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE, TRUE); + RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE, TRUE, TRUE); + RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE, TRUE, TRUE); RS_regexp = (IGNORECASE ? RS_re_no_case : RS_re_yes_case); matchrec = rsrescan; @@ -3240,7 +3130,7 @@ } else matchrec = rs1scan; set_FS: - if (! using_fieldwidths()) + if (current_field_sep() == Using_FS) set_FS(); } @@ -3270,10 +3160,10 @@ 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)); + sub = make_string(full_index, strlen(full_index)); val = in_array(PROCINFO_node, sub); - free_temp(sub); - free(full_index); + unref(sub); + efree(full_index); if (val) { if (val->flags & MAYBE_NUM) @@ -3294,8 +3184,6 @@ { static const 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" }, { IOP_CLOSED, "IOP_CLOSED" }, @@ -3311,6 +3199,39 @@ static void free_rp(struct redirect *rp) { - free(rp->value); - free(rp); + efree(rp->value); + efree(rp); +} + +/* inetfile --- return true for a /inet special file, set other values */ + +static int +inetfile(const char *str, int *length, int *family) +{ + int ret = FALSE; + + if (strncmp(str, "/inet/", 6) == 0) { + ret = TRUE; + if (length != NULL) + *length = 6; + if (family != NULL) + *family = AF_UNSPEC; + } else if (strncmp(str, "/inet4/", 7) == 0) { + ret = TRUE; + if (length != NULL) + *length = 7; + if (family != NULL) + *family = AF_INET; + } else if (strncmp(str, "/inet6/", 7) == 0) { + ret = TRUE; + if (length != NULL) + *length = 7; + if (family != NULL) + *family = AF_INET6; +#ifndef HAVE_GETADDRINFO + fatal(_("IPv6 communication is not supported")); +#endif + } + + return ret; } diff -Nru gawk-3.1.8+dfsg/m4/ChangeLog gawk-4.0.1+dfsg/m4/ChangeLog --- gawk-3.1.8+dfsg/m4/ChangeLog 2010-05-06 17:55:59.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/ChangeLog 2012-03-28 20:02:04.000000000 +0000 @@ -1,152 +1,9 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Mon Apr 26 20:16:49 2010 Arnold D. Robbins - - * libtool.m4, ltoptions.m4, ltsugar.m4, ltversion.m4, - lt~obsolete.m4: Removed. - -Mon Mar 29 08:42:38 2010 Arnold D. Robbins - - * libsigsegv.m4: New file, from gnulib. - -Tue Jul 21 22:28:56 2009 Arnold D. Robbins - - * Release 3.1.7: Release tar file made. - -2009-06-08 gettextize - - * gettext.m4: Upgrade to gettext-0.17. - * iconv.m4: Upgrade to gettext-0.17. - * lib-link.m4: Upgrade to gettext-0.17. - * po.m4: Upgrade to gettext-0.17. - -Mon Jun 8 22:15:29 2009 Arnold D. Robbins - - * libtool.m4, lt~obsolete.m4 ltsugar.m4 ltversion.m4, - ltoptions.m4: New files. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Tue Mar 20 21:33:31 2007 Arnold D. Robbins - - * strtod.m4: Removed, not needed anymore. - -2007-01-08 gettextize - - * gettext.m4: Upgrade to gettext-0.16.1. - * lib-link.m4: Upgrade to gettext-0.16.1. - * lib-prefix.m4: Upgrade to gettext-0.16.1. - * nls.m4: Upgrade to gettext-0.16.1. - * po.m4: Upgrade to gettext-0.16.1. - * intl.m4: New file, copied in from move to current Autotools. - * intldir.m4: New file, copied in from move to current Autotools. - * lock.m4: New file, copied in from move to current Autotools. - * visibility.m4: New file, copied in from move to current Autotools. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Wed Jul 6 17:05:32 2005 Arnold D. Robbins - - * gettext.m4: Per Bruno Haible, revert the change for the test - for locale.h from Sergey Poznyakoff. - -Wed Jun 8 20:45:17 2005 Sergey Poznyakoff - - * gettext.m4: Move test for locale.h and LC_MESSAGES in AM_GNU_GETTEXT. - Makes things work when the library is external. - -Mon May 30 21:31:43 2005 Arnold D. Robbins - - * intmax_t.m4: Updated macro for intmax_t from Jim Meyering. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -2004-02-19 gettextize - - * po.m4: Upgrade to gettext-0.14.1. - -2004-01-16 gettextize - - * gettext.m4: Upgrade to gettext-0.13.1. - * intmax.m4: New file, from gettext-0.13.1. - * lib-ld.m4: Upgrade to gettext-0.13.1. - * lib-prefix.m4: Upgrade to gettext-0.13.1. - * longdouble.m4: New file, from gettext-0.13.1. - * longlong.m4: Upgrade to gettext-0.13.1. - * po.m4: Upgrade to gettext-0.13.1. - * printf-posix.m4: New file, from gettext-0.13.1. - * signed.m4: New file, from gettext-0.13.1. - * size_max.m4: New file, from gettext-0.13.1. - * ulonglong.m4: Upgrade to gettext-0.13.1. - * wchar_t.m4: New file, from gettext-0.13.1. - * wint_t.m4: New file, from gettext-0.13.1. - * xsize.m4: New file, from gettext-0.13.1. - * Makefile.am: New file. - -Thu Jan 15 15:51:12 2004 Arnold D. Robbins - - * m4/arch.m4, m4/socket.m4, m4/strtod.m4: Quoting fixed for automake 1.8.x. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -2003-06-16 gettextize - - * gettext.m4: Upgrade to gettext-0.12.1. - * inttypes_h.m4: Upgrade to gettext-0.12.1. - * lib-ld.m4: Upgrade to gettext-0.12.1. - * lib-link.m4: Upgrade to gettext-0.12.1. - * lib-prefix.m4: Upgrade to gettext-0.12.1. - * nls.m4: New file, from gettext-0.12.1. - * po.m4: New file, from gettext-0.12.1. - * progtest.m4: Upgrade to gettext-0.12.1. - * stdint_h.m4: Upgrade to gettext-0.12.1. - * uintmax_t.m4: New file, from gettext-0.12.1. - * ulonglong.m4: New file, from gettext-0.12.1. - * Makefile.am: New file. - -2003-03-26 Paul Eggert - - * longlong.m4, intmax_t.m4: New files. - * ulonglong.m4, uintmax_t.m4: Removed. - -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. - -2002-04-28 gettextize - - * gettext.m4: Upgrade to gettext-0.11.2. - * isc-posix.m4: Upgrade to gettext-0.11.2. - * lib-link.m4: Upgrade to gettext-0.11.2. - -2002-04-09 gettextize - - * gettext.m4: Upgrade to gettext-0.11.1. +2011-06-23 Arnold D. Robbins + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/m4/ChangeLog.0 gawk-4.0.1+dfsg/m4/ChangeLog.0 --- gawk-3.1.8+dfsg/m4/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/ChangeLog.0 2011-01-05 18:36:38.000000000 +0000 @@ -0,0 +1,180 @@ +Wed Jan 5 20:36:10 2011 Arnold D. Robbins + + * readline.m4: Move call to AC_LANG([C]) from here to + ../configure.ac. + +Tue Jan 4 11:09:43 2011 Arnold D. Robbins + + * readline.m4: Really fixed to work correctly with Autoconf 2.68. + +Sat Dec 25 21:40:25 2010 Arnold D. Robbins + + * readline.m4: Fixed to work correctly with Autoconf 2.68. + +Fri Dec 24 13:00:26 2010 Arnold D. Robbins + + * readline.m4: Updated to work with Autoconf 2.68. + +2010-12-22 gettextize + + * gettext.m4: Upgrade to gettext-0.18.1. + * iconv.m4: Upgrade to gettext-0.18.1. + * lib-ld.m4: Upgrade to gettext-0.18.1. + * lib-link.m4: Upgrade to gettext-0.18.1. + * lib-prefix.m4: Upgrade to gettext-0.18.1. + * nls.m4: Upgrade to gettext-0.18.1. + * po.m4: Upgrade to gettext-0.18.1. + * progtest.m4: Upgrade to gettext-0.18.1. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Mon Apr 26 20:16:49 2010 Arnold D. Robbins + + * libtool.m4, ltoptions.m4, ltsugar.m4, ltversion.m4, + lt~obsolete.m4: Removed. + +Mon Mar 29 08:42:38 2010 Arnold D. Robbins + + * libsigsegv.m4: New file, from gnulib. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +2009-06-08 gettextize + + * gettext.m4: Upgrade to gettext-0.17. + * iconv.m4: Upgrade to gettext-0.17. + * lib-link.m4: Upgrade to gettext-0.17. + * po.m4: Upgrade to gettext-0.17. + +Mon Jun 8 22:15:29 2009 Arnold D. Robbins + + * libtool.m4, lt~obsolete.m4 ltsugar.m4 ltversion.m4, + ltoptions.m4: New files. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Tue Mar 20 21:33:31 2007 Arnold D. Robbins + + * strtod.m4: Removed, not needed anymore. + +2007-01-08 gettextize + + * gettext.m4: Upgrade to gettext-0.16.1. + * lib-link.m4: Upgrade to gettext-0.16.1. + * lib-prefix.m4: Upgrade to gettext-0.16.1. + * nls.m4: Upgrade to gettext-0.16.1. + * po.m4: Upgrade to gettext-0.16.1. + * intl.m4: New file, copied in from move to current Autotools. + * intldir.m4: New file, copied in from move to current Autotools. + * lock.m4: New file, copied in from move to current Autotools. + * visibility.m4: New file, copied in from move to current Autotools. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Wed Jul 6 17:05:32 2005 Arnold D. Robbins + + * gettext.m4: Per Bruno Haible, revert the change for the test + for locale.h from Sergey Poznyakoff. + +Wed Jun 8 20:45:17 2005 Sergey Poznyakoff + + * gettext.m4: Move test for locale.h and LC_MESSAGES in AM_GNU_GETTEXT. + Makes things work when the library is external. + +Mon May 30 21:31:43 2005 Arnold D. Robbins + + * intmax_t.m4: Updated macro for intmax_t from Jim Meyering. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +2004-02-19 gettextize + + * po.m4: Upgrade to gettext-0.14.1. + +2004-01-16 gettextize + + * gettext.m4: Upgrade to gettext-0.13.1. + * intmax.m4: New file, from gettext-0.13.1. + * lib-ld.m4: Upgrade to gettext-0.13.1. + * lib-prefix.m4: Upgrade to gettext-0.13.1. + * longdouble.m4: New file, from gettext-0.13.1. + * longlong.m4: Upgrade to gettext-0.13.1. + * po.m4: Upgrade to gettext-0.13.1. + * printf-posix.m4: New file, from gettext-0.13.1. + * signed.m4: New file, from gettext-0.13.1. + * size_max.m4: New file, from gettext-0.13.1. + * ulonglong.m4: Upgrade to gettext-0.13.1. + * wchar_t.m4: New file, from gettext-0.13.1. + * wint_t.m4: New file, from gettext-0.13.1. + * xsize.m4: New file, from gettext-0.13.1. + * Makefile.am: New file. + +Thu Jan 15 15:51:12 2004 Arnold D. Robbins + + * m4/arch.m4, m4/socket.m4, m4/strtod.m4: Quoting fixed for automake 1.8.x. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +2003-06-16 gettextize + + * gettext.m4: Upgrade to gettext-0.12.1. + * inttypes_h.m4: Upgrade to gettext-0.12.1. + * lib-ld.m4: Upgrade to gettext-0.12.1. + * lib-link.m4: Upgrade to gettext-0.12.1. + * lib-prefix.m4: Upgrade to gettext-0.12.1. + * nls.m4: New file, from gettext-0.12.1. + * po.m4: New file, from gettext-0.12.1. + * progtest.m4: Upgrade to gettext-0.12.1. + * stdint_h.m4: Upgrade to gettext-0.12.1. + * uintmax_t.m4: New file, from gettext-0.12.1. + * ulonglong.m4: New file, from gettext-0.12.1. + * Makefile.am: New file. + +2003-03-26 Paul Eggert + + * longlong.m4, intmax_t.m4: New files. + * ulonglong.m4, uintmax_t.m4: Removed. + +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. + +2002-04-28 gettextize + + * gettext.m4: Upgrade to gettext-0.11.2. + * isc-posix.m4: Upgrade to gettext-0.11.2. + * lib-link.m4: Upgrade to gettext-0.11.2. + +2002-04-09 gettextize + + * gettext.m4: Upgrade to gettext-0.11.1. + diff -Nru gawk-3.1.8+dfsg/m4/arch.m4 gawk-4.0.1+dfsg/m4/arch.m4 --- gawk-3.1.8+dfsg/m4/arch.m4 2008-01-25 10:11:22.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/arch.m4 2010-10-31 10:25:52.000000000 +0000 @@ -64,8 +64,8 @@ if test "OS/390" = "`uname`" then CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" - # Must rebuild awkgram.c from Bison for EBCDIC - rm -f awkgram.c + # Must rebuild awkgram.c and command.c from Bison for EBCDIC + rm -f awkgram.c command.c ac_cv_zos_uss=yes else ac_cv_zos_uss=no diff -Nru gawk-3.1.8+dfsg/m4/gettext.m4 gawk-4.0.1+dfsg/m4/gettext.m4 --- gawk-3.1.8+dfsg/m4/gettext.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/gettext.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,5 @@ -# gettext.m4 serial 60 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +# gettext.m4 serial 63 (gettext-0.18) +dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ dnl Authors: dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2006. +dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. @@ -60,6 +60,8 @@ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) + ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], + [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) @@ -123,11 +125,11 @@ gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, + AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then @@ -267,7 +269,7 @@ if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, + AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else @@ -301,9 +303,9 @@ fi dnl For backward compatibility. Some packages may be using this. - AC_DEFINE(HAVE_GETTEXT, 1, + AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE(HAVE_DCGETTEXT, 1, + AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi @@ -319,9 +321,9 @@ fi dnl Make all variables we use known to autoconf. - AC_SUBST(BUILD_INCLUDED_LIBINTL) - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATOBJEXT) + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= @@ -329,36 +331,36 @@ dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share - AC_SUBST(DATADIRNAME) + AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo - AC_SUBST(INSTOBJEXT) + AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat - AC_SUBST(GENCAT) + AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi - AC_SUBST(INTLOBJS) + AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" - AC_SUBST(INTLLIBS) + AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. - AC_SUBST(LIBINTL) - AC_SUBST(LTLIBINTL) - AC_SUBST(POSUB) + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) ]) diff -Nru gawk-3.1.8+dfsg/m4/iconv.m4 gawk-4.0.1+dfsg/m4/iconv.m4 --- gawk-3.1.8+dfsg/m4/iconv.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/iconv.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,5 @@ -# iconv.m4 serial AM6 (gettext-0.17) -dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. +# iconv.m4 serial 11 (gettext-0.18.1) +dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -34,7 +34,7 @@ am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include @@ -42,7 +42,7 @@ [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], - am_cv_func_iconv=yes) + [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" @@ -51,14 +51,14 @@ [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], - am_cv_lib_iconv=yes - am_cv_func_iconv=yes) + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ - dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" @@ -87,6 +87,25 @@ return 1; } } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { @@ -134,7 +153,7 @@ am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then - AC_DEFINE(HAVE_ICONV, 1, + AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then @@ -147,16 +166,31 @@ LIBICONV= LTLIBICONV= fi - AC_SUBST(LIBICONV) - AC_SUBST(LTLIBICONV) + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) ]) -AC_DEFUN([AM_ICONV], +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])) +gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_CACHE_VAL([am_cv_proto_iconv], [ AC_TRY_COMPILE([ #include #include @@ -169,12 +203,12 @@ #else size_t iconv(); #endif -], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") +], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) 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);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([$]{ac_t:- - }[$]am_cv_proto_iconv) - AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) fi ]) diff -Nru gawk-3.1.8+dfsg/m4/intlmacosx.m4 gawk-4.0.1+dfsg/m4/intlmacosx.m4 --- gawk-3.1.8+dfsg/m4/intlmacosx.m4 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/intlmacosx.m4 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,51 @@ +# intlmacosx.m4 serial 1 (gettext-0.17) +dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on MacOS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in MacOS X 10.2. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + gt_cv_func_CFPreferencesCopyAppValue, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], + [CFPreferencesCopyAppValue(NULL, NULL)], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, + [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Check for API introduced in MacOS X 10.3. + AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, + [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff -Nru gawk-3.1.8+dfsg/m4/lib-ld.m4 gawk-4.0.1+dfsg/m4/lib-ld.m4 --- gawk-3.1.8+dfsg/m4/lib-ld.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/lib-ld.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,5 @@ -# lib-ld.m4 serial 3 (gettext-0.13) -dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +# lib-ld.m4 serial 4 (gettext-0.18) +dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,7 +10,7 @@ dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; @@ -77,7 +77,7 @@ else AC_MSG_CHECKING([for non-GNU ld]) fi -AC_CACHE_VAL(acl_cv_path_LD, +AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do @@ -89,9 +89,9 @@ # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; + test "$with_gnu_ld" != no && break ;; *) - test "$with_gnu_ld" != yes && break ;; + test "$with_gnu_ld" != yes && break ;; esac fi done @@ -101,9 +101,9 @@ fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then - AC_MSG_RESULT($LD) + AC_MSG_RESULT([$LD]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU diff -Nru gawk-3.1.8+dfsg/m4/lib-link.m4 gawk-4.0.1+dfsg/m4/lib-link.m4 --- gawk-3.1.8+dfsg/m4/lib-link.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/lib-link.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,12 +1,12 @@ -# lib-link.m4 serial 13 (gettext-0.17) -dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. +# lib-link.m4 serial 21 (gettext-0.18) +dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -AC_PREREQ(2.54) +AC_PREREQ([2.54]) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. @@ -18,9 +18,9 @@ [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([Name],[translit([$1],[./-], [___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" @@ -39,16 +39,17 @@ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes - undefine([Name]) - undefine([NAME]) + popdef([NAME]) + popdef([Name]) ]) -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. If found, it -dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and -dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl the ability to compile and link the specified testcode. The missing-message +dnl defaults to 'no' and may contain additional hints for the user. +dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} +dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname @@ -57,9 +58,9 @@ [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([Name],[translit([$1],[./-], [___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. @@ -73,13 +74,25 @@ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIB[]NAME" - AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, + dnl because these -l options might require -L options that are present in + dnl LIBS. -l options benefit only from the -L options listed before it. + dnl Otherwise, add it to the front of LIBS, because it may be a static + dnl library that depends on another static library that is present in LIBS. + dnl Static libraries benefit only from the static libraries listed after + dnl it. + case " $LIB[]NAME" in + *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; + *) LIBS="$LIB[]NAME $LIBS" ;; + esac + AC_TRY_LINK([$3], [$4], + [ac_cv_lib[]Name=yes], + [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else @@ -95,8 +108,8 @@ AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) - undefine([Name]) - undefine([NAME]) + popdef([NAME]) + popdef([Name]) ]) dnl Determine the platform dependent parameters needed to use rpath: @@ -114,7 +127,7 @@ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ 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 @@ -131,11 +144,32 @@ acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE(rpath, + AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. @@ -144,19 +178,23 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. - define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) - AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], -[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib - --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -169,6 +207,10 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi fi fi ]) @@ -178,6 +220,9 @@ LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= @@ -327,7 +372,9 @@ 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 "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -415,7 +462,16 @@ case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIB[]NAME[]_PREFIX="$basedir" + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; esac @@ -476,9 +532,11 @@ dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -609,6 +667,11 @@ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, @@ -654,7 +717,8 @@ if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem"; then + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= @@ -663,7 +727,8 @@ -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem"; then + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; diff -Nru gawk-3.1.8+dfsg/m4/lib-prefix.m4 gawk-4.0.1+dfsg/m4/lib-prefix.m4 --- gawk-3.1.8+dfsg/m4/lib-prefix.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/lib-prefix.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,5 @@ -# lib-prefix.m4 serial 5 (gettext-0.15) -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -153,33 +153,72 @@ prefix="$acl_save_prefix" ]) -dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing -dnl the basename of the libdir, either "lib" or "lib64". +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ - dnl There is no formal standard regarding lib and lib64. The current - dnl practice is that on a system supporting 32-bit and 64-bit instruction - dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit - dnl libraries go under $prefix/lib. We determine the compiler's default - dnl mode by looking at the compiler's library search path. If at least - dnl of its elements ends in /lib64 or points to a directory whose absolute - dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the - dnl default, namely "lib". + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi - done - IFS="$acl_save_IFS" - fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) diff -Nru gawk-3.1.8+dfsg/m4/nls.m4 gawk-4.0.1+dfsg/m4/nls.m4 --- gawk-3.1.8+dfsg/m4/nls.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/nls.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,6 @@ -# nls.m4 serial 3 (gettext-0.15) -dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,15 +18,15 @@ dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ(2.50) +AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS - AC_ARG_ENABLE(nls, + AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) ]) diff -Nru gawk-3.1.8+dfsg/m4/po.m4 gawk-4.0.1+dfsg/m4/po.m4 --- gawk-3.1.8+dfsg/m4/po.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/po.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,5 @@ -# po.m4 serial 15 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +# po.m4 serial 17 (gettext-0.18) +dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,7 +17,7 @@ dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ(2.50) +AC_PREREQ([2.50]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], @@ -29,7 +29,7 @@ dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) + AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. @@ -41,7 +41,7 @@ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 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)], :) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl diff -Nru gawk-3.1.8+dfsg/m4/progtest.m4 gawk-4.0.1+dfsg/m4/progtest.m4 --- gawk-3.1.8+dfsg/m4/progtest.m4 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/progtest.m4 2010-12-22 19:09:06.000000000 +0000 @@ -1,5 +1,5 @@ -# progtest.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. +# progtest.m4 serial 6 (gettext-0.18) +dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -16,7 +16,7 @@ dnl Authors: dnl Ulrich Drepper , 1996. -AC_PREREQ(2.50) +AC_PREREQ([2.50]) # Search path for a program which passes the given test. @@ -55,7 +55,7 @@ # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, +AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. @@ -84,9 +84,9 @@ esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$]$1) + AC_MSG_RESULT([$][$1]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi -AC_SUBST($1)dnl +AC_SUBST([$1])dnl ]) diff -Nru gawk-3.1.8+dfsg/m4/readline.m4 gawk-4.0.1+dfsg/m4/readline.m4 --- gawk-3.1.8+dfsg/m4/readline.m4 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/m4/readline.m4 2011-01-05 18:33:57.000000000 +0000 @@ -0,0 +1,64 @@ +dnl Check for readline and dependencies +dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. +dnl +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 +dnl Defines HAVE_LIBREADLINE to 1 if a working readline setup is +dnl found, and sets @LIBREADLINE@ to the necessary libraries. + +AC_DEFUN([GNUPG_CHECK_READLINE], +[ + AC_ARG_WITH([readline], + AC_HELP_STRING([--with-readline=DIR], + [look for the readline library in DIR]), + [_do_readline=$withval],[_do_readline=yes]) + + if test "$_do_readline" != "no" ; then + if test -d "$withval" ; then + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LDFLAGS="${LDFLAGS} -L$withval/lib" + fi + + for _termcap in "" "-ltermcap" "-lcurses" "-lncurses" ; do + _readline_save_libs=$LIBS + _combo="-lreadline${_termcap:+ $_termcap}" + LIBS="$LIBS $_combo" + + AC_MSG_CHECKING([whether readline via \"$_combo\" is present and sane]) + + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ +#include +#include +#include +],[ +rl_completion_func_t *completer; +add_history("foobar"); +rl_catch_signals=0; +rl_inhibit_completion=0; +rl_attempted_completion_function=NULL; +rl_completion_matches(NULL,NULL); +])],_found_readline=yes,_found_readline=no) + + AC_MSG_RESULT([$_found_readline]) + + LIBS=$_readline_save_libs + + if test $_found_readline = yes ; then + AC_DEFINE(HAVE_LIBREADLINE,1, + [Define to 1 if you have a fully functional readline library.]) + AC_SUBST(LIBREADLINE,$_combo) + break + fi + done + + unset _termcap + unset _readline_save_libs + unset _combo + unset _found_readline + fi +])dnl diff -Nru gawk-3.1.8+dfsg/main.c gawk-4.0.1+dfsg/main.c --- gawk-3.1.8+dfsg/main.c 2010-04-26 18:26:41.000000000 +0000 +++ gawk-4.0.1+dfsg/main.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,9 +1,9 @@ /* - * main.c -- Expression tree constructors and main program for gawk. + * main.c -- Code generator and main program for gawk. */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -24,56 +24,49 @@ */ /* FIX THIS BEFORE EVERY RELEASE: */ -#define UPDATE_YEAR 2010 +#define UPDATE_YEAR 2012 #include "awk.h" #include "getopt.h" -#ifndef O_BINARY -#include -#endif - #ifdef HAVE_MCHECK_H #include #endif -#ifdef HAVE_LIBSIGSEGV -#include -#else -typedef void *stackoverflow_context_t; -#define sigsegv_install_handler(catchsegv) signal(SIGSEGV, catchsig) -/* define as 0 rather than empty so that (void) cast on it works */ -#define stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE) 0 -#endif #define DEFAULT_PROFILE "awkprof.out" /* where to put profile */ #define DEFAULT_VARFILE "awkvars.out" /* where to put vars */ static const char *varfile = DEFAULT_VARFILE; +const char *command_file = NULL; /* debugger commands */ -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, const char *argv0, char **argv)); -static void init_vars P((void)); -static NODE *load_environ P((void)); -static NODE *load_procinfo 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 usage(int exitval, FILE *fp) ATTRIBUTE_NORETURN; +static void copyleft(void) ATTRIBUTE_NORETURN; +static void cmdline_fs(char *str); +static void init_args(int argc0, int argc, const char *argv0, char **argv); +static void init_vars(void); +static NODE *load_environ(void); +static NODE *load_procinfo(void); +static RETSIGTYPE catchsig(int sig); #ifdef HAVE_LIBSIGSEGV -static int catchsegv P((void *fault_address, int serious)); -static void catchstackoverflow P((int emergency, stackoverflow_context_t scp)); +static int catchsegv(void *fault_address, int serious); +static void catchstackoverflow(int emergency, stackoverflow_context_t scp); #endif -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)); +static void nostalgia(void) ATTRIBUTE_NORETURN; +static void version(void) ATTRIBUTE_NORETURN; +static void init_fds(void); +static void init_groupset(void); + +static void save_argv(int, char **); /* These nodes store all the special variables AWK uses */ NODE *ARGC_node, *ARGIND_node, *ARGV_node, *BINMODE_node, *CONVFMT_node; -NODE *ENVIRON_node, *ERRNO_node, *FIELDWIDTHS_node, *FILENAME_node, *FNR_node; -NODE *FS_node, *IGNORECASE_node, *NF_node, *NR_node, *OFMT_node, *OFS_node; -NODE *ORS_node, *PROCINFO_node, *RLENGTH_node, *RSTART_node, *RS_node; -NODE *RT_node, *SUBSEP_node, *LINT_node, *TEXTDOMAIN_node; +NODE *ENVIRON_node, *ERRNO_node, *FIELDWIDTHS_node, *FILENAME_node; +NODE *FNR_node, *FPAT_node, *FS_node, *IGNORECASE_node, *LINT_node; +NODE *NF_node, *NR_node, *OFMT_node, *OFS_node, *ORS_node, *PROCINFO_node; +NODE *RLENGTH_node, *RSTART_node, *RS_node, *RT_node, *SUBSEP_node; +NODE *TEXTDOMAIN_node; + +NODE *_r; /* used as temporary in stack macros */ long NF; long NR; @@ -84,7 +77,6 @@ char *ORS; char *OFMT; char *TEXTDOMAIN; -int MRL; /* See -mr option for use of this variable */ /* * CONVFMT is a convenience pointer for the current number to string format. @@ -94,9 +86,6 @@ */ char *CONVFMT = "%.6g"; - -int errcount = 0; /* error counter, used by yyerror() */ - NODE *Nnull_string; /* The global null string */ #if defined(HAVE_LOCALE_H) @@ -107,34 +96,38 @@ /* The name the program was invoked under, for error messages */ const char *myname; -/* A block of AWK code to be run before running the program */ -NODE *begin_block = NULL; +/* A block of AWK code to be run */ +INSTRUCTION *code_block = NULL; -/* A block of AWK code to be run after the last input file */ -NODE *end_block = NULL; +char **d_argv; /* saved argv for debugger restarting */ +/* + * List of rules and functions with first and last instruction (source_line) + * information; used for profiling and debugging. + */ +INSTRUCTION *rule_list; -int exiting = FALSE; /* Was an "exit" statement executed? */ -int exit_val = EXIT_SUCCESS; /* optional exit value */ +int exit_val = EXIT_SUCCESS; /* exit value */ #if defined(YYDEBUG) || defined(GAWKDEBUG) extern int yydebug; #endif -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 */ +SRCFILE *srcfiles; /* source files */ + +/* + * structure to remember variable pre-assignments + */ +struct pre_assign { + enum assign_type { PRE_ASSIGN = 1, PRE_ASSIGN_FS } type; + char *val; +}; + +static struct pre_assign *preassigns = NULL; /* requested via -v or -F */ +static long numassigns = -1; /* how many of them */ static int disallow_var_assigns = FALSE; /* true for --exec */ -#define preassigns_add(stype, val) \ - add_src(&preassigns, &numassigns, &allocassigns, stype, val) +static void add_preassign(enum assign_type type, char *val); #undef do_lint #undef do_lint_old @@ -146,24 +139,25 @@ int do_intl = FALSE; /* dump locale-izable strings to stdout */ int do_non_decimal_data = FALSE; /* allow octal/hex C style DATA. Use with caution! */ int do_nostalgia = FALSE; /* provide a blast from the past */ -int do_intervals = FALSE; /* allow {...,...} in regexps */ +int do_intervals = FALSE; /* allow {...,...} in regexps, see resetup() */ int do_profiling = FALSE; /* profile and pretty print the program */ int do_dump_vars = FALSE; /* dump all global variables at end */ int do_tidy_mem = FALSE; /* release vars when done */ -int do_optimize = FALSE; /* apply any safe optimizations */ - -int in_begin_rule = FALSE; /* we're in a BEGIN rule */ -int in_end_rule = FALSE; /* we're in an END rule */ -int whiny_users = FALSE; /* do things that whiny users want */ +int do_optimize = TRUE; /* apply default optimizations */ +int do_binary = FALSE; /* hands off my data! */ +int do_sandbox = FALSE; /* sandbox mode - disable 'system' function & redirections */ int use_lc_numeric = FALSE; /* obey locale for decimal point */ -#ifdef MBS_SUPPORT + +#if MBS_SUPPORT int gawk_mb_cur_max; /* MB_CUR_MAX value, see comment in main() */ -#else -const int gawk_mb_cur_max = 1; #endif +FILE *output_fp; /* default output for debugger */ int output_is_tty = FALSE; /* control flushing of output */ +/* default format for strftime(), available via PROCINFO */ +const char def_strftime_format[] = "%a %b %e %H:%M:%S %Z %Y"; + extern const char *version_string; #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 @@ -171,45 +165,38 @@ int ngroups; /* size of said set */ #endif -/* The parse tree is stored here. */ -NODE *expression_value; - -#if _MSC_VER == 510 -void (*lintfunc) P((va_list va_alist, ...)) = warning; -#else -#ifdef CAN_USE_STDARG_H -void (*lintfunc) P((const char *mesg, ...)) = warning; -#else -void (*lintfunc) () = warning; -#endif -#endif +void (*lintfunc)(const char *mesg, ...) = warning; +/* + * Note: reserve -D for future use, to merge dgawk into gawk. + * Note: reserve -l for future use, for xgawk's -l option. + */ static const struct option optab[] = { - { "compat", no_argument, & do_traditional, 1 }, { "traditional", no_argument, & do_traditional, 1 }, - { "lint", optional_argument, NULL, 'l' }, + { "lint", optional_argument, NULL, 'L' }, { "lint-old", no_argument, & do_lint_old, 1 }, { "optimize", no_argument, & do_optimize, 'O' }, { "posix", no_argument, & do_posix, 1 }, + { "command", required_argument, NULL, 'R' }, { "nostalgia", no_argument, & do_nostalgia, 1 }, - { "gen-po", no_argument, & do_intl, 1 }, + { "gen-pot", no_argument, & do_intl, 1 }, { "non-decimal-data", no_argument, & do_non_decimal_data, 1 }, { "profile", optional_argument, NULL, 'p' }, - { "copyleft", no_argument, NULL, 'C' }, { "copyright", no_argument, NULL, 'C' }, { "field-separator", required_argument, NULL, 'F' }, { "file", required_argument, NULL, 'f' }, { "re-interval", no_argument, & do_intervals, 1 }, - { "source", required_argument, NULL, 's' }, + { "source", required_argument, NULL, 'e' }, { "dump-variables", optional_argument, NULL, 'd' }, { "assign", required_argument, NULL, 'v' }, { "version", no_argument, NULL, 'V' }, - { "usage", no_argument, NULL, 'u' }, - { "help", no_argument, NULL, 'u' }, - { "exec", required_argument, NULL, 'S' }, + { "help", no_argument, NULL, 'h' }, + { "exec", required_argument, NULL, 'E' }, { "use-lc-numeric", no_argument, & use_lc_numeric, 1 }, + { "characters-as-bytes", no_argument, & do_binary, 'b' }, + { "sandbox", no_argument, & do_sandbox, 1 }, #if defined(YYDEBUG) || defined(GAWKDEBUG) - { "parsedebug", no_argument, NULL, 'D' }, + { "parsedebug", no_argument, NULL, 'Y' }, #endif { NULL, 0, NULL, '\0' } }; @@ -224,25 +211,21 @@ int main(int argc, char **argv) { - int c; - char *scan; - /* the + on the front tells GNU getopt not to rearrange argv */ - const char *optlist = "+F:f:v:W;m:DO"; + /* + * The + on the front tells GNU getopt not to rearrange argv. + * Note: reserve -D for future use, to merge dgawk into gawk. + * Note: reserve -l for future use, for xgawk's -l option. + */ + const char *optlist = "+F:f:v:W;m:bcCd::e:E:gh:L:nNOp::PrR:StVY"; int stopped_early = FALSE; int old_optind; - extern int optind; - extern int opterr; - extern char *optarg; int i; - int stdio_problem = FALSE; + int c; + char *scan, *src; char *extra_stack; /* do these checks early */ - if (getenv("TIDYMEM") != NULL) - do_tidy_mem = TRUE; - - if (getenv("WHINY_USERS") != NULL) - whiny_users = TRUE; + do_tidy_mem = (getenv("TIDYMEM") != NULL); #ifdef HAVE_MCHECK_H #ifdef HAVE_MTRACE @@ -282,7 +265,7 @@ setlocale(LC_TIME, ""); #endif -#ifdef MBS_SUPPORT +#if 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 @@ -290,6 +273,9 @@ */ gawk_mb_cur_max = MB_CUR_MAX; /* Without MBS_SUPPORT, gawk_mb_cur_max is 1. */ + + /* init the cache for checking bytes if they're characters */ + init_btowc_cache(); #endif (void) bindtextdomain(PACKAGE, LOCALEDIR); @@ -299,21 +285,16 @@ #ifdef SIGBUS (void) signal(SIGBUS, catchsig); #endif + (void) sigsegv_install_handler(catchsegv); #define STACK_SIZE (16*1024) - extra_stack = malloc(STACK_SIZE); - if (extra_stack == NULL) - fatal(_("out of memory")); + emalloc(extra_stack, char *, STACK_SIZE, "main"); (void) stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE); #undef STACK_SIZE myname = gawk_name(argv[0]); os_arg_fixup(&argc, &argv); /* emulate redirection, expand wildcards */ - /* remove sccs gunk */ - if (strncmp(version_string, "@(#)", 4) == 0) - version_string += 4; - if (argc < 2) usage(EXIT_FAILURE, stderr); @@ -323,9 +304,17 @@ /* init array handling. */ array_init(); + output_fp = stdout; + /* we do error messages ourselves on invalid options */ opterr = FALSE; + /* copy argv before getopt gets to it; used to restart the debugger */ + save_argv(argc, argv); + + /* initialize global (main) execution context */ + push_context(new_context()); + /* option processing. ready, set, go! */ for (optopt = 0, old_optind = 1; (c = getopt_long(argc, argv, optlist, optab, NULL)) != EOF; @@ -335,66 +324,58 @@ switch (c) { case 'F': - preassigns_add(PRE_ASSIGN_FS, optarg); + add_preassign(PRE_ASSIGN_FS, optarg); break; - case 'S': + case 'E': disallow_var_assigns = TRUE; /* fall through */ case 'f': /* - * a la MKS awk, allow multiple -f options. - * this makes function libraries real easy. - * most of the magic is in the scanner. + * Allow multiple -f options. + * This makes function libraries real easy. + * Most of the magic is in the scanner. * * The following is to allow for whitespace at the end * of a #! /bin/gawk line in an executable file */ scan = optarg; if (argv[optind-1] != optarg) - while (isspace(*scan)) + while (isspace((unsigned char) *scan)) scan++; - srcfiles_add(SOURCEFILE, - (*scan == '\0' ? argv[optind++] : optarg)); + src = (*scan == '\0' ? argv[optind++] : optarg); + (void) add_srcfile((src && src[0] == '-' && src[1] == '\0') ? + SRC_STDIN : SRC_FILE, + src, srcfiles, NULL, NULL); + break; case 'v': - preassigns_add(PRE_ASSIGN, optarg); + add_preassign(PRE_ASSIGN, optarg); break; case 'm': /* - * Research awk extension. + * BWK awk extension. * -mf nnn set # fields, gawk ignores * -mr nnn set record length, ditto * - * As of at least 10/2007, Research awk also ignores it. + * As of at least 10/2007, BWK awk also ignores it. */ if (do_lint) lintwarn(_("`-m[fr]' option irrelevant in gawk")); if (optarg[0] != 'r' && optarg[0] != 'f') warning(_("-m option usage: `-m[fr] nnn'")); - /* - * Set fixed length records for Tandem, - * ignored on other platforms (see io.c:get_a_record). - */ - if (optarg[0] == 'r') { - if (isdigit(optarg[1])) - MRL = atoi(optarg+1); - else { - MRL = atoi(argv[optind]); - optind++; - } - } else if (optarg[1] == '\0') - optind++; break; - case 'W': /* gawk specific options - now in getopt_long */ - fprintf(stderr, _("%s: option `-W %s' unrecognized, ignored\n"), - argv[0], optarg); + case 'b': + do_binary = TRUE; + break; + + case 'c': + do_traditional = TRUE; break; - /* These can only come from long form options */ case 'C': copyleft(); break; @@ -405,8 +386,24 @@ varfile = optarg; break; - case 'l': + case 'e': + if (optarg[0] == '\0') + warning(_("empty argument to `-e/--source' ignored")); + else + (void) add_srcfile(SRC_CMDLINE, optarg, srcfiles, NULL, NULL); + break; + + case 'g': + do_intl = TRUE; + break; + + case 'h': + /* write usage to stdout, per GNU coding stds */ + usage(EXIT_SUCCESS, stdout); + break; + #ifndef NO_LINT + case 'L': do_lint = LINT_ALL; if (optarg != NULL) { if (strcmp(optarg, "fatal") == 0) @@ -414,11 +411,27 @@ else if (strcmp(optarg, "invalid") == 0) do_lint = LINT_INVALID; } + break; + + case 't': + do_lint_old = TRUE; + break; +#else + case 'L': + case 't': + break; #endif + + case 'n': + do_non_decimal_data = TRUE; + break; + + case 'N': + use_lc_numeric = TRUE; break; case 'O': - do_optimize = TRUE; + do_optimize++; break; case 'p': @@ -429,21 +442,27 @@ set_prof_file(DEFAULT_PROFILE); break; - case 's': - if (optarg[0] == '\0') - warning(_("empty argument to `--source' ignored")); - else - srcfiles_add(CMDLINE, optarg); + case 'P': + do_posix = TRUE; break; - case 'u': - usage(EXIT_SUCCESS, stdout); /* per coding stds */ - break; + case 'r': + do_intervals = TRUE; + break; + + case 'S': + do_sandbox = TRUE; + break; case 'V': version(); break; + case 'W': /* gawk specific options - now in getopt_long */ + fprintf(stderr, _("%s: option `-W %s' unrecognized, ignored\n"), + argv[0], optarg); + break; + case 0: /* * getopt_long found an option that sets a variable @@ -452,20 +471,28 @@ */ break; - case 'D': + case 'Y': + case 'R': #if defined(YYDEBUG) || defined(GAWKDEBUG) - yydebug = 2; - break; + if (c == 'Y') { + yydebug = 2; + break; + } #endif - /* if not debugging, fall through */ + if (c == 'R' && which_gawk == exe_debugging) { + if (optarg[0] != '\0') + command_file = optarg; + break; + } + /* if not debugging or dgawk, fall through */ case '?': default: /* - * New behavior. If not posix, an unrecognized - * option stops argument processing so that it can - * go into ARGV for the awk program to see. This - * makes use of ``#! /bin/gawk -f'' easier. + * If not posix, an unrecognized option stops argument + * processing so that it can go into ARGV for the awk + * program to see. This makes use of ``#! /bin/gawk -f'' + * easier. * * However, it's never simple. If optopt is set, * an option that requires an argument didn't get the @@ -483,7 +510,7 @@ stopped_early = TRUE; goto out; } else if (optopt != '\0') { - /* Use 1003.2 required message format */ + /* Use POSIX required message format */ fprintf(stderr, _("%s: option requires an argument -- %c\n"), myname, optopt); @@ -493,7 +520,7 @@ let getopt print error message for us */ break; } - if (c == 'S') /* --exec ends option processing */ + if (c == 'E') /* --exec ends option processing */ break; } out: @@ -529,6 +556,15 @@ if (do_lint && os_is_setuid()) warning(_("running %s setuid root may be a security problem"), myname); +#if MBS_SUPPORT + if (do_binary) { + if (do_posix) + warning(_("`--posix' overrides `--binary'")); + else + gawk_mb_cur_max = 1; /* hands off my data! */ + } +#endif + /* * Force profiling if this is pgawk. * Don't bother if the command line already set profiling up. @@ -552,6 +588,8 @@ */ resetup(); + (void) grow_stack(); + /* Set up the special variables */ init_vars(); @@ -559,12 +597,16 @@ init_fields(); /* Now process the pre-assignments */ - for (i = 0; i <= numassigns; i++) - if (preassigns[i].stype == PRE_ASSIGN) + for (i = 0; i <= numassigns; i++) { + if (preassigns[i].type == PRE_ASSIGN) (void) arg_assign(preassigns[i].val, TRUE); else /* PRE_ASSIGN_FS */ cmdline_fs(preassigns[i].val); - free(preassigns); + efree(preassigns[i].val); + } + + if (preassigns != NULL) + efree(preassigns); if ((BINMODE & 1) != 0) if (os_setbinmode(fileno(stdin), O_BINARY) == -1) @@ -579,20 +621,19 @@ #ifdef GAWKDEBUG setbuf(stdout, (char *) NULL); /* make debugging easier */ #endif - if (isatty(fileno(stdout))) + if (os_isatty(fileno(stdout))) output_is_tty = TRUE; /* No -f or --source options, use next arg */ - if (numfiles == -1) { + if (srcfiles->next == srcfiles) { if (optind > argc - 1 || stopped_early) /* no args left or no program */ usage(EXIT_FAILURE, stderr); - srcfiles_add(CMDLINE, argv[optind]); + (void) add_srcfile(SRC_CMDLINE, argv[optind], srcfiles, NULL, NULL); optind++; } init_args(optind, argc, do_posix ? argv[0] : myname, argv); - (void) tokexpand(); #if defined(LC_NUMERIC) /* @@ -602,23 +643,19 @@ */ setlocale(LC_NUMERIC, "C"); #endif - /* Read in the program */ - if (yyparse() != 0 || errcount != 0) + if (parse_program(&code_block) != 0) exit(EXIT_FAILURE); - - free(srcfiles); - + if (do_intl) exit(EXIT_SUCCESS); - if (do_lint && begin_block == NULL && expression_value == NULL - && end_block == NULL) - lintwarn(_("no program text at all!")); - if (do_lint) shadow_funcs(); + if (do_lint && code_block->nexti->opcode == Op_atexit) + lintwarn(_("no program text at all!")); + init_profiling_signals(); #if defined(LC_NUMERIC) @@ -641,40 +678,10 @@ setlocale(LC_NUMERIC, ""); #endif - /* Whew. Finally, run the program. */ - if (begin_block != NULL) { - in_begin_rule = TRUE; - (void) interpret(begin_block); - } - in_begin_rule = FALSE; - if (! exiting && (expression_value != NULL || end_block != NULL)) - do_input(); - if (end_block != NULL) { - in_end_rule = TRUE; - (void) interpret(end_block); - } - in_end_rule = FALSE; - /* - * This used to be: - * - * if (close_io() != 0 && ! exiting && exit_val == 0) - * exit_val = 1; - * - * Other awks don't care about problems closing open files - * and pipes, in that it doesn't affect their exit status. - * So we no longer do either. - */ - (void) close_io(& stdio_problem); - /* - * However, we do want to exit non-zero if there was a problem - * with stdout/stderr, so we reinstate a slightly different - * version of the above: - */ - if (stdio_problem && ! exiting && exit_val == EXIT_SUCCESS) - exit_val = EXIT_FAILURE; + interpret(code_block); if (do_profiling) { - dump_prog(begin_block, expression_value, end_block); + dump_prog(code_block); dump_funcs(); } @@ -683,30 +690,37 @@ if (do_tidy_mem) release_all_vars(); + + /* keep valgrind happier */ + if (extra_stack) + efree(extra_stack); exit(exit_val); /* more portable */ return exit_val; /* to suppress warnings */ } -/* add_src --- add one element to *srcfiles or *preassigns */ +/* add_preassign --- add one element to preassigns */ static void -add_src(struct src **data, long *num, long *alloc, enum srctype stype, char *val) +add_preassign(enum assign_type type, char *val) { + static long alloc_assigns; /* for how many are allocated */ + #define INIT_SRC 4 - ++*num; + ++numassigns; - 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"); + if (preassigns == NULL) { + emalloc(preassigns, struct pre_assign *, + INIT_SRC * sizeof(struct pre_assign), "add_preassign"); + alloc_assigns = INIT_SRC; + } else if (numassigns >= alloc_assigns) { + alloc_assigns *= 2; + erealloc(preassigns, struct pre_assign *, + alloc_assigns * sizeof(struct pre_assign), "add_preassigns"); } - - (*data)[*num].stype = stype; - (*data)[*num].val = val; + preassigns[numassigns].type = type; + preassigns[numassigns].val = estrdup(val, strlen(val)); #undef INIT_SRC } @@ -716,7 +730,6 @@ static void usage(int exitval, FILE *fp) { - /* Not factoring out common stuff makes it easier to translate. */ fprintf(fp, _("Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"), myname); @@ -725,37 +738,37 @@ /* GNU long options info. This is too many options. */ - fputs(_("POSIX options:\t\tGNU long options:\n"), fp); + fputs(_("POSIX options:\t\tGNU long options: (standard)\n"), fp); fputs(_("\t-f progfile\t\t--file=progfile\n"), fp); fputs(_("\t-F fs\t\t\t--field-separator=fs\n"), fp); fputs(_("\t-v var=val\t\t--assign=var=val\n"), fp); - fputs(_("\t-m[fr] val\n"), fp); + fputs(_("Short options:\t\tGNU long options: (extensions)\n"), fp); + fputs(_("\t-b\t\t\t--characters-as-bytes\n"), fp); + fputs(_("\t-c\t\t\t--traditional\n"), fp); + fputs(_("\t-C\t\t\t--copyright\n"), fp); + fputs(_("\t-d[file]\t\t--dump-variables[=file]\n"), fp); + fputs(_("\t-e 'program-text'\t--source='program-text'\n"), fp); + fputs(_("\t-E file\t\t\t--exec=file\n"), fp); + fputs(_("\t-g\t\t\t--gen-pot\n"), fp); + fputs(_("\t-h\t\t\t--help\n"), fp); + fputs(_("\t-L [fatal]\t\t--lint[=fatal]\n"), fp); + fputs(_("\t-n\t\t\t--non-decimal-data\n"), fp); + fputs(_("\t-N\t\t\t--use-lc-numeric\n"), fp); fputs(_("\t-O\t\t\t--optimize\n"), fp); - fputs(_("\t-W compat\t\t--compat\n"), fp); - fputs(_("\t-W copyleft\t\t--copyleft\n"), fp); - fputs(_("\t-W copyright\t\t--copyright\n"), fp); - fputs(_("\t-W dump-variables[=file]\t--dump-variables[=file]\n"), fp); - fputs(_("\t-W exec=file\t\t--exec=file\n"), fp); - fputs(_("\t-W gen-po\t\t--gen-po\n"), fp); - fputs(_("\t-W help\t\t\t--help\n"), fp); - fputs(_("\t-W lint[=fatal]\t\t--lint[=fatal]\n"), fp); - fputs(_("\t-W lint-old\t\t--lint-old\n"), fp); - fputs(_("\t-W non-decimal-data\t--non-decimal-data\n"), fp); + fputs(_("\t-p[file]\t\t--profile[=file]\n"), fp); + fputs(_("\t-P\t\t\t--posix\n"), fp); + fputs(_("\t-r\t\t\t--re-interval\n"), fp); + if (which_gawk == exe_debugging) + fputs(_("\t-R file\t\t\t--command=file\n"), fp); + fputs(_("\t-S\t\t\t--sandbox\n"), fp); + fputs(_("\t-t\t\t\t--lint-old\n"), fp); + fputs(_("\t-V\t\t\t--version\n"), fp); #ifdef NOSTALGIA fputs(_("\t-W nostalgia\t\t--nostalgia\n"), fp); #endif #ifdef GAWKDEBUG - fputs(_("\t-W parsedebug\t\t--parsedebug\n"), fp); + fputs(_("\t-Y\t\t--parsedebug\n"), fp); #endif - fputs(_("\t-W profile[=file]\t--profile[=file]\n"), fp); - fputs(_("\t-W posix\t\t--posix\n"), fp); - fputs(_("\t-W re-interval\t\t--re-interval\n"), fp); - fputs(_("\t-W source=program-text\t--source=program-text\n"), fp); - fputs(_("\t-W traditional\t\t--traditional\n"), fp); - fputs(_("\t-W usage\t\t--usage\n"), fp); - fputs(_("\t-W use-lc-numeric\t--use-lc-numeric\n"), fp); - fputs(_("\t-W version\t\t--version\n"), fp); - /* This is one string to make things easier on translators. */ /* TRANSLATORS: --help output 5 (end) @@ -805,11 +818,6 @@ GNU General Public License for more details.\n\ \n"); 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"); -*/ N_("You should have received a copy of the GNU General Public License\n\ along with this program. If not, see http://www.gnu.org/licenses/.\n"); @@ -832,16 +840,16 @@ static void cmdline_fs(char *str) { - register NODE **tmp; + NODE **tmp; - tmp = get_lhs(FS_node, (Func_ptr *) 0, FALSE); + tmp = &FS_node->var_value; unref(*tmp); /* * Only if in full compatibility mode check for the stupid special * case so -F\t works as documented in awk book even though the shell * hands us -Ft. Bleah! * - * Thankfully, Posix didn't propagate this "feature". + * Thankfully, POSIX didn't propagate this "feature". */ if (str[0] == 't' && str[1] == '\0') { if (do_lint) @@ -860,19 +868,26 @@ { int i, j; NODE **aptr; + NODE *tmp; - 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((char *) argv0, strlen(argv0)); + ARGV_node = install_symbol(estrdup("ARGV", 4), mk_symbol(Node_var_array, (NODE *) NULL)); + tmp = make_number(0.0); + aptr = assoc_lookup(ARGV_node, tmp, FALSE); + unref(tmp); + unref(*aptr); + *aptr = make_string(argv0, strlen(argv0)); (*aptr)->flags |= MAYBE_NUM; - for (i = argc0, j = 1; i < argc; i++) { - aptr = assoc_lookup(ARGV_node, tmp_number((AWKNUM) j), FALSE); + for (i = argc0, j = 1; i < argc; i++, j++) { + tmp = make_number((AWKNUM) j); + aptr = assoc_lookup(ARGV_node, tmp, FALSE); + unref(tmp); + unref(*aptr); *aptr = make_string(argv[i], strlen(argv[i])); (*aptr)->flags |= MAYBE_NUM; - j++; } - ARGC_node = install("ARGC", - node(make_number((AWKNUM) j), Node_var, (NODE *) NULL)); + + ARGC_node = install_symbol(estrdup("ARGC", 4), + mk_symbol(Node_var, make_number((AWKNUM) j))); } /* @@ -882,45 +897,48 @@ * they have NULL entries in that field. This is notably true of FS * and IGNORECASE. */ + struct varinit { NODE **spec; const char *name; - NODETYPE type; const char *strval; AWKNUM numval; + Func_ptr update; Func_ptr assign; + int do_assign; int flags; #define NO_INSTALL 0x01 #define NON_STANDARD 0x02 }; static const struct varinit varinit[] = { -{NULL, "ARGC", Node_illegal, NULL, 0, NULL, NO_INSTALL }, -{&ARGIND_node, "ARGIND", Node_var, NULL, 0, NULL, NON_STANDARD }, -{NULL, "ARGV", Node_illegal, NULL, 0, NULL, NO_INSTALL }, -{&BINMODE_node, "BINMODE", Node_BINMODE, NULL, 0, NULL, NON_STANDARD }, -{&CONVFMT_node, "CONVFMT", Node_CONVFMT, "%.6g", 0, set_CONVFMT, 0 }, -{NULL, "ENVIRON", Node_illegal, NULL, 0, NULL, NO_INSTALL }, -{&ERRNO_node, "ERRNO", Node_var, NULL, 0, NULL, NON_STANDARD }, -{&FIELDWIDTHS_node, "FIELDWIDTHS", Node_FIELDWIDTHS, "", 0, NULL, NON_STANDARD }, -{&FILENAME_node, "FILENAME", Node_var, "", 0, NULL, 0 }, -{&FNR_node, "FNR", Node_FNR, NULL, 0, set_FNR, 0 }, -{&FS_node, "FS", Node_FS, " ", 0, NULL, 0 }, -{&IGNORECASE_node, "IGNORECASE", Node_IGNORECASE, NULL, 0, NULL, NON_STANDARD }, -{&LINT_node, "LINT", Node_LINT, NULL, 0, NULL, NON_STANDARD }, -{&NF_node, "NF", Node_NF, NULL, -1, NULL, 0 }, -{&NR_node, "NR", Node_NR, NULL, 0, set_NR, 0 }, -{&OFMT_node, "OFMT", Node_OFMT, "%.6g", 0, set_OFMT, 0 }, -{&OFS_node, "OFS", Node_OFS, " ", 0, set_OFS, 0 }, -{&ORS_node, "ORS", Node_ORS, "\n", 0, set_ORS, 0 }, -{NULL, "PROCINFO", Node_illegal, NULL, 0, NULL, NO_INSTALL | NON_STANDARD }, -{&RLENGTH_node, "RLENGTH", Node_var, NULL, 0, NULL, 0 }, -{&RS_node, "RS", Node_RS, "\n", 0, set_RS, 0 }, -{&RSTART_node, "RSTART", Node_var, NULL, 0, NULL, 0 }, -{&RT_node, "RT", Node_var, "", 0, NULL, NON_STANDARD }, -{&SUBSEP_node, "SUBSEP", Node_SUBSEP, "\034", 0, NULL, 0 }, -{&TEXTDOMAIN_node, "TEXTDOMAIN", Node_TEXTDOMAIN, "messages", 0, set_TEXTDOMAIN, NON_STANDARD }, -{0, NULL, Node_illegal, NULL, 0, NULL, 0 }, +{NULL, "ARGC", NULL, 0, NULL, NULL, FALSE, NO_INSTALL }, +{&ARGIND_node, "ARGIND", NULL, 0, NULL, NULL, FALSE, NON_STANDARD }, +{NULL, "ARGV", NULL, 0, NULL, NULL, FALSE, NO_INSTALL }, +{&BINMODE_node, "BINMODE", NULL, 0, NULL, set_BINMODE, FALSE, NON_STANDARD }, +{&CONVFMT_node, "CONVFMT", "%.6g", 0, NULL, set_CONVFMT,TRUE, 0 }, +{NULL, "ENVIRON", NULL, 0, NULL, NULL, FALSE, NO_INSTALL }, +{&ERRNO_node, "ERRNO", "", 0, NULL, NULL, FALSE, NON_STANDARD }, +{&FIELDWIDTHS_node, "FIELDWIDTHS", "", 0, NULL, set_FIELDWIDTHS, FALSE, NON_STANDARD }, +{&FILENAME_node, "FILENAME", "", 0, NULL, NULL, FALSE, 0 }, +{&FNR_node, "FNR", NULL, 0, update_FNR, set_FNR, TRUE, 0 }, +{&FS_node, "FS", " ", 0, NULL, set_FS, FALSE, 0 }, +{&FPAT_node, "FPAT", "[^[:space:]]+", 0, NULL, set_FPAT, FALSE, NON_STANDARD }, +{&IGNORECASE_node, "IGNORECASE", NULL, 0, NULL, set_IGNORECASE, FALSE, NON_STANDARD }, +{&LINT_node, "LINT", NULL, 0, NULL, set_LINT, FALSE, NON_STANDARD }, +{&NF_node, "NF", NULL, -1, update_NF, set_NF, FALSE, 0 }, +{&NR_node, "NR", NULL, 0, update_NR, set_NR, TRUE, 0 }, +{&OFMT_node, "OFMT", "%.6g", 0, NULL, set_OFMT, TRUE, 0 }, +{&OFS_node, "OFS", " ", 0, NULL, set_OFS, TRUE, 0 }, +{&ORS_node, "ORS", "\n", 0, NULL, set_ORS, TRUE, 0 }, +{NULL, "PROCINFO", NULL, 0, NULL, NULL, FALSE, NO_INSTALL | NON_STANDARD }, +{&RLENGTH_node, "RLENGTH", NULL, 0, NULL, NULL, FALSE, 0 }, +{&RS_node, "RS", "\n", 0, NULL, set_RS, TRUE, 0 }, +{&RSTART_node, "RSTART", NULL, 0, NULL, NULL, FALSE, 0 }, +{&RT_node, "RT", "", 0, NULL, NULL, FALSE, NON_STANDARD }, +{&SUBSEP_node, "SUBSEP", "\034", 0, NULL, set_SUBSEP, TRUE, 0 }, +{&TEXTDOMAIN_node, "TEXTDOMAIN", "messages", 0, NULL, set_TEXTDOMAIN, TRUE, NON_STANDARD }, +{0, NULL, NULL, 0, NULL, NULL, FALSE, 0 }, }; /* init_vars --- actually initialize everything in the symbol table */ @@ -928,18 +946,20 @@ static void init_vars() { - register const struct varinit *vp; + const struct varinit *vp; + NODE *n; - for (vp = varinit; vp->name; vp++) { + for (vp = varinit; vp->name != NULL; vp++) { if ((vp->flags & NO_INSTALL) != 0) continue; + n = mk_symbol(Node_var, vp->strval == NULL + ? make_number(vp->numval) + : make_string(vp->strval, strlen(vp->strval))); + n->var_assign = (Func_ptr) vp->assign; + n->var_update = (Func_ptr) vp->update; - *(vp->spec) = install((char *) vp->name, - node(vp->strval == NULL ? make_number(vp->numval) - : make_string((char *) vp->strval, - strlen(vp->strval)), - vp->type, (NODE *) NULL)); - if (vp->assign) + *(vp->spec) = install_symbol(estrdup(vp->name, strlen(vp->name)), n); + if (vp->do_assign) (*(vp->assign))(); } @@ -954,18 +974,17 @@ static NODE * load_environ() { -#if ! defined(TANDEM) -#if ! (defined(MSDOS) && !defined(DJGPP)) && ! defined(OS2) && ! (defined(VMS) && defined(__DECC)) +#if ! (defined(VMS) && defined(__DECC)) extern char **environ; #endif - register char *var, *val; + char *var, *val; NODE **aptr; - register int i; -#endif /* TANDEM */ + int i; + NODE *tmp; + + ENVIRON_node = install_symbol(estrdup("ENVIRON", 7), + mk_symbol(Node_var_array, (NODE *) NULL)); - ENVIRON_node = install("ENVIRON", - node((NODE *) NULL, Node_var_array, (NODE *) NULL)); -#if ! defined(TANDEM) for (i = 0; environ[i] != NULL; i++) { static char nullstr[] = ""; @@ -975,8 +994,10 @@ *val++ = '\0'; else val = nullstr; - aptr = assoc_lookup(ENVIRON_node, tmp_string(var, strlen(var)), - FALSE); + tmp = make_string(var, strlen(var)); + aptr = assoc_lookup(ENVIRON_node, tmp, FALSE); + unref(tmp); + unref(*aptr); *aptr = make_string(val, strlen(val)); (*aptr)->flags |= MAYBE_NUM; @@ -988,7 +1009,8 @@ * Put AWKPATH into ENVIRON if it's not there. * This allows querying it from within awk programs. */ - if (! in_array(ENVIRON_node, tmp_string("AWKPATH", 7))) { + tmp = make_string("AWKPATH", 7); + if (! in_array(ENVIRON_node, tmp)) { /* * On VMS, environ[] only holds a subset of what getenv() can * find, so look AWKPATH up before resorting to default path. @@ -996,10 +1018,11 @@ val = getenv("AWKPATH"); if (val == NULL) val = defpath; - aptr = assoc_lookup(ENVIRON_node, tmp_string("AWKPATH", 7), FALSE); + aptr = assoc_lookup(ENVIRON_node, tmp, FALSE); + unref(*aptr); *aptr = make_string(val, strlen(val)); } -#endif /* TANDEM */ + unref(tmp); return ENVIRON_node; } @@ -1008,13 +1031,17 @@ static NODE * load_procinfo() { +#if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 int i; - NODE **aptr; char name[100]; +#endif AWKNUM value; - PROCINFO_node = install("PROCINFO", - node((NODE *) NULL, Node_var_array, (NODE *) NULL)); + PROCINFO_node = install_symbol(estrdup("PROCINFO", 8), + mk_symbol(Node_var_array, (NODE *) NULL)); + + update_PROCINFO_str("version", VERSION); + update_PROCINFO_str("strftime", def_strftime_format); #ifdef GETPGRP_VOID #define getpgrp_arg() /* nothing */ @@ -1023,55 +1050,57 @@ #endif value = getpgrp(getpgrp_arg()); - aptr = assoc_lookup(PROCINFO_node, tmp_string("pgrpid", 6), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("pgrpid", value); /* - * could put a lot of this into a table, but then there's - * portability problems declaring all the functions. so just - * do it the slow and stupid way. sigh. + * Could put a lot of this into a table, but then there's + * portability problems declaring all the functions. So just + * do it the slow and stupid way. Sigh. */ - aptr = assoc_lookup(PROCINFO_node, tmp_string("version", 7), FALSE); - *aptr = make_string(VERSION, strlen(VERSION)); - value = getpid(); - aptr = assoc_lookup(PROCINFO_node, tmp_string("pid", 3), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("pid", value); value = getppid(); - aptr = assoc_lookup(PROCINFO_node, tmp_string("ppid", 4), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("ppid", value); value = getuid(); - aptr = assoc_lookup(PROCINFO_node, tmp_string("uid", 3), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("uid", value); value = geteuid(); - aptr = assoc_lookup(PROCINFO_node, tmp_string("euid", 4), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("euid", value); value = getgid(); - aptr = assoc_lookup(PROCINFO_node, tmp_string("gid", 3), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("gid", value); value = getegid(); - aptr = assoc_lookup(PROCINFO_node, tmp_string("egid", 4), FALSE); - *aptr = make_number(value); + update_PROCINFO_num("egid", value); + + switch (current_field_sep()) { + case Using_FIELDWIDTHS: + update_PROCINFO_str("FS", "FIELDWIDTHS"); + break; + case Using_FPAT: + update_PROCINFO_str("FS", "FPAT"); + break; + case Using_FS: + update_PROCINFO_str("FS", "FS"); + break; + default: + fatal(_("unknown value for field spec: %d\n"), + current_field_sep()); + break; + } - aptr = assoc_lookup(PROCINFO_node, tmp_string("FS", 2), FALSE); - *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++) { sprintf(name, "group%d", i + 1); value = groupset[i]; - aptr = assoc_lookup(PROCINFO_node, tmp_string(name, strlen(name)), FALSE); - *aptr = make_number(value); + update_PROCINFO_num(name, value); } if (groupset) { - free(groupset); + efree(groupset); groupset = NULL; } #endif @@ -1083,9 +1112,9 @@ int is_std_var(const char *var) { - register const struct varinit *vp; + const struct varinit *vp; - for (vp = varinit; vp->name; vp++) { + for (vp = varinit; vp->name != NULL; vp++) { if (strcmp(vp->name, var) == 0) { if ((do_traditional || do_posix) && (vp->flags & NON_STANDARD) != 0) return FALSE; @@ -1097,6 +1126,26 @@ return FALSE; } + +/* get_spec_varname --- return the name of a special variable + with the given assign or update routine. +*/ + +const char * +get_spec_varname(Func_ptr fptr) +{ + const struct varinit *vp; + + if (! fptr) + return NULL; + for (vp = varinit; vp->name != NULL; vp++) { + if (vp->assign == fptr || vp->update == fptr) + return vp->name; + } + return NULL; +} + + /* arg_assign --- process a command-line assignment */ int @@ -1104,10 +1153,10 @@ { char *cp, *cp2; int badvar; - Func_ptr after_assign = NULL; NODE *var; NODE *it; NODE **lhs; + long save_FNR; if (! initing && disallow_var_assigns) return FALSE; /* --exec */ @@ -1126,13 +1175,19 @@ *cp++ = '\0'; + /* avoid false source indications in a fatal message */ + source = NULL; + sourceline = 0; + save_FNR = FNR; + FNR = 0; + /* first check that the variable name has valid syntax */ badvar = FALSE; - if (! isalpha(arg[0]) && arg[0] != '_') + if (! isalpha((unsigned char) arg[0]) && arg[0] != '_') badvar = TRUE; else for (cp2 = arg+1; *cp2; cp2++) - if (! isalnum(*cp2) && *cp2 != '_') { + if (! isalnum((unsigned char) *cp2) && *cp2 != '_') { badvar = TRUE; break; } @@ -1145,8 +1200,17 @@ lintwarn(_("`%s' is not a variable name, looking for file `%s=%s'"), arg, arg, cp); } else { + if (check_special(arg) >= 0) + fatal(_("cannot use gawk builtin `%s' as variable name"), arg); + + if (! initing) { + var = lookup(arg); + if (var != NULL && var->type == Node_func) + fatal(_("cannot use function `%s' as variable name"), arg); + } + /* - * Recent versions of nawk expand escapes inside assignments. + * BWK awk expands escapes inside assignments. * This makes sense, so we do it too. */ it = make_str_node(cp, strlen(cp), SCAN); @@ -1161,17 +1225,31 @@ if (do_posix) setlocale(LC_NUMERIC, ""); #endif /* LC_NUMERIC */ - var = variable(arg, FALSE, Node_var); - lhs = get_lhs(var, &after_assign, FALSE); + + /* + * since we are restoring the original text of ARGV later, + * need to copy the variable name part if we don't want + * name like v=abc instead of just v in var->vname + */ + + cp2 = estrdup(arg, cp - arg); /* var name */ + + var = variable(cp2, Node_var); + if (var == NULL) /* error */ + exit(EXIT_FATAL); + if (var->type == Node_var && var->var_update) + var->var_update(); + lhs = get_lhs(var, FALSE); unref(*lhs); *lhs = it; - if (after_assign != NULL) - (*after_assign)(); + /* check for set_FOO() routine */ + if (var->type == Node_var && var->var_assign) + var->var_assign(); } if (! initing) *--cp = '='; /* restore original text of ARGV */ - + FNR = save_FNR; return ! badvar; } @@ -1294,20 +1372,35 @@ */ ngroups = getgroups(0, NULL); #endif - if (ngroups == -1) - fatal(_("could not find groups: %s"), strerror(errno)); - else if (ngroups == 0) + /* If an error or no groups, just give up and get on with life. */ + if (ngroups <= 0) return; /* fill in groups */ emalloc(groupset, GETGROUPS_T *, ngroups * sizeof(GETGROUPS_T), "init_groupset"); ngroups = getgroups(ngroups, groupset); - if (ngroups == -1) - fatal(_("could not find groups: %s"), strerror(errno)); + /* same thing here, give up but keep going */ + if (ngroups == -1) { + efree(groupset); + ngroups = 0; + groupset = NULL; + } #endif } +/* estrdup --- duplicate a string */ + +char * +estrdup(const char *str, size_t len) +{ + char *s; + emalloc(s, char *, len + 1, "estrdup"); + memcpy(s, str, len); + s[len] = '\0'; + return s; +} + #if defined(HAVE_LOCALE_H) /* init_locale --- initialize locale info. */ @@ -1327,15 +1420,44 @@ t = localeconv(); *l = *t; - l->thousands_sep = strdup(t->thousands_sep); - l->decimal_point = strdup(t->decimal_point); - l->grouping = strdup(t->grouping); - l->int_curr_symbol = strdup(t->int_curr_symbol); - l->currency_symbol = strdup(t->currency_symbol); - l->mon_decimal_point = strdup(t->mon_decimal_point); - l->mon_thousands_sep = strdup(t->mon_thousands_sep); - l->mon_grouping = strdup(t->mon_grouping); - l->positive_sign = strdup(t->positive_sign); - l->negative_sign = strdup(t->negative_sign); + l->thousands_sep = estrdup(t->thousands_sep, strlen(t->thousands_sep)); + l->decimal_point = estrdup(t->decimal_point, strlen(t->decimal_point)); + l->grouping = estrdup(t->grouping, strlen(t->grouping)); + l->int_curr_symbol = estrdup(t->int_curr_symbol, strlen(t->int_curr_symbol)); + l->currency_symbol = estrdup(t->currency_symbol, strlen(t->currency_symbol)); + l->mon_decimal_point = estrdup(t->mon_decimal_point, strlen(t->mon_decimal_point)); + l->mon_thousands_sep = estrdup(t->mon_thousands_sep, strlen(t->mon_thousands_sep)); + l->mon_grouping = estrdup(t->mon_grouping, strlen(t->mon_grouping)); + l->positive_sign = estrdup(t->positive_sign, strlen(t->positive_sign)); + l->negative_sign = estrdup(t->negative_sign, strlen(t->negative_sign)); } #endif /* LOCALE_H */ + +/* save_argv --- save argv array */ + +static void +save_argv(int argc, char **argv) +{ + int i; + + emalloc(d_argv, char **, (argc + 1) * sizeof(char *), "save_argv"); + for (i = 0; i < argc; i++) + d_argv[i] = estrdup(argv[i], strlen(argv[i])); + d_argv[argc] = NULL; +} + +/* + * update_global_values --- make sure the symbol table has correct values. + * Called from the grammar before dumping values. + */ + +void +update_global_values() +{ + const struct varinit *vp; + + for (vp = varinit; vp->name; vp++) { + if (vp->update != NULL) + vp->update(); + } +} diff -Nru gawk-3.1.8+dfsg/mbsupport.h gawk-4.0.1+dfsg/mbsupport.h --- gawk-3.1.8+dfsg/mbsupport.h 2010-04-26 18:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/mbsupport.h 2012-03-28 19:52:05.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2004, 2005 the Free Software Foundation, Inc. + * Copyright (C) 2004, 2005, 2011, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -36,8 +36,11 @@ #include #endif +#ifndef NO_MBSUPPORT + #if defined(HAVE_ISWCTYPE) \ && defined(HAVE_LOCALE_H) \ + && (defined(HAVE_BTOWC) || defined(ZOS_USS)) \ && defined(HAVE_MBRLEN) \ && defined(HAVE_MBRTOWC) \ && defined(HAVE_WCHAR_H) \ @@ -55,5 +58,37 @@ /* We can handle multibyte strings. */ # define MBS_SUPPORT 1 #else -# undef MBS_SUPPORT +# define MBS_SUPPORT 0 +#endif + +#else /* NO_MBSUPPORT is defined */ +# define MBS_SUPPORT 0 +#endif + +#if ! MBS_SUPPORT +# undef MB_CUR_MAX +# define MB_CUR_MAX 1 + +/* All this glop is for dfa.c. Bleah. */ + +#ifndef DJGPP +#define wchar_t char +#endif + +#define wctype_t int +#define wint_t int +#define mbstate_t int +#define WEOF EOF +#define towupper toupper +#define towlower tolower +#ifndef DJGPP +#define btowc(x) ((int)x) +#endif +#define iswalnum isalnum +#define iswalpha isalpha +#define iswupper isupper + +extern wctype_t wctype(const char *name); +extern int iswctype(wint_t wc, wctype_t desc); +extern int wcscoll(const wchar_t *ws1, const wchar_t *ws2); #endif diff -Nru gawk-3.1.8+dfsg/missing_d/ChangeLog gawk-4.0.1+dfsg/missing_d/ChangeLog --- gawk-3.1.8+dfsg/missing_d/ChangeLog 2010-05-06 17:56:40.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/ChangeLog 2012-03-28 20:02:30.000000000 +0000 @@ -1,156 +1,17 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Fri Apr 30 11:38:49 2010 Arnold D. Robbins +2011-11-02 Pat Rankin - * snprintf.c: Add check to undef restrict and define as empty. - Allows !@#$%^&*() OSF/1 to compile and build. + * wcmisc.c: Make code be conditional upon corresponding !HAVE_WCxxx. -Mon Apr 26 19:48:07 2010 Arnold D. Robbins +2011-11-01 Arnold D. Robbins - * snprintf.c (vsnprintf): Undo change of 21 April. vsnprintf - is needed for vprintf in that file. + * wcmisc.c: New file. -Wed Apr 21 23:32:51 2010 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * snprintf.c (vsnprintf): Don't define if not STDARG_H. - Gawk doesn't use it. - -Fri Mar 19 09:19:17 2010 Arnold D. Robbins - - * usleep.c: New file. - -Tue Jul 21 22:28:56 2009 Arnold D. Robbins - - * Release 3.1.7: Release tar file made. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Sun Oct 14 19:37:33 2007 Arnold D. Robbins - - * snprintf.c (safe_tmpfile): If have `atexit', add call to a function - that closes the open fp and unlinks the file. Needed mainly for - PC which can't do Unix-style unlink-after-open. - -Tue Oct 2 22:12:13 2007 Arnold D. Robbins - - * snprintf.c (safe_tmpfile): Add use of TMPDIR and TEMP environment - variables for systems that may not have a /tmp. For MS systems - do unlink at close. Thanks to Eli Zaretskii and Scott Deifik - for motivating me to do the right thing. - -Fri Apr 13 06:05:05 2007 Arnold D. Robbins - - * getaddrinfo.c: Add test for HAVE_SOCKETS with error message - if not. Thanks to Pat Rankin. - -Sun Apr 8 16:15:27 2007 Arnold D. Robbins - - * getaddrinfo.c: Add include of , and . - -Fri Apr 6 13:23:04 2007 Arnold D. Robbins - - * memmove.c.BSD, strncasecmp.c.BSD: Removed so that they won't make - their way into a tarball; these were the original versions from BSD - that were in use until the Savannah CVS archive went into place; see - the entry from August 25, 2006. - -Thu Apr 5 17:01:15 2007 Arnold D. Robbins - - * sprintf.c (snprintf): Fix typo and call vsnprintf - instead of calling self recursively. Thanks to Pat Rankin. - -Tue Feb 27 20:58:01 2007 Arnold D. Robbins - - * snprintf.c: Change names from gawk_xxx to real xxx. - -Mon Jan 15 14:34:30 2007 Arnold D. Robbins - - * getaddrinfo.h, getaddrinfo.c: New files, based on - submission by Jan Pazdziora . - -Fri Sep 15 15:05:09 2006 Arnold D. Robbins - - * strncasecmp.c, memmove.c: Corrected the FSF's address. - -Fri Aug 25 13:21:57 2006 Arnold D. Robbins - - * README: New file. - * strncasecmp.c, memmove.c: Replaced with versions - from GLIBC, hacked unmercifully to work standalone. - -Fri Oct 21 11:18:10 2005 Arnold D. Robbins - - * strtod.c (gawk_strtod): Made check for locale's decimal - point conditional also upon do_posix. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Tue Jul 26 21:27:46 2005 Arnold D. Robbins - - * strtod.c (gawk_strtod) [ENABLE_NLS]: Removed from conditional - paralleling change to main.c. - * stroul.c (strtoul): Same. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon May 3 09:24:21 2004 Arnold D. Robbins - - * strtoul.c: New file. - -Sun May 2 18:03:54 2004 Arnold D. Robbins - - * strtod.c (gawk_strtod): Check for locale's decimal point - instead of hard-wiring period. - -Tue Jan 20 10:38:48 2004 Arnold D. Robbins - - * memmove.c: New file. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -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. - -Tue Dec 4 17:56:46 2001 Arnold D. Robbins - - * strftime.c: Replaced with glibc version. - * strftime.3: Removed - -Fri Aug 3 09:01:19 2001 Arnold D. Robbins - - ChangeLog created. - - * strtod.c (strtod): Fixed test at end for failure to - be a little smarter. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/missing_d/ChangeLog.0 gawk-4.0.1+dfsg/missing_d/ChangeLog.0 --- gawk-3.1.8+dfsg/missing_d/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/ChangeLog.0 2010-11-29 18:09:48.000000000 +0000 @@ -0,0 +1,171 @@ +Mon Nov 29 20:09:40 2010 Eli Zaretskii + + * strftime.c : Don't declare for __MINGW32__. + +Thu Nov 25 21:16:58 2010 Arnold D. Robbins + + * strcoll.c: New file. + * memcmp.c, memcpy.c, memset.c, strchr.c, strtod.c: Remove + `register' keyword everywhere, as in mainline code. + +Sun Jun 6 21:44:19 2010 Arnold D. Robbins + + * getaddrinfo.h: Add undef for addrinfo, freeaddrinfo, and + getaddrinfo, just in case. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Fri Apr 30 11:38:49 2010 Arnold D. Robbins + + * snprintf.c: Add check to undef restrict and define as empty. + Allows !@#$%^&*() OSF/1 to compile and build. + +Mon Apr 26 19:48:07 2010 Arnold D. Robbins + + * snprintf.c (vsnprintf): Undo change of 21 April. vsnprintf + is needed for vprintf in that file. + +Wed Apr 21 23:32:51 2010 Arnold D. Robbins + + * snprintf.c (vsnprintf): Don't define if not STDARG_H. + Gawk doesn't use it. + +Fri Mar 19 09:19:17 2010 Arnold D. Robbins + + * usleep.c: New file. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Sun Oct 14 19:37:33 2007 Arnold D. Robbins + + * snprintf.c (safe_tmpfile): If have `atexit', add call to a function + that closes the open fp and unlinks the file. Needed mainly for + PC which can't do Unix-style unlink-after-open. + +Tue Oct 2 22:12:13 2007 Arnold D. Robbins + + * snprintf.c (safe_tmpfile): Add use of TMPDIR and TEMP environment + variables for systems that may not have a /tmp. For MS systems + do unlink at close. Thanks to Eli Zaretskii and Scott Deifik + for motivating me to do the right thing. + +Fri Apr 13 06:05:05 2007 Arnold D. Robbins + + * getaddrinfo.c: Add test for HAVE_SOCKETS with error message + if not. Thanks to Pat Rankin. + +Sun Apr 8 16:15:27 2007 Arnold D. Robbins + + * getaddrinfo.c: Add include of , and . + +Fri Apr 6 13:23:04 2007 Arnold D. Robbins + + * memmove.c.BSD, strncasecmp.c.BSD: Removed so that they won't make + their way into a tarball; these were the original versions from BSD + that were in use until the Savannah CVS archive went into place; see + the entry from August 25, 2006. + +Thu Apr 5 17:01:15 2007 Arnold D. Robbins + + * sprintf.c (snprintf): Fix typo and call vsnprintf + instead of calling self recursively. Thanks to Pat Rankin. + +Tue Feb 27 20:58:01 2007 Arnold D. Robbins + + * snprintf.c: Change names from gawk_xxx to real xxx. + +Mon Jan 15 14:34:30 2007 Arnold D. Robbins + + * getaddrinfo.h, getaddrinfo.c: New files, based on + submission by Jan Pazdziora . + +Fri Sep 15 15:05:09 2006 Arnold D. Robbins + + * strncasecmp.c, memmove.c: Corrected the FSF's address. + +Fri Aug 25 13:21:57 2006 Arnold D. Robbins + + * README: New file. + * strncasecmp.c, memmove.c: Replaced with versions + from GLIBC, hacked unmercifully to work standalone. + +Fri Oct 21 11:18:10 2005 Arnold D. Robbins + + * strtod.c (gawk_strtod): Made check for locale's decimal + point conditional also upon do_posix. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Tue Jul 26 21:27:46 2005 Arnold D. Robbins + + * strtod.c (gawk_strtod) [ENABLE_NLS]: Removed from conditional + paralleling change to main.c. + * stroul.c (strtoul): Same. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon May 3 09:24:21 2004 Arnold D. Robbins + + * strtoul.c: New file. + +Sun May 2 18:03:54 2004 Arnold D. Robbins + + * strtod.c (gawk_strtod): Check for locale's decimal point + instead of hard-wiring period. + +Tue Jan 20 10:38:48 2004 Arnold D. Robbins + + * memmove.c: New file. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +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. + +Tue Dec 4 17:56:46 2001 Arnold D. Robbins + + * strftime.c: Replaced with glibc version. + * strftime.3: Removed + +Fri Aug 3 09:01:19 2001 Arnold D. Robbins + + ChangeLog created. + + * strtod.c (strtod): Fixed test at end for failure to + be a little smarter. diff -Nru gawk-3.1.8+dfsg/missing_d/getaddrinfo.h gawk-4.0.1+dfsg/missing_d/getaddrinfo.h --- gawk-3.1.8+dfsg/missing_d/getaddrinfo.h 2007-01-15 19:35:00.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/getaddrinfo.h 2010-12-27 17:49:12.000000000 +0000 @@ -5,6 +5,11 @@ #define AI_PASSIVE 1 #endif /* AI_PASSIVE */ +/* undef these, just in case, to avoid noisy warnings */ +#undef addrinfo +#undef freeaddrinfo +#undef getaddrinfo + #define addrinfo xaddrinfo #define freeaddrinfo xfreeaddrinfo #define getaddrinfo xgetaddrinfo diff -Nru gawk-3.1.8+dfsg/missing_d/memcmp.c gawk-4.0.1+dfsg/missing_d/memcmp.c --- gawk-3.1.8+dfsg/missing_d/memcmp.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/memcmp.c 2010-11-25 19:20:37.000000000 +0000 @@ -7,8 +7,8 @@ int memcmp (s1, s2, l) -register char *s1, *s2; -register int l; +char *s1, *s2; +int l; { for (; l-- > 0; s1++, s2++) { if (*s1 != *s2) diff -Nru gawk-3.1.8+dfsg/missing_d/memcpy.c gawk-4.0.1+dfsg/missing_d/memcpy.c --- gawk-3.1.8+dfsg/missing_d/memcpy.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/memcpy.c 2010-11-25 19:20:43.000000000 +0000 @@ -6,10 +6,10 @@ char * memcpy (dest, src, l) -register char *dest, *src; -register int l; +char *dest, *src; +int l; { - register char *ret = dest; + char *ret = dest; while (l--) *dest++ = *src++; diff -Nru gawk-3.1.8+dfsg/missing_d/memmove.c gawk-4.0.1+dfsg/missing_d/memmove.c --- gawk-3.1.8+dfsg/missing_d/memmove.c 2007-04-06 10:00:03.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/memmove.c 2010-11-25 19:18:10.000000000 +0000 @@ -21,7 +21,7 @@ /* * August 2006. For Gawk: Borrowed from GLIBC and hacked unmercifully. - * DON'T steal this for your own code, got straight to the GLIBC + * DON'T steal this for your own code, go straight to the GLIBC * source for the original versions. */ diff -Nru gawk-3.1.8+dfsg/missing_d/memset.c gawk-4.0.1+dfsg/missing_d/memset.c --- gawk-3.1.8+dfsg/missing_d/memset.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/memset.c 2010-11-25 19:20:49.000000000 +0000 @@ -7,11 +7,11 @@ void * memset(dest, val, l) void *dest; -register int val; -register size_t l; +int val; +size_t l; { - register char *ret = dest; - register char *d = dest; + char *ret = dest; + char *d = dest; while (l--) *d++ = val; diff -Nru gawk-3.1.8+dfsg/missing_d/setenv.c gawk-4.0.1+dfsg/missing_d/setenv.c --- gawk-3.1.8+dfsg/missing_d/setenv.c 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/setenv.c 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,178 @@ +/* $NetBSD: setenv.c,v 1.1.1.1 2009/04/12 15:33:26 christos Exp $ */ + +#if defined(LIBC_SCCS) && !defined(lint) +static const char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93"; +static const char rcsid[] = "Id: setenv.c,v 1.2 2005/04/27 04:56:11 sra Exp"; +#endif /* LIBC_SCCS and not lint */ + +/* + * Copyright (c) 1987, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* #include "port_before.h" */ + +#include +#include +#include +#include + +/* #include "port_after.h" */ + +#define NEED_SETENV +#if !defined(NEED_SETENV) +int __bindcompat_setenv; +#else + +/* + * Gawk changes: + * 1. Comment out "port_before.h" and "port_after.h" includes. + * 2. Define NEED_SETENV. + * 3. Add leading "int" to setenv() for C99 compilers. Which is worse, + * that it wasn't there in the first place, or that C99 now makes + * such functions void, breaking 40+ years of historical practice? + * 4. Change return type of unsetenv to "int" for standards + * conformance and check for name containing an "=" in + * which case it return an error. (See unsetenv(3), at least on Linux.) + */ + +extern char **environ; + +static char *findenv(const char *name, int *offset); + +/*% + * setenv -- + * Set the value of the environmental variable "name" to be + * "value". If rewrite is set, replace any current value. + */ +int +setenv(const char *name, const char *value, int rewrite) +{ + extern char **environ; + static int alloced; /*%< if allocated space before */ + char *c; + int l_value, offset; + + if (*value == '=') /*%< no `=' in value */ + ++value; + l_value = strlen(value); + if ((c = findenv(name, &offset))) { /*%< find if already exists */ + if (!rewrite) + return (0); + if (strlen(c) >= l_value) { /*%< old larger; copy over */ + while (*c++ = *value++); + return (0); + } + } else { /*%< create new slot */ + int cnt; + char **p; + + for (p = environ, cnt = 0; *p; ++p, ++cnt); + if (alloced) { /*%< just increase size */ + environ = (char **)realloc((char *)environ, + (size_t)(sizeof(char *) * (cnt + 2))); + if (!environ) + return (-1); + } + else { /*%< get new space */ + alloced = 1; /*%< copy old entries into it */ + p = malloc((size_t)(sizeof(char *) * (cnt + 2))); + if (!p) + return (-1); + memcpy(p, environ, cnt * sizeof(char *)); + environ = p; + } + environ[cnt + 1] = NULL; + offset = cnt; + } + for (c = (char *)name; *c && *c != '='; ++c); /*%< no `=' in name */ + if (!(environ[offset] = /*%< name + `=' + value */ + malloc((size_t)((int)(c - name) + l_value + 2)))) + return (-1); + for (c = environ[offset]; (*c = *name++) && *c != '='; ++c); + for (*c++ = '='; *c++ = *value++;); + return (0); +} + +/*% + * unsetenv(name) -- + * Delete environmental variable "name". + */ +int +unsetenv(const char *name) +{ + char **p; + int offset; + + if (strchr(name, '=') != NULL) { + errno = EINVAL; + return -1; + } + + while (findenv(name, &offset)) /*%< if set multiple times */ + for (p = &environ[offset];; ++p) + if (!(*p = *(p + 1))) + break; + + return 0; +} + +/*% + * findenv -- + * Returns pointer to value associated with name, if any, else NULL. + * Sets offset to be the offset of the name/value combination in the + * environmental array, for use by setenv(3) and unsetenv(3). + * Explicitly removes '=' in argument name. + * + * This routine *should* be a static; don't use it. + */ +static char * +findenv(const char *name, int *offset) +{ + const char *np; + char **p, *c; + int len; + + if (name == NULL || environ == NULL) + return (NULL); + for (np = name; *np && *np != '='; ++np) + continue; + len = np - name; + for (p = environ; (c = *p) != NULL; ++p) + if (strncmp(c, name, len) == 0 && c[len] == '=') { + *offset = p - environ; + return (c + len + 1); + } + return (NULL); +} +#endif + +/*! \file */ diff -Nru gawk-3.1.8+dfsg/missing_d/strchr.c gawk-4.0.1+dfsg/missing_d/strchr.c --- gawk-3.1.8+dfsg/missing_d/strchr.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/strchr.c 2010-11-25 19:20:54.000000000 +0000 @@ -10,7 +10,7 @@ char * strchr(str, c) -register const char *str, c; +const char *str, c; { if (c == '\0') { /* thanks to Mike Brennan ... */ @@ -35,9 +35,9 @@ char * strrchr(str, c) -register const char *str, c; +const char *str, c; { - register const char *save = NULL; + const char *save = NULL; for (; *str; str++) if (*str == c) diff -Nru gawk-3.1.8+dfsg/missing_d/strcoll.c gawk-4.0.1+dfsg/missing_d/strcoll.c --- gawk-3.1.8+dfsg/missing_d/strcoll.c 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/strcoll.c 2010-11-24 18:49:24.000000000 +0000 @@ -0,0 +1,7 @@ +/* replacement strcoll.c */ + +int +strcoll(const char *s1, const char *s2) +{ + return strcmp(s1, s2); /* nyah, nyah, so there */ +} diff -Nru gawk-3.1.8+dfsg/missing_d/strftime.c gawk-4.0.1+dfsg/missing_d/strftime.c --- gawk-3.1.8+dfsg/missing_d/strftime.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/strftime.c 2010-11-29 18:08:37.000000000 +0000 @@ -55,8 +55,10 @@ # endif #endif #if HAVE_TZNAME +#ifndef __MINGW32__ extern char *tzname[]; #endif +#endif /* Do multibyte processing if multibytes are supported, unless multibyte sequences are safe in formats. Multibyte sequences are diff -Nru gawk-3.1.8+dfsg/missing_d/strtod.c gawk-4.0.1+dfsg/missing_d/strtod.c --- gawk-3.1.8+dfsg/missing_d/strtod.c 2006-08-11 12:49:52.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/strtod.c 2010-11-25 19:20:58.000000000 +0000 @@ -40,8 +40,8 @@ double gawk_strtod(s, ptr) -register const char *s; -register const char **ptr; +const char *s; +const char **ptr; { const char *start = s; /* save original start of string */ const char *begin = NULL; /* where the number really begins */ diff -Nru gawk-3.1.8+dfsg/missing_d/wcmisc.c gawk-4.0.1+dfsg/missing_d/wcmisc.c --- gawk-3.1.8+dfsg/missing_d/wcmisc.c 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/missing_d/wcmisc.c 2011-12-08 19:12:16.000000000 +0000 @@ -0,0 +1,100 @@ +/* wcmisc.c - replace wcXXXX routines + Copyright (C) 2011 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 3, 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., + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */ + +#if !defined(HAVE_WCTYPE) || !defined(HAVE_ISWCTYPE) +static const char *classes[] = { + "", + "alnum", + "alpha", + "blank", + "cntrl", + "digit", + "graph", + "lower", + "print", + "punct", + "space", + "upper", + "xdigit", + NULL +}; +#endif + +#ifndef HAVE_ISWCTYPE +static int is_blank (int c) +{ + return (c == ' ' || c == '\t'); +} +#endif + +#ifndef HAVE_WCTYPE +wctype_t wctype(const char *name) +{ + int i; + + for (i = 1; classes[i] != NULL; i++) + if (strcmp(name, classes[i]) == 0) + return i; + + return 0; +} +#endif + +#ifndef HAVE_ISWCTYPE +int iswctype(wint_t wc, wctype_t desc) +{ + int j = sizeof(classes) / sizeof(classes[0]); + + if (desc >= j || desc == 0) + return 0; + + switch (desc) { + case 1: return isalnum(wc); + case 2: return isalpha(wc); + case 3: return is_blank(wc); + case 4: return iscntrl(wc); + case 5: return isdigit(wc); + case 6: return isgraph(wc); + case 7: return islower(wc); + case 8: return isprint(wc); + case 9: return ispunct(wc); + case 10: return isspace(wc); + case 11: return isupper(wc); + case 12: return isxdigit(wc); + default: return 0; + } +} +#endif + +#ifndef HAVE_WCSCOLL +int wcscoll(const wchar_t *ws1, const wchar_t *ws2) +{ + size_t i; + + for (i = 0; ws1[i] != 0 && ws2[i] != 0; i++) { + if (ws1[i] < ws2[i]) + return -1; + else if (ws1[i] > ws2[i]) + return 1; + } + + return (ws1[i] - ws2[i]); +} +#endif + +/*wcmisc.c*/ diff -Nru gawk-3.1.8+dfsg/msg.c gawk-4.0.1+dfsg/msg.c --- gawk-3.1.8+dfsg/msg.c 2009-03-21 20:29:05.000000000 +0000 +++ gawk-4.0.1+dfsg/msg.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,9 +1,10 @@ /* - * msg.c - routines for error messages + * msg.c - routines for error messages. */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003, 2010 + * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -25,12 +26,15 @@ #include "awk.h" +extern FILE *output_fp; int sourceline = 0; char *source = NULL; - static const char *srcfile = NULL; static int srcline; +jmp_buf fatal_tag; +int fatal_tag_valid = FALSE; + /* err --- print an error message with source line and file and record */ /* VARARGS2 */ @@ -38,16 +42,21 @@ err(const char *s, const char *emsg, va_list argp) { char *file; + const char *me; - (void) fflush(stdout); - (void) fprintf(stderr, "%s: ", myname); + (void) fflush(output_fp); + me = myname; + if (strncmp(me, "dgawk", 5) == 0) + me = &myname[1]; + (void) fprintf(stderr, "%s: ", me); #ifdef GAWKDEBUG if (srcfile != NULL) { fprintf(stderr, "%s:%d:", srcfile, srcline); srcfile = NULL; } #endif /* GAWKDEBUG */ - if (sourceline != 0) { + + if (sourceline > 0) { if (source != NULL) (void) fprintf(stderr, "%s:", source); else @@ -70,29 +79,11 @@ /* msg --- take a varargs error message and print it */ -/* - * Function identifier purposely indented to avoid mangling - * by ansi2knr. Sigh. - */ - void -#ifdef CAN_USE_STDARG_H - msg(const char *mesg, ...) -#else -/*VARARGS0*/ - msg(va_alist) - va_dcl -#endif +msg(const char *mesg, ...) { va_list args; -#ifdef CAN_USE_STDARG_H va_start(args, mesg); -#else - char *mesg; - - va_start(args); - mesg = va_arg(args, char *); -#endif err("", mesg, args); va_end(args); } @@ -100,45 +91,19 @@ /* warning --- print a warning message */ void -#ifdef CAN_USE_STDARG_H - warning(const char *mesg, ...) -#else -/*VARARGS0*/ - warning(va_alist) - va_dcl -#endif +warning(const char *mesg, ...) { va_list args; -#ifdef CAN_USE_STDARG_H va_start(args, mesg); -#else - char *mesg; - - va_start(args); - mesg = va_arg(args, char *); -#endif err(_("warning: "), mesg, args); va_end(args); } void -#ifdef CAN_USE_STDARG_H - error(const char *mesg, ...) -#else -/*VARARGS0*/ - error(va_alist) - va_dcl -#endif +error(const char *mesg, ...) { va_list args; -#ifdef CAN_USE_STDARG_H va_start(args, mesg); -#else - char *mesg; - - va_start(args); - mesg = va_arg(args, char *); -#endif err(_("error: "), mesg, args); va_end(args); } @@ -155,30 +120,29 @@ file = srcfile; line = srcline; } -/* fatal --- print an error message and die */ +/* r_fatal --- print a fatal error message */ void -#ifdef CAN_USE_STDARG_H - r_fatal(const char *mesg, ...) -#else -/*VARARGS0*/ - r_fatal(va_alist) - va_dcl -#endif +r_fatal(const char *mesg, ...) { va_list args; -#ifdef CAN_USE_STDARG_H va_start(args, mesg); -#else - char *mesg; - - va_start(args); - mesg = va_arg(args, char *); -#endif err(_("fatal: "), mesg, args); va_end(args); #ifdef GAWKDEBUG abort(); #endif - exit(EXIT_FATAL); + gawk_exit(EXIT_FATAL); +} + +/* gawk_exit --- longjmp out if necessary */ + +void +gawk_exit(int status) +{ + if (fatal_tag_valid) { + exit_val = status; + longjmp(fatal_tag, 1); + } + exit(status); } diff -Nru gawk-3.1.8+dfsg/node.c gawk-4.0.1+dfsg/node.c --- gawk-3.1.8+dfsg/node.c 2010-04-13 19:24:45.000000000 +0000 +++ gawk-4.0.1+dfsg/node.c 2012-03-28 19:47:54.000000000 +0000 @@ -3,7 +3,8 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003-2010 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003-2011, + * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -26,31 +27,23 @@ #include "awk.h" #include "math.h" -static int is_ieee_magic_val P((const char *val)); -static AWKNUM get_ieee_magic_val P((const char *val)); +static int is_ieee_magic_val(const char *val); +static AWKNUM get_ieee_magic_val(const char *val); -/* r_force_number --- force a value to be numeric */ +/* force_number --- force a value to be numeric */ AWKNUM -r_force_number(register NODE *n) +r_force_number(NODE *n) { - register char *cp; - register char *cpend; + char *cp; + char *cpend; char save; char *ptr; unsigned int newflags; extern double strtod(); -#ifdef GAWKDEBUG - if (n == NULL) - cant_happen(); - if (n->type != Node_val) - cant_happen(); - if (n->flags == 0) - cant_happen(); if (n->flags & NUMCUR) return n->numbr; -#endif /* all the conditionals are an attempt to avoid the expensive strtod */ @@ -59,8 +52,6 @@ n->numbr = 0.0; if (n->stlen == 0) { - if (0 && do_lint) - lintwarn(_("can't convert string to float")); return 0.0; } @@ -73,9 +64,7 @@ * This also allows hexadecimal floating point. Ugh. */ if (! do_posix) { - if (isalpha(*cp)) { - if (0 && do_lint) - lintwarn(_("can't convert string to float")); + if (isalpha((unsigned char) *cp)) { return 0.0; } else if (n->stlen == 4 && is_ieee_magic_val(n->stptr)) { if (n->flags & MAYBE_NUM) @@ -92,17 +81,15 @@ fall through */ cpend = cp + n->stlen; - while (cp < cpend && isspace(*cp)) + while (cp < cpend && isspace((unsigned char) *cp)) cp++; - /* FIXME: Simplify this condition! */ - if ( cp == cpend - || (! do_posix - && (isalpha(*cp) + if ( cp == cpend /* only spaces, or */ + || (! do_posix /* not POSIXLY paranoid and */ + && (isalpha((unsigned char) *cp) /* letter, or */ + /* CANNOT do non-decimal and saw 0x */ || (! do_non_decimal_data && cp[0] == '0' && (cp[1] == 'x' || cp[1] == 'X'))))) { - if (0 && do_lint) - lintwarn(_("can't convert string to float")); return 0.0; } @@ -112,13 +99,12 @@ } else newflags = 0; - if (cpend - cp == 1) { - if (isdigit(*cp)) { + if (cpend - cp == 1) { /* only one character */ + if (isdigit((unsigned char) *cp)) { /* it's a digit! */ n->numbr = (AWKNUM)(*cp - '0'); n->flags |= newflags; n->flags |= NUMCUR; - } else if (0 && do_lint) - lintwarn(_("can't convert string to float")); + } return n->numbr; } @@ -138,17 +124,14 @@ n->numbr = (AWKNUM) strtod((const char *) cp, &ptr); /* POSIX says trailing space is OK for NUMBER */ - while (isspace(*ptr)) + while (isspace((unsigned char) *ptr)) ptr++; *cpend = save; finish: - /* the >= should be ==, but for SunOS 3.5 strtod() */ - if (errno == 0 && ptr >= cpend) { + if (errno == 0 && ptr == cpend) { n->flags |= newflags; n->flags |= NUMCUR; } else { - if (0 && do_lint && ptr < cpend) - lintwarn(_("can't convert string to float")); errno = 0; } @@ -157,9 +140,9 @@ /* - * the following lookup table is used as an optimization in force_string + * The following lookup table is used as an optimization in force_string; * (more complicated) variations on this theme didn't seem to pay off, but - * systematic testing might be in order at some point + * systematic testing might be in order at some point. */ static const char *values[] = { "0", @@ -178,10 +161,10 @@ /* format_val --- format a numeric value based on format */ NODE * -format_val(const char *format, int index, register NODE *s) +format_val(const char *format, int index, NODE *s) { char buf[BUFSIZ]; - register char *sp = buf; + char *sp = buf; double val; char *orig, *trans, save; @@ -193,7 +176,7 @@ trans = dgettext(TEXTDOMAIN, orig); s->stptr[s->stlen] = save; - return tmp_string(trans, strlen(trans)); + return make_string(trans, strlen(trans)); } /* @@ -217,8 +200,7 @@ if ((val = double_to_int(s->numbr)) != s->numbr || val <= LONG_MIN || val >= LONG_MAX) { /* - * Once upon a time, if GFMT_WORKAROUND wasn't defined, - * we just blindly did this: + * Once upon a time, we just blindly did this: * sprintf(sp, format, s->numbr); * s->stlen = strlen(sp); * s->stfmt = (char) index; @@ -226,38 +208,37 @@ * and just always format the value ourselves. */ - NODE *dummy, *r; + NODE *dummy[2], *r; unsigned short oflags; extern NODE **fmt_list; /* declared in eval.c */ /* create dummy node for a sole use of format_tree */ - getnode(dummy); - dummy->type = Node_expression_list; - dummy->lnode = s; - dummy->rnode = NULL; + dummy[1] = s; oflags = s->flags; - s->flags |= PERM; /* prevent from freeing by format_tree() */ if (val == s->numbr) { /* integral value, but outside range of %ld, use %.0f */ r = format_tree("%.0f", 4, dummy, 2); s->stfmt = -1; } else { r = format_tree(format, fmt_list[index]->stlen, dummy, 2); + assert(r != NULL); s->stfmt = (char) index; } s->flags = oflags; s->stlen = r->stlen; if ((s->flags & STRCUR) != 0) - free(s->stptr); + efree(s->stptr); s->stptr = r->stptr; - freenode(r); /* Do not free_temp(r)! We want */ - freenode(dummy); /* to keep s->stptr == r->stpr. */ + freenode(r); /* Do not unref(r)! We want to keep s->stptr == r->stpr. */ goto no_malloc; } else { - /* integral value */ - /* force conversion to long only once */ - register long num = (long) val; + /* + * integral value + * force conversion to long only once + */ + long num = (long) val; + if (num < NVAL && num >= 0) { sp = (char *) values[num]; s->stlen = 1; @@ -267,75 +248,56 @@ } s->stfmt = -1; } + if (s->stptr != NULL) + efree(s->stptr); emalloc(s->stptr, char *, s->stlen + 2, "format_val"); memcpy(s->stptr, sp, s->stlen+1); no_malloc: - s->stref = 1; s->flags |= STRCUR; free_wstr(s); return s; } -/* r_force_string --- force a value to be a string */ +/* force_string --- force a value to be a string */ NODE * -r_force_string(register NODE *s) +r_force_string(NODE *s) { - NODE *ret; -#ifdef GAWKDEBUG - if (s == NULL) - cant_happen(); - if (s->type != Node_val) - cant_happen(); - if (s->stref <= 0) - cant_happen(); if ((s->flags & STRCUR) != 0 - && (s->stfmt == -1 || s->stfmt == CONVFMTidx)) + && (s->stfmt == -1 || s->stfmt == CONVFMTidx) + ) return s; -#endif - - ret = format_val(CONVFMT, CONVFMTidx, s); - return ret; + return format_val(CONVFMT, CONVFMTidx, s); } -/* - * dupnode: - * Duplicate a node. (For strings, "duplicate" means crank up the - * reference count.) - */ +/* dupnode --- duplicate a node */ NODE * -r_dupnode(NODE *n) +dupnode(NODE *n) { - register NODE *r; + NODE *r; -#ifndef DUPNODE_MACRO - if ((n->flags & TEMP) != 0) { - n->flags &= ~TEMP; - n->flags |= MALLOC; + if (n->type == Node_ahash) { + n->ahname_ref++; return n; } + + assert(n->type == Node_val); + if ((n->flags & PERM) != 0) return n; -#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; + + if ((n->flags & MALLOC) != 0) { + n->valref++; return n; } + getnode(r); *r = *n; - r->flags &= ~(PERM|TEMP|FIELD); + r->flags &= ~FIELD; r->flags |= MALLOC; -#ifdef MBS_SUPPORT + r->valref = 1; +#if MBS_SUPPORT /* * DON'T call free_wstr(r) here! * r->wstptr still points at n->wstptr's value, and we @@ -343,95 +305,74 @@ */ r->wstptr = NULL; r->wstlen = 0; -#endif /* defined MBS_SUPPORT */ - 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'; -#if defined MBS_SUPPORT +#endif /* MBS_SUPPORT */ + + if ((n->flags & STRCUR) != 0) { + emalloc(r->stptr, char *, n->stlen + 2, "dupnode"); + memcpy(r->stptr, n->stptr, n->stlen); + r->stptr[n->stlen] = '\0'; +#if MBS_SUPPORT if ((n->flags & WSTRCUR) != 0) { r->wstlen = n->wstlen; - emalloc(r->wstptr, wchar_t *, sizeof(wchar_t) * (r->wstlen + 2), "dupnode"); - memcpy(r->wstptr, n->wstptr, r->wstlen * sizeof(wchar_t)); - r->wstptr[r->wstlen] = L'\0'; + emalloc(r->wstptr, wchar_t *, sizeof(wchar_t) * (n->wstlen + 2), "dupnode"); + memcpy(r->wstptr, n->wstptr, n->wstlen * sizeof(wchar_t)); + r->wstptr[n->wstlen] = L'\0'; r->flags |= WSTRCUR; } -#endif /* defined MBS_SUPPORT */ - } 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->ahname_str[r->ahname_len] = '\0'; +#endif /* MBS_SUPPORT */ } + return r; } -/* copy_node --- force a brand new copy of a node to be allocated */ - -NODE * -copynode(NODE *old) -{ - NODE *new; - int saveflags; - - assert(old != NULL); - saveflags = old->flags; - old->flags &= ~(MALLOC|PERM); - new = dupnode(old); - old->flags = saveflags; - return new; -} - /* mk_number --- allocate a node with defined number */ NODE * mk_number(AWKNUM x, unsigned int flags) { - register NODE *r; + NODE *r; getnode(r); r->type = Node_val; r->numbr = x; + r->valref = 1; r->flags = flags; -#ifdef GAWKDEBUG - r->stref = 1; r->stptr = NULL; r->stlen = 0; free_wstr(r); -#endif /* GAWKDEBUG */ return r; } /* make_str_node --- make a string node */ NODE * -make_str_node(char *s, unsigned long len, int flags) +r_make_str_node(const char *s, unsigned long len, int flags) { - register NODE *r; + NODE *r; getnode(r); r->type = Node_val; + r->numbr = 0; r->flags = (STRING|STRCUR|MALLOC); -#ifdef MBS_SUPPORT +#if MBS_SUPPORT r->wstptr = NULL; r->wstlen = 0; -#endif /* defined MBS_SUPPORT */ +#endif /* MBS_SUPPORT */ if (flags & ALREADY_MALLOCED) - r->stptr = s; + r->stptr = (char *) s; else { - emalloc(r->stptr, char *, len + 2, s); + emalloc(r->stptr, char *, len + 2, "make_str_node"); memcpy(r->stptr, s, len); } r->stptr[len] = '\0'; - + if ((flags & SCAN) != 0) { /* scan for escape sequences */ const char *pf; - register char *ptm; - register int c; - register const char *end; -#ifdef MBS_SUPPORT + char *ptm; + int c; + const char *end; +#if MBS_SUPPORT mbstate_t cur_state; memset(& cur_state, 0, sizeof(cur_state)); @@ -439,7 +380,7 @@ end = &(r->stptr[len]); for (pf = ptm = r->stptr; pf < end;) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT /* * Keep multibyte characters together. This avoids * problems if a subsequent byte of a multibyte @@ -472,27 +413,16 @@ len = ptm - r->stptr; erealloc(r->stptr, char *, len + 1, "make_str_node"); r->stptr[len] = '\0'; + r->flags &= ~MALLOC; r->flags |= PERM; } r->stlen = len; - r->stref = 1; + r->valref = 1; r->stfmt = -1; return r; } -/* tmp_string --- allocate a temporary string */ - -NODE * -tmp_string(char *s, size_t len) -{ - register NODE *r; - - r = make_string(s, len); - r->flags |= TEMP; - return r; -} - /* more_nodes --- allocate more nodes */ #define NODECHUNK 100 @@ -502,7 +432,7 @@ NODE * more_nodes() { - register NODE *np; + NODE *np; /* get more nodes and initialize list */ emalloc(nextfree, NODE *, NODECHUNK * sizeof(NODE), "more_nodes"); @@ -517,62 +447,39 @@ return np; } -#ifdef MEMDEBUG -#undef freenode -/* freenode --- release a node back to the pool */ - -void -freenode(NODE *it) -{ -#ifdef MPROF - it->stref = 0; - free((char *) it); -#else /* not MPROF */ -#ifndef NO_PROFILING - it->exec_count = 0; -#endif - /* add it to head of freelist */ - it->nextp = nextfree; - nextfree = it; -#endif /* not MPROF */ -} -#endif /* GAWKDEBUG */ - /* unref --- remove reference to a particular node */ void -unref(register NODE *tmp) +unref(NODE *tmp) { if (tmp == NULL) return; if ((tmp->flags & PERM) != 0) return; - tmp->flags &= ~TEMP; - if ((tmp->flags & MALLOC) != 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) { - tmp->stref--; - return; - } - free(tmp->stptr); - free_wstr(tmp); + + if (tmp->type == Node_ahash) { + if (tmp->ahname_ref > 1) + tmp->ahname_ref--; + else { + efree(tmp->ahname_str); + freenode(tmp); } - freenode(tmp); return; } - if ((tmp->flags & FIELD) != 0) { - free_wstr(tmp); - freenode(tmp); - return; + + if ((tmp->flags & MALLOC) != 0) { + if (tmp->valref > 1) { + tmp->valref--; + return; + } + if (tmp->flags & STRCUR) + efree(tmp->stptr); } + free_wstr(tmp); + freenode(tmp); } + /* * parse_escape: * @@ -589,20 +496,21 @@ * If \ is followed by 000, we return 0 and leave the string pointer after the * zeros. A value of 0 does not mean end of string. * - * Posix doesn't allow \x. + * POSIX doesn't allow \x. */ int parse_escape(const char **string_ptr) { - register int c = *(*string_ptr)++; - register int i; - register int count; + int c = *(*string_ptr)++; + int i; + int count; int j; const char *start; if (do_lint_old) { switch (c) { + case 'a': case 'b': case 'f': case 'r': @@ -613,7 +521,7 @@ switch (c) { case 'a': - return BELL; + return '\a'; case 'b': return '\b'; case 'f': @@ -662,7 +570,7 @@ } if (do_posix) return ('x'); - if (! isxdigit((*string_ptr)[0])) { + if (! isxdigit((unsigned char) (*string_ptr)[0])) { warning(_("no hex digits in `\\x' escape sequence")); return ('x'); } @@ -738,14 +646,14 @@ for (; *str != '\0'; str++) { if (*str == 'e' || *str == 'E' || *str == dec_point) return FALSE; - else if (! isdigit(*str)) + else if (! isdigit((unsigned char) *str)) break; } return TRUE; } -#if defined MBS_SUPPORT +#if MBS_SUPPORT /* str2wstr --- convert a multibyte string to a wide string */ NODE * @@ -755,9 +663,19 @@ char *sp; mbstate_t mbs; wchar_t wc, *wsp; + static short warned = FALSE; assert((n->flags & (STRING|STRCUR)) != 0); + /* + * Don't convert global null string or global null field + * variables to a wide string. They are both zero-length anyway. + * This also avoids future double-free errors while releasing + * shallow copies, eg. *tmp = *Null_field; free_wstr(tmp); + */ + if (n == Nnull_string || n == Null_field) + return n; + if ((n->flags & WSTRCUR) != 0) { if (ptr == NULL) return n; @@ -771,11 +689,11 @@ * code trades space for time. We allocate * an array of wchar_t that is n->stlen long. * This is needed in the worst case anyway, where - * each input bytes maps to one wchar_t. The + * each input byte maps to one wchar_t. The * advantage is that we only have to convert the string * once, instead of twice, once to find out how many - * wide characters, and then again to actually fill - * the info in. If there's a lot left over, we can + * wide characters, and then again to actually fill in + * the info. If there's a lot left over, we can * realloc the wide string down in size. */ @@ -799,11 +717,39 @@ src_count = n->stlen; memset(& mbs, 0, sizeof(mbs)); for (i = 0; src_count > 0; i++) { - count = mbrtowc(& wc, sp, src_count, & mbs); + /* + * 9/2010: Check the current byte; if it's a valid character, + * then it doesn't start a multibyte sequence. This brings a + * big speed up. Thanks to Ulrich Drepper for the tip. + * 11/2010: Thanks to Paolo Bonzini for some even faster code. + */ + if (is_valid_character(*sp)) { + count = 1; + wc = btowc_cache(*sp); + } else + count = mbrtowc(& wc, sp, src_count, & mbs); switch (count) { case (size_t) -2: case (size_t) -1: - goto done; + /* + * Just skip the bad byte and keep going, so that + * we get a more-or-less full string, instead of + * stopping early. This is particularly important + * for match() where we need to build the indices. + */ + sp++; + src_count--; + /* + * mbrtowc(3) says the state of mbs becomes undefined + * after a bad character, so reset it. + */ + memset(& mbs, 0, sizeof(mbs)); + /* And warn the user something's wrong */ + if (do_lint && ! warned) { + warned = TRUE; + lintwarn(_("Invalid multibyte data detected. There may be a mismatch between your data and your locale.")); + } + break; case 0: count = 1; @@ -820,9 +766,8 @@ } } -done: *wsp = L'\0'; - n->wstlen = i; + n->wstlen = wsp - n->wstptr; n->flags |= WSTRCUR; #define ARBITRARY_AMOUNT_TO_GIVE_BACK 100 if (n->stlen - n->wstlen > ARBITRARY_AMOUNT_TO_GIVE_BACK) @@ -831,6 +776,47 @@ return n; } +/* wstr2str --- convert a wide string back into multibyte one */ + +NODE * +wstr2str(NODE *n) +{ + size_t result; + size_t length; + wchar_t *wp; + mbstate_t mbs; + char *newval, *cp; + + assert(n->valref == 1); + assert((n->flags & WSTRCUR) != 0); + + /* + * Convert the wide chars in t1->wstptr back into m.b. chars. + * This is pretty grotty, but it's the most straightforward + * way to do things. + */ + memset(& mbs, 0, sizeof(mbs)); + + length = n->wstlen; + emalloc(newval, char *, (length * gawk_mb_cur_max) + 2, "wstr2str"); + + wp = n->wstptr; + for (cp = newval; length > 0; length--) { + result = wcrtomb(cp, *wp, & mbs); + if (result == (size_t) -1) /* what to do? break seems best */ + break; + cp += result; + wp++; + } + *cp = '\0'; + + efree(n->stptr); + n->stptr = newval; + n->stlen = cp - newval; + + return n; +} + /* free_wstr --- release the wide string part of a node */ void @@ -840,14 +826,14 @@ if ((n->flags & WSTRCUR) != 0) { assert(n->wstptr != NULL); - free(n->wstptr); + efree(n->wstptr); } n->wstptr = NULL; n->wstlen = 0; n->flags &= ~WSTRCUR; } -static void +static void __attribute__ ((unused)) dump_wstr(FILE *fp, const wchar_t *str, size_t len) { if (str == NULL || len == 0) @@ -916,7 +902,7 @@ return NULL; } -#endif /* defined MBS_SUPPORT */ +#endif /* MBS_SUPPORT */ /* is_ieee_magic_val --- return true for +inf, -inf, +nan, -nan */ @@ -962,3 +948,18 @@ return v; } + +#if MBS_SUPPORT +wint_t btowc_cache[256]; + +/* init_btowc_cache --- initialize the cache */ + +void init_btowc_cache() +{ + int i; + + for (i = 0; i < 255; i++) { + btowc_cache[i] = btowc(i); + } +} +#endif diff -Nru gawk-3.1.8+dfsg/pc/ChangeLog gawk-4.0.1+dfsg/pc/ChangeLog --- gawk-3.1.8+dfsg/pc/ChangeLog 2010-05-06 17:57:10.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/ChangeLog 2012-03-28 20:02:39.000000000 +0000 @@ -1,508 +1,109 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Mon May 3 21:15:49 2010 Scott Deifik +2012-03-20 Arnold D. Robbins - * Makefile.tst (lc_num1): Now passes, remove "expect to fail" - message. + * Makefile.tst (printfbad3): New test. -Tue Apr 13 22:13:51 2010 Scott Deifik +2012-03-14 Eli Zaretskii - * config.h, Makefile.tst: Sync with mainline. + * gawkmisc.pc (btowc): New version for DJGPP. -Tue Feb 2 20:49:20 2010 Scott Deifik +2012-03-01 Scott Deifik - * Makefile.tst: Sync with mainline. + * Makefile.tst: Sync with mainline version. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2012-03-01 Eli Zaretskii - * Release 3.1.7: Release tar file made. + * Makefile: Quiet confusing info messages from the linker when + gawk is linked against readline as a shared library. -Mon Jul 13 05:43:07 2009 Scott Deifik +2012-02-22 Eli Zaretskii - * Makefile.tst: Still more sync with mainline. + * Makefile.tst: Update CMP and CP definitions, add "Expect xxxx to + fail with MinGW" messages as needed. -Tue Jun 23 05:24:12 2009 Scott Deifik +2012-02-15 Arnold D. Robbins - * Makefile.tst: More sync with mainline. + * gawkmisc.pc (execvp): Modify signature, return -1 + on error. -Thu Jun 18 06:24:29 2009 Scott Deifik +2012-02-11 Eli Zaretskii - * Makefile.tst: Sync with mainline. + Fix dependencies in pc/Makefile. + * Makefile ($(ALLOBJS) $(LIBOBJS) eval_p$O profile_p$O): Add eval_d$O, + debug$O, and command$O. -2008-07-26 Eli Zaretskii + Support MinGW build with the readline library. + * Makefile (default): Add a line for the mingw32-readline target. + (mingw32-readline): New target, passes -DHAVE_LIBREADLINE to the + compiler and adds -lreadline to the linker command line. - * config.h (WEXITSTATUS) [_MSC_VER || __MINGW32__]: Define. + * config.sed: Comment out "#undef HAVE_LIBREADLINE", so that it + could be #define'd on the compiler command line. -Mon Oct 22 08:49:05 2007 Arnold D. Robbins +2012-02-10 Arnold D. Robbins - * Release 3.1.6: Release tar file made. + * gawkmisc.pc (execvp): New function based on code from Eli + Zaretskii to make dgawk's restarting the debugger work. -Sat Oct 20 22:42:08 2007 Scott Deifik +2012-01-27 Scott Deifik - * Makefile.tst: Sync with mainline, Revise inftest. + * Makefile.tst: Sync with mainline version. -Fri Oct 19 05:37:37 2007 Scott Deifik +2011-12-06 Scott Deifik - * config.h: Add definition of HAVE_ATEXIT. Needed for replacement - sprintf. + * Makefile.tst: Sync with mainline version. + Use testoutcmp.awk script. -Thu Oct 4 21:19:54 2007 Juan M. Guerrero +2011-12-06 Arnold D. Robbins - * Makefile.tst (fmtspcl.ok): Remove unneeded dependency on Makefile. + * testoutcmp.awk: Script to replace cmd for DJGPP. -Wed Sep 26 15:10:17 2007 Scott Deifik +2011-11-01 Scott Deifik - * Makefile.tst (poundbang): Fix path in call to gawk. - (nofile): Fix output message with sed to match what test suite wants. + * config.sed: Additional update. -Wed Sep 26 14:46:34 2007 Eli Zaretskii +2011-10-29 Eli Zaretskii - * Makefile.tst (msg): Use $(CMP) instead a literal "cmp". - (nonl): Use NUL instead of /dev/null. - (devfd, pid, fmtspcl, nofile, rstest4, rstest5, getlnhd, clos1way): - Expect to fail on MinGW. - (fmtspcl.ok): Depend on Makefile, not Makefile.tst. - (pipeio2, hsprint, fmttest): Expect formatting or whitespace - differences. - (exitval2): Use exitval2.w32 instead of exitval2.awk. + * config.sed: Fix some edits, to be consistent with the old + config.h file. Make regexps match #undef lines with whitespace + at the end of the line. Add forgotten EMX #defines. - * config.h (HAVE_DECL_TZNAME) [__MINGW32__]: Define. - (HAVE_ALLOCA) [__MINGW32__]: Don't define. - (HAVE_SNPRINTF) [__MINGW32__]: Remove _MSC_VER condition. +2011-10-27 Scott Deifik -Tue Sep 25 08:22:11 2007 KIMURA Koichi + * Makefile.tst: Sync with mainline version. - * config.h: For Visual Studio, undef restrict, define HAVE_TMPFILE, - undef TIME_WITH_SYS_TIME. +2011-10-24 Eli Zaretskii -Mon May 21 05:46:46 2007 Scott Deifik + * gawkmisc.pc (wctob) [__MINGW32__]: A replacement for the + function of the same name in MS runtime, which does a better job + with 8-bit characters that have their high bit set. + Original supplied by Jim Meyering . - * config.h (HAVE_MKTIME): Define. + * popen.h (system) [__MINGW32__]: Redirect to os_system. -Wed May 16 22:12:55 2007 Scott Deifik + * Makefile (./doc/awkcard.tr): Don't use Unixy forward slashes in + redirection. + (builtin$O): Depend on popen.h. + (random$O): New target, separated from builtin$O. - * Makfile.tst: Changes for DJGPP, bring in sync with main - test/Makefile. + * configpk.sed: + * config.sed: + * make-config.bat: New files, to produce pc/config.h from the top-level + configh.in file. -Wed May 9 21:01:18 2007 Scott Deifik +2011-10-18 Juan Manuel Guerrero - DJGPP changes: + * Makefile: doc target to create all documentation files. - * config.h: Add HAVE_MKTME, HAVE_MKSTEMP, conditionalize - HAVE_SNPRINTF. (ADR: #define out restrict). - * Makefile: Add replace$0 to AWKOBJS2 and PAWKOBJS2. +2011-09-30 Eli Zaretskii -2007-03-19 Juan M. Guerrero + * config.h: Update packaging related versions. - * config.h: Undef HAVE_ALLOCA for DJGPP. - * Makefile: Add floatcomp$O to AWKOBJS1 and PAWKOBJS1. +2011-06-23 Arnold D. Robbins -2007-02-25 Juan M. Guerrero - - * config.h: Let DEFPATH reflect DJGPP installation directory tree. - * Makefile: pkgdatadir variable defined to $(prefix)/lib/awk. - * Makefile: In DJGPP section use the DJGPP environment variable to - redefine the pkgdatadir variable. - -2006-07-22 Eli Zaretskii - - * Makefile.tst: Update copyright years. - (COMSPEC): If it's empty, use ComSpec instead. - (CMP): Ignore white space differences. - (BASIC_TESTS): Add concat4, nofile, ovrflow1, subi18n. - (GAWK_EXT_TESTS): Add binmode1, devfd1, devfd2, fwtest, nondec2. - (msg): Use $(CMP) instead of literal "cmp". - (inftest): Uncomment the test. - (nonl): Use NUL, so it works with any DOS/Windows shell. - (fsspcoln): Run `head' though the system shell. - (nondec2, nofile, binmode1, subi18n, concat4, devfd1, devfd2) - (ovrflow1, fwtest, mixed1): New tests. - (fmttest, hsprint, ovrflow1, posix): Run output through Sed to - adjust the number of leading zeros in the exponent produced by %e. - (longwrds): Set SORT to just "sort". - (exitval2): Use exitval2.w32. - -2006-07-01 Eli Zaretskii - - * popen.h (os_popen): Declare 1st argument "const char *". - - * popen.c (scriptify): Declare argument "const char *". - (os_system): Declare argument "const char *". Add a new local - variable cmd1 to hold the results of scriptify. - (os_popen): Declare 1st argument "const char *". Add a new local - variable cmd to hold the results of scriptify. - - * Makefile (mingw32): Update definitions for CF, LF, and LF2. Use - libmsvcrtp60 during linking (for multibyte and wide character - support). - (io$O): Depend on popen.h. - - * config.h (HAVE_BTOWC) [_WIN32]: Define. - (HAVE_INTMAX_T, HAVE_UINTMAX_T, HAVE_INTTYPES_H, HAVE_STDINT_H) - (HAVE_INTTYPES_H_WITH_UINTMAX, HAVE_ISASCII, HAVE_ISWCTYPE) - (HAVE_ISWLOWER, HAVE_ISWUPPER, HAVE_LONG_LONG, HAVE_MBRLEN) - (HAVE_MBRTOWC, HAVE_TOWLOWER, HAVE_TOWUPPER, HAVE_WCHAR_H) - (HAVE_WCRTOMB, HAVE_WCSCOLL, HAVE_WCTYPE, HAVE_WCTYPE_H) - (HAVE_WCTYPE_T, HAVE_WINT_T) [__MINGW32__]: Define. - (inline) [__GNUC__]: Define to __inline__. - (HAVE_MEMMOVE, HAVE_PUTENV, HAVE_SETLOCALE, HAVE_LOCALE_H) - (HAVE_SNPRINTF, HAVE_STRTOUL, HAVE_STDLIB_H, HAVE_SYS_STAT_H) - (HAVE_SYS_TIME_H, HAVE_UNSIGNED_LONG_LONG) [__MINGW32__]: Define. - (HAVE_UNISTD_H): Define also for __MINGW32__. - (PACKAGE_BUGREPORT, PACKAGE_NAME, PACKAGE_STRING) - (PACKAGE_TARNAME, PACKAGE_VERSION): Define. - (VERSION): Update. - [__MINGW32__]: Include . - (HAVE_POPEN_H): Define as 1. - (ssize_t, intmax_t, uintmax_t): Don't redefine for __MINGW32__. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Sun Jun 26 09:31:35 2005 Scott Deifik - - * Makefile: Decrease stack size for MSC. - * Makefile.tst (Maketests): Syncronized with what's happening in - the main dist. - -Thu Apr 28 23:08:51 2005 Scott Deifik - - * config.h, Makefile.tst: Synced to main distribution. - -Wed Feb 16 10:20:18 2005 Scott Deifik - - * Makefile: Decrease stack size for MSC. - * Makefile.tst: Syncronized with what's happening in the main dist. - * config.h: Improved for DJGPP. - -Wed Feb 9 14:38:38 2005 Scott Deifik - - * Makefile, Makefile.tst: Syncronized with what's happening - in the main dist. - -Thu Feb 3 14:57:28 2005 Scott Deifik - - * config.h (SIZEOF_UNSIGNED_INT, SIZEOF_UNSIGNED_LONG): Add definitions. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Sun Jun 13 17:40:09 2004 Scott Deifik - - * Makefile: Reduce the stack size for MSC. - * Makefile.tst: Synchronized with main distribution. - -Sun Jun 13 17:39:47 2004 Arnold D. Robbins - - * Makefile (AWKOBJS2, PAWKOBJS2): Restore version.o. - -Tue Jun 1 22:31:36 2004 Arnold D. Robbins - - * Makefile (AWKOBJS2, PAWKOBJS2): Remove version.o. - - Per Jim Meyering: - * popen.c (scriptify): Check `realloc' return value. - -Tue Mar 2 18:10:55 2004 Arnold D. Robbins - - * Makefile (LIBOJBS): Add `dfa$O' into list. - (main$O rule): Removed, since patchlev.h not part of dist - anymore. - -Tue Mar 2 18:09:54 2004 Scott Deifik - - * config.h (HAVE_ALLOCA_H): Undefine. - * Makefile (LMSC): Adjust stack size for MSC. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -Thu Jun 26 15:00:20 2003 Scott Deifik - - * Makefile.tst: Synchronized to main dist. - -Sun Jun 15 19:27:58 2003 Patrick T.J. McPhee - - * config.h: Separate the ifdefs for os_system from ssize_t etc. - -Sun Jun 15 19:05:15 2003 Scott Deifik - - * Makefile.tst: Synchronized to main dist. - -Mon Jun 9 17:12:24 2003 Patrick T.J. McPhee - - * dlfcn.c, dlfcn.h, gawke32.def: New files. - * Makefile: Changes to allow dynamic linking of libraries - under Windows32. - -Sun May 11 15:19:52 2003 Scott Deifik - - * config.h: Update defs for ssize_t, intmax_t, uintmax_t. - * Makefile: Update compile options. - * gawkmisc.pc (memcpy_long, memset_long): New functions. - * Makefile.tst: Synchronized with test/Makefile. - -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. - -Thu Apr 18 17:29:16 2002 Scott Deifik - - * Makefile.tst (strftime): Remove comment on call to $(CMP). - -Sun Mar 10 17:05:35 2002 Scott Deifik - - * Makefile.tst: More clean up and sync with ../test/Makefile. - -Thu Jan 3 15:20:17 2002 Scott Deifik - - * Makefile.tst: Minor clean up and sync with ../test/Makefile. - -Wed Dec 19 16:01:58 2001 Peter J. Farley III - - * gawkmisc.pc: Just use single quote for `quote' for all cases. - -Wed Dec 19 15:59:52 2001 Eli Zaretskii - - * install.awk: Install gawkinet.info as well. - * awklib/igawk.awk: Bring in sync with awklib/eg/prog/igawk.sh. - * makefile (PRSPFILE, PRSP, PLDRSP, DO_PLNK, DO_PBIND, PLDJG): New - variables. - (djgpp, djgpp-debug): Set PLNK and PBIND. - (PBIND): Define to EMPTY as default. - (PAWKOBJS1, PAWKOBJS2, PGAWKOBJS): New variables. - (all): Add pgawk.exe. - (pgawk.exe, $(PRSPFILE)): New rules. - ($(ALLOBJS)): Add eval_p.o and profile_p.o to the list of files - that are dependent on awk.h, dfa.h, regex.h, and config.h. - (eval_p$O, profile_p$O): New dependencies. - (clean): Add pgawk and $(PRSPFILE) to files that are to be cleaned - up. - -Tue Dec 4 16:44:07 2001 Andreas Buening - - Updated OS/2 support. - - * gawkmisc.pc (quote): Use single quote for __EMX__. - (os_arg_fixup): new OS/2 code. - (os_devopen): for OS/2 return -1. - (ispath): check for leading drive letter for __EMX__. - (os_close_on_exec): Add check for defined __EMX__. - (os_is_setuid): Add real code for __EMX__. - (_os2_is_abs_path): new function. - (_os2_unixroot): new function. - (_os2_unixroot_path): new function. - -Tue Sep 25 15:19:53 2001 Arnold D. Robbins - - * gawkmisc.pc (os_close_on_exec): If fd <= 2, return. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Tue Jan 30 10:56:05 2001 Arnold D. Robbins - - * config.h: Per Kay Uwe Rommel, turn on HAVE_FCNTL_H for - all PC platforms so that BINMODE works on all. - -Sun Jan 28 15:50:02 2001 Eli Zaretskii - - * gawkmisc.pc (gawk_name): Support file names with mixed forward- - and back-slashes. - (orig_tty_mode): New variable. - (os_setbinmode): Save the original mode of the console device. - [__DJGPP__]: Allow the program to be interrupted with Ctrl-C even - though the console was switched to binary mode. - (os_restore_mode): New function. - -Wed Jan 17 10:59:32 2001 Eli Zaretskii - - * gawkmisc.pc (os_close_on_exec) [__DJGPP__]: Don't print the - warning about failure to set close-on-exec bit, unless it's DJGPP - 2.04 or later. - -Wed Jan 3 19:11:00 2001 Darrel Hankerson - - * popen.c: write script files in binary only if the shell is - unix-like. - * Makefile: set threshold (-Gt) on MSC 16bit versions to obtain - sufficient stack. 3.0.91 builtin.c compiles with optimization, - in MSC[67], so remove the special compile - -Wed Jan 3 19:54:12 2001 Arnold D. Robbins - - * config.h, gawkmisc.pc: Allow fcntl if DGJPP. From Scott. - -Sun Dec 3 16:53:37 2000 Arnold D. Robbins - - * gawkmisc.pc (os_setbinmode): new function. - -Sun Dec 3 14:56:38 2000 Arnold D. Robbins - - * Makefile, Makefile.tst, gawkmisc.pc: updated from Scottd. - * popen.c: updated from Darrell Hankerson. - -Wed Nov 22 11:47:00 2000 Arnold D. Robbins - - * gawk.rsp, pc_popen.c, pc_popen.h, Makefile, Makefile.tst, - gawkmisc.pc: Synched with diffs from Scott Deifik. - * config.h: Updated from main dist, best guess by me, will - probably need tweaking. - -Tue Nov 7 14:09:14 2000 Arnold D. Robbins - - * gawkmisc.pc (os_is_setuid): new function. - -Thu Nov 5 16:50:09 1998 Arnold D. Robbins - - * gawkmisc.pc (os_devopen): handle "/dev/null". - -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - * Close-on-exec changes: - gawkmisc.pc: (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. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 21 16:44:54 2000 Scott Deifik - - * Makefile, Makefile.tst: synchronized with main dist, again. - -Thu May 18 14:07:52 2000 Scott Deifik - - * Makefile, Makefile.tst: synchronized with main dist. - * config.h: Define HAVE_LIMITS_H as 1. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Sun Jun 27 12:27:00 1999 Darrel Hankerson - - * Makefile, Makefile.tst, ../README_d/README.pc: finalized. - * include/process.h: new file - -Fri May 21 00:00:00 1999 Darrel Hankerson - - * popen.c: MSC (on DOS/Windows32) and MINGW32 now honor SHELL. - * io.c: MINGW32 reports errno==0 after failure in redirect(); - assume close_one() in this case. - * io.c: Add HAVE_POPEN_H and let pc/config.h deal with the mess. - (Can't move everything to config.h because of popen define.) - -Sun May 9 09:12:33 1999 Darrel Hankerson - - * Add 1999-04-30 changes from Eli Zaretskii - 1. Makefile (TAGS, tags): New targets. - 2. Makefile.tst (regtes): Pass the value of $CMP to the - regtest script. - -Thu Nov 18 03:48:32 1998 Scott Deifik - - * Readme.pc: More LFN-based comments. - -Thu Nov 12 21:01:24 1998 Darrel Hankerson - - * mingw32 target added with corresponding minor changes to getid.c, - io.c, and config.h. - - * vcWin32 needed popen defines in config.h which were inadvertently - omitted from 3.0.3. - - * README.pc updated to clarify the procedure for building - non-LFN versions on LFN systems, and to note that Windows32 gawk - may require Windows32 utilities. - - * emxbnd target modified to accomodate older versions of emx. - -Thu Nov 08 09:11:44 1998 Scott Deifik - - * pc/Makefile: Stack reduced again for 16bit MSC versions. - - * pc/Makefile.tst: Updated to keep in sync with new - test/Makefile.in. In addition, made to work in Windows 9x - with non-LFN tools. - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Tue May 13 20:06:09 1997 Darrel Hankerson - - * vcWin32 target added. Some new tests for WIN32 in gawkmisc.c - io.c, and regex.c. Makefile changes for nmake, which can't - expand $($x). - - * config.h updated for BITOPS and NONDECDATA (also in Makefile). - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Fri Jan 17 19:20:45 1997 Darrel Hankerson - - * Makefile: add KUR's emxnt target for emx+RSXNT. Create awk.exe - "link" to gawk.exe for djgpp target. (Suggested by Eli Zaretskii. - Should be done as part of a smarter install, since awk.exe only - works with djgpp gawk.exe.) Separate djgpp-v1 into djgppv1 - target. Install awk.exe if present. - - * install.awk: install awk.exe if present (only for djgpp) - - * config.h: additional include for emx+RSXNT. - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Thu Aug 1 19:46:00 1996 Scott Deifik - - * Makefile: Changes for MSC 8. - -Wed Jan 10 22:58:55 1996 Arnold D. Robbins - - * ChangeLog created. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/pc/ChangeLog.0 gawk-4.0.1+dfsg/pc/ChangeLog.0 --- gawk-3.1.8+dfsg/pc/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/ChangeLog.0 2011-06-20 17:37:24.000000000 +0000 @@ -0,0 +1,680 @@ +Mon Jun 20 20:37:19 2011 Arnold D. Robbins + + * Makefile.tst: Sync with mainline version. + +Mon Jun 20 20:16:58 2011 Eli Zaretskii + + * Makefile (LIBOBJS): Remove hard-locale$O. + (dfa$O): Remove hard-locale.h from prerequisites. + +Sun Jun 5 21:47:33 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Tue May 31 23:09:13 2011 Arnold D. Robbins + + * Makefile.tst: Sync with mainline version. + +Tue May 31 23:07:20 2011 Scott Deifik + + * Makefile.tst (fpat2): Fix the test. + +Thu May 26 22:12:28 2011 Arnold D. Robbins + + * Makefile.tst: Sync with mainline version. + +Mon May 23 21:52:49 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Sat May 14 22:30:06 2011 Arnold D. Robbins + + * Makefile.tst: Sync with mainline version. + +Mon May 9 15:13:18 2011 Arnold D. Robbins + + * Makefile.tst: Sync with mainline version. + +Sun May 8 20:57:16 2011 Arnold D. Robbins + + * Makefile.tst: Sync with mainline version. + +Mon May 2 23:34:54 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Fri Apr 29 12:35:21 2011 Arnold D. Robbins + + * Makefile: Remove dependencies on awkprintf.h. + +Sun Apr 24 11:54:58 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Fri Apr 1 11:50:59 2011 Arnold D. Robbins + + * config.h (ISATTY): Remove definition. + * gawkmisc.pc (os_iastty): New function. + +Sun Feb 27 22:58:08 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Mon Feb 21 20:32:36 2011 Arnold D. Robbins + + * Makefile.tst (GAWK_EXT_TESTS): Include profile3. Thanks to + Scott Deifik for pointing out the omission. + +Wed Feb 16 21:09:50 2011 Arnold D. Robbins + + * Makefile.tst (lintwarn): New test. + +Wed Feb 16 20:40:27 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Mon Feb 14 21:30:48 2011 Arnold Robbins + + * Makefile.tst: Sync with mainline version. + +Sun Feb 13 20:23:07 2011 Eli Zaretskii + + * gawkmisc.pc (files_are_same): Change arguments. Compare file + names and modification times in addition to devices and inodes. + * Makefile (LIBOBJS): Add hard-locale$O. + Update prerequisites. + * config.h (ISATTY) [__MINGW32__ || _MSC_VER]: Define. + +Mon Feb 7 22:45:28 2011 Arnold Robbins + + * Makefile.tst: Sync with mainline version. + +Tue Feb 1 23:15:45 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Thu Jan 27 21:31:23 2011 Scott Deifik + + * Makefile.tst: Fixes for dumpvars and mv, cp, et. al. + +Mon Jan 17 22:21:07 2011 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Mon Jan 17 22:17:07 2011 Arnold Robbins + + * config.h: Remove definitions of PIPES_SIMULATED and _NFILE for + DJGPP. Per Eli, they aren't needed here. + +2011-01-08 Eli Zaretskii + + * popen.c (scriptify): Fix syntax error. + + * config.h (HAVE___ARGZ_COUNT, HAVE___ARGZ_NEXT) + (HAVE___ARGZ_STRINGIFY): Don't define. + (HAVE_PORTALS): Remove reference. + + * gawkmisc.pc (unsetenv) [__DJGPP__]: Implement. + (usleep) [__MINGW32__]: Resurrect. + +Tue Jan 4 11:20:40 2011 Arnold Robbins + + * config.h: Add PIPES_SIMULATED and definition of _NFILE for + DJGPP. + +Sat Dec 18 22:12:42 2010 Arnold Robbins + + * gawkw32.def: Removed. + * Makefile (gawk.exp): Removed target and rule. + +Sat Dec 18 20:13:35 2010 Eli Zaretskii + + * popen.h: Remove the parts conditioned by _MSC_VER and OS2. Use + __DJGPP__ instead of __GO32__. + + * popen.c (popen, pclose) [OS2, _MSC_VER]: Remove definitions. + (unixshell, scriptify, os_pclose): Remove OS2 parts. + + * getid.c: Remove the parts conditioned by _MSC_VER and OS2. + + * config.h: Remove the parts conditioned by _MSC_VER. + + * Makefile: Drop support for DJGPP v1.x and for Microsoft + compilers on DOS/Windows. + + * gawkmisc.pc (setenv, unsetenv) [__MINGW32__]: Emulations for MinGW. + + * Makefile (DLMINGW32): New variable. + (mingw32): Pass it to sub-Make. + + * dlfnc.h, dlfcn.c, include/*: Removed. + +Mon Nov 29 20:10:00 2010 Eli Zaretskii + + * config.h (HAVE_STRFTIME): Don't define for __MINGW32__. Define + strftime to rpl_strftime, to avoid infinite recursion in + missing_d/strftime.c. + +Fri Nov 12 12:36:18 2010 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Thu Oct 28 08:17:00 2010 Scott Deifik + + * Makefile.tst: Sync with mainline version. + +Wed Jul 14 23:05:57 2010 Eli Zaretskii + + * config.h (HAVE_USLEEP) [__MINGW32__]: Define. + + * gawkmisc.pc (usleep) [__MINGW32__]: Implementation of `usleep' + for MinGW. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Mon May 3 21:15:49 2010 Scott Deifik + + * Makefile.tst (lc_num1): Now passes, remove "expect to fail" + message. + +Tue Apr 13 22:13:51 2010 Scott Deifik + + * config.h, Makefile.tst: Sync with mainline. + +Tue Feb 2 20:49:20 2010 Scott Deifik + + * Makefile.tst: Sync with mainline. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Mon Jul 13 05:43:07 2009 Scott Deifik + + * Makefile.tst: Still more sync with mainline. + +Tue Jun 23 05:24:12 2009 Scott Deifik + + * Makefile.tst: More sync with mainline. + +Thu Jun 18 06:24:29 2009 Scott Deifik + + * Makefile.tst: Sync with mainline. + +2008-07-26 Eli Zaretskii + + * config.h (WEXITSTATUS) [_MSC_VER || __MINGW32__]: Define. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Sat Oct 20 22:42:08 2007 Scott Deifik + + * Makefile.tst: Sync with mainline, Revise inftest. + +Fri Oct 19 05:37:37 2007 Scott Deifik + + * config.h: Add definition of HAVE_ATEXIT. Needed for replacement + sprintf. + +Thu Oct 4 21:19:54 2007 Juan M. Guerrero + + * Makefile.tst (fmtspcl.ok): Remove unneeded dependency on Makefile. + +Wed Sep 26 15:10:17 2007 Scott Deifik + + * Makefile.tst (poundbang): Fix path in call to gawk. + (nofile): Fix output message with sed to match what test suite wants. + +Wed Sep 26 14:46:34 2007 Eli Zaretskii + + * Makefile.tst (msg): Use $(CMP) instead a literal "cmp". + (nonl): Use NUL instead of /dev/null. + (devfd, pid, fmtspcl, nofile, rstest4, rstest5, getlnhd, clos1way): + Expect to fail on MinGW. + (fmtspcl.ok): Depend on Makefile, not Makefile.tst. + (pipeio2, hsprint, fmttest): Expect formatting or whitespace + differences. + (exitval2): Use exitval2.w32 instead of exitval2.awk. + + * config.h (HAVE_DECL_TZNAME) [__MINGW32__]: Define. + (HAVE_ALLOCA) [__MINGW32__]: Don't define. + (HAVE_SNPRINTF) [__MINGW32__]: Remove _MSC_VER condition. + +Tue Sep 25 08:22:11 2007 KIMURA Koichi + + * config.h: For Visual Studio, undef restrict, define HAVE_TMPFILE, + undef TIME_WITH_SYS_TIME. + +Mon May 21 05:46:46 2007 Scott Deifik + + * config.h (HAVE_MKTIME): Define. + +Wed May 16 22:12:55 2007 Scott Deifik + + * Makfile.tst: Changes for DJGPP, bring in sync with main + test/Makefile. + +Wed May 9 21:01:18 2007 Scott Deifik + + DJGPP changes: + + * config.h: Add HAVE_MKTME, HAVE_MKSTEMP, conditionalize + HAVE_SNPRINTF. (ADR: #define out restrict). + * Makefile: Add replace$0 to AWKOBJS2 and PAWKOBJS2. + +2007-03-19 Juan M. Guerrero + + * config.h: Undef HAVE_ALLOCA for DJGPP. + * Makefile: Add floatcomp$O to AWKOBJS1 and PAWKOBJS1. + +2007-02-25 Juan M. Guerrero + + * config.h: Let DEFPATH reflect DJGPP installation directory tree. + * Makefile: pkgdatadir variable defined to $(prefix)/lib/awk. + * Makefile: In DJGPP section use the DJGPP environment variable to + redefine the pkgdatadir variable. + +2006-07-22 Eli Zaretskii + + * Makefile.tst: Update copyright years. + (COMSPEC): If it's empty, use ComSpec instead. + (CMP): Ignore white space differences. + (BASIC_TESTS): Add concat4, nofile, ovrflow1, subi18n. + (GAWK_EXT_TESTS): Add binmode1, devfd1, devfd2, fwtest, nondec2. + (msg): Use $(CMP) instead of literal "cmp". + (inftest): Uncomment the test. + (nonl): Use NUL, so it works with any DOS/Windows shell. + (fsspcoln): Run `head' though the system shell. + (nondec2, nofile, binmode1, subi18n, concat4, devfd1, devfd2) + (ovrflow1, fwtest, mixed1): New tests. + (fmttest, hsprint, ovrflow1, posix): Run output through Sed to + adjust the number of leading zeros in the exponent produced by %e. + (longwrds): Set SORT to just "sort". + (exitval2): Use exitval2.w32. + +2006-07-01 Eli Zaretskii + + * popen.h (os_popen): Declare 1st argument "const char *". + + * popen.c (scriptify): Declare argument "const char *". + (os_system): Declare argument "const char *". Add a new local + variable cmd1 to hold the results of scriptify. + (os_popen): Declare 1st argument "const char *". Add a new local + variable cmd to hold the results of scriptify. + + * Makefile (mingw32): Update definitions for CF, LF, and LF2. Use + libmsvcrtp60 during linking (for multibyte and wide character + support). + (io$O): Depend on popen.h. + + * config.h (HAVE_BTOWC) [_WIN32]: Define. + (HAVE_INTMAX_T, HAVE_UINTMAX_T, HAVE_INTTYPES_H, HAVE_STDINT_H) + (HAVE_INTTYPES_H_WITH_UINTMAX, HAVE_ISASCII, HAVE_ISWCTYPE) + (HAVE_ISWLOWER, HAVE_ISWUPPER, HAVE_LONG_LONG, HAVE_MBRLEN) + (HAVE_MBRTOWC, HAVE_TOWLOWER, HAVE_TOWUPPER, HAVE_WCHAR_H) + (HAVE_WCRTOMB, HAVE_WCSCOLL, HAVE_WCTYPE, HAVE_WCTYPE_H) + (HAVE_WCTYPE_T, HAVE_WINT_T) [__MINGW32__]: Define. + (inline) [__GNUC__]: Define to __inline__. + (HAVE_MEMMOVE, HAVE_PUTENV, HAVE_SETLOCALE, HAVE_LOCALE_H) + (HAVE_SNPRINTF, HAVE_STRTOUL, HAVE_STDLIB_H, HAVE_SYS_STAT_H) + (HAVE_SYS_TIME_H, HAVE_UNSIGNED_LONG_LONG) [__MINGW32__]: Define. + (HAVE_UNISTD_H): Define also for __MINGW32__. + (PACKAGE_BUGREPORT, PACKAGE_NAME, PACKAGE_STRING) + (PACKAGE_TARNAME, PACKAGE_VERSION): Define. + (VERSION): Update. + [__MINGW32__]: Include . + (HAVE_POPEN_H): Define as 1. + (ssize_t, intmax_t, uintmax_t): Don't redefine for __MINGW32__. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Sun Jun 26 09:31:35 2005 Scott Deifik + + * Makefile: Decrease stack size for MSC. + * Makefile.tst (Maketests): Syncronized with what's happening in + the main dist. + +Thu Apr 28 23:08:51 2005 Scott Deifik + + * config.h, Makefile.tst: Synced to main distribution. + +Wed Feb 16 10:20:18 2005 Scott Deifik + + * Makefile: Decrease stack size for MSC. + * Makefile.tst: Syncronized with what's happening in the main dist. + * config.h: Improved for DJGPP. + +Wed Feb 9 14:38:38 2005 Scott Deifik + + * Makefile, Makefile.tst: Syncronized with what's happening + in the main dist. + +Thu Feb 3 14:57:28 2005 Scott Deifik + + * config.h (SIZEOF_UNSIGNED_INT, SIZEOF_UNSIGNED_LONG): Add definitions. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Sun Jun 13 17:40:09 2004 Scott Deifik + + * Makefile: Reduce the stack size for MSC. + * Makefile.tst: Synchronized with main distribution. + +Sun Jun 13 17:39:47 2004 Arnold D. Robbins + + * Makefile (AWKOBJS2, PAWKOBJS2): Restore version.o. + +Tue Jun 1 22:31:36 2004 Arnold D. Robbins + + * Makefile (AWKOBJS2, PAWKOBJS2): Remove version.o. + + Per Jim Meyering: + * popen.c (scriptify): Check `realloc' return value. + +Tue Mar 2 18:10:55 2004 Arnold D. Robbins + + * Makefile (LIBOJBS): Add `dfa$O' into list. + (main$O rule): Removed, since patchlev.h not part of dist + anymore. + +Tue Mar 2 18:09:54 2004 Scott Deifik + + * config.h (HAVE_ALLOCA_H): Undefine. + * Makefile (LMSC): Adjust stack size for MSC. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +Thu Jun 26 15:00:20 2003 Scott Deifik + + * Makefile.tst: Synchronized to main dist. + +Sun Jun 15 19:27:58 2003 Patrick T.J. McPhee + + * config.h: Separate the ifdefs for os_system from ssize_t etc. + +Sun Jun 15 19:05:15 2003 Scott Deifik + + * Makefile.tst: Synchronized to main dist. + +Mon Jun 9 17:12:24 2003 Patrick T.J. McPhee + + * dlfcn.c, dlfcn.h, gawke32.def: New files. + * Makefile: Changes to allow dynamic linking of libraries + under Windows32. + +Sun May 11 15:19:52 2003 Scott Deifik + + * config.h: Update defs for ssize_t, intmax_t, uintmax_t. + * Makefile: Update compile options. + * gawkmisc.pc (memcpy_long, memset_long): New functions. + * Makefile.tst: Synchronized with test/Makefile. + +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. + +Thu Apr 18 17:29:16 2002 Scott Deifik + + * Makefile.tst (strftime): Remove comment on call to $(CMP). + +Sun Mar 10 17:05:35 2002 Scott Deifik + + * Makefile.tst: More clean up and sync with ../test/Makefile. + +Thu Jan 3 15:20:17 2002 Scott Deifik + + * Makefile.tst: Minor clean up and sync with ../test/Makefile. + +Wed Dec 19 16:01:58 2001 Peter J. Farley III + + * gawkmisc.pc: Just use single quote for `quote' for all cases. + +Wed Dec 19 15:59:52 2001 Eli Zaretskii + + * install.awk: Install gawkinet.info as well. + * awklib/igawk.awk: Bring in sync with awklib/eg/prog/igawk.sh. + * makefile (PRSPFILE, PRSP, PLDRSP, DO_PLNK, DO_PBIND, PLDJG): New + variables. + (djgpp, djgpp-debug): Set PLNK and PBIND. + (PBIND): Define to EMPTY as default. + (PAWKOBJS1, PAWKOBJS2, PGAWKOBJS): New variables. + (all): Add pgawk.exe. + (pgawk.exe, $(PRSPFILE)): New rules. + ($(ALLOBJS)): Add eval_p.o and profile_p.o to the list of files + that are dependent on awk.h, dfa.h, regex.h, and config.h. + (eval_p$O, profile_p$O): New dependencies. + (clean): Add pgawk and $(PRSPFILE) to files that are to be cleaned + up. + +Tue Dec 4 16:44:07 2001 Andreas Buening + + Updated OS/2 support. + + * gawkmisc.pc (quote): Use single quote for __EMX__. + (os_arg_fixup): new OS/2 code. + (os_devopen): for OS/2 return -1. + (ispath): check for leading drive letter for __EMX__. + (os_close_on_exec): Add check for defined __EMX__. + (os_is_setuid): Add real code for __EMX__. + (_os2_is_abs_path): new function. + (_os2_unixroot): new function. + (_os2_unixroot_path): new function. + +Tue Sep 25 15:19:53 2001 Arnold D. Robbins + + * gawkmisc.pc (os_close_on_exec): If fd <= 2, return. + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +Tue Jan 30 10:56:05 2001 Arnold D. Robbins + + * config.h: Per Kay Uwe Rommel, turn on HAVE_FCNTL_H for + all PC platforms so that BINMODE works on all. + +Sun Jan 28 15:50:02 2001 Eli Zaretskii + + * gawkmisc.pc (gawk_name): Support file names with mixed forward- + and back-slashes. + (orig_tty_mode): New variable. + (os_setbinmode): Save the original mode of the console device. + [__DJGPP__]: Allow the program to be interrupted with Ctrl-C even + though the console was switched to binary mode. + (os_restore_mode): New function. + +Wed Jan 17 10:59:32 2001 Eli Zaretskii + + * gawkmisc.pc (os_close_on_exec) [__DJGPP__]: Don't print the + warning about failure to set close-on-exec bit, unless it's DJGPP + 2.04 or later. + +Wed Jan 3 19:11:00 2001 Darrel Hankerson + + * popen.c: write script files in binary only if the shell is + unix-like. + * Makefile: set threshold (-Gt) on MSC 16bit versions to obtain + sufficient stack. 3.0.91 builtin.c compiles with optimization, + in MSC[67], so remove the special compile + +Wed Jan 3 19:54:12 2001 Arnold D. Robbins + + * config.h, gawkmisc.pc: Allow fcntl if DGJPP. From Scott. + +Sun Dec 3 16:53:37 2000 Arnold D. Robbins + + * gawkmisc.pc (os_setbinmode): new function. + +Sun Dec 3 14:56:38 2000 Arnold D. Robbins + + * Makefile, Makefile.tst, gawkmisc.pc: updated from Scottd. + * popen.c: updated from Darrell Hankerson. + +Wed Nov 22 11:47:00 2000 Arnold D. Robbins + + * gawk.rsp, pc_popen.c, pc_popen.h, Makefile, Makefile.tst, + gawkmisc.pc: Synched with diffs from Scott Deifik. + * config.h: Updated from main dist, best guess by me, will + probably need tweaking. + +Tue Nov 7 14:09:14 2000 Arnold D. Robbins + + * gawkmisc.pc (os_is_setuid): new function. + +Thu Nov 5 16:50:09 1998 Arnold D. Robbins + + * gawkmisc.pc (os_devopen): handle "/dev/null". + +Wed Jul 30 19:53:52 1997 Arnold D. Robbins + + * Close-on-exec changes: + gawkmisc.pc: (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. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed Jun 21 16:44:54 2000 Scott Deifik + + * Makefile, Makefile.tst: synchronized with main dist, again. + +Thu May 18 14:07:52 2000 Scott Deifik + + * Makefile, Makefile.tst: synchronized with main dist. + * config.h: Define HAVE_LIMITS_H as 1. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + +Sun Jun 27 12:27:00 1999 Darrel Hankerson + + * Makefile, Makefile.tst, ../README_d/README.pc: finalized. + * include/process.h: new file + +Fri May 21 00:00:00 1999 Darrel Hankerson + + * popen.c: MSC (on DOS/Windows32) and MINGW32 now honor SHELL. + * io.c: MINGW32 reports errno==0 after failure in redirect(); + assume close_one() in this case. + * io.c: Add HAVE_POPEN_H and let pc/config.h deal with the mess. + (Can't move everything to config.h because of popen define.) + +Sun May 9 09:12:33 1999 Darrel Hankerson + + * Add 1999-04-30 changes from Eli Zaretskii + 1. Makefile (TAGS, tags): New targets. + 2. Makefile.tst (regtes): Pass the value of $CMP to the + regtest script. + +Thu Nov 18 03:48:32 1998 Scott Deifik + + * Readme.pc: More LFN-based comments. + +Thu Nov 12 21:01:24 1998 Darrel Hankerson + + * mingw32 target added with corresponding minor changes to getid.c, + io.c, and config.h. + + * vcWin32 needed popen defines in config.h which were inadvertently + omitted from 3.0.3. + + * README.pc updated to clarify the procedure for building + non-LFN versions on LFN systems, and to note that Windows32 gawk + may require Windows32 utilities. + + * emxbnd target modified to accomodate older versions of emx. + +Thu Nov 08 09:11:44 1998 Scott Deifik + + * pc/Makefile: Stack reduced again for 16bit MSC versions. + + * pc/Makefile.tst: Updated to keep in sync with new + test/Makefile.in. In addition, made to work in Windows 9x + with non-LFN tools. + +Thu May 15 12:49:08 1997 Arnold D. Robbins + + * Release 3.0.3: Release tar file made. + +Tue May 13 20:06:09 1997 Darrel Hankerson + + * vcWin32 target added. Some new tests for WIN32 in gawkmisc.c + io.c, and regex.c. Makefile changes for nmake, which can't + expand $($x). + + * config.h updated for BITOPS and NONDECDATA (also in Makefile). + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Fri Jan 17 19:20:45 1997 Darrel Hankerson + + * Makefile: add KUR's emxnt target for emx+RSXNT. Create awk.exe + "link" to gawk.exe for djgpp target. (Suggested by Eli Zaretskii. + Should be done as part of a smarter install, since awk.exe only + works with djgpp gawk.exe.) Separate djgpp-v1 into djgppv1 + target. Install awk.exe if present. + + * install.awk: install awk.exe if present (only for djgpp) + + * config.h: additional include for emx+RSXNT. + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Thu Aug 1 19:46:00 1996 Scott Deifik + + * Makefile: Changes for MSC 8. + +Wed Jan 10 22:58:55 1996 Arnold D. Robbins + + * ChangeLog created. diff -Nru gawk-3.1.8+dfsg/pc/Makefile gawk-4.0.1+dfsg/pc/Makefile --- gawk-3.1.8+dfsg/pc/Makefile 2010-04-13 19:12:57.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/Makefile 2012-03-28 19:47:54.000000000 +0000 @@ -1,35 +1,37 @@ -# Makefile for gawk (GNU awk) Dec 2000 +# Makefile for gawk (GNU awk) Dec 2010 # -# - for GNU C (djgpp) [32bit executable for DOS] +# - for GNU C (djgpp) [32bit protected-mode executable for DOS] # - for GNU C (emx) [32bit executable for OS/2 or DOS or Windows32] -# - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT] -# - for MS-Visual C/C++ 4.x [Windows32 executable for Windows 9x/NT] -# - for Microsoft C 7 [16bit ececutable for DOS] -# - for Microsoft C 6.00A [16bit executable for OS/2 or DOS] +# - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT/2K/XP/7] -# Tested with GNU make and dmake-3.8 under OS/2 and DOS, and ndmake and -# Microsoft nmake under DOS. Compiling with dmake under DOS may require the -# DOS-only version of dmake (so that swapping works). nmake requires a -# few edits in the configuration section below. +# Tested with GNU make on Windows, OS/2 and DOS. default: @echo "Enter $(MAK) target " - @echo " where 'target' is chosen from " + @echo " where 'target' is chosen from " @echo " djgpp ... DOS 32-bit exe [GNU C, Delorie, v2] " - @echo " djgppv1 . DOS 32-bit exe [GNU C, Delorie, v1] " @echo " emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] " @echo " emxnt ... NT exe [emx/gcc with RSXNT] " @echo " emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc] " - @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " - @echo " msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)] " - @echo " msc6 .... DOS exe [Microsoft C 6.00a] " - @echo " msc6os2 . OS/2 exe [Microsoft C 6.00a] " - @echo " msc6bnd . OS/2 and DOS exe [Microsoft C 6.00a] " - @echo " vcWin32 . Windows32 exe [Microsoft Visual C] " + @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " + @echo " mingw32-readline . Like mingw32, but with readline " + @echo " [You will need to have GNU readline library installed.] " @echo " ----------------------------------------------------- " @echo " test .... Perform tests (see README_d/README.pc) " @echo " install . Install gawk under $(prefix)/ " + @echo " doc ..... Create documentation " +# Support dropped in 4.0 +# - for DJGPP v1.x [DOS 32bit protected-mode executable] +# - for MS-Visual C/C++ 4.x [Windows32 executable for Windows 9x/NT] +# - for Microsoft C 7 [16bit ececutable for DOS] +# - for Microsoft C 6.00A [16bit executable for OS/2 or DOS] +# @echo " djgppv1 . DOS 32-bit exe [GNU C, Delorie, v1] " +# @echo " msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)] " +# @echo " msc6 .... DOS exe [Microsoft C 6.00a] " +# @echo " msc6os2 . OS/2 exe [Microsoft C 6.00a] " +# @echo " msc6bnd . OS/2 and DOS exe [Microsoft C 6.00a] " +# @echo " vcWin32 . Windows32 exe [Microsoft Visual C] " # Support dropped in 3.0 # - for Microsoft C 5.1 [16bit executable for OS/2 or DOS] # @echo " msc51 DOS exe [Microsoft C 5.1] " @@ -38,6 +40,7 @@ #======================= Configuration ================================== RSPFILE = gawk.rsp PRSPFILE = pgawk.rsp +DRSPFILE = dgawk.rsp # # Choose method for passing arguments to the linker. # @@ -45,19 +48,13 @@ #LDRSP = $(GAWKOBJS) #LNKRSP = $(LDRSP) # -# else if make == dmake -# Response files for linker: dmake allows the macro expansion -# $(macro_name:modifier_list:modifier_list:...) -# The macro mktmp creates a temporary file for the linker. -# The 't' modifier is for tokenization. -#LDRSP = @$(mktmp $(<:t"\n")) -#LNKRSP = @$(mktmp $(<:t"+\n") ) # Space before final paren req -# # else use brain-dead approach (emxbnd will need 'tr'). RSP = $(RSPFILE) PRSP = $(PRSPFILE) +DRSP = $(DRSPFILE) LDRSP = @$(RSP) PLDRSP = @$(PRSP) +DLDRSP = @$(DRSP) LNKRSP = $(LDRSP) #------------------------------------------------------------------------ # Some makes do not define MAKE (and ndmake does not allow a define). @@ -80,25 +77,13 @@ install = 1 #------------------------------------------------------------------------ # To work around command-line length problems, this makefile assumes -# that $($X) can be expanded. If using a make (such as nmake) which -# cannot handle such macros, define DO_LNK and DO_BIND for your target -# as $(L) and $(B), resp.; e.g., -#DO_LNK = $(LvcWin32) -#DO_PLNK = $(PLvcWin32) -# and then comment the following: +# that $($X) can be expanded. DO_LNK = $($(LNK)) DO_BIND= $($(BIND)) DO_PLNK = $($(PLNK)) DO_PBIND= $($(PBIND)) -#------------------------------------------------------------------------ -# For dynamic extension support, uncomment these lines -# pick the appropriate .def file entry for your compiler -#DYN_FLAGS=-DDYNAMIC -#DYN_EXP=gawk.exp -#DYN_OBJ=dlfcn$O $(DYN_EXP) -#DYN_MAKEXP=$(DMEvcWin32) -#DYN_MAKEXP=$(DMEmingw32) -# +DO_DLNK = $($(DLNK)) +DO_DBIND= $($(DBIND)) #======================================================================== # End of general configuration. Some platform-specific configuration # notes appear below. @@ -113,29 +98,20 @@ endif LDJG = $(CC) $(LF) -o gawk.exe $(LDRSP) $(LF2) PLDJG = $(CC) $(LF) -o pgawk.exe $(PLDRSP) $(LF2) +DLDJG = $(CC) $(LF) -o dgawk.exe $(DLDRSP) $(LF2) BDJG = stubify -g awk.exe | stubedit awk.exe runfile=gawk djgpp: $(MAK) all \ CC=gcc O=.o CF=-O2 \ - LNK=LDJG PLNK=PLDJG LF=-s LF2=-lm \ - BIND=BDJG PBIND='' + LNK=LDJG PLNK=PLDJG DLNK=DLDJG LF=-s LF2=-lm \ + BIND=BDJG PBIND='' DBIND='' djgpp-debug: $(MAK) all \ CC=gcc O=.o CF='-O2 -g' \ - LNK=LDJG PLNK=PLDJG LF2=-lm \ - BIND=BDJG PBIND='' - -LDJGv1 = $(CC) $(LF) -o gawk $(LDRSP) $(LF2) -#BDJGv1 = coff2exe -s /djgpp/bin/go32.exe gawk -BDJGv1 = coff2exe gawk - -djgppv1: - $(MAK) all \ - CC=gcc O=.o CF=-O \ - LNK=LDJGv1 LF=-s LF2=-lm \ - BIND=BDJGv1 + LNK=LDJG PLNK=PLDJG DLNK=DLDJG LF2=-lm \ + BIND=BDJG PBIND='' DBIND='' #======================================================================== #========================== EMX ========================================= @@ -181,132 +157,24 @@ #========================== MINGW32 ===================================== #======================================================================== -DMEmingw32 = dlltool -D gawk.exe -d gawkw32.def -e gawk.exp -l libgawk.a - LMINGW32 = $(CC) $(LF) -o $@ $(GAWKOBJS) $(LF2) PLMINGW32 = $(CC) $(LF) -o $@ $(PGAWKOBJS) $(LF2) +DLMINGW32 = $(CC) $(LF) -o $@ $(DGAWKOBJS) $(LF2) # The following might work around command-line length limitations: #LMINGW32 = $(CC) $(LF) -o $@ *.o $(LF2) mingw32: $(MAK) all \ CC=gcc O=.o CF="-O2 -gdwarf-2 -g3" OBJ=popen.o \ - LNK=LMINGW32 PLNK=PLMINGW32 LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP= - -#======================================================================== -#========================== MSC ========================================= -#======================================================================== - -# stdargv, glob, and director are from Stewartson's sh. These provide -# globbing and enhanced argument-passing. MSC setargv.obj is a -# more limited alternative (and it will permit a bound version). -#STDARGV = stdargv.obj glob.obj director.obj -STDARGV = setargv.obj - -# Optimization and library options: -# Os == optimize for size, Ot == optimize for speed, G2 == 286 or better -#MSCOPT = -Gt3600 -Os -G2 -# MSC seems to be more stable with -Od than with -Ot, but then regexec.c gives -# "code segment too large" error when compiling. Adding -G2y fixes this and -# lets us keep the -Od. -MSCOPT = -Gt3600 -Od -G2y -# Alternate lib, does not use math coprocessor. -#MSCLIB = llibca -#MSCCL = -FPa -# Emulator lib, uses math coprocessor if present. -MSCLIB = llibce -MSCCL = -FPi -#MSCCL = -FPc - -# If the stack gets much smaller than 3000, the "longwrds" test fails. -LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x2eb0,nul - - -# CLMSC-linking works when building under OS/2 -CLMSC = $(CC) -o $@ $(LF) $(GAWKOBJS) $(STDARGV) $(LF2) -link /NOE/NOI/STACK:0x6f00 - -BMSC = bind $@ /n DOSMAKEPIPE DOSCWAIT - - -# Ugly hack: config.h defines __STDC__ if not defined on command-line. -# OS/2 versions can't use -Za in getid.c. MSC7 uses stub headers in pc/ -# due to ANSI conflicts. MSC 5.1 defines __STDC__=0 regardless of ANSI flag. - -# dmake-3.8 runs out of memory under DOS. Request that dmake -# swap itself out on these targets. Note that this won't have -# any affect on the bound OS/2 and DOS version of dmake-3.8. - -.SWAP: msc msc-debug msc6 msc6os2 msc6bnd msc51 check - -msc: - $(MAK) all \ - "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -Ze -Ipc/include $(MSCOPT)" \ - OBJ=popen.obj \ - LNK=LMSC P=+ -Lmsc = $(LMSC) # for broken makes (nmake) which cannot expand $($X) -Bmsc = - -msc-debug: - $(MAK) all \ - "CC=cl $(MSCCL)" O=.obj "CF=-AL -Ze -Ipc/include -W2 -Zi -Od" \ - OBJ=popen.obj \ - LNK=LMSC LF2=/CO P=+ - -msc6: -# $(MAK) builtin.obj \ -# "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -Za $(MSCOPT) -Od" - $(MAK) all \ - "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -Za $(MSCOPT)" \ - OBJ=popen.obj \ - LNK=LMSC P=+ -Lmsc6 = $(LMSC) # for broken makes (nmake) which cannot expand $($X) -Bmsc6 = - -msc6os2: -# $(MAK) builtin.obj \ -# "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -DOS2 -UMSDOS $(MSCOPT) -Od" - $(MAK) all \ - "CC=cl $(MSCCL)" O=.obj "CF=-AL -DOS2 -UMSDOS $(MSCOPT)" \ - LNK=LMSC "LF2=p,gawk.def" P=+ + LNK=LMINGW32 PLNK=PLMINGW32 DLNK=DLMINGW32 \ + LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP= -msc6bnd: -# $(MAK) builtin.obj \ -# "CC=cl -nologo $(MSCCL)" O=.obj "CF=-AL -DOS2 $(MSCOPT) -Od" +mingw32-readline: $(MAK) all \ - "CC=cl $(MSCCL)" O=.obj "CF=-AL -DOS2 $(MSCOPT)" \ - OBJ=popen.obj \ - LNK=LMSC "LF2=p,gawk.def" P=+ \ - BIND=BMSC -Lmsc6bnd = $(LMSC) # for broken makes (nmake) which cannot expand $($X) -Bmsc6bnd = $(BMSC) - - -# Windows '9x / NT -DMEvcWin32 = lib /def:gawkw32.def /name:gawk.exe /out:gawk.lib -LvcWin32 = link -nologo -subsystem:console -release -out:$@ $(LNKRSP) -PLvcWin32 = link -nologo -subsystem:console -release -out:$@ $(PLDRSP) - -vcWin32: - $(MAK) all \ - "CC=cl -nologo" O=.obj "CF=-o2 -DWIN32 -D__STDC__=0" \ - OBJ=popen.obj \ - LNK=LvcWin32 - - -# Support dropped in 3.0 -#msc51: -# $(MAK) all \ -# "CC=cl $(MSCCL)" O=.obj "CF=-AL -Za -D_MSC_VER=510 $(MSCOPT)" \ -# OBJ=popen.obj \ -# LNK=LMSC P=+ -# -#msc51bnd: -# $(MAK) all \ -# "CC=cl -AL ($MSCCL)" O=.obj "CF=-DOS2 -D_MSC_VER=510 $(MSCOPT)" \ -# OBJ=popen.obj \ -# LNK=CLMSC "LF=-Lp -Fb" "LF2=gawk.def" - -#======================================================================== + CC=gcc O=.o CF="-DHAVE_LIBREADLINE -O2 -gdwarf-2 -g3" OBJ=popen.o \ + LNK=LMINGW32 PLNK=PLMINGW32 DLNK=DLMINGW32 \ + LF="-gdwarf-2 -g3" \ + LF2="-lreadline -lmsvcp60 -Wl,--enable-auto-import" RSP= # Define BIND for BINDless compiles, otherwise $($(BIND)) may break. BIND = EMPTY @@ -322,6 +190,8 @@ AWKOBJS2 = ext$O msg$O node$O profile$O re$O replace$O version$O $(DYN_OBJ) PAWKOBJS1 = array$O builtin$O eval_p$O field$O floatcomp$O gawkmisc$O io$O main$O PAWKOBJS2 = ext$O msg$O node$O profile_p$O re$O replace$O version$O $(DYN_OBJ) +DAWKOBJS1 = array$O builtin$O debug$O eval_d$O field$O floatcomp$O gawkmisc$O io$O main$O +DAWKOBJS2 = ext$O msg$O node$O profile$O re$O replace$O version$O command$O $(DYN_OBJ) AWKOBJS = $(AWKOBJS1) $(AWKOBJS2) ALLOBJS = $(AWKOBJS) awkgram$O getid$O $(OBJ) @@ -332,6 +202,7 @@ GAWKOBJS = $(ALLOBJS) $(LIBOBJS) PGAWKOBJS = $(PAWKOBJS1) $(PAWKOBJS2) $(LIBOBJS) awkgram$O getid$O $(OBJ) +DGAWKOBJS = $(DAWKOBJS1) $(DAWKOBJS2) $(LIBOBJS) awkgram$O getid$O $(OBJ) # clear out suffixes list # .SUFFIXES: @@ -341,7 +212,7 @@ $(CC) -c $(CFLAGS) $< # rules to build gawk -all : gawk.exe pgawk.exe +all : gawk.exe pgawk.exe dgawk.exe gawk.exe:: $(GAWKOBJS) $(RSP) $(DO_LNK) @@ -351,6 +222,10 @@ $(DO_PLNK) $(DO_PBIND) +dgawk.exe:: $(DGAWKOBJS) $(DRSP) + $(DO_DLNK) + $(DO_DBIND) + $(RSPFILE) : $(GAWKOBJS) echo $(AWKOBJS1)$P > $@ echo $(AWKOBJS2)$P >> $@ @@ -361,18 +236,36 @@ echo $(PAWKOBJS2)$P >> $@ echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@ -$(ALLOBJS) eval_p$O profile_p$O: awk.h regex.h config.h +$(DRSPFILE) : $(DGAWKOBJS) + echo $(DAWKOBJS1)$P > $@ + echo $(DAWKOBJS2)$P >> $@ + echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@ + +# Notes to dependencies: +# 1. The dependency on getopt.h is because unistd.h includes it, +# and we have -I. on the compiler command line. unistd.h is +# included by awk.h. +# 2. custom.h is not mentioned because pc ports don't use it. +$(ALLOBJS) $(LIBOBJS) eval_p$O profile_p$O eval_d$O debug$O command$O: \ + awk.h regex.h config.h gettext.h mbsupport.h protos.h dfa.h getopt.h -gawkmisc$O: pc/gawkmisc.pc +builtin$O: floatmagic.h random.h popen.h + +random$O: floatmagic.h random.h + +debug$O: floatmagic.h + +command$O debug$O: cmd.h + +dfa$O: xalloc.h -getopt$O: getopt.h +gawkmisc$O: pc/gawkmisc.pc -getopt1$O: getopt.h +getopt$O getopt1$O : getopt_int.h io$O: popen.h -gawk.exp: gawkw32.def - $(DYN_MAKEXP) +regex$O: regcomp.c regexec.c regex_internal.h eval_p$O: eval.c @@ -390,7 +283,7 @@ install: install$(install) -install1: +install1: echo extproc sh $(prefix)/bin/igawk.cmd > igawk.cmd echo shift >> igawk.cmd cat pc/awklib/igawk >> igawk.cmd @@ -407,7 +300,7 @@ gawk -v prefix=$(prefix) -f install.awk clean: - rm -rf gawk pgawk *.exe gawk.map *.o *.obj core a.out $(RSPFILE) $(PRSPFILE) $(DYN_EXP) + rm -rf gawk pgawk dgawk *.exe gawk.map *.o *.obj core a.out $(RSPFILE) $(PRSPFILE) $(DRSPFILE) $(DYN_EXP) # cd doc && $(MAKE) clean # cd test && $(MAKE) clean # cd awklib && $(MAKE) clean @@ -432,3 +325,68 @@ tags: ctags awk.h *.y custom.h *.c *.h + +#======================================================================== +#================================= DOC ================================== +#======================================================================== + +DVIS = ./doc/gawk.dvi ./doc/gawkinet.dvi +PDFS = ./doc/gawk.pdf ./doc/gawkinet.pdf +PSS = ./doc/gawk.ps ./doc/gawkinet.ps +HTMLS = ./doc/gawk.html ./doc/gawkinet.html +INFOS = ./doc/gawk.info ./doc/gawkinet.info +TEXINFOS = ./doc/gawk.texi ./doc/gawkinet.texi + +TEXI2DVI = texi2dvi --build-dir=./doc +TEXI2PDF = $(TEXI2DVI) --pdf --batch +DVIPS = dvips +MAKEINFO = makeinfo --no-split --force +MAKEINFOHTML = $(MAKEINFO) --html + +TROFF = groff -t -Tps -U +#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/" + +SEDME = sed "s/^\/level0 save def/\/level0 save def 30 -48 translate/" + +SEDME2 = sed "/%%Page: 10 10/,/0 Cg EP/d" + +.SUFFIXES: .dvi .html .info .pdf .ps .texi + +.texi.info: + $(MAKEINFO) -o $@ $< + +.texi.html: + $(MAKEINFOHTML) -o $@ $< + +.texi.dvi: + $(TEXI2DVI) -o $@ $< + +.texi.pdf: + $(TEXI2PDF) -o $@ $< + +.dvi.ps: + $(DVIPS) -o $@ $< + +./doc/awkcard.tr: ./doc/awkcard.in + cd doc + sed "s,SRCDIR,.," < awkcard.in > awkcard.tr + cd .. + +./doc/awkcard.nc: export GROFF_TMPDIR ?= . +./doc/awkcard.nc: ./doc/macros ./doc/cardfonts ./doc/no.colors ./doc/awkcard.tr ./doc/ad.block ./doc/awkcard.in ./doc/setter.outline + cd doc + $(TROFF) ./macros ./cardfonts ./no.colors awkcard.tr | $(SEDME) | cat ./setter.outline - | $(SEDME2) > awkcard.ps + cd .. + +./doc/awkcard.ps: ./doc/awkcard.nc + cd doc + touch awkcard.nc + cd .. + +./doc/awkcard.pdf: ./doc/awkcard.ps + cd doc + ps2pdf ./awkcard.ps ./awkcard.pdf + cd .. + +doc: $(INFOS) $(DVIS) $(HTMLS) $(PSS) $(PDFS) ./doc/awkcard.ps ./doc/awkcard.pdf diff -Nru gawk-3.1.8+dfsg/pc/Makefile.tst gawk-4.0.1+dfsg/pc/Makefile.tst --- gawk-3.1.8+dfsg/pc/Makefile.tst 2010-05-03 18:14:29.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/Makefile.tst 2012-03-28 19:47:54.000000000 +0000 @@ -1,6 +1,6 @@ # Makefile for GNU Awk test suite. # -# Copyright (C) 1988-2010 the Free Software Foundation, Inc. +# Copyright (C) 1988-2012 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -46,7 +46,7 @@ # or "make check extra" (with DJGPP Make) should run successfully. # The Bash shell (compiled with djgpp) works very well with the -# MSC & djgpp-compiled gawks. It is currently the recommended shell to use +# djgpp-compiled gawk. It is currently the recommended shell to use # for testing, along with DJGPP make. See README.pc for # more information on OS/2 and DOS shells. @@ -66,6 +66,9 @@ AWK2 = '..\gawk.exe' AWKPROG = ../gawk.exe +# Define PGAWK +PGAWK = ../pgawk.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). # This is also an issue for the "mmap8k" test. If it fails, make sure that @@ -83,15 +86,21 @@ #CMP = cmp # See the comment above for why you might want to set CMP to "env LFN=n diff" #CMP = env LFN=n diff -CMP = diff -#CMP = diff -c +#CMP = diff +CMP = diff -u #CMP = gcmp -# Set your "cp" and "mkdir" commands here. Note: DOS's copy must take forward -# slashes. -#CP = cp +# cmp replacement program for PC where the error messages aren't +# exactly the same. Should run even on old awk. +TESTOUTCMP = $(AWK) -f ../testoutcmp.awk + +# Set your "cp," "mv," and "mkdir" commands here. Note: DOS's copy must take +# forward slashes. +CP = cp #CP = : && command -c copy -CP = command.com /c copy +#CP = command.com /c copy + +MV = cmd.exe /c ren #MKDIR = mkdir #MKDIR = gmkdir @@ -110,63 +119,93 @@ # ============================================================================ srcdir = . +abs_builddir = . # Get rid of core files when cleaning and generated .ok file CLEANFILES = core core.* fmtspcl.ok -# try to keep these sorted +# try to keep these sorted. each letter starts a new line BASIC_TESTS = \ - addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \ - arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \ - aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \ - arysubnm asgext awkpath back89 backgsub childin clobber closebad \ - clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \ - datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \ - exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray \ - fnarray2 fnaryscl fnasgnm \ - fnmisc fordel forref forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ - funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ + addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \ + arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ + arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ + aryprm8 arysubnm asgext awkpath \ + back89 backgsub \ + childin clobber closebad clsflnam compare compare2 concat1 concat2 \ + concat3 concat4 convfmt \ + datanonl defref delargv delarpm2 delarprm delfunc dfastress dynlj \ + eofsplit exitval1 exitval2 \ + fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ + fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ + fstabplus funsemnl funsmnam funstack \ + getline getline2 getline3 getline4 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ - hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ - longsub longwrds manglprm math membug1 messages minusstr mmap8k \ - mtchi18n nasty nasty2 negexp nested nfldstr nfneg nfset nlfldsep \ - nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ - nors nulrsend numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts \ - onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 parsefld \ - parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ - prt1eval prtoeval psx96sub rand rebt8b1 redfilnm regeq reindops \ - reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ - rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin sortempty \ - splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \ - strtod subamp subi18n subsepnm subslash substr swaplns synerr1 \ - synerr2 tradanch tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \ - unterm uparrfs wideidx wideidx2 widesub widesub2 widesub3 \ - widesub4 wjposer1 zero2 zeroe0 zeroflag + gsubtst7 gsubtst8 \ + hex hsprint \ + inputred intest intprec iobug1 \ + leaddig leadnl litoct longsub longwrds \ + manglprm math membug1 messages minusstr mmap8k mtchi18n \ + nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ + nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ + noparms nors nulrsend numindex numsubstr \ + octsub ofmt ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf \ + paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ + posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ + prt1eval prtoeval \ + rand range1 rebt8b1 redfilnm regeq regrange reindops reparse \ + resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ + rstest3 rstest4 rstest5 rswhite \ + scalar sclforin sclifin sortempty splitargv splitarr splitdef \ + splitvar splitwht strcat1 strnum1 strtod subamp subi18n \ + subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \ + uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \ + wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ + zero2 zeroe0 zeroflag + +UNIX_TESTS = \ + fflush getlnhd localenl pid pipeio1 pipeio2 poundbang rtlen rtlen01 \ + space strftlng -UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = \ - argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 fieldwdth \ - fsfwfs funlen fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 \ - gnureops icasefs icasers igncdym igncfs ignrcas2 ignrcase lint lintold \ - manyfiles match1 match2 match3 mbprintf3 mbstr1 nondec nondec2 posix \ - printfbad1 printfbad2 procinfs rebuf regx8bit reint reint2 rsstart1 \ - rsstart2 rsstart3 rstest6 shadow strftime strtonum + aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ + backw badargs beginfile1 beginfile2 binmode1 \ + clos1way delsub devfd devfd1 devfd2 dumpvars exit \ + fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ + fwtest fwtest2 fwtest3 \ + gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ + icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall \ + lint lintold lintwarn \ + manyfiles match1 match2 match3 mbstr1 \ + nastyparm next nondec nondec2 \ + patsplit posix printfbad1 printfbad2 printfbad3 procinfs \ + profile1 profile2 profile3 pty1 \ + rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + strtonum switch2 -EXTRA_TESTS = regtest inftest -INET_TESTS = inetechu inetecht inetdayu inetdayt +EXTRA_TESTS = inftest regtest +INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat -LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ - mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny - +LOCALE_CHARSET_TESTS = \ + asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ + mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc # List of the tests which should be run with --lint option: -NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 uninit5 uninitialized +NEED_LINT = \ + defref fmtspcl lintwarn noeffect nofmtch shadow \ + uninit2 uninit3 uninit4 uninit5 uninitialized + # List of the tests which should be run with --lint-old option: NEED_LINT_OLD = lintold +# List of the tests which fail with EXIT CODE 1 +FAIL_CODE1 = \ + fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm + + # List of the files that appear in manual tests or are for reserve testing: -GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk +GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid @@ -274,7 +313,7 @@ .) : ;; \ *) rm -f ./argarray.in ;; \ esac - @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @@ -286,48 +325,48 @@ @echo manyfiles @rm -rf junk @mkdir junk - @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ + @$(AWK) 'BEGIN { for (i = 1; i <= 1030; 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 _$@ + @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 _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inftest:: @echo $@ @echo This test is very machine specific... - @echo This sometimes seems to cause problems for MSC gawk. @echo Expect inftest to fail with DJGPP. @$(AWK) -f $(srcdir)/inftest.awk | sed "s/inf/Inf/g" >_$@ - @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ - @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ - @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ - @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ - @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 - @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @@ -344,7 +383,7 @@ litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ - @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd:: @echo $@ @@ -355,13 +394,13 @@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ - @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup - @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @@ -371,7 +410,7 @@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ - @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.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. @@ -387,12 +426,12 @@ @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi - @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.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 _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fmtspcl.ok: fmtspcl.tok @$(AWK) -v "sd=$(srcdir)" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < $(srcdir)/fmtspcl.tok > $@ 2>/dev/null @@ -406,18 +445,19 @@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ - @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 - @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio2:: @echo $@ + @echo Expect pipeio2 to fail with MinGW @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ - @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clobber:: @echo $@ @@ -428,7 +468,7 @@ arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ - @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @@ -472,12 +512,12 @@ redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ - @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ - @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @@ -486,9 +526,9 @@ space:: @echo $@ - @echo Expect space to fail with DJGPP. @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +# @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @@ -511,11 +551,6 @@ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -whiny:: - @echo $@ - @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - wideidx:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ @@ -591,6 +626,22 @@ @head $(srcdir)/rsstart1.in | $(AWK) -f $(srcdir)/rsstart2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rtlen:: + @echo $@ + @$(srcdir)/$@.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rtlen01:: + @echo $@ + @$(srcdir)/$@.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rtlenmb:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(srcdir)/rtlen.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/rtlen.ok _$@ && rm -f _$@ + nondec2:: @echo $@ @$(AWK) --non-decimal-data -v a=0x1 -f $(srcdir)/$@.awk >_$@ @@ -628,6 +679,7 @@ # The program text is the '1' which will print each record. How compact can you get? devfd2:: @echo $@ + @echo Expect devfd2 to fail in MinGW @$(AWK) 1 /dev/fd/4 /dev/fd/5 4< $(srcdir)/devfd.in1 5< $(srcdir)/devfd.in2 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -655,7 +707,7 @@ mbprintf1:: @echo $@ - @echo Expect mbprintf1 to fail with DJGPP. + @echo Expect mbprintf1 to fail with DJGPP and MinGW. @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -674,7 +726,7 @@ mbfw1:: @echo $@ - @echo Expect mbfw1 to fail with DJGPP. + @echo Expect mbfw1 to fail with DJGPP and MinGW. @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -694,6 +746,65 @@ @echo $@ @$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +beginfile1:: + @echo $@ + @echo Expect beginfile1 to fail with DJGPP and MinGW + @AWKPATH=$(srcdir) $(AWK) -f $@.awk $(srcdir)/$@.awk . ./no/such/file Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +beginfile2: + @echo $@ + @-( cd $(srcdir) && LC_ALL=C AWK="$(abs_builddir)/$(AWKPROG)" $(srcdir)/$@.sh $(srcdir)/$@.in ) > _$@ 2>&1 +# @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + @-$(TESTOUTCMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +dumpvars:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --dump-variables 1 < $(srcdir)/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@ +# @mv awkvars.out _$@ + @$(MV) awkvars.out _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile1: + @echo $@ + @$(AWK) --profile=ap-$@.out -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > _$@.out1 + @$(AWK) -f ap-$@.out $(srcdir)/dtdgport.awk > _$@.out2 ; rm ap-$@.out + @cmp _$@.out1 _$@.out2 && rm _$@.out[12] || echo EXIT CODE: $$? >>_$@ + +profile2: + @echo $@ + @$(PGAWK) --profile=ap-$@.out -v sortcmd=sort -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile3: + @echo $@ + @$(PGAWK) --profile=ap-$@.out -f $(srcdir)/$@.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +posix2008sub: + @echo $@ + @$(AWK) --posix -f $(srcdir)/$@.awk > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +next: + @echo $@ + @-AWK="$(AWKPROG)" $(srcdir)/$@.sh > _$@ 2>&1 + @-LC_ALL=C $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +exit: + @echo $@ + @echo Expect exit to fail with MinGW + @-AWK="$(AWKPROG)" $(srcdir)/$@.sh > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rri1:: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -866,6 +977,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delargv: + @echo delargv + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + delarpm2: @echo delarpm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -881,6 +997,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +dfastress: + @echo dfastress + @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: $$? >>_$@ @@ -893,6 +1014,7 @@ exitval2: @echo exitval2 + @echo Expect exitval2 to fail with MinGW @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1001,6 +1123,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getline4: + @echo getline4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 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: $$? >>_$@ @@ -1036,6 +1163,16 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +gsubtst7: + @echo gsubtst7 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst8: + @echo gsubtst8 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + hex: @echo hex @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1043,6 +1180,7 @@ hsprint: @echo hsprint + @echo Expect hsprint to fail with MinGW due to 3 digits in %e output @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1117,6 +1255,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +negrange: + @echo negrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nested: @echo nested @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1202,6 +1345,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ofmta: + @echo ofmta + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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: $$? >>_$@ @@ -1302,16 +1450,16 @@ @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 _$@ +range1: + @echo range1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + rebt8b1: @echo rebt8b1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1322,6 +1470,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regrange: + @echo regrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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: $$? >>_$@ @@ -1364,11 +1517,13 @@ rstest4: @echo rstest4 + @echo Expect rstest4 to fail with MinGW @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest5: @echo rstest5 + @echo Expect rstest5 to fail with MinGW @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1529,6 +1684,36 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +aadelete1: + @echo aadelete1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aadelete2: + @echo aadelete2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aarray1: + @echo aarray1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aasort: + @echo aasort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aasorti: + @echo aasorti + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arraysort: + @echo arraysort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + backw: @echo backw @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1540,11 +1725,36 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delsub: + @echo delsub + @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 _$@ +fpat1: + @echo fpat1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpat2: + @echo fpat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpat3: + @echo fpat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpatnull: + @echo fpatnull + @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: $$? >>_$@ @@ -1565,6 +1775,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fwtest3: + @echo fwtest3 + @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: $$? >>_$@ @@ -1577,7 +1792,7 @@ getlndir: @echo getlndir - @echo Expect getlndir to fail with DJGPP. + @echo Expect getlndir to fail with DJGPP and MinGW. @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1621,6 +1836,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +indirectcall: + @echo indirectcall + @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: $$? >>_$@ @@ -1631,6 +1851,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint-old < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +lintwarn: + @echo lintwarn + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + match1: @echo match1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1646,13 +1871,24 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +nastyparm: + @echo nastyparm + @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 _$@ +patsplit: + @echo patsplit + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + posix: @echo posix + @echo Expect posix to fail with MinGW due to 3 digits in e+NNN exponent @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1661,11 +1897,22 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +printfbad3: + @echo printfbad3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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 _$@ +pty1: + @echo pty1 + @echo Expect pty1 to fail with DJGPP and MinGW. + @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: $$? >>_$@ @@ -1686,11 +1933,31 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +sortfor: + @echo sortfor + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sortu: + @echo sortu + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitarg4: + @echo splitarg4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + strtonum: @echo strtonum @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +switch2: + @echo switch2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + double1: @echo double1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1698,6 +1965,7 @@ double2: @echo double2 + @echo Expect double2 to fail with MinGW due to 3 digits in e+NNN exponents @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1718,6 +1986,7 @@ fmttest: @echo fmttest + @echo Expect fmttest to fail with MinGW due to 3 digits in e+NNN exponents @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ diff -Nru gawk-3.1.8+dfsg/pc/config.h gawk-4.0.1+dfsg/pc/config.h --- gawk-3.1.8+dfsg/pc/config.h 2010-04-13 19:12:44.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/config.h 2012-03-28 19:47:54.000000000 +0000 @@ -1,418 +1,419 @@ -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ -/* - * acconfig.h -- configuration definitions for gawk. - */ - -/* - * Copyright (C) 1995-2005 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -/* Define 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 - -/* Define if using alloca.c. */ -/* #undef C_ALLOCA */ - -/* Define if type char is unsigned and you are not using gcc. */ -#ifndef __CHAR_UNSIGNED__ -/* #undef __CHAR_UNSIGNED__ */ -#endif +/* configh.in. Generated from configure.ac by autoheader. */ +/* pc/config.h. Generated automatically by pc/config.sed. */ -/* Define to empty if the keyword does not work. */ -/* #undef const */ +/* dynamic loading is possible */ +#undef DYNAMIC -/* 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 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'. */ +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ #define GETGROUPS_T gid_t -/* Define if the `getpgrp' function takes no argument. */ +/* Define to 1 if the `getpgrp' function requires zero arguments. */ #define GETPGRP_VOID 1 +/* Define to 1 if you have the `alarm' function. */ +#define HAVE_ALARM 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + /* Define to 1 if you have the `atexit' function. */ -# define HAVE_ATEXIT 1 +#define HAVE_ATEXIT 1 /* Define to 1 if you have the `btowc' function. */ #ifdef _WIN32 #define HAVE_BTOWC 1 #endif -#ifdef __MINGW32__ +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ +#ifdef __MINGW32__ #define HAVE_DECL_TZNAME 1 +#endif + +/* 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. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fmod' function. */ +#define HAVE_FMOD 1 + +/* have getaddrinfo */ +#undef HAVE_GETADDRINFO + +/* 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 if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define to 1 if you have the `grantpt' function. */ +#undef HAVE_GRANTPT + +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV /* Define if you have the 'intmax_t' type in or . */ +#ifdef __MINGW32__ #define HAVE_INTMAX_T 1 - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 +#endif /* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ #define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 +#endif /* Define if exists, doesn't clash with , and declares uintmax_t. */ +#ifdef __MINGW32__ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 #endif -#ifdef __MINGW32__ /* Define to 1 if you have the `isascii' function. */ +#ifdef __MINGW32__ #define HAVE_ISASCII 1 +#endif /* Define to 1 if you have the `iswctype' function. */ +#ifdef __MINGW32__ #define HAVE_ISWCTYPE 1 +#endif /* Define to 1 if you have the `iswlower' function. */ +#ifdef __MINGW32__ #define HAVE_ISWLOWER 1 +#endif /* Define to 1 if you have the `iswupper' function. */ +#ifdef __MINGW32__ #define HAVE_ISWUPPER 1 - -/* Define if you have the 'long long' type. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the `mbrlen' function. */ -#define HAVE_MBRLEN 1 - -/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `towlower' function. */ -#define HAVE_TOWLOWER 1 - -/* Define to 1 if you have the `towupper' function. */ -#define HAVE_TOWUPPER 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcscoll' function. */ -#define HAVE_WCSCOLL 1 - -/* Define to 1 if you have the `wctype' function. */ -#define HAVE_WCTYPE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* systems should define this type here */ -#define HAVE_WCTYPE_T 1 - -/* systems should define this type here */ -#define HAVE_WINT_T 1 #endif -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define if you have and it should be used (not on Ultrix). */ -/* #undef HAVE_ALLOCA_H */ +/* Define if you have and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES -/* Define if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBINTL_H -/* Define if your struct stat has st_blksize. */ -#define HAVE_ST_BLKSIZE 1 - -/* Define if you have the ANSI # stringizing operator in cpp. */ -#define HAVE_STRINGIZE 1 - -/* Define if you have that is POSIX.1 compatible. */ -/* #undef HAVE_SYS_WAIT_H */ +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 -/* Define if your struct tm has tm_zone. */ -/* #undef HAVE_TM_ZONE */ +/* Define to 1 if you have a fully functional readline library. */ +/* #undef HAVE_LIBREADLINE */ -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#define HAVE_TZNAME 1 +/* Define if you have the libsigsegv library. */ +#undef HAVE_LIBSIGSEGV -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 -/* Define as __inline if that's what the C compiler calls it. */ -#if defined (_MSC_VER) -#define inline +/* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ +#define HAVE_LOCALE_H 1 #endif -#ifdef __GNUC__ -#define inline __inline__ -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 +/* Define if you have the 'long long' type. */ +#ifdef __MINGW32__ +#define HAVE_LONG_LONG 1 #endif -/* Define if on MINIX. */ -/* #undef _MINIX */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define if you need to in order for stat and other things to work. */ -/* #undef _POSIX_SOURCE */ +/* Define to 1 if the system has the type `long long int'. */ +#undef HAVE_LONG_LONG_INT -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* 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 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 +/* Define to 1 if you have the `mbrlen' function. */ +#ifdef __MINGW32__ +#define HAVE_MBRLEN 1 +#endif -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +#ifdef __MINGW32__ +#define HAVE_MBRTOWC 1 +#endif -/* Define if your declares struct tm. */ -/* #undef TM_IN_SYS_TIME */ +/* Define to 1 if you have the header file. */ +#undef HAVE_MCHECK_H -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ +/* Define to 1 if you have the `memcmp' function. */ +#define HAVE_MEMCMP 1 -#define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */ -#define SPRINTF_RET int /* return type of sprintf */ -#define HAVE_MKTIME /* we have the mktime function */ -/* #undef HAVE_SOCKETS */ /* we have sockets on this system */ -/* #undef HAVE_PORTALS */ /* we have portals on /p on this system */ -/* #undef DYNAMIC */ /* allow dynamic addition of builtins */ -/* #undef STRTOD_NOT_C89 */ /* strtod doesn't have C89 semantics */ - -/* Define if you have the __argz_count function. */ -#define HAVE___ARGZ_COUNT 1 +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 -/* Define if you have the __argz_next function. */ -#define HAVE___ARGZ_NEXT 1 +/* Define to 1 if you have the `memcpy_ulong' function. */ +#undef HAVE_MEMCPY_ULONG -/* Define if you have the __argz_stringify function. */ -#define HAVE___ARGZ_STRINGIFY 1 +/* Define to 1 if you have the `memmove' function. */ +#ifdef __MINGW32__ +#define HAVE_MEMMOVE 1 +#endif -/* Define if you have the alarm function. */ -#define HAVE_ALARM 1 +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H -/* Define if you have the dcgettext function. */ -/* #undef HAVE_DCGETTEXT */ +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 -/* Define if you have the fmod function. */ -#define HAVE_FMOD 1 +/* Define to 1 if you have the `memset_ulong' function. */ +#undef HAVE_MEMSET_ULONG -/* Define if you have the getcwd function. */ -/* #undef HAVE_GETCWD */ +/* Define to 1 if you have the `mkstemp' function. */ +#ifdef DJGPP +#define HAVE_MKSTEMP 1 +#endif -/* Define if you have the getpagesize function. */ -/* #undef HAVE_GETPAGESIZE */ +/* we have the mktime function */ +#define HAVE_MKTIME 1 -/* Define if you have the memcmp function. */ -#define HAVE_MEMCMP 1 +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY 1 +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H -#ifdef __MINGW32__ -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 +/* Define to 1 if you have the `setenv' function. */ +#if defined(__MINGW32__) || defined(__DJGPP__) +#define HAVE_SETENV 1 #endif -/* Define if you have the memset function. */ -#define HAVE_MEMSET 1 - -/* Define if you have the munmap function. */ -/* #undef HAVE_MUNMAP */ - +/* Define to 1 if you have the `setlocale' function. */ #ifdef __MINGW32__ -/* Define if you have the putenv function. */ -#define HAVE_PUTENV 1 - -/* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 +#endif -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID /* Define to 1 if you have the `snprintf' function. */ +#ifdef __MINGW32__ #define HAVE_SNPRINTF 1 +#endif -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* FIXME!! */ +/* newer systems define this type here */ +#undef HAVE_SOCKADDR_STORAGE /* we have sockets on this system */ #undef HAVE_SOCKETS -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#ifdef __GNUC__ +#define HAVE_STDDEF_H 1 #endif -/* Define if you have the setenv function. */ -/* #define HAVE_SETENV */ +/* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ +#define HAVE_STDINT_H 1 +#endif -/* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#undef HAVE_STDINT_H_WITH_UINTMAX -/* Define if you have the strcasecmp function. */ -/* #undef HAVE_STRCASECMP */ +/* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ +#define HAVE_STDLIB_H 1 +#endif -/* Define if you have the strchr function. */ +/* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 -/* Define if you have the strdup function. */ -#define HAVE_STRDUP 1 +/* Define to 1 if you have the `strcoll' function. */ +#undef HAVE_STRCOLL -/* Define if you have the strerror function. */ +/* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 -/* Define if you have the strftime function. */ +/* Define to 1 if you have the `strftime' function. */ +#ifdef __MINGW32__ +/* MinGW uses the replacement from missing_d, to support the %e specifier. */ +#define strftime rpl_strftime +#else #define HAVE_STRFTIME 1 +#endif + +/* Define to 1 if cpp supports the ANSI # stringizing operator. */ +#define HAVE_STRINGIZE 1 -/* Define if you have the strncasecmp function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 +#ifdef __EMX__ +#define strncasecmp strnicmp +#endif -/* Define if you have the strtod function. */ -#define HAVE_STRTOD 1 +/* Define to 1 if you have the header file. */ +#undef HAVE_STROPTS_H -#ifdef __MINGW32__ +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 /* Define to 1 if you have the `strtoul' function. */ +#ifdef __MINGW32__ #define HAVE_STRTOUL 1 #endif -/* Define if you have the system function. */ -#define HAVE_SYSTEM 1 +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define if you have the tzset function. */ -#define HAVE_TZSET 1 +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_ZONE -/* Define if you have the header file. */ -/* #undef HAVE_ARGZ_H */ +/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ +#undef HAVE_ST_BLKSIZE -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `system' function. */ +#define HAVE_SYSTEM 1 -/* Define if you have the header file. */ -/* #undef HAVE_LIBINTL_H */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 +/* Define to 1 if you have the header file. */ +#ifndef __MINGW32__ +#define HAVE_SYS_PARAM_H 1 +#endif -/* Define if you have the header file. */ -/* #undef HAVE_MALLOC_H */ +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 +/* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ +#define HAVE_SYS_STAT_H 1 +#endif -/* Define if you have the header file. */ -/* #undef HAVE_NETDB_H */ +/* Define to 1 if you have the header file. */ +#if defined(DJGPP) || defined(__MINGW32__) +#define HAVE_SYS_TIME_H 1 +#endif -/* Define if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_NL_TYPES_H */ +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H -/* Define if you have the header file. */ -/* #undef HAVE_SIGNUM_H */ +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 +/* Define to 1 if you have the `tmpfile' function. */ +#undef HAVE_TMPFILE + +/* 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 `towlower' function. */ #ifdef __MINGW32__ -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 +#define HAVE_TOWLOWER 1 +#endif -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 +/* Define to 1 if you have the `towupper' function. */ +#ifdef __MINGW32__ +#define HAVE_TOWUPPER 1 +#endif -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 +/* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ +#define HAVE_TZNAME 1 + +/* Define to 1 if you have the `tzset' function. */ +#define HAVE_TZSET 1 + +/* Define if you have the 'uintmax_t' type in or . */ +#if defined(DJGPP) || defined(__MINGW32__) +#define HAVE_UINTMAX_T 1 +#ifdef DJGPP +#define uintmax_t unsigned long long +#endif +#endif + +/* Define to 1 if you have the header file. */ +#if defined(DJGPP) || defined(__MINGW32__) +#define HAVE_UNISTD_H 1 +#endif /* Define if you have the 'unsigned long long' type. */ #define HAVE_UNSIGNED_LONG_LONG 1 -#endif -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 +/* Define to 1 if the system has the type `unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT -/* Define if you have the header file. */ -/* #undef HAVE_STRINGS_H */ +/* Define to 1 if you have the `usleep' function. */ +#if defined(DJGPP) || defined(__MINGW32__) +#define HAVE_USLEEP 1 +#endif -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ +/* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ +#define HAVE_WCHAR_H 1 +#endif -/* Define if you have the header file. */ -#if defined(DJGPP) -# define HAVE_SYS_TIME_H 1 +/* Define to 1 if you have the `wcrtomb' function. */ +#ifdef __MINGW32__ +#define HAVE_WCRTOMB 1 #endif -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 +/* Define to 1 if you have the `wcscoll' function. */ +#ifdef __MINGW32__ +#define HAVE_WCSCOLL 1 +#endif -/* Define if you have the header file. */ -#if defined(DJGPP) || defined(__MINGW32__) -# define HAVE_UNISTD_H 1 +/* Define to 1 if you have the `wctype' function. */ +#ifdef __MINGW32__ +#define HAVE_WCTYPE 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef __MINGW32__ +#define HAVE_WCTYPE_H 1 #endif -/* Define if you have the i library (-li). */ -/* #undef HAVE_LIBI */ +/* systems should define this type here */ +#ifdef __MINGW32__ +#define HAVE_WCTYPE_T 1 +#endif -/* Define if you have the intl library (-lintl). */ -/* #undef HAVE_LIBINTL */ +/* systems should define this type here */ +#ifdef __MINGW32__ +#define HAVE_WINT_T 1 +#endif -/* Define if you have the m library (-lm). */ -#define HAVE_LIBM 1 +/* disable lint checks */ +#undef NO_LINT /* Name of package */ #define PACKAGE "gawk" @@ -424,67 +425,157 @@ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU Awk 3.1.5a" +#define PACKAGE_STRING "GNU Awk 4.0.0l" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gawk" +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://www.gnu.org/software/gawk/" + /* Define to the version of this package. */ -#define PACKAGE_VERSION "3.1.5a" +#define PACKAGE_VERSION "4.0.0l" -/* Version number of package */ -#define VERSION "3.1.5a" +/* Define to 1 if *printf supports %F format */ +#undef PRINTF_HAS_F_FORMAT -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void -/* Define to make ftello visible on some hosts (e.g. HP-UX 10.20). */ -/* #undef _LARGEFILE_SOURCE */ +#if defined(DJGPP) || defined(__MINGW32__) +#include +#endif -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ +/* The size of `unsigned int', as computed by sizeof. */ +#if UINT_MAX == 65536 +#define SIZEOF_UNSIGNED_INT 2 +#elif UINT_MAX == 4294967295U +#define SIZEOF_UNSIGNED_INT 4 +#endif -/* Define to make ftello visible on some hosts (e.g. glibc 2.1.3). */ -/* #undef _XOPEN_SOURCE */ +/* The size of `unsigned long', as computed by sizeof. */ +#if ULONG_MAX == 4294967295UL +#define SIZEOF_UNSIGNED_LONG 4 +#endif -/* Define to 1 if *printf supports %F format */ -/* #undef PRINTF_HAS_F_FORMAT */ +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 -/* Define if compiler has function prototypes */ -#define PROTOTYPES 1 +/* some systems define this type here */ +#undef TIME_T_IN_SYS_TYPES_H -/* Define to 1 if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 -/* Define if your locale.h file contains LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME -/* Define to 1 if NLS is requested. */ -/* #undef ENABLE_NLS */ +/* force use of our version of strftime */ +#undef USE_INCLUDED_STRFTIME -/* Define to 1 if you have gettext and don't want to use GNU gettext. */ -/* #undef HAVE_GETTEXT */ +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif -/* Define as 1 if you have catgets and don't want to use GNU gettext. */ -/* #undef HAVE_CATGETS */ -/* The size of `unsigned int' & `unsigned long', as computed by sizeof. */ -#if defined(DJGPP) || defined(_MSC_VER) || defined(__MINGW32__) -# include +/* Version number of package */ +#define VERSION "4.0.0l" + +/* 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 -#if UINT_MAX == 65536 -# define SIZEOF_UNSIGNED_INT 2 +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#ifdef __GNUC__ +#define inline __inline__ +#endif #endif -#if UINT_MAX == 4294967295U -# define SIZEOF_UNSIGNED_INT 4 +/* Define to long or long long if and don't define. */ +#ifdef DJGPP +#define intmax_t long long #endif -#if ULONG_MAX == 4294967295UL -# define SIZEOF_UNSIGNED_LONG 4 +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#ifdef DJGPP +#define restrict +#endif +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* type to use in place of socklen_t if not defined */ +#undef socklen_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. */ +#ifdef DJGPP +#define uintmax_t unsigned long long #endif +#include "custom.h" /* Library search path */ #if defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 3) # define DEFPATH ".;/dev/env/DJDIR/share/awk" @@ -492,69 +583,15 @@ # define DEFPATH ".;c:/lib/awk;c:/gnu/lib/awk" #endif -#if defined (_MSC_VER) -#if !defined(__STDC__) -# define __STDC__ 1 -#endif -#undef HAVE_UNISTD_H -#undef HAVE_SYS_PARAM_H -#undef HAVE_RANDOM -/* msc strftime is incomplete, use supplied version */ -#undef HAVE_STRFTIME -/* #define HAVE_TM_ZONE */ -#define altzone timezone -#endif - +#ifndef DJGPP #define HAVE_POPEN_H 1 - -#if defined(_MSC_VER) && defined(MSDOS) -#define system(s) os_system(s) #endif -#ifdef _MSC_VER -#define ssize_t long int /* DJGPP has ssize_t */ -#define intmax_t long -#define uintmax_t unsigned long -#endif - -#if defined (_MSC_VER) || defined(__EMX__) +#if defined(__EMX__) #define strcasecmp stricmp #define strncasecmp strnicmp #endif -#if defined(DJGPP) -# define HAVE_LIMITS_H 1 -# undef HAVE_POPEN_H -# undef HAVE_ALLOCA -# define HAVE_MKSTEMP 1 -# define HAVE_USLEEP 1 -#define intmax_t long long -#define uintmax_t unsigned long long -#define restrict /* nothing */ -#endif - -#if defined(__WIN32__) && defined(__CRTRSXNT__) -#include -#endif - -/* For vcWin32 */ -#if defined(WIN32) && defined(_MSC_VER) -#define alloca _alloca -#define system(s) os_system(s) -/* VC++ dosen't supprt restrict keyword */ -#define restrict -/* VC++ have tmpfile */ -#define HAVE_TMPFILE -/* sys/time.h is not exist in VC++? */ -#undef TIME_WITH_SYS_TIME -#endif - #if defined(__MINGW32__) -#undef HAVE_SYS_PARAM_H -#endif - -#if defined(_MSC_VER) || defined(__MINGW32__) # define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000) #endif - -/* #define NO_LINT 1 */ diff -Nru gawk-3.1.8+dfsg/pc/config.sed gawk-4.0.1+dfsg/pc/config.sed --- gawk-3.1.8+dfsg/pc/config.sed 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/config.sed 2012-03-28 19:47:54.000000000 +0000 @@ -0,0 +1,279 @@ +# -config.sed----------------------------------------------------------- +# Configuration script for pc/config.h +# ---------------------------------------------------------------------- + +# Copyright (C) 2011 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +# ---------------------------------------------------------------------- + +/configh\.in/a\ +/* pc/config.h. Generated automatically by pc/config.sed. */ + +s/^#undef GETPGRP_VOID *$/#define GETPGRP_VOID 1/ +s/^#undef GETGROUPS_T *$/#define GETGROUPS_T gid_t/ +/^#undef GETPGRP_VOID$/c\ +#ifdef DJGPP\ +#define GETPGRP_VOID 1\ +#endif +s/^#undef HAVE_ALARM *$/#define HAVE_ALARM 1/ +s/^#undef HAVE_ATEXIT *$/#define HAVE_ATEXIT 1/ +/^#undef HAVE_BTOWC *$/c\ +#ifdef _WIN32\ +#define HAVE_BTOWC 1\ +#endif +/^#undef HAVE_DECL_TZNAME *$/c\ +#ifdef __MINGW32__\ +#define HAVE_DECL_TZNAME 1\ +#endif +s/^#undef HAVE_FCNTL_H *$/#define HAVE_FCNTL_H 1/ +s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/ +/^#undef HAVE_INTMAX_T *$/c\ +#ifdef __MINGW32__\ +#define HAVE_INTMAX_T 1\ +#endif +/^#undef HAVE_INTTYPES_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_INTTYPES_H 1\ +#endif +/^#undef HAVE_INTTYPES_H_WITH_UINTMAX *$/c\ +#ifdef __MINGW32__\ +#define HAVE_INTTYPES_H_WITH_UINTMAX 1\ +#endif +/^#undef HAVE_ISASCII *$/c\ +#ifdef __MINGW32__\ +#define HAVE_ISASCII 1\ +#endif +/^#undef HAVE_ISWCTYPE *$/c\ +#ifdef __MINGW32__\ +#define HAVE_ISWCTYPE 1\ +#endif +/^#undef HAVE_ISWLOWER *$/c\ +#ifdef __MINGW32__\ +#define HAVE_ISWLOWER 1\ +#endif +/^#undef HAVE_ISWUPPER *$/c\ +#ifdef __MINGW32__\ +#define HAVE_ISWUPPER 1\ +#endif +s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/ +/^#undef HAVE_LIBREADLINE *$/c\ +/* #undef HAVE_LIBREADLINE */ +s/^#undef HAVE_LIMITS_H *$/#define HAVE_LIMITS_H 1/ +/^#undef HAVE_LOCALE_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_LOCALE_H 1\ +#endif +/^#undef HAVE_LONG_LONG *$/c\ +#ifdef __MINGW32__\ +#define HAVE_LONG_LONG 1\ +#endif +/^#undef HAVE_MBRLEN *$/c\ +#ifdef __MINGW32__\ +#define HAVE_MBRLEN 1\ +#endif +/^#undef HAVE_MBRTOWC *$/c\ +#ifdef __MINGW32__\ +#define HAVE_MBRTOWC 1\ +#endif +s/^#undef HAVE_MEMCMP *$/#define HAVE_MEMCMP 1/ +s/^#undef HAVE_MEMCPY *$/#define HAVE_MEMCPY 1/ +/^#undef HAVE_MEMMOVE *$/c\ +#ifdef __MINGW32__\ +#define HAVE_MEMMOVE 1\ +#endif +s/^#undef HAVE_MEMSET *$/#define HAVE_MEMSET 1/ +/^#undef HAVE_MKSTEMP *$/c\ +#ifdef DJGPP\ +#define HAVE_MKSTEMP 1\ +#endif +s/^#undef HAVE_MKTIME *$/#define HAVE_MKTIME 1/ +/^#undef HAVE_SETENV *$/c\ +#if defined(__MINGW32__) || defined(__DJGPP__)\ +#define HAVE_SETENV 1\ +#endif +/^#undef HAVE_SETLOCALE *$/c\ +#ifdef __MINGW32__\ +#define HAVE_SETLOCALE 1\ +#endif +/^#undef HAVE_SNPRINTF *$/c\ +#ifdef __MINGW32__\ +#define HAVE_SNPRINTF 1\ +#endif +s/^#undef HAVE_STDARG_H *$/#define HAVE_STDARG_H 1/ +/^#undef HAVE_STDDEF_H *$/c\ +#ifdef __GNUC__\ +#define HAVE_STDDEF_H 1\ +#endif +/^#undef HAVE_STDINT_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_STDINT_H 1\ +#endif +/^#undef HAVE_STDLIB_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_STDLIB_H 1\ +#endif +s/^#undef HAVE_STRCHR *$/#define HAVE_STRCHR 1/ +s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/ +/^#undef HAVE_STRFTIME *$/c\ +#ifdef __MINGW32__\ +/* MinGW uses the replacement from missing_d, to support the %e specifier. */\ +#define strftime rpl_strftime\ +#else\ +#define HAVE_STRFTIME 1\ +#endif +s/^#undef HAVE_STRINGIZE *$/#define HAVE_STRINGIZE 1/ +s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/ +/^#undef HAVE_STRNCASECMP *$/c\ +#define HAVE_STRNCASECMP 1\ +#ifdef __EMX__\ +#define strncasecmp strnicmp\ +#endif +s/^#undef HAVE_STRTOD *$/#define HAVE_STRTOD 1/ +/^#undef HAVE_STRTOUL *$/c\ +#ifdef __MINGW32__\ +#define HAVE_STRTOUL 1\ +#endif +s/^#undef HAVE_SYSTEM *$/#define HAVE_SYSTEM 1/ +/^#undef HAVE_SYS_PARAM_H *$/c\ +#ifndef __MINGW32__\ +#define HAVE_SYS_PARAM_H 1\ +#endif +/^#undef HAVE_SYS_STAT_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_SYS_STAT_H 1\ +#endif +/^#undef HAVE_SYS_TIME_H *$/c\ +#if defined(DJGPP) || defined(__MINGW32__)\ +#define HAVE_SYS_TIME_H 1\ +#endif +s/^#undef HAVE_SYS_TYPES_H *$/#define HAVE_SYS_TYPES_H 1/ +/^#undef HAVE_TOWLOWER *$/c\ +#ifdef __MINGW32__\ +#define HAVE_TOWLOWER 1\ +#endif +/^#undef HAVE_TOWUPPER *$/c\ +#ifdef __MINGW32__\ +#define HAVE_TOWUPPER 1\ +#endif +s/^#undef HAVE_TZNAME *$/#define HAVE_TZNAME 1/ +s/^#undef HAVE_TZSET *$/#define HAVE_TZSET 1/ +/^#undef HAVE_UINTMAX_T *$/c\ +#if defined(DJGPP) || defined(__MINGW32__)\ +#define HAVE_UINTMAX_T 1\ +#ifdef DJGPP\ +#define uintmax_t unsigned long long\ +#endif\ +#endif +/^#undef HAVE_UNISTD_H *$/c\ +#if defined(DJGPP) || defined(__MINGW32__)\ +#define HAVE_UNISTD_H 1\ +#endif +s/^#undef HAVE_UNSIGNED_LONG_LONG *$/#define HAVE_UNSIGNED_LONG_LONG 1/ +/^#undef HAVE_USLEEP *$/c\ +#if defined(DJGPP) || defined(__MINGW32__)\ +#define HAVE_USLEEP 1\ +#endif +s/^#undef HAVE_VPRINTF *$/#define HAVE_VPRINTF 1/ +/^#undef HAVE_WCHAR_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WCHAR_H 1\ +#endif +/^#undef HAVE_WCRTOMB *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WCRTOMB 1\ +#endif +/^#undef HAVE_WCSCOLL *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WCSCOLL 1\ +#endif +/^#undef HAVE_WCTYPE *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WCTYPE 1\ +#endif +/^#undef HAVE_WCTYPE_H *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WCTYPE_H 1\ +#endif +/^#undef HAVE_WCTYPE_T *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WCTYPE_T 1\ +#endif +/^#undef HAVE_WINT_T *$/c\ +#ifdef __MINGW32__\ +#define HAVE_WINT_T 1\ +#endif +s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/ +s/^#undef RETSIGTYPE *$/#define RETSIGTYPE void/ +/^#.*RETSIGTYPE /a\ +\ +#if defined(DJGPP) || defined(__MINGW32__)\ +#include \ +#endif +/^#undef SIZEOF_UNSIGNED_INT *$/c\ +#if UINT_MAX == 65536\ +#define SIZEOF_UNSIGNED_INT 2\ +#elif UINT_MAX == 4294967295U\ +#define SIZEOF_UNSIGNED_INT 4\ +#endif +/^#undef SIZEOF_UNSIGNED_LONG *$/c\ +#if ULONG_MAX == 4294967295UL\ +#define SIZEOF_UNSIGNED_LONG 4\ +#endif +s/^#undef STDC_HEADERS *$/#define STDC_HEADERS 1/ +s/^#undef TIME_WITH_SYS_TIME *$/#define TIME_WITH_SYS_TIME 1/ +/^#undef inline *$/c\ +#ifdef __GNUC__\ +#define inline __inline__\ +#endif +/^#undef intmax_t *$/c\ +#ifdef DJGPP\ +#define intmax_t long long\ +#endif +/^#undef restrict *$/c\ +#ifdef DJGPP\ +#define restrict\ +#endif +/^#undef uintmax_t *$/c\ +#ifdef DJGPP\ +#define uintmax_t unsigned long long\ +#endif + +s|^#undef PACKAGE_URL *$|#define PACKAGE_URL "http://www.gnu.org/software/gawk/"| + +$a\ +/* Library search path */\ +#if defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 3)\ +# define DEFPATH ".;/dev/env/DJDIR/share/awk"\ +#else\ +# define DEFPATH ".;c:/lib/awk;c:/gnu/lib/awk"\ +#endif\ +\ +#ifndef DJGPP\ +#define HAVE_POPEN_H 1\ +#endif\ +\ +#if defined(__EMX__)\ +#define strcasecmp stricmp\ +#define strncasecmp strnicmp\ +#endif\ +\ +#if defined(__MINGW32__)\ +# define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000)\ +#endif diff -Nru gawk-3.1.8+dfsg/pc/configpk.sed gawk-4.0.1+dfsg/pc/configpk.sed --- gawk-3.1.8+dfsg/pc/configpk.sed 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/configpk.sed 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,9 @@ +s/^AC_INIT([[]\{0,1\}\([^],]*\)[]]\{0,1\}, *[[]\{0,1\}\([^],]*\)[]]\{0,1\}, *[[]\{0,1\}\([^],]*\)[]]\{0,1\}, *[[]\{0,1\}\([^],)]*\).*$/\ +s|^#undef PACKAGE_NAME *$|#define PACKAGE_NAME "\1"|\ +s|^#undef VERSION *$|#define VERSION "\2"\|\ +s|^#undef PACKAGE_VERSION *$|#define PACKAGE_VERSION "\2"|\ +s|^#undef PACKAGE_STRING *$|#define PACKAGE_STRING "\1 \2"|\ +s|^#undef PACKAGE_BUGREPORT *$|#define PACKAGE_BUGREPORT "\3"|\ +s|^#undef PACKAGE *$|#define PACKAGE "\4"|\ +s|^#undef PACKAGE_TARNAME *$|#define PACKAGE_TARNAME "\4"|\ +/p diff -Nru gawk-3.1.8+dfsg/pc/dlfcn.c gawk-4.0.1+dfsg/pc/dlfcn.c --- gawk-3.1.8+dfsg/pc/dlfcn.c 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/dlfcn.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* -** dlfcn.c -- limited implementation of posix dynamic loading functions -*/ - -/* - * Copyright (C) 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include -#include - -/* open the library file. We currently ignore flags. */ -void *dlopen(const char * libname, int flags) -{ - HMODULE libH; - - - /* if libname is specified, we need to load a library of that name */ - if (libname) { - libH = LoadLibrary(libname); - } - - /* otherwise, we're supposed to return a handle to global symbol - * information, which includes the executable and all libraries loaded - * with RTLD_GLOBAL. For our purposes, it doesn't really matter, so - * we simply return the handle to the .exe */ - else { - libH = GetModuleHandle(NULL); - } - - return (void *)libH; -} - - -/* don't need the library any more */ -int dlclose(void * libH) -{ - int rc; - - if (FreeLibrary((HMODULE)libH)) { - rc = 0; - } - else { - rc = -1; - } - - return rc; -} - -/* find the symbol */ -void *dlsym(void * /*restrict*/ libH, const char * /*restrict*/ fnName) -{ - return (void *)GetProcAddress((HMODULE)libH, fnName); -} - -char *dlerror(void) -{ - static char errbuf[1024]; - - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), errbuf, sizeof(errbuf), NULL); - - return errbuf; -} - - diff -Nru gawk-3.1.8+dfsg/pc/dlfcn.h gawk-4.0.1+dfsg/pc/dlfcn.h --- gawk-3.1.8+dfsg/pc/dlfcn.h 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/dlfcn.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* -** dlfcn.h -- limited implementation of posix dynamic loading functions -*/ - -/* - * Copyright (C) 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef _DLFCN_H -#define _DLFCN_H - -/* symbols required by susv3. These are not supported here (everything is - * RTLD_NOW, RTLD_GLOBAL) */ -#define RTLD_LAZY 0 -#define RTLD_NOW 1 -#define RTLD_GLOBAL 0 -#define RTLD_LOCAL 2 - -int dlclose(void *); -char *dlerror(void); -void *dlopen(const char *, int); -void *dlsym(void * /*restrict*/, const char * /*restrict*/); - -#endif diff -Nru gawk-3.1.8+dfsg/pc/gawkmisc.pc gawk-4.0.1+dfsg/pc/gawkmisc.pc --- gawk-3.1.8+dfsg/pc/gawkmisc.pc 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/gawkmisc.pc 2012-03-28 19:47:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991 - 2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991 - 2003, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -281,6 +281,53 @@ } } +/* os_isatty --- return true if fd is a tty */ + +int +os_isatty(int fd) +{ +#if defined(__MINGW32__) || defined(_MSC_VER) + return (isatty(fd) && lseek(fd, SEEK_CUR, 0) == -1); +#else + return isatty(fd); +#endif +} + +/* files_are_same --- return true if files are identical */ + +int +files_are_same(char *path, SRCFILE *src) +{ + struct stat st; + size_t pathlen; + char *p, *s; + + if (stat (path, & st) == 0) { + /* If they have a working `stat', honor that. */ + if (!(st.st_dev == src->sbuf.st_dev + && st.st_ino == src->sbuf.st_ino)) + return 0; + + /* Compare modification times. */ + if (st.st_mtime != src->mtime) + return 0; + + /* Compare absolute file names case-insensitively, and + treat forward- and back-slashes as equal. */ + pathlen = strlen(path); + for (p = path, s = src->fullpath; + p <= path + pathlen; + p++, s++) { + if (tolower(*p) != tolower(*s) + && !((*p == '/' || *p == '\\') + && (*s == '/' || *s == '\\'))) + return 0; + } + return 1; + } + return 0; +} + #ifdef __EMX__ # ifndef PATH_SEPARATOR @@ -453,3 +500,107 @@ return (result) ? (const char*) result : path; } #endif /* __EMX__ */ + +#ifdef __MINGW32__ + +extern void *xmalloc (size_t); + +int +setenv (const char *name, const char *value, int rewrite) +{ + char *entry; + + if (*value == '=') + ++value; + + if (getenv (name) && !rewrite) + return 0; + + entry = xmalloc (strlen (name) + 1 + strlen (value) + 1); + strcat (strcat (strcpy (entry, name), "="), value); + if (putenv (entry) != 0) + { + free (entry); + return -1; + } + return 0; +} + +int +unsetenv (const char *name) +{ + if (!name || !*name || strchr (name, '=') != NULL) + return -1; + + return setenv (name, "", 1); +} + +#include + +int +usleep(unsigned int usec) +{ + double msecf = usec / 1000.0; + + Sleep ((DWORD)msecf); + + return usec - msecf * 1000 < 0 ? 0 : (int)(usec - msecf * 1000); +} + +/* The implementation of wctob in the MS runtime is problematic + because it doesn't allow to distinguish between WEOF and 0xff, due + to integer sign extension. It also causes failures in dfa.c when + characters with the 8th bit set are involved. This replacement + version fixes that. */ + +#include + +int +wctob (wint_t wc) +{ + char buf[64]; + + if (!(MB_CUR_MAX <= sizeof (buf))) + abort (); + /* Handle the case where WEOF is a value that does not fit in a wchar_t. */ + if (wc == (wchar_t)wc) + if (wctomb (buf, (wchar_t)wc) == 1) + return (unsigned char) buf[0]; + return EOF; +} + +/* + * On MS-Windows with MinGW, execvp causes the shell and the re-exec'ed + * dgawk to compete for the keyboard input. + * + * This will need work if we ever need a real version of execvp. + */ +int execvp(const char *file, const char *const *argv) +{ + if (_spawnvp(_P_WAIT, file, (const char * const *)argv) != -1) + exit(EXIT_SUCCESS); + + return -1; +} +#endif /* __MINGW32__ */ + +#ifdef __DJGPP__ + +int +unsetenv (const char *name) +{ + if (!name || !*name || strchr (name, '=') != NULL) + return -1; + + return putenv (name); +} + +/* This is needed to defeat too-clever GCC warnings in dfa.c about + comparison being always false due to limited range of data type. */ +wint_t +btowc (int c) +{ + return c; +} + +#endif /* __DJGPP__ */ diff -Nru gawk-3.1.8+dfsg/pc/gawkw32.def gawk-4.0.1+dfsg/pc/gawkw32.def --- gawk-3.1.8+dfsg/pc/gawkw32.def 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/gawkw32.def 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -;; export definitions for Windows32 gawk -;; this is to support extension libraries -- this should generate a gawk.lib -;; against which they can link -;; don't change the ordinals (the numbers after the function names) - -EXPORTS - -;; functions related directly to adding external functions -get_argument @1 -set_value @2 -make_builtin @3 -get_curfunc_arg_count @4 - -;; functions for manipulating data types -mk_number @11 -tmp_string @12 -unref @13 -r_force_string @14 -r_force_number @15 -nodetype2str @16 - - -;; incidental other functions -assoc_lookup @31 -assoc_clear @32 -r_dupnode @33 -set_loc @34 -update_ERRNO @35 -r_fatal @36 -get_actual @37 - -;; data -- note that this must be redeclared with __declspec(dllimport) in the extension -;; library since the exported symbol is actually a pointer to the data - -CONVFMTidx @101 -lintfunc @102 -do_lint @103 -stack_ptr @104 diff -Nru gawk-3.1.8+dfsg/pc/getid.c gawk-4.0.1+dfsg/pc/getid.c --- gawk-3.1.8+dfsg/pc/getid.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/getid.c 2010-12-18 18:11:10.000000000 +0000 @@ -1,24 +1,6 @@ -#if defined(_MSC_VER) || defined(__MINGW32__) +#ifdef __MINGW32__ -#ifdef OS2 -# define INCL_DOSPROCESS -# include -# if _MSC_VER == 510 -# define DosGetPID DosGetPid -# endif -#else -# include -#endif - -#ifdef OS2 -int getpid(void) -{ - PIDINFO PidInfo; - - DosGetPID(&PidInfo); - return(PidInfo.pid); -} -#endif +#include unsigned int getuid (void) { @@ -40,23 +22,16 @@ return (0); } -#endif +#endif /* __MINGW32__ */ int getpgrp(void) { return (0); } -#if defined(_MSC_VER) || defined(__GO32__) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) int getppid(void) { -#ifdef OS2 - PIDINFO PidInfo; - - DosGetPID(&PidInfo); - return(PidInfo.pidParent); -#else - return(0); -#endif + return (0); } -#endif +#endif /* __DJGPP__ || __MINGW32__ */ diff -Nru gawk-3.1.8+dfsg/pc/include/fcntl.h gawk-4.0.1+dfsg/pc/include/fcntl.h --- gawk-3.1.8+dfsg/pc/include/fcntl.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/fcntl.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/process.h gawk-4.0.1+dfsg/pc/include/process.h --- gawk-3.1.8+dfsg/pc/include/process.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/process.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/stdio.h gawk-4.0.1+dfsg/pc/include/stdio.h --- gawk-3.1.8+dfsg/pc/include/stdio.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/stdio.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/stdlib.h gawk-4.0.1+dfsg/pc/include/stdlib.h --- gawk-3.1.8+dfsg/pc/include/stdlib.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/stdlib.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/string.h gawk-4.0.1+dfsg/pc/include/string.h --- gawk-3.1.8+dfsg/pc/include/string.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/string.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/sys/stat.h gawk-4.0.1+dfsg/pc/include/sys/stat.h --- gawk-3.1.8+dfsg/pc/include/sys/stat.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/sys/stat.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/sys/types.h gawk-4.0.1+dfsg/pc/include/sys/types.h --- gawk-3.1.8+dfsg/pc/include/sys/types.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/sys/types.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/include/time.h gawk-4.0.1+dfsg/pc/include/time.h --- gawk-3.1.8+dfsg/pc/include/time.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/include/time.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -#undef __STDC__ -#include -#define __STDC__ 1 diff -Nru gawk-3.1.8+dfsg/pc/make-config.bat gawk-4.0.1+dfsg/pc/make-config.bat --- gawk-3.1.8+dfsg/pc/make-config.bat 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/make-config.bat 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,6 @@ +@echo off +sed -n -f configpk.sed < ..\configure.ac > tmp.sed +sed -f config.sed < ..\configh.in > config.tmp +sed -f tmp.sed < config.tmp > config.h +del tmp.sed +del config.tmp diff -Nru gawk-3.1.8+dfsg/pc/popen.c gawk-4.0.1+dfsg/pc/popen.c --- gawk-3.1.8+dfsg/pc/popen.c 2006-08-11 12:50:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/popen.c 2011-01-08 20:54:28.000000000 +0000 @@ -4,18 +4,6 @@ #include #include -#ifdef OS2 -#ifdef _MSC_VER -#define popen(c,m) _popen(c,m) -#define pclose(f) _pclose(f) -#endif -#endif - -#if defined(WIN32) && defined(_MSC_VER) -#define popen _popen -#define pclose _pclose -#endif - #ifndef _NFILE #define _NFILE 40 #endif @@ -36,7 +24,7 @@ * Currently, only MSC (running under DOS) and MINGW versions are managed. */ -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(__MINGW32__) static int unixshell(char *p) @@ -87,8 +75,10 @@ slashify(name, p); if (! (i = unixshell(p))) { char *p = (char *) realloc(name, strlen(name) + 5); - if (p == NULL) + if (p == NULL) { + free(cmd); return NULL; + } name = p; strcat(name, ".bat"); } @@ -98,10 +88,14 @@ if ((fp = fopen(p, i ? "wb" : "w")) != NULL) { if (! i) fputs("@echo off\n", fp); i = strlen(command); - if ((fwrite(command, 1, i, fp) < i) || (fputc('\n', fp) == EOF)) - cmd = NULL; - } else + if ((fwrite(command, 1, i, fp) < i) || (fputc('\n', fp) == EOF)) { + free(cmd); + cmd = NULL; + } + } else { + free(cmd); cmd = NULL; + } if (fp) fclose(fp); return(cmd); } @@ -125,11 +119,6 @@ int i; char *cmd1; -#if defined(OS2) - if (_osmode == OS2_MODE) - return(system(cmd)); -#endif - if ((cmd1 = scriptify(cmd)) == NULL) return(1); if (s = getenv("SHELL")) i = spawnlp(P_WAIT, s, s, cmd1 + strlen(s), NULL); @@ -138,7 +127,7 @@ unlink_and_free(cmd1); return(i); } -#else +#else /* !__MINGW32__ */ #define os_system(cmd) system(cmd) #endif @@ -150,20 +139,15 @@ char *name; int cur; char curmode[4]; -#if defined(__MINGW32__) || (defined(_MSC_VER) && defined(WIN32)) +#if defined(__MINGW32__) char *cmd; #endif - -#if defined(OS2) && (_MSC_VER != 510) - if (_osmode == OS2_MODE) - return(popen(command, mode)); -#endif if (*mode != 'r' && *mode != 'w') return NULL; strncpy(curmode, mode, 3); curmode[3] = '\0'; -#if defined(__MINGW32__) || (defined(_MSC_VER) && defined(WIN32)) +#if defined(__MINGW32__) current = popen(cmd = scriptify(command), mode); cur = fileno(current); strcpy(pipes[cur].pmode, curmode); @@ -211,12 +195,7 @@ int cur = fileno(current); int fd, rval; -#if defined(OS2) && (_MSC_VER != 510) - if (_osmode == OS2_MODE) - return(pclose(current)); -#endif - -#if defined(__MINGW32__) || (defined(_MSC_VER) && defined(WIN32)) +#if defined(__MINGW32__) rval = pclose(current); *pipes[cur].pmode = '\0'; unlink_and_free(pipes[cur].command); diff -Nru gawk-3.1.8+dfsg/pc/popen.h gawk-4.0.1+dfsg/pc/popen.h --- gawk-3.1.8+dfsg/pc/popen.h 2006-08-11 12:50:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/popen.h 2011-11-01 20:09:45.000000000 +0000 @@ -1,21 +1,17 @@ /* ** popen.h -- prototypes for pipe functions */ - -#if defined (OS2) && !defined(MSDOS) /* OS/2, but not family mode */ -# if defined (_MSC_VER) -# define popen(c, m) _popen(c, m) -# define pclose(f) _pclose(f) +#if !defined (__DJGPP__) +# if defined (popen) +# undef popen +# undef pclose # endif -#else -# if !defined (__GO32__) -# if defined (popen) -# undef popen -# undef pclose -# endif -# define popen(c, m) os_popen(c, m) -# define pclose(f) os_pclose(f) - extern FILE *os_popen( const char *, const char * ); - extern int os_pclose( FILE * ); -# endif -#endif +# define popen(c, m) os_popen(c, m) +# define pclose(f) os_pclose(f) + extern FILE *os_popen( const char *, const char * ); + extern int os_pclose( FILE * ); +# ifdef __MINGW32__ +# define system(c) os_system(c) + extern int os_system( const char * ); +# endif /* __MINGW32__ */ +#endif /* !__DJGPP__ */ diff -Nru gawk-3.1.8+dfsg/pc/testoutcmp.awk gawk-4.0.1+dfsg/pc/testoutcmp.awk --- gawk-3.1.8+dfsg/pc/testoutcmp.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/pc/testoutcmp.awk 2012-03-28 19:47:54.000000000 +0000 @@ -0,0 +1,57 @@ +# cmp replacement program for PC where the error messages aren't +# exactly the same. should run even on old awk +# +# Copyright (C) 2011 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +{ + if (FNR == NR) + file = 0 + else + file = 1 + gsub(/\r/, "", $0) + lines[file, FNR] = $0 +} + +END { + if (NR/2 != FNR) { + printf("testoutcmp: warning: files are not of equal length!\n") > "/dev/stderr" + exit 1 + } + + for (i = 1; i <= FNR; i++) { + good = lines[0, i] + actual = lines[1, i] + if (good == actual) + continue + + l = length(good) + if (substr(good, l, 1) == ")") + l-- + if (substr(good, 1, l) == substr(actual, 1, l)) + continue + else { + printf("%s and %s are not equal\n", ARGV[1], + ARGV[2]) > "/dev/stderr" + exit 1 + } + } + + exit 0 +} diff -Nru gawk-3.1.8+dfsg/po/ChangeLog gawk-4.0.1+dfsg/po/ChangeLog --- gawk-3.1.8+dfsg/po/ChangeLog 2010-05-06 17:55:50.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ChangeLog 2012-03-28 20:01:57.000000000 +0000 @@ -1,94 +1,21 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2011-07-17 Arnold D. Robbins - * Release 3.1.7: Release tar file made. + * Makefile.in.in (dist2): Remove README from list of files checked for + manually. Added in main directory's Makefile.am EXTRA_DIST, per + advice from Bruno Haible. -Mon Jun 8 23:12:09 2009 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * Makefile.in.in: Reinstate change of 2008.12.18. + * Makefile.in.in (dist2): Add README to list of files checked for + manually. + * 4.0.0: Remake the tar ball. -2009-06-08 gettextize - - * Makefile.in.in: Upgrade to gettext-0.17. - -Thu Dec 18 20:36:34 2008 Arnold D. Robbins - - * Makefile.in.in (install-dvi, install-ps): New targets that - do nothing, per email from "Stoddard, Isaac A" - . - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Mon Sep 10 12:41:34 2007 Arnold D. Robbins - - * All .po files: Updated to GPL 3. - -2007-01-08 gettextize - - * Makefile.in.in: Upgrade to gettext-0.16.1. - * Makevar.template: New file, copied in from gettext-0.16.1. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -2004-02-19 gettextize - - * Makefile.in.in: Upgrade to gettext-0.14.1. - * Rules-quot: Upgrade to gettext-0.14.1. - -2004-01-16 gettextize - - * Makefile.in.in: Upgrade to gettext-0.13.1. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -2003-06-16 gettextize - - * Makefile.in.in: Upgrade to gettext-0.12.1. - * Rules-quot: New file, from gettext-0.12.1. - * boldquot.sed: New file, from gettext-0.12.1. - * en@boldquot.header: New file, from gettext-0.12.1. - * en@quot.header: New file, from gettext-0.12.1. - * insert-header.sin: New file, from gettext-0.12.1. - * quot.sed: New file, from gettext-0.12.1. - -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 - - * Updated 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. - -2002-04-09 gettextize - - * Makefile.in.in: Upgrade to gettext-0.11.1. - * remove-potcdate.sin: New file, from gettext-0.11.1. +2011-06-23 Arnold D. Robbins + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/po/ChangeLog.0 gawk-4.0.1+dfsg/po/ChangeLog.0 --- gawk-3.1.8+dfsg/po/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ChangeLog.0 2011-06-08 19:14:37.000000000 +0000 @@ -0,0 +1,127 @@ +Wed Jun 8 22:14:07 2011 Arnold D. Robbins + + * sv.po, sv.gmo: Updated! + * LINGUAS: Updated and sorted. + +Thu May 19 17:10:07 2011 Arnold D. Robbins + + * LINGUAS: Updated and sorted. + +Wed May 18 21:45:31 2011 Arnold D. Robbins + + * LINGUAS: Updated and sorted. + +Sun May 1 20:32:10 2011 Arnold D. Robbins + + * LINGUAS: Removed all files not updated recently; some have been + abandoned all the way back to 2002. + * README: New file. + +Mon Mar 21 20:40:28 2011 Arnold D. Robbins + + * LINGUAS: Sorted. + +Fri Mar 18 12:01:21 2011 Arnold D. Robbins + + * fi.po, fi.gmo: New files. + * LINGUAS: Updated. + +2010-12-22 gettextize + + * Makefile.in.in: Upgrade to gettext-0.18.1. + * Rules-quot: Upgrade to gettext-0.18.1. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Mon Jun 8 23:12:09 2009 Arnold D. Robbins + + * Makefile.in.in: Reinstate change of 2008.12.18. + +2009-06-08 gettextize + + * Makefile.in.in: Upgrade to gettext-0.17. + +Thu Dec 18 20:36:34 2008 Arnold D. Robbins + + * Makefile.in.in (install-dvi, install-ps): New targets that + do nothing, per email from "Stoddard, Isaac A" + . + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Mon Sep 10 12:41:34 2007 Arnold D. Robbins + + * All .po files: Updated to GPL 3. + +2007-01-08 gettextize + + * Makefile.in.in: Upgrade to gettext-0.16.1. + * Makevar.template: New file, copied in from gettext-0.16.1. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +2004-02-19 gettextize + + * Makefile.in.in: Upgrade to gettext-0.14.1. + * Rules-quot: Upgrade to gettext-0.14.1. + +2004-01-16 gettextize + + * Makefile.in.in: Upgrade to gettext-0.13.1. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +2003-06-16 gettextize + + * Makefile.in.in: Upgrade to gettext-0.12.1. + * Rules-quot: New file, from gettext-0.12.1. + * boldquot.sed: New file, from gettext-0.12.1. + * en@boldquot.header: New file, from gettext-0.12.1. + * en@quot.header: New file, from gettext-0.12.1. + * insert-header.sin: New file, from gettext-0.12.1. + * quot.sed: New file, from gettext-0.12.1. + +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 + + * Updated 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. + +2002-04-09 gettextize + + * Makefile.in.in: Upgrade to gettext-0.11.1. + * remove-potcdate.sin: New file, from gettext-0.11.1. + diff -Nru gawk-3.1.8+dfsg/po/LINGUAS gawk-4.0.1+dfsg/po/LINGUAS --- gawk-3.1.8+dfsg/po/LINGUAS 2009-12-04 12:47:18.000000000 +0000 +++ gawk-4.0.1+dfsg/po/LINGUAS 2011-06-08 19:11:23.000000000 +0000 @@ -1,20 +1,10 @@ +da +de es +fi fr -he -id it -sv -tr -de -da -pt_BR -ca -pl ja -ro nl -rw -ga -vi -zh_CN -ast +pl +sv diff -Nru gawk-3.1.8+dfsg/po/Makefile.in.in gawk-4.0.1+dfsg/po/Makefile.in.in --- gawk-3.1.8+dfsg/po/Makefile.in.in 2009-06-08 20:11:52.000000000 +0000 +++ gawk-4.0.1+dfsg/po/Makefile.in.in 2011-11-01 20:09:45.000000000 +0000 @@ -1,5 +1,5 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper +# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -8,8 +8,8 @@ # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # -# Origin: gettext-0.17 -GETTEXT_MACRO_VERSION = 0.17 +# Origin: gettext-0.18 +GETTEXT_MACRO_VERSION = 0.18 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -88,8 +88,8 @@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ @@ -193,8 +193,15 @@ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -217,7 +224,6 @@ fi install-data-no: all install-data-yes: all - $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ @@ -269,7 +275,6 @@ fi installdirs-data-no: installdirs-data-yes: - $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ @@ -327,7 +332,7 @@ check: all -info dvi ps pdf html tags TAGS ctags CTAGS ID install-dvi install-ps: +info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed @@ -395,9 +400,15 @@ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ @@ -418,9 +429,13 @@ update-gmo: Makefile $(GMOFILES) @: +# Recreate Makefile by invoking config.status. Explicitly invoke the shell, +# because execution permission bits may not work on the current file system. +# Use @SHELL@, which is the shell determined by autoconf for the use by its +# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ - && $(SHELL) ./config.status $(subdir)/$@.in po-directories + && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: diff -Nru gawk-3.1.8+dfsg/po/README gawk-4.0.1+dfsg/po/README --- gawk-3.1.8+dfsg/po/README 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/po/README 2011-05-01 17:36:30.000000000 +0000 @@ -0,0 +1,15 @@ +Sun May 1 20:34:31 IDT 2011 +============================ + +For gawk 4.0, I have removed .po files that are not being maintained +from the distribution, since the code base has changed so much. + +The original files are still available from the gawk git repository +and/or from the translation project. If your language used to be supported +and no longer is, please consider updating the translation so that it +can be restored to the distribution. + +Thanks! + +Arnold Robbins +arnold@skeeve.com diff -Nru gawk-3.1.8+dfsg/po/Rules-quot gawk-4.0.1+dfsg/po/Rules-quot --- gawk-3.1.8+dfsg/po/Rules-quot 2009-06-08 20:07:44.000000000 +0000 +++ gawk-4.0.1+dfsg/po/Rules-quot 2010-12-22 19:09:06.000000000 +0000 @@ -20,7 +20,7 @@ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ - if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/ast.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/ast.gmo differ diff -Nru gawk-3.1.8+dfsg/po/ast.po gawk-4.0.1+dfsg/po/ast.po --- gawk-3.1.8+dfsg/po/ast.po 2010-05-06 17:57:38.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ast.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,1991 +0,0 @@ -# Mensajes en asturianu para gawk-3.1.7. -# Copyright (C) 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the gawk package. -# Marquinos , 2008. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk-3.1.7\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2009-12-17 16:31+0100\n" -"Last-Translator: Marquinos \n" -"Language-Team: Asturian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: array.c:112 -#, c-format -msgid "attempt to use function `%s' as an array" -msgstr "intentóse usar la función `%s' como una matriz" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "intentóse usar el parámetru escalar `%s' como una matriz" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "intentóse usar el datu escalar `%s' como una matriz" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "dende %s" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "referencia al elementu ensin anicializar `%s[\"%s\"]'" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "el subíndiz de la matriz `%s' ye la cadena nula" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: l'índiz `%s' nun ta na matriz `%s'" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: baleru (nulu)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: baleru (cero)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: tamañu_tabla = %d, tamañu_matriz = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: ye un parámetru\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: array_ref a %s\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "Los bloques %s deben tener una parte d'aición" - -#: awkgram.y:221 -msgid "each rule must have a pattern or an action part" -msgstr "cada regla tien de tener un patrón o una parte d'aición" - -#: awkgram.y:257 awkgram.y:266 -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "l'awk antiguu non almite múltiples regles `BEGIN' o `END'" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' ye una función interna, nun puede redefinise" - -#: awkgram.y:331 -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "" -"la constante d'espresión regular `//' paez un comentariu de C++, pero nun lo " -"ye" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "" -"la constante d'espresión regular `/%s/' paez un comentariu de C, pero nun lo " -"ye" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "la sentencia puede nun tener efeutu" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "usóse `%s' na aición %s" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' ye una estensión de gawk" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "usóse `return' fuera del contestu de la función" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"el `print' simple na regla BEGIN o END probablemente tien de ser `print \"\"'" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' ye una estensión de gawk" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete(array)' ye una estensión de gawk que nun ye tresportable" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "valores case duplicaos nel cuerpu d'un switch: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "Detectóse un `default' duplicáu nel cuerpo d'un switch" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "les llínies de trabayu de dos víes multiestáu non furrulen" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "espresión regular del lláu drechu d'una asignación" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "espresión regular a manzorga del operador `~' o `!~'" - -#: awkgram.y:830 awkgram.y:903 -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "" -"l'awk antiguu nun almite la pallabra contraseña `in' esceutu dempués de `for'" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "espresión regular a drecha d'una comparación" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "`getline' non redirixíu non definíu dientro de l'aición d'END" - -#: awkgram.y:904 -msgid "old awk does not support multidimensional arrays" -msgstr "l'awk antiguu nun almite matrices multidimensionales" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "la llamada de `length' ensin paréntesis nun ye tresportable" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "la llamada de `length' ensin paréntesis ta obsoleta por POSIX" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "usu d'una matriz que nun ye matriz" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "espresión de subíndiz non válida" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "nueva llinia o fin de la cadena inesperaos" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "testu de programa baleru na llinia de comandu" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "nun puede abrise'l ficheru fonte `%s' pa llectura (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "nun puede lleese'l ficheru fonte `%s' (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "el ficheru fonte `%s' ta baleru" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "el ficheru fonte nun fina con llinia nueva" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "espresión regular ensin finar fina con `\\` al final del ficheru" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" -"%s: %d: el modificador d'espresión regular `/.../%c` de tawk nun furrula en " -"gawk" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" -"el modificador d'espresión regular `/.../%c` de tawk nun furrula en gawk" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "espresión regular ensin finar" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "espresión regular ensin finar al final del ficheru" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "l'usu de la continuación de llinia `\\ #...' nun ye tresportable" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "la barra invertida nun ye'l caberu carauter na llinia" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX nun permite l'operador `**='" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "l'awk antiguu nun almite l'operador `**='" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX nun permite l'operador `**'" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "l'awk antiguu nun almite l'operador `**='" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "l'operador `^=' nun s'almite nel awk antiguu" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "l'operador `^' nun s'almite nel awk antiguu" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "cadena ensin finar" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "carauter '%c' non válidu na espresión" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' ye una estensión de gawk" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' ye una estensión de Bell Labs" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX non permite `%s'" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' nun s'almite nel awk antiguu" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "¡`goto' considerase permalu!\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d ye non válidu como númberu d'argumentos pa %s" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: el tercer argumentu ye una estensión de gawk" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: el lliteral de cadena como caberu argumentu de substitute nun tien efeutu" - -#: awkgram.y:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "el tercer argumentu de %s nun ye un oxetu que pueda camudase" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: el segundu argumentu ye una estensión de gawk" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"l'usu de dcgettext(_\\\"...\\\") ye incorreutu: quita'l subrayáu d'aniciu" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"l'usu de dcngettext(_\\\"...\\\") ye incorreutu: quita'l subrayáu d'aniciu" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "función `%s': parámetru #%d, `%s', duplica'l parámetru #%d" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "función `%s': parámetru `%s' anubre la variable global" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "nun puede abrir `%s' pa escritura (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "unvíase'l perfil a la salida standard de fallu" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: falló close (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "¡llamóse shadow_funcs() dos vegaes!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "hai variables anubríes." - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "" -"función `%s': nun puede usase un nome de función como nome de parámetru" - -#: awkgram.y:3004 -#, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "" -"función `%s': nun puede usar variable especial `%s' como parámetru de función" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "el nome de función `%s' definióse previamente" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "llamóse a la función `%s' pero enxamás se definió" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "definióse la función `%s' pero enxamás se llamó" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"la constante d'espresión regular pal parámetru #%d da un valor booleanu" - -#: awkgram.y:3245 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"llamóse la función `%s' con espaciu ente'l nome y el `(',\n" -"o usóse como una variable o una matriz" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "intentóse una división por cero en `/='" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "intentóse una división por cero en `%%'" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "falló %s a \"%s\" (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "salida standard" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "razón desconocía" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: recibióse un argumentu que nun ye un númberu" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: l'argumentu %g ta fuera de rangu" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "" -"fflush: nun puede llimpiase: abrióse la tubería `%s' pa llectura, non pa " -"escritura" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "" -"fflush: nun puede llimpiase: abrióse'l ficheru `%s' pa llectura, non pa " -"escritura" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: `%s' nun ye un ficheru abiertu, tubería o co-procesu" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "index: el primer argumentu recibíu nun ye una cadena" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: el segundu argumentu recibíu nun ye una cadena" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: recibióse un argumentu que nun ye un númberu" - -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "`length(array)' ye una estensión de gawk" - -#: builtin.c:471 -#, fuzzy -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "llonxitú: argumentu ensin tipu será forzáu a escalar" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "llonxitú: argumentu ensin tipu será forzáu a escalar" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: recibióse un argumentu que nun ye una cadena" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: recibióse un argumentu que nun ye un númberu" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: recibióse l'argumentu negativu %g" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "tien de usase `count$' en tolos formatos o en dengún" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "anchor de campu ye ignoráu por especificador `%%%%'" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "precisión ye ignorada por especificador `%%%%'" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "anchor campu y precisión ignoraos por especificador `%%%%'" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "nun se permite `$' nos formatos d'awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "la cuenta d'argumentos con `$' tien de ser > 0" - -#: builtin.c:853 -#, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "" -"la cuenta d'argumentos %ld ye mayor que'l númberu total d'argumentos " -"proporcionaos" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "nun se permite `$' dempués d'un puntu nel formatu" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "nun se proporciona `$' pal anchor o la precisión del campu posicional" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "`l' nun tien significáu nos formatos d'awk; descartase" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "nun se permite `l' nos formatos POSIX d'awk" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "`L' nun tien significáu nos formatos d'awk; descartase" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "nun se permite `L' nos formatos POSIX d'awk" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "`h' nun tien significáu nos formatos d'awk; descartase" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "nun se permite `h' nos formatos POSIX d'awk" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: el valor %g ta fuera del rangu pal formatu `%%%c'" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" -"ignorando caráuter desconocíu especificáu de formatu `%c': ensin argumentu " -"convertíu" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "nun hai suficientes argumentos pa satisfacer a la cadena de formatu" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "acabóse ^ pa esti" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: l'especificador de formatu nun tien lletres de control" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "proporcionaronse demasiaos argumentos pa la cadena de formatu" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: ensin argumentos" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: recibióse un argumentu que nun ye un númberu" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: llamóse col argumentu negativu %g" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: l'índiz d'aniciu %g nun ye válidu, usase 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: truncaráse l'índiz d'aniciu non enteru %g" - -#: builtin.c:1510 -#, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: el llargor %g nun ye >= 1" - -#: builtin.c:1512 -#, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: el llargor %g nun ye >= 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr: truncaráse'l llargor non enteru %g" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "" -"substr: el llargor %g ye enforma grande pa ser índiz de cadena, truncase a %g" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: la cadena d'orixe ye de llonxitú cero" - -#: builtin.c:1552 -#, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: l'índiz d'aniciu %g ta dempués del fin de la cadena" - -#: builtin.c:1560 -#, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"substr: la cadena %g nel índiz d'aniciu %g escede'l llargor del primer " -"argumentu (%lu)" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: el primer argumentu recibíu nun ye una cadena" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: recibióse una cadena de formatu vacía" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: recibióse un argumentu que nun ye una cadena" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: recibióse un argumentu que nun ye una cadena" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "referencia al campu ensin anicializar `$%d'" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: recibióse un argumentu que nun ye una cadena" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: recibióse un argumentu que nun ye una cadena" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: el primer argumentu recibíu nun ye un númberu" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: recibióse un argumentu que nun ye un númberu" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: recibió un argumentu que nun ye un númberu" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: recibió un argumentu que nun ye un númberu" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: el tercer argumentu nun ye una matriz" - -#: builtin.c:2744 -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: el tercer argumentu de 0 tratase como 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: el primer argumentu recibíu nun ye un númberu" - -#: builtin.c:2862 -msgid "lshift: received non-numeric second argument" -msgstr "lshift: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): los valores negativos darán resultaos raros" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): los valores fraccionarios truncaránse" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"lshift(%lf, %lf): un valor de desplazamientu mui grande dará resultaos raros" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: el primer argumentu recibíu nun ye un númberu" - -#: builtin.c:2900 -msgid "rshift: received non-numeric second argument" -msgstr "rshift: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): los valores negativos darán resultaos raros" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncaos" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"rshift(%lf, %lf): un valor de desplazamientu mui grande dará resultaos raros" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: el primer argumentu recibíu nun ye un númberu" - -#: builtin.c:2938 -msgid "and: received non-numeric second argument" -msgstr "and: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): los valores negativos darán resultaos raros" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): los valores fraccionarios serán truncaos" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: el primer argumentu recibíu nun ye un númberu" - -#: builtin.c:2974 -msgid "or: received non-numeric second argument" -msgstr "or: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): los valores negativos darán resultaos raros" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): los valores fraccionarios serán truncaos" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: el primer argumentu recibíu nun ye un númberu" - -#: builtin.c:3010 -msgid "xor: received non-numeric second argument" -msgstr "xor: el segundu argumentu recibíu nun ye un númberu" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): los valores negativos darán resultaos raros" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): los valores fraccionarios truncaránse" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: recibióse un argumentu que nun ye un númberu" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): el valor negativu dará resultaos raros" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): el valor fraccionario truncaráse" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' nun ye ua categoría llocal válida" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "triba de nodu %d desconocida" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "desbordamientu d'almacenamientu temporal en genflags2str" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "intentóse usar la matriz `%s' nun contestu escalar" - -#: eval.c:802 -#, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"ciclo for: la matriz `%s' camudó de tamañu de %ld a %ld durante la execución " -"del ciclu" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "`break' fuera d'un ciclu nun ye tresportable" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "nun se permite `break' fuera d'un ciclu" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' fuera d'un ciclu nun ye tresportable" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "nun se permite `continue' fuera d'un ciclu" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' nun puede llamase dende una regla BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' nun puede llamase dende una regla END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' nun puede llamase dende una regla BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' nun puede llamase dende una regla END" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "la declaración nun tien efeutu" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "nun puede usase'l nome de la función `%s' como variable o matriz" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referencia al argumentu ensin anicializar `%s'" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referencia a la variable ensin anicializar `%s'" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenación: ¡Los efectos llaterales nuna espresión camudarón la llonxitú " -"d'otra!" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "usóse una asignación nun contestu condicional" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "intentóse una división por cero" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "triba illegal (%s) en tree_eval" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "intentóse una división por cero en `/='" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "intentóse una división por cero en `%%='" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "llamóse a la función `%s' con más argumentos de los declaraos" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "la función `%s' nun ta definida" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Pila de Llamaes de Funciones:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- principal --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "intentóse una referencia de campu dende un valor que nun ye un númberu" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "intentóse una referencia dende una cadena nula" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "intentóse acceder al campu %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "nun se permite l'asignación como resultáu d'una función interna" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' ye una estensión de gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' ye una estensión de gawk" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "valor BINMODE `%s' nun ye válidu, tratáu como 3" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "especificación `%sFMT' `%s' errónea" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "desactivase `--lint' darréu d'una asignación a `LINT'" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "`extension' ye una estensión de gawk" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: nun puede abrise `%s' (%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "" -"extension: la biblioteca `%s': nun puede llamase a la función `%s' (%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "extension: falta'l nome de la función" - -#: ext.c:110 -#, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: caráuter illegal `%c' nel nome de la función `%s'" - -#: ext.c:116 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: nun puede redefinise la función `%s'" - -#: ext.c:120 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: la función `%s' ya ta definida" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" -"extension: nun puede usase la orde interna de gawk `%s' como nome de función" - -#: ext.c:127 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: el nome de función `%s' definióse previamente" - -#: ext.c:204 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "la función `%s' definióse pa tomar non más de %d argumentu(os)" - -#: ext.c:207 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "función `%s': falta l'argumentu #%d" - -#: ext.c:217 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "función `%s': argumentu #%d: intentóse usar un escalar como una matriz" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "función `%s': argumentu #%d: intentóse usar una matriz como un escalar" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Operación Non Sofitada" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF con un valor negativu" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: el segundu argumentu nun ye una matriz" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: la cadena nula pal tercer argumentu ye una estensión de gawk" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' ye una estensión gawk" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "valor de FIELDWIDTHS non válidu, cerca de `%s'" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "la cadena nula pa `FS' ye una estensión de gawk" - -#: field.c:1092 -msgid "old awk does not support regexps as value of `FS'" -msgstr "l'awk antiguu nun almite espresiones regulares como valor de `FS'" - -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: la opción '%s' ye ambigua\n" - -#: getopt.c:623 getopt.c:627 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: la opción '--%s' nun almite dengún argumentu\n" - -#: getopt.c:636 getopt.c:641 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: la opción '%c%s' nun almite dengún argumentu\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: la opción '%s' requier un argumentu\n" - -#: getopt.c:741 getopt.c:744 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: nun se reconoz la opción '--%s'\n" - -#: getopt.c:752 getopt.c:755 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: nun se reconoz la opción '%c%s'\n" - -#: getopt.c:804 getopt.c:807 -#, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opción non válida -- '%c'\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: la opción requier un argumentu -- '%c'\n" - -#: getopt.c:930 getopt.c:946 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: la opción '-W %s' ye ambigua\n" - -#: getopt.c:970 getopt.c:988 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: la opción '-W %s' nun almite dengún argumentu\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: la opción '%s' requier un argumentu\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "nun puede abrise'l ficheru `%s' pa llectura (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "falló al zarrar el df %d (`%s') (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "triba d'árbol %s non válidu en redirect()" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "la espresión na redirección `%s' namái tien un valor numbéricu" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "la espresión pa la redirección `%s' tien un valor de cadena nula" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"el ficheru `%s' pa la redirección `%s' puede ser resultáu d'una espresión " -"llógica" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "mezcla innecesaria de `>' y `>>' pal ficheru `%.*s'" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "nun puede abrise la tubería `%s' pa la salida (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "nun puede abrise la tubería `%s' pa la entrada (%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "nun puede abrise la tubería de dos víes `%s' pa entrada/salida (%s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "nun puede redirixise dende `%s' (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "nun puede redirixise a `%s' (%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"alcanzóse'l llímite del sistema pa ficheros abiertos: entamando a " -"multiplexar los descriptores de ficheru" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "falló al zarrar `%s' (%s)." - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "demasiaes tuberíes o ficheros d'entrada abiertos" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: el segundu argumentu tien de ser `to' o `from'" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: `%.*s' nun ye un ficheru abierto, tubería o co-procesu" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "zarráu d'una redirección qu'enxamás foi abierta" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: la redirección `%s' nun s'abre con `|&', ignoróse'l segundu argumentu" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "estáu de fallu (%d) al zarrar la tubería de `%s' (%s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "estáu de fallu (%d) al zarrar el ficheru de `%s' (%s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "nun se provee'l zarráu esplícitu del `socket' `%s'" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "nun se provee'l zarráu esplícitu del co-procesu `%s'" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "nun se provee'l zarráu esplícitu de la tubería `%s'" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "nun se provee'l zarráu explícitu del ficheru `%s'" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "fallu al escribir na salida standard (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "fallu al escribir na salida standard de fallu (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "falló la limpieza de la tubería de `%s' (%s)." - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "falló la limpieza del co-procesu de la tubería a `%s' (%s)." - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "falló la limpieza del ficheru de `%s' (%s)." - -#: io.c:1222 -#, c-format -msgid "local port %s invalid in `/inet'" -msgstr "puertu llocal %s non válidu en `/inet'" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "anfitrión remotu ya información de puertu (%s, %s) inválidos" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "perdón, el veceru /inet/raw nun ta llistu entá" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "namái root puede usar `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "perdón, el sirvidor /inet/raw nun ta llistu entá" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "" -"nun se proporciona dalgún protocolu (conocíu) nel nome de ficheru especial `%" -"s'" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "el nome de ficheru especial `%s' ta incompletu" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "tien d'apurrise a `/inet' un nome d'anfitrión remotu" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "tien d'apurrise a `/inet' un puertu remotu" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "Nun tan sofitaes comunicaciones TCP/IP" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "el ficheru `%s' ye un direutoriu" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "usa `PROCINFO[\\\"%s\\\"]' en llugar de `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "usa `PROCINFO[...]' en llugar de `/dev/user'" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "nun puede abrise `%s', mou `%s'" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "falló al zarrar el pty mayestru (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "falló al zarrar la salida standard nel fíu (%s)" - -#: io.c:1928 -#, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "" -"falló'l movimientu del pty esclavu a la salida standard nel fíu (dup: %s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "falló al zarrar la entrada standard nel fíu (%s)" - -#: io.c:1933 -#, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "" -"falló'l movimientu del pty esclavu a la entrada standard nel fíu (dup: %s)" - -#: io.c:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "falló al zarrar el pty esclavu (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "falló'l movimientu a la salida standard nel fíu (dup: %s)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "" -"falló'l movimiento de la tubería a la entrada standard nel fíu (dup: %s)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "falló la restauración de la salida standard nel procesu padre\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "falló la restauración de la entrada standard nel procesu padre\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "falló al zarrar la tubería (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&' nun sofitao" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "nun puede abrise la tubería `%s' (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "nun puede criase'l procesu fíu pa `%s' (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "el ficheru de datos `%s' ta baleru" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "nun puede reservase más memoria d'entrada" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "fallu al lleer el ficheru d'entrada `%s': %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "el valor multicarauter de `RS' ye una estensión de gawk" - -#: main.c:306 -msgid "out of memory" -msgstr "fuera de memoria" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "la opción -m[fr] ye irrelevante en gawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "usu de la opción -m: `-m[fr]' nnn" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: nun se reconoz la opción `-W %s', ignorase\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "ignorase l'argumentu baleru pa `--source'" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: la opción requier un argumentu -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "" -"la variable d'ambiente `POSIXLY_CORRECT' ta afitada: activase `--posix'" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' imponse a `--traditional'" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--posix'/`--traditional' imponense a `--non-decimal-data'" - -#: main.c:530 -#, c-format -msgid "running %s setuid root may be a security problem" -msgstr "executar %s como setuid root puede ser un problema de seguridá" - -#: main.c:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "nun puede afitase'l mou binariu na entrada standard (%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "nun puede afitase'l mou binariu na salida standard (%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "nun puede afitase'l mou binariu na salida standard de fallu (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "¡Non hai dengún programa de testu!" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"Mou d'emplegu: %s [opciones estilu POSIX o GNU] -f fichprog [--] " -"ficheru ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Mou d'emplegu: %s [opciones estilu POSIX o GNU] [--] %cprograma%c " -"ficheru ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opciones POSIX:\t\tOpciones llargues GNU:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fichprog\t\t--file=fichprog\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F sc\t\t\t--field-separator=sc\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=valor\t\t--assign=var=valor\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valor\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=ficheru]\t--dump-variables[=ficheru]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=ficheru\t\t--exec=ficheru\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=ficheru]\t--profile[=ficheru]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -# Esta es la llinia más larga de la llista de argumentos. -# Probar con gawk pa revisar tabuladores. cfuga -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=testu-prog\t--source=testu-prog\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t\\t-W usa-lc-numeric\\t--usa-lc-numeric\\n\n" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"Pa reportar bugs, consulta'l nodu `Bugs' en `gawk.info', el cual\n" -"correspuende a la seición `Reporting Problems and Bugs' na versión impresa.\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"gawk ye una llingua de reconocimientu y procesamientu de patrones.\n" -"Por omisión llee la entrada standard y escribe na salida standard.\n" -"\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -"Exemplos:\n" -"\tgawk '{ sum += $1 }; END { print sum }' ficheru\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" - -#: main.c:802 -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 "" -"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" - -#: main.c:813 -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft non afita FS a tabulador nel awk de POSIX" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" -"%s: l'argumentu `%s' pa `-v' nun ye de la forma `var=valor'\n" -"\n" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "`%s' nun ye un nome de variable llegal" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "`%s' nun ye un nome de variable, guetase'l ficheru `%s=%s'" - -#: main.c:1184 -msgid "floating point exception" -msgstr "escepción de coma flotante" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "fallu fatal: fallu internu" - -#: main.c:1206 -msgid "fatal error: internal error: segfault" -msgstr "fallu fatal: fallu internu: segfault" - -#: main.c:1218 -msgid "fatal error: internal error: stack overflow" -msgstr "fallu fatal: fallu internu: stack overflow" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "nun esiste'l df %d abiertu previamente" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "nun puede abrise previamente /dev/null pal df %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "nun pueden atopase los grupos: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "llinia ord.:" - -#: msg.c:120 -msgid "warning: " -msgstr "avisu: " - -#: msg.c:142 -msgid "error: " -msgstr "fallu: " - -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "nun puede convertise una cadena a coma flotante" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "barra invertida al final de la cadena" - -#: node.c:609 -#, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "l'awk antiguu nun almite la secuencia d'escape `\\%c'" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX nun permite escapes `\\x'" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "nun hai díxitos hexadecimales na secuencia d'escape `\\x'" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" -"carauteres hexadecimales d'escape \\x%.*s de %d carauteres probablemente nun " -"s'interpreten como esperes" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "la secuencia d'escape `\\%c' tratase como una simple `%c'" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': nun puede afitase close-on-exec: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "nun puede abrise `%s' pa escritura: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "fallu internu: %s con vname null" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# tratase internamente como `delete'" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# esta ye una función d'estensión cargada dinámicamente" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# perfil de gawk, criáu %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# bloque(s) BEGIN\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Regla(es)\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# bloque(s) END\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Funciones, enumberaes alfabéticamente\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "triba %s inesperada en prec_level" - -#: profile.c:1527 -#, c-format -msgid "Unknown node type %s in pp_var" -msgstr "triba de nodu %s desconocida en pp_var" - -#: regcomp.c:132 -msgid "Success" -msgstr "Ésitu" - -#: regcomp.c:135 -msgid "No match" -msgstr "Nun hai coincidencia" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Espresión regular non válida" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Carauter d'ordenación non válidu" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "Nome de clas de carauter non válidu" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Barra invertida extra al final" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Referencia p'atrás non válida" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "[ o [^ desemparexaos" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "( o \\( desemparexaos" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "\\{ desemparexáu" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Conteníu non válidu de \\{\\}" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Final de rangu non válidu" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Memoria escosada" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Espresión regular precedente non válida" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Fin prematuru de la espresión regular" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "La espresión regular ye enforma grande" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr ") o \\) desemparexaos" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Nun hai una espresión regular previa" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "nun puede abrise'l `socket' de dos víes `%s' pa entrada/salida (%s)" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opción illegal -- %c\n" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/ca.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/ca.gmo differ diff -Nru gawk-3.1.8+dfsg/po/ca.po gawk-4.0.1+dfsg/po/ca.po --- gawk-3.1.8+dfsg/po/ca.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ca.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2068 +0,0 @@ -# translation of gawk.po to Catalan -# Copyright (C) 2003 Free Software Foundation, Inc. -# Antoni Bella Perez , 2003. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.31\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2003-05-07 21:13+0100\n" -"Last-Translator: Antoni Bella Perez \n" -"Language-Team: Catalan \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.0.1\n" - -#: array.c:112 -#, fuzzy, c-format -msgid "attempt to use function `%s' as an array" -msgstr "s'ha intentat usar la funció «%s» com a una matriu" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "s'ha intentat usar un paràmetre escalar «%s» com a una matriu" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu" - -#: array.c:156 -#, fuzzy, c-format -msgid "from %s" -msgstr "%s (de %s)" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "referència a un element sense valor inicial «%s[\"%s\"]»" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "el subscript de la matriu «%s» és una cadena nul·la" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: l'índex «%s» no està en la matriu «%s»" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: buit (nul)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: buit (zero)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: mida_taula = %d, mida_matriu = %d\n" - -#: array.c:830 -#, fuzzy, c-format -msgid "%s: is parameter\n" -msgstr "%s: és un paràmetre\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: ref_matriu a %s\n" - -#: awkgram.y:218 -#, fuzzy, c-format -msgid "%s blocks must have an action part" -msgstr "Els blocs FINAL han de tindre una part d'acció" - -#: awkgram.y:221 -#, fuzzy -msgid "each rule must have a pattern or an action part" -msgstr "Els blocs FINAL han de tindre una part d'acció" - -#: awkgram.y:257 awkgram.y:266 -#, fuzzy -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "«%s» és una funció interna, no pot ser redefinida" - -#: awkgram.y:331 -#, fuzzy -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "" -"la constant d'expressió regular «/%s/» sembla un comentari en C, perà no ho és" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "" -"la constant d'expressió regular «/%s/» sembla un comentari en C, perà no ho és" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "la declaració podria no tindre efecte" - -#: awkgram.y:458 awkgram.y:482 -#, fuzzy, c-format -msgid "`%s' used in %s action" -msgstr "«next» és usat dintre de l'acció BEGIN o END" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "«nextfile» és una extensió de gawk" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "«return» és usat fora del context d'una funció" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"el «print» simple en la regla BEGIN o END probablement ha de ser «print \"\"»" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "«delete array» és una extensió de gawk" - -#: awkgram.y:572 awkgram.y:580 -#, fuzzy -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "«delete array» és una extensió de gawk" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "les canonades bidireccionals multi-etapes no funcionen" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "expressió regular a la dreta d'una assignació" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "expressió regular a l'esquerra de l'operador «~» o «!~»" - -#: awkgram.y:830 awkgram.y:903 -#, fuzzy -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "expressió regular a la derta de la comparació" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "«getline» no redirigit sense definir dintre de l'acció FINAL" - -#: awkgram.y:904 -#, fuzzy -msgid "old awk does not support multidimensional arrays" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "la crida de «length» sense parèntesis no és portable" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "la crida de «length» sense parèntesis està desaprovada per POSIX" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "expressió de subscript no vàlida" - -#: awkgram.y:1257 -#, fuzzy -msgid "unexpected newline or end of string" -msgstr "nova línia inesperada" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "el text del programa en la línia de comandaments està buit" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "no es pot obrir el fitxer font «%s» per a lectura (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "no es pot llegir el fitxer font «%s» (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "el fitxer font «%s» està buit" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "el fitxer font no finalitza amb un retorn de carro" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "expressió regular sense finalitzar acaba amb «\\» al final del fitxer" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "expressió regular sense finalitzar" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "expressió regular sense finalitzar al final del fitxer" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "l'ús de «\\ #...» com a continuació de línia no és portable" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "la barra invertida no és l'últim caràcter en la línia" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX no permet l'operador «**=»" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX no permet l'operador «**»" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "l'operador «^=» no està suportat en l'antic awk" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "l'operador «^» no està suportat en l'antic awk" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "cadena sense finalitzar" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "caràcter «%c» no vàlid en l'expressió" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "«%s» és una extensió de gawk" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "«%s» és una extensió de Bell Labs" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX no permet «%s»" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "«%s» no està suportat en l'antic awk" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "«goto» se considera nefast!\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d no és vàlid com a nombre d'arguments per a %s" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: el tercer argument és una extensió de gawk" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s: la cadena literal com a últim argument de substitució no té efecte" - -#: awkgram.y:2475 -#, fuzzy, c-format -msgid "%s third parameter is not a changeable object" -msgstr "sub: el tercer argument no és un objecte intercanviable" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: el segon argument és una extensió de gawk" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"l'ús de dcgettext(_\"...\") no és correcte: elimineu el guió baix inicial" - -#: awkgram.y:2530 -#, fuzzy -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"l'ús de dcgettext(_\"...\") no és correcte: elimineu el guió baix inicial" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "funció «%s»: paràmetre #%d, «%s», duplica al paràmetre #%d" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "funció «%s»: paràmetre «%s» ofusca la variable global" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "no es pot obrir «%s» per a escriptura (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "enviant el perfil a l'eixida d'error estàndard" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: tancament erroni (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() crida dos vegades!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "" - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre" - -#: awkgram.y:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "nom de la funció «%s» definida prèviament" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "es crida a la funció «%s» però no s'ha definit" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "es defineix la funció «%s» però no s'ha cridat mai" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"l'expressió regular constant per al paràmetre #%d condueix a un valor booleà" - -#: awkgram.y:3245 -#, fuzzy, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"s'ha cridat a la funció «%s» amb espai entre el nom i el «(»,\n" -"%s" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "s'ha intentat una divisió per zero en «/=»" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "s'ha intentat una divisió per zero en «%%»" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s a \"%s\" ha fallat (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "eixida estàndard" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "motiu desconegut" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: s'ha rebut un argument que no és un número" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: l'argument %g està fora de rang" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "" -"fflush: no es pot netejar: la canonada «%s» s'ha obert per a lectura, no per " -"a escriptura" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "" -"fflush: no es pot netejar: el fitxer «%s» s'ha obert per a lectura, no per a " -"escriptura" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: «%s» no és un fitxer obert, canonada o co-procés" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "índex: el primer argument rebut no és una cadena" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "índex: el segon argument rebut no és una cadena" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: s'ha rebut un argument no numèric" - -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "«delete array» és una extensió de gawk" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: s'ha rebut un argument que no és una cadena" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: s'ha rebut un argument no numèric" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: s'ha rebut l'argument negatiu %g" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "no es permeten «$» en els formats awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "el compte d'arguments amb «$» ha de ser > 0" - -#: builtin.c:853 -#, fuzzy, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "" -"el comte d'arguments %d és major que el nombre total d'arguments " -"proporcionats" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "no es permet «$» després d'un punt en el format" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "no es proporciona «$» per a l'ample o precisió del camp de posició" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "«l» manca de significat en els formats awk; serà ignorat" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "«l» no està permés en els formats POSIX de awk" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "«L» manca de significat en els formats awk; serà ignorat" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "«L» no està permés en els formats POSIX de awk" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "«h» manca de significat en els formats awk; serà ignorat" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "«h» no està permés en els formats POSIX de awk" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "no hi ha prou arguments per a satisfer el format d'una cadena" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ desbordament per a aquest" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: l'especificador de format no conté lletra de control" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "s'han proporcionat masses arguments per a la cadena de format" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: sense arguments" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: s'ha rebut un argument no numèric" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: cridat amb l'argument negatiu %g" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: l'índex d'inici %g no és vàlid, usant 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: l'índex d'inici no enter %g serà truncat" - -#: builtin.c:1510 -#, fuzzy, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: la longitud %g és <= 0" - -#: builtin.c:1512 -#, fuzzy, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: la longitud %g és <= 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr: la longitud sobre un nombre no enter %g serà truncada" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: la cadena font és de longitud zero" - -#: builtin.c:1552 -#, fuzzy, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: l'índex d'inici %d sobrepassa l'acabament de la cadena" - -#: builtin.c:1560 -#, fuzzy, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"substr: la longitud %d a l'índex d'inici %d excedeix la longitud del 1er " -"argument (%d)" - -#: builtin.c:1637 -#, fuzzy -msgid "strftime: received non-string first argument" -msgstr "strftime: el primer argument rebut no és una cadena" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: s'ha rebut una cadena de format buida" - -#: builtin.c:1652 -#, fuzzy -msgid "strftime: received non-numeric second argument" -msgstr "strftime: el segon argument rebut no és numèric" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: s'ha rebut un argument que no és una cadena" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -#, fuzzy -msgid "system: received non-string argument" -msgstr "system: s'ha rebut un argument que no és una cadena" - -#: builtin.c:1904 eval.c:2157 -#, fuzzy, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "referència a una variable sense inicialitzar «%s»" - -#: builtin.c:2009 -#, fuzzy -msgid "tolower: received non-string argument" -msgstr "tolower: s'ha rebut un argument que no és una cadena" - -#: builtin.c:2039 -#, fuzzy -msgid "toupper: received non-string argument" -msgstr "toupper: s'ha rebut un argument que no és una cadena" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: el primer argument rebut no és numèric" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: el segon argument rebut no és numèric" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: s'ha rebut un argument que no és numèric" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: s'ha rebut un argument que no és numèric" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: s'ha rebut un argument que no és numèric" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: el tercer argument no és una matriu" - -#: builtin.c:2744 -#, fuzzy -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: el tercer argument de 0 és tractat com a 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: el primer argument rebut no és numèric" - -#: builtin.c:2862 -#, fuzzy -msgid "lshift: received non-numeric second argument" -msgstr "atan2: el segon argument rebut no és numèric" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): els valors negatius donaran resultats estranys" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): els valors fraccionaris sernn truncats" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"lshift(%lf, %lf): un valor de desplaçament massa gran donarà resultats " -"estranys" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: el primer argument rebut no és numèric" - -#: builtin.c:2900 -#, fuzzy -msgid "rshift: received non-numeric second argument" -msgstr "atan2: el segon argument rebut no és numèric" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): els valors negatius donaran resultats estranys" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): els valors fraccionaris seran truncats" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"rshift(%lf, %lf): un valor de desplaçament massa gran donarà resultats " -"estranys" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: el primer argument rebut no és numèric" - -#: builtin.c:2938 -#, fuzzy -msgid "and: received non-numeric second argument" -msgstr "atan2: el segon argument rebut no és numèric" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): els valors negatius donaran resultats estranys" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): els valors fraccionaris seran truncats" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: el primer argument rebut no és numèric" - -#: builtin.c:2974 -#, fuzzy -msgid "or: received non-numeric second argument" -msgstr "atan2: el segon argument rebut no és numèric" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): els valors negatius donaran resultats estranys" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): els valors fraccionaris seran truncats" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: el primer argument rebut no és numèric" - -#: builtin.c:3010 -#, fuzzy -msgid "xor: received non-numeric second argument" -msgstr "atan2: el segon argument rebut no és numèric" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): els valors negatius donaran resultats estranys" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): els valors fraccionaris seran truncats" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: s'ha rebut un argument que no és numèric" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): el valor negatiu donarà resultats estranys" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): el valor fraccionari serà truncat" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: «%s» no és una categoria local vàlida" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "tipo de node %d desconegut" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "desbordament del cau temporal en genflags2str" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "s'ha intentat usar la matriu «%s» en un context escalar" - -#: eval.c:802 -#, fuzzy, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"bucle for: la matriu «%s» ha canviat de mida de %d a %d durant l'execució del " -"bucle" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "«break» a fora d'un bucle no és portable" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "no es permet «break» a fora d'un bucle" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "«continue» fora d'un bucle no és portable" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "no es permet «continue» a fora d'un bucle" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "«next» no es pot cridar des d'una regla BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "«next» no es pot cridar des d'una regla FINAL" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "«nextfile» no es pot cridar des d'una regla BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "«nextfile» no es pot cridar des d'una regla FINAL" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "la sentència no té efecte" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referència a un argument sense inicialitzar «%s»" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referència a una variable sense inicialitzar «%s»" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenació: els efectes colaterals en una expressió han canviat la " -"longitud d'una altra!" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "assignació usada en un context condicional" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "s'ha intentat una divisió per zero" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipus il·legal (%s) en tree_eval" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "s'ha intentat una divisió per zero en «/=»" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "s'ha intentat una divisió per zero en «%%=»" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "s'ha cridat a la funció «%s» amb més arguments dels declarats" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "la funció «%s» no està definida" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Pila de Crides a les Funcions:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- principal --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "s'ha intentat una referència de camp a partir d'un valor no numèric" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "s'ha intentat una referència a partir d'una cadena nul·la" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "s'ha intentat accedir al camp %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "" -"no es permet l'assignació per a obtindre un resultat d'una funció interna" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "«IGNORECASE» és una extensió de gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "«BINMODE» és una extensió de gawk" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "«%sFMT» especificació errònia «%s»" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "desactivant «--lint» degut a una assignació a «LINT»" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "«extension» és una extensió gawk" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: no es pot obrir «%s» (%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: biblioteca «%s»: no es pot cridar a la funció «%s» (%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "" - -#: ext.c:110 -#, fuzzy, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: biblioteca «%s»: no es pot cridar a la funció «%s» (%s)\n" - -#: ext.c:116 -#, fuzzy, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: no es pot obrir «%s» (%s)\n" - -#: ext.c:120 -#, fuzzy, c-format -msgid "extension: function `%s' already defined" -msgstr "la funció «%s» no està definida" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" - -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "nom de la funció «%s» definida prèviament" - -#: ext.c:204 -#, fuzzy, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "es defineix la funció «%s» però no s'ha cridat mai" - -#: ext.c:207 -#, fuzzy, c-format -msgid "function `%s': missing argument #%d" -msgstr "la funció «%s» no està definida" - -#: ext.c:217 -#, fuzzy, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Operació No Suportada" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF s'inicialitza sobre un valor negatiu" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: el segon argument no és una matriu" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: la cadena nul·la per al tercer argument és una extensió de gawk" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "«FIELDWIDTHS» és una extensió de gawk" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "la cadena nul·la per a «FS» és una extensió de gawk" - -#: field.c:1092 -#, fuzzy -msgid "old awk does not support regexps as value of `FS'" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: l'opció «%s» és ambigua\n" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: l'opció «--%s» no admet cap argument\n" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: l'opció «%c%s» no admet cap argument\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: l'opció «%s» requereix un argument\n" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: no es reconeix l'opció «--%s»\n" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: no es reconeix l'opció «%c%s»\n" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opció no vàlida -- %c\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: l'opció requereix un argument -- %c\n" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: l'opció «-W %s» és ambigua\n" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: l'opció «-W %s» no admet cap argument\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: l'opció «%s» requereix un argument\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "no es pot obrir el fitxer «%s» per a lectura (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "la finalització del descriptor fd %d («%s») ha fallat (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipus d'arbre %s no vàlid dintre de redirect()" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "l'expressió en la redirecció «%s» solt té un valor numèric" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "l'expressió per a la redirecció «%s» té un valor de cadena nul·la" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"el fitxer «%s» per a la redirecció «%s» pot ser resultat d'una expressió lògica" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "mescla innecessària de «>» i «>>» per al fitxer «%.*s»" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "no es pot obrir la canonada «%s» per a l'eixida (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "no es pot obrir la canonada «%s» per a l'entrada (%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "" -"no es pot obrir una canonada bidireccional «%s» per a les entrades/eixides (%" -"s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "no es pot redirigir des de «%s» (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "no es pot redirigir cap a «%s» (%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"s'ha arribat al límit del sistema per a fitxers oberts: es començarà a " -"multiplexar els descriptors de fitxer" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "la finalització de «%s» ha fallat (%s)" - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "masses canonades o fitxers d'entrada oberts" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: el segon argument hauria de ser «to» o «from»" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: «%.*s» no és un fitxer obert, canonada o co-procés" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "finalització d'una redirecció que no s'ha obert" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "close: la redirecció «%s» no s'obre amb «|&», s'ignora el segon argument" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "estaus de falla (%d) en la finalització de la canonada «%s» (%s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "estatus de falla (%d) en la finalització del fitxer «%s» (%s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "no s'aporta la finalització explícita del socket «%s»" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "no s'aporta la finalització explícita del co-procés «%s»" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "no s'aporta la finalització explícita de la canonada «%s»" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "no s'aporta la finalització explícita del fitxer «%s»" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "error a l'escriure en l'eixida estàndard (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "error a l'escriure en l'eixida d'error estàndard (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "la neteja de la canonada de «%sx» ha fallat (%s)." - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "la neteja de la canonada per al co-procés de «%sx» ha fallat (%s)." - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "la neteja del fitxer «%sx» ha fallat (%s)." - -#: io.c:1222 -#, fuzzy, c-format -msgid "local port %s invalid in `/inet'" -msgstr "port local no vàlid en «%s»" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "el client /inet/raw encara no està a punt, ho sento" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "sols el root pot usar «/inet/raw»." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "el servidor /inet/raw encara no està a punt, ho sento" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "no s'aporta cap protocol (conegut) en el nom del fitxer especial «%s»" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "el nom del fitxer especial «%s» està incomplet" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "s'ha de subministrar un nom de sistema remot a «/inet»" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "s'ha de subministrar un port remot a «/inet»" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "les comunicacions TCP/IP no estan suportades" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "el fitxer «%s» és un directori" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "useu «PROCINFO[\"%s\"]» en comptes de «%s»" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "useu «PROCINFO[...]» en comptes de «/dev/user»" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "no es pot obrir «%s», mode «%s»" - -#: io.c:1923 -#, fuzzy, c-format -msgid "close of master pty failed (%s)" -msgstr "ha fallat la finalització de la canonada (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "" -"ha fallat la finalització de l'eixida estàndard en els processos fills (%s)" - -#: io.c:1928 -#, fuzzy, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "" -"ha fallat la redirecció cap a l'eixida estàndard dels processos fills (dup: %" -"s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "" -"ha fallat la finalització de l'entrada estàndard en els processos fills (%s)" - -#: io.c:1933 -#, fuzzy, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "" -"ha fallat la redirecció cap a l'entrada estàndard dels processos fills (dup: " -"%s)" - -#: io.c:1935 io.c:1954 -#, fuzzy, c-format -msgid "close of slave pty failed (%s)" -msgstr "ha fallat la finalització de la canonada (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "" -"ha fallat la redirecció cap a l'eixida estàndard dels processos fills (dup: %" -"s)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "" -"ha fallat la redirecció cap a l'entrada estàndard dels processos fills (dup: " -"%s)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "ha fallat la restauració de l'eixida estàndard en el procés pare\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "ha fallat la restauració de l'entrada estàndard en el procés pare\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "ha fallat la finalització de la canonada (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "«|&» no està suportat" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "no es pot obrir la canonada «%s» (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "no es pot crear el procés fill per a «%s» (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "el fitxer de dades «%s» està buit" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "error en llegir el fitxer d'entrada «%s»: %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "el valor multicaràcter de «RS» és una extensió de gawk" - -#: main.c:306 -msgid "out of memory" -msgstr "memòria esgotada" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "l'opción «-m[fr]» és irrellevant en gawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "ús de l'opció -m: «-m[fr] nnn»" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: no es reconeix l'opció «-W %s», serà ignorada\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "s'igonarà l'argument buit per a l'opció «--source»" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: l'opció requereix un argument -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "la variable d'entorn «POSIXLY_CORRECT» està establerta: usant «--posix»" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "«--posix» solapa a «--traditional»" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "«--posix» i «--traditional» solapen a «--non-decimal-data»" - -#: main.c:530 -#, fuzzy, c-format -msgid "running %s setuid root may be a security problem" -msgstr "executar %s com a setuid root pot ser un problema de seguretat" - -#: main.c:571 -#, fuzzy, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "no es pot establir el mode en l'entrada estàndard (%s)" - -#: main.c:574 -#, fuzzy, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "no es pot establir el mode en l'eixida estàndard (%s)" - -#: main.c:576 -#, fuzzy, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "no es pot establir el mode en l'eixida d'error estàndard (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "no hi ha cap text per al programa!" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "Ús: %s [opcions d'estil POSIX o GNU] -f fitx_prog [--] fitxer ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "Ús: %s [opcions d'estil POSIX o GNU] [--] %cprograma%c fitxer ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opcions POSIX:\t\tOpcions llargues GNU:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fitx_prog\t\t--file=fitx_prog\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs (fs=sep_camp)\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=valor\t\t--assign=var=valor\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valor\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=fitxer] --dump-variables[=fitxer]\n" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W profile[=fitxer]\t--profile[=fitxer]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=fitxer]\t--profile[=fitxer]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=text_prog\t--source=text_prog\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -#, 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 "a la secció «Reporting Problems and Bugs» de la versió impresa.\n" - -#: main.c:770 -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:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" - -#: main.c:794 -#, fuzzy, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Copyright (C) 1989, 1991-%d Free Software Foundation.\n" -"\n" -"Aquest programa és programari lliure; pot redistribuir-se i/o modificar-se\n" -"sota els termes de la Llicència Pública General de GNU tal i como està\n" -"publicada per la Free Software Foundation; ja siga en la versió 2 de la\n" -"Llicència, o (a la vostra elecció) qualsevol versió posterior.\n" -"\n" - -#: main.c:802 -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 "" -"Aquest programa es distribueix amb l'esperança de que serà d'utilitat,\n" -"però SENSE CAP GARANTIA; fins i tot sense la garantia implícita de\n" -"COMERCIABILITAT o IDONEÏTAT PER A UN PROPÒSIT EN PARTICULAR.\n" -"Per a més detalls consulteu la Llicència Pública General de GNU.\n" -"\n" - -#: main.c:813 -#, fuzzy -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"Junt amb aquest programa hauríeu d'haber rebut una còpia de la Llicència\n" -"Pública General de GNU; si no és així, escriviu a la Free Software\n" -"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft no permet inicialitzar FS a un tabulador en la versió POSIX de awk" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "" - -#: main.c:1184 -msgid "floating point exception" -msgstr "excepció de coma flotant" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "error fatal: error intern" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "error fatal: error intern" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "error fatal: error intern" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "no s'ha pre-obert el descriptor fd per a %d" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "no es pot pre-obrir /dev/null per al descriptor fd %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "no es poden trobar els grups: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "línia cmd.:" - -#: msg.c:120 -msgid "warning: " -msgstr "ADVERTIMENT: " - -#: msg.c:142 -msgid "error: " -msgstr "Error: " - -#: msg.c:178 -msgid "fatal: " -msgstr "Fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "no es pot convertir la cadena a coma flotant" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "barra invertida al final de la cadena" - -#: node.c:609 -#, fuzzy, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "l'antic awk no suporta l'operador «**=»" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX no permet seqüències d'escapada «\\x»" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "no hi ha dígits hexadecimals en la seqüència d'escapada «\\x»" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "la seqüència d'escapada «\\%c» és tractada com a una simple «%c»" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s «%s»: no es pot inicialitzar close-on-exec: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "no es pot obrir «%s» per a escriptura: %s" - -#: profile.c:457 -#, fuzzy, c-format -msgid "internal error: %s with null vname" -msgstr "error intern: Node_var amb vname nul" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# perfil gawk, creat %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# Bloc(s) INICI\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Regla(es)\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# Bloc(s) FINAL\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Funcions, llistades alfabèticament\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "tipus %s inesperat en prec_level" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "tipo de node %d desconegut" - -#: regcomp.c:132 -msgid "Success" -msgstr "Èxit" - -#: regcomp.c:135 -msgid "No match" -msgstr "No hi ha concordança" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Expressió regular no vàlida" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Caràcter de comparació no vàlid" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "Nom de classe de caràcters no vàlid" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Barra invertida extra al final" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Referència cap enradera no vàlida" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "[ o [^ desemparellats" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "( o \\( desemparellats" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "\\{ desemparellat" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Contingut no vàlid de \\{\\}" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Final de rang no vàlid" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Memòria exhaurida" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Expressió regular precedent no vàlida" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Fí prematura de l'expressió regular" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "L'expressió regular és massa gran" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr ") o \\) desemparellats" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "No hi ha una expressió regular prèvia" - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: ús il·legal de la variable «%s» com a una matriu" - -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: el primer argument no és una matriu" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: el segon argument no és una matriu" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opció il·legal -- %c\n" - -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" -#~ msgstr "" -#~ "\n" -#~ "Per a informar d'errors, consulteu el node «Bugs» en «gawk.info», que està\n" - -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "sintaxi no vàlida en el nom «%s» per a l'asignació de la variable" - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "error intern: Node_var_array amb vname nul" - -#~ msgid "or used in other expression context" -#~ msgstr "o s'ha emprat en un altre context de l'expressió" - -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "«%s» és una funció, l'assignació no és permesa" - -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "Els blocs INICI han de tindre una part d'acció" - -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "«nextfile» és usat dintre de l'acció BEGIN o END" - -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "«getline» no redirigit sense definir dintre de l'acció BEGIN o END" - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x no està en la taula de referència\n" - -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "gsub: el tercer argument no és un objecte intercanviable" - -#~ msgid "Unfinished \\ escape" -#~ msgstr "seqüència d'escapada \\ sense finalitzar" - -#~ msgid "unfinished repeat count" -#~ msgstr "repetició del comptador sense finalitzar" - -#~ msgid "malformed repeat count" -#~ msgstr "repetició del comptador malformada" - -#~ msgid "Unbalanced [" -#~ msgstr "[ sense aparellar" - -#~ msgid "Unbalanced (" -#~ msgstr "( sense aparellar" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "No s'especifiquen els bits de sintaxi de l'expressió regular" - -#~ msgid "Unbalanced )" -#~ msgstr ") sense aparellar" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "el camp %d en FIELDWIDTHS, hauria de ser > 0" - -#~ msgid "function %s called\n" -#~ msgstr "s'ha cridat a la funció %s\n" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "" -#~ "no es pot obrir un socket bidireccional «%s» per a les entrades/eixides (%" -#~ "s)" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "port remot no vàlid en «%s»" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "error intern: fitxer «%s», línia %d\n" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/da.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/da.gmo differ diff -Nru gawk-3.1.8+dfsg/po/da.po gawk-4.0.1+dfsg/po/da.po --- gawk-3.1.8+dfsg/po/da.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/da.po 2012-03-28 20:03:46.000000000 +0000 @@ -1,1679 +1,1846 @@ # Danish translation of gawk # Copyright (C) 2001 Free Software Foundation, Inc. -# Keld Simonsen , 2002. -# +# This file is distributed under the same license as the gawk package. +# Martin Sjögren , 2001-2002. +# Christer Andersson , 2007. +# Keld Simonsen , 2002,2011,2012. +# Review by Torben Grøn Helligsø , 2011. +# Review by Ask Hjorth Larsen , 2011. msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.31\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2002-11-09 10:09+0100\n" -"Last-Translator: Keld Simonsen \n" -"Language-Team: Danish \n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-02-06 10:37+0100\n" +"Last-Translator: Keld Simonsen \n" +"Language-Team: Danish \n" +"Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: array.c:112 -#, fuzzy, c-format +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "fra %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "forsøg på at bruge en skalar som array" + +#: array.c:251 +#, c-format msgid "attempt to use function `%s' as an array" -msgstr "forsøg på at bruge funktionen \"%s\" som vektor" +msgstr "forsøg på at bruge funktionen '%s' som et array" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" -msgstr "forsøg på at bruge skalarparameteren \"%s\" som en vektor" +msgstr "forsøg på at bruge skalarparameteren '%s' som et array" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "forsøg på at bruge skalaren \"%s\" som vektor" +msgid "attempt to use scalar `%s' as an array" +msgstr "forsøg på at bruge skalar '%s' som et array" -#: array.c:156 -#, fuzzy, c-format -msgid "from %s" -msgstr "%s (fra %s)" +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "forsøg på at bruge array '%s' i skalarsammenhæng" #: array.c:513 -#, fuzzy, c-format +#, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "reference til ikke-initieret element \"%s[\"%s\"]\"" +msgstr "reference til ikke-initieret element '%s[\"%.*s\"]'" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" -msgstr "indeks i vektoren \"%s\" er en tom streng" +msgstr "indeks i array '%s' er en tom streng" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" -msgstr "delete: indeks \"%s\" findes ikke i vektoren \"%s\"" +msgstr "delete: indeks '%s' findes ikke i array '%s'" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "forsøg på at bruge skalaren '%s[\"%.*s\"]' som array" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" -msgstr "%s: tom (nil)\n" +msgstr "%s: tom (null)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (nul)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: tabelstørrelse = %d, vektorstørrelse = %d\n" +msgstr "%s: tabelstørrelse = %d, arraystørrelse = %d\n" -#: array.c:830 -#, fuzzy, c-format +#: array.c:954 +#, c-format msgid "%s: is parameter\n" -msgstr "%s: er en parameter\n" +msgstr "%s: er parameter\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" -msgstr "%s: vektorreference til %s\n" +msgstr "%s: arrayreference til %s\n" -#: awkgram.y:218 -#, fuzzy, c-format +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: argument er ikke et array" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: andet argument er ikke et array" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: andet argument er ikke et array" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: første argument er ikke et array" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: første argument er ikke et array" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: kan ikke bruge et underarray af første argument for andet argument" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: kan ikke bruge et underarray af første argument for andet argument" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: kan ikke bruge et underarray af andet argument for første argument" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: kan ikke bruge et underarray af andet argument for første argument" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "'%s' er ugyldigt som funktionsnavn" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "funktionen for sorteringssammenligning '%s' er ikke defineret" + +#: awkgram.y:249 +#, c-format msgid "%s blocks must have an action part" -msgstr "END-blok skal have en handlingsdel" +msgstr "%s-blokke skal have en handlingsdel" -#: awkgram.y:221 -#, fuzzy +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" -msgstr "END-blok skal have en handlingsdel" +msgstr "hver regel skal have et mønster eller en handlingsdel" -#: awkgram.y:257 awkgram.y:266 -#, fuzzy +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "gamle awk understøtter ikke operatoren \"**\"" +msgstr "" +"gamle versioner af awk understøtter ikke flere 'BEGIN'- eller 'END'-regler" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "\"%s\" er en indbygget funktion, den kan ikke omdefineres" +msgstr "'%s' er en indbygget funktion, den kan ikke omdefineres" -#: awkgram.y:331 -#, fuzzy +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "regexp-konstanten \"/%s/\" ser ud som en C-kommentar, men er det ikke" +msgstr "regexp-konstanten '//' ser ud som en C++-kommentar, men er det ikke" -#: awkgram.y:334 +#: awkgram.y:436 #, 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" +msgstr "regexp-konstanten '/%s/' ser ud som en C-kommentar, men er det ikke" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "kommandoen har måske ikke nogen effekt" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "dublet case-værdier i switch-krop %s" -#: awkgram.y:458 awkgram.y:482 -#, fuzzy, c-format -msgid "`%s' used in %s action" -msgstr "\"next\" brugt i BEGIN- eller END-handling" +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "dublet 'default' opdaget i switch-krop" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "'break' uden for en løkke eller switch er ikke tilladt" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "'continue' uden for en løkke er ikke tilladt" + +#: awkgram.y:828 +#, c-format +msgid "`next' used in %s action" +msgstr "'next' brugt i %s-handling" + +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" -msgstr "\"nextfile\" er en gawk-udvidelse" +msgstr "'nextfile' er en gawk-udvidelse" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "'nextfile' brugt i %s-handling" + +#: awkgram.y:865 msgid "`return' used outside function context" -msgstr "\"return\" brugt uden for funktion" +msgstr "'return' brugt uden for funktion" -#: awkgram.y:534 +#: awkgram.y:925 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 \"\"'" +"alenestående 'print' i BEGIN eller END-regel skulle muligvis være 'print " +"\"\"'" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" -msgstr "\"delete array\" er en gawk-udvidelse" +msgstr "'delete array' er en gawk-udvidelse" -#: awkgram.y:572 awkgram.y:580 -#, fuzzy +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" -msgstr "\"delete array\" er en gawk-udvidelse" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" +msgstr "'delete array' er en ikke-portabel udvidelse fra tawk" -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "flertrins dobbeltrettede datakanaler fungerer ikke" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "regulært udtryk i højreleddet af en tildeling" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" -msgstr "regulært udtryk på venstre side af en \"~\"- eller \"!~\"-operator" +msgstr "regulært udtryk på venstre side af en '~'- eller '!~'-operator" -#: awkgram.y:830 awkgram.y:903 -#, fuzzy +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" -msgstr "gamle awk understøtter ikke operatoren \"**\"" +msgstr "" +"gamle versioner af awk understøtter ikke nøgleordet 'in' undtagen efter 'for'" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "regulært udtryk i højreleddet af en sammenligning" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "'getline var' ugyldig inden i '%s' regel" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "'getline' ugyldig inden i '%s' regel" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" -msgstr "ikke-omdirigeret \"getline\" udefineret inde i END-handling" +msgstr "ikke-omdirigeret 'getline' udefineret inden i END-handling" -#: awkgram.y:904 -#, fuzzy +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" -msgstr "gamle awk understøtter ikke operatoren \"**\"" +msgstr "gamle versioner af awk understøtter ikke flerdimensionale array" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" -msgstr "kald af \"length\" uden parenteser er ikke portabelt" +msgstr "kald af 'length' uden parenteser er ikke portabelt" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "kald af \"length\" uden parenteser er forældet ifølge POSIX" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "indirekte funktionskald er en gawk-udvidelse" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "kan ikke bruge specialvariabel '%s' til indirekte funktionskald" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" -msgstr "ugyldig indeksudtryk" +msgstr "ugyldigt indeksudtryk" -#: awkgram.y:1257 -#, fuzzy -msgid "unexpected newline or end of string" -msgstr "uventet nylinjetegn" +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "brug af ikke-array som array" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "tom programtekst på kommandolinjen" +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "advarsel: " -#: awkgram.y:1430 +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "fatal: " + +#: awkgram.y:2043 +msgid "unexpected newline or end of string" +msgstr "uventet nylinjetegn eller strengafslutning" + +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" -msgstr "kan ikke åbne kildefilen \"%s\" for læsning (%s)" +msgstr "kan ikke åbne kildefilen '%s' for læsning (%s)" + +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "ukendt årsag" -#: awkgram.y:1528 +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "allerede inkluderet kildefil '%s'" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include er en gawk-udvidelse" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "tomt filnavn efter @include" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "tom programtekst på kommandolinjen" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" -msgstr "kan ikke læse kildefilen \"%s\" (%s)" +msgstr "kan ikke læse kildefilen '%s' (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" -msgstr "kildefilen \"%s\" er tom" +msgstr "kildefilen '%s' er tom" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "kildefilen slutter ikke med en ny linje" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" -msgstr "uafsluttet regulært udtryk slutter med \"\\\" i slutningen af filen" +msgstr "uafsluttet regulært udtryk slutter med '\\' i slutningen af filen" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" +msgstr "%s: %d: regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" +msgstr "regex-ændringstegn '/.../%c' fra tawk virker ikke i gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "uafsluttet regulært udtryk" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "uafsluttet regulært udtryk i slutningen af filen" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" -msgstr "Brug af \"\\ #...\" for linjefortsættelse er ikke portabelt" +msgstr "brug af '\\ #...' for linjefortsættelse er ikke portabelt" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "sidste tegn på linjen er ikke en omvendt skråstreg" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" -msgstr "POSIX tillader ikke operatoren \"**=\"" +msgstr "POSIX tillader ikke operatoren '**='" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" -msgstr "gamle awk understøtter ikke operatoren \"**=\"" +msgstr "gamle versioner af awk understøtter ikke operatoren '**='" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" -msgstr "POSIX tillader ikke operatoren \"**\"" +msgstr "POSIX tillader ikke operatoren '**'" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" -msgstr "gamle awk understøtter ikke operatoren \"**\"" +msgstr "gamle versioner af awk understøtter ikke operatoren '**'" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" -msgstr "operatoren \"^=\" understøttes ikke i gamle awk" +msgstr "operatoren '^=' understøttes ikke i gamle versioner af awk" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" -msgstr "operatoren \"^\" understøttes ikke i gamle awk" +msgstr "operatoren '^' understøttes ikke i gamle versioner af awk" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "uafsluttet streng" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" -msgstr "ugyldigt tegn \"%c\" i udtryk" +msgstr "ugyldigt tegn '%c' i udtryk" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" -msgstr "\"%s\" er en gawk-udvidelse" +msgstr "'%s' er en gawk-udvidelse" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" -msgstr "\"%s\" er en Bell Labs-udvidelse" +msgstr "'%s' er en Bell Labs-udvidelse" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" -msgstr "POSIX tillader ikke \"%s\"" +msgstr "POSIX tillader ikke '%s'" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" -msgstr "\"%s\" understøttes ikke i gamle awk" +msgstr "'%s' understøttes ikke i gamle versioner af awk" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" -msgstr "\"goto\" anses for skadlig!\n" +msgstr "'goto' anses for skadelig!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d er et ugyldigt antal argumenter for %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: tredje argument er en gawk-udvidelse" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, 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:2475 -#, fuzzy, c-format +#: awkgram.y:3659 +#, c-format msgid "%s third parameter is not a changeable object" -msgstr "sub: tredje argument er ikke et ændringsbart objekt" +msgstr "%s: tredje argument er ikke et ændringsbart objekt" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: tredje argument er en gawk-udvidelse" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: andet argument er en gawk-udvidelse" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -"brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende " +"brug af dcgettext(_\"...\") er forkert: fjern det indledende " "understregningstegn" -#: awkgram.y:2530 -#, fuzzy +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -"brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende " +"brug af dcgettext(_\"...\") er forkert: fjern det indledende " "understregningstegn" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "funktionen \"%s\": parameter %d, \"%s\", er samme som parameter %d" +msgstr "funktionen '%s': parameter %d, '%s', er samme som parameter %d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" -msgstr "funktionen \"%s\": parameteren \"%s\" overskygger en global variabel" +msgstr "funktionen '%s': parameteren '%s' overskygger en global variabel" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" -msgstr "kunne ikke åbne \"%s\" for skrivning (%s)" +msgstr "kunne ikke åbne '%s' for skrivning (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "sender profilen til standard fejl" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "sender variabelliste til standard fejl" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" -msgstr "%s: mislykkedes at lukke (%s)" +msgstr "%s: lukning mislykkedes (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() kaldt to gange!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." -msgstr "" +msgstr "der var skyggede variable." -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" -msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn" +msgstr "funktionen '%s': kan ikke bruge funktionsnavn som parameternavn" -#: awkgram.y:3004 -#, fuzzy, c-format +#: awkgram.y:4210 +#, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn" +msgstr "" +"funktionen '%s': kan ikke bruge specialvariabel '%s' som en " +"funktionsparameter" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" -msgstr "funktionsnavnet \"%s\" er allerede defineret" +msgstr "funktionsnavnet '%s' er allerede defineret" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" -msgstr "funktionen \"%s\" kaldt, men aldrig defineret" +msgstr "funktionen '%s' kaldt, men aldrig defineret" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "funktionen \"%s\" defineret, men aldrig kaldt" +msgid "function `%s' defined but never called directly" +msgstr "funktionen '%s' defineret, men aldrig kaldt direkte" -#: awkgram.y:3201 +#: awkgram.y:4435 #, 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:3245 -#, fuzzy, c-format +#: awkgram.y:4544 +#, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -"funktionen \"%s\" kaldt med blanktegn mellem navnet og \"(\",\n" -"%s" +"funktionen '%s' kaldt med blanktegn mellem navnet og '(',\n" +"eller brugt som en variabel eller et array" -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "forsøgte at dividere med nul i \"/=\"" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "forsøgte at dividere med nul" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" -msgstr "forsøgte at dividere med nul i \"%%\"" +msgstr "forsøgte at dividere med nul i '%%'" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" -msgstr "%s til \"%s\" mislykkedes (%s)" +msgstr "%s til '%s' mislykkedes (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "standard ud" -#: builtin.c:124 -msgid "reason unknown" -msgstr "ukendt årsag" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: fik et ikke-numerisk argument" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" -msgstr "exp: argumentet %g er uden for tilladt område" +msgstr "exp: argumentet %g er uden for det tilladte område" -#: builtin.c:201 +#: builtin.c:200 #, 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" +"fflush: kan ikke rense: datakanalen '%s' åbnet for læsning, ikke skrivning" -#: builtin.c:204 +#: builtin.c:203 #, 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" +msgstr "fflush: kan ikke rense: filen '%s' åbnet for læsning, ikke skrivning" -#: builtin.c:216 +#: builtin.c:215 #, 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" +msgstr "fflush: '%s' er ikke en åben fil, datakanal eller ko-proces" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "indeks: første argument er ikke en streng" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "indeks: andet argument er ikke en streng" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: fik et ikke-numerisk argument" -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "\"delete array\" er en gawk-udvidelse" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: fik et array-argument" -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" +msgstr "'length(array)' er en gawk-udvidelse" -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length: fik et argument som ikke er en streng" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: fik et ikke-numerisk argument" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: fik et negativt argument %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "fatal: skal bruge 'count$' på alle formater eller ikke nogen" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" +msgid "field width is ignored for `%%' specifier" +msgstr "feltbredde ignoreret for '%%'-angivelse" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" +msgid "precision is ignored for `%%' specifier" +msgstr "præcision ignoreret for '%%'-angivelse" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "feltbredde og præcision ignoreret for '%%'-angivelse" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "\"$\" tillades ikke i awkformat" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "fatal: '$' tillades ikke i awk-formater" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "argumentantallet med \"$\" skal være > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "fatal: argumentantallet med '$' skal være > 0" -#: builtin.c:853 -#, 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:830 +#, c-format +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "fatal: argumentantallet %ld er større end antal givne argumenter" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "\"$\" tillades ikke efter et punktum i formatet" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "intet \"$\" angivet for positionsangivet feltbredde eller præcision" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "fatal: '$' tillades ikke efter et punktum i formatet" -#: builtin.c:938 +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "" +"fatal: intet '$' angivet for bredde eller præcision af positionsangivet felt" + +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" -msgstr "\"l\" er meningsløst i awk-formater, ignoreret" +msgstr "'l' er meningsløst i awk-formater, ignoreret" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "\"l\" tillades ikke i POSIX awk-formater" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "fatal: 'l' tillades ikke i POSIX awk-formater" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" -msgstr "\"L\" er meningsløst i awk-formater, ignoreret" +msgstr "'L' er meningsløst i awk-formater, ignoreret" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "\"L\" tillades ikke i POSIX awk-formater" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "fatal: 'L' tillades ikke i POSIX awk-formater" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" -msgstr "\"h\" er meningsløst i awk-formater, ignoreret" +msgstr "'h' er meningsløst i awk-formater, ignoreret" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "\"h\" tillades ikke i POSIX awk-formater" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "fatal: 'h' tillades ikke i POSIX awk-formater" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "" +msgstr "[s]printf: værdi %g er uden for område for '%%%c'-format" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" +"ignorerer ukendt formatspecificeringstegn '%c': intet argument konverteret" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "for få argumenter til formatstrengen" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "fatal: for få argumenter til formatstrengen" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "^ sluttede her" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: formatspecifiereren har intet kommandobogstav" +msgstr "[s]printf: formatspecifikation har intet kommandobogstav" #: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "for mange argumenter til formatstrengen" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: ingen argumenter" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fik ikke-numerisk argument" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: kaldt med negativt argument %g" -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: startindeks %g er ugyldigt, bruger 1" - -#: builtin.c:1484 +#: builtin.c:1503 #, 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:1510 -#, fuzzy, c-format msgid "substr: length %g is not >= 1" -msgstr "substr: længden %g er <= 0" +msgstr "substr: længden %g er ikke >= 1" -#: builtin.c:1512 -#, fuzzy, c-format +#: builtin.c:1505 +#, c-format msgid "substr: length %g is not >= 0" -msgstr "substr: længden %g er <= 0" +msgstr "substr: længden %g er ikke >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" -msgstr "substr: længden %g som ikke er et heltal bliver trunkeret" +msgstr "substr: længden %g som ikke er et heltal vil blive trunkeret" -#: builtin.c:1524 +#: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "" +msgstr "substr: længden %g for stor til strengindeksering, trunkerer til %g" -#: builtin.c:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: startindeks %g er ugyldigt, bruger 1" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: startindeks %g som ikke er et heltal vil blive trunkeret" + +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr: kildestrengen er tom" -#: builtin.c:1552 -#, fuzzy, c-format +#: builtin.c:1575 +#, c-format msgid "substr: start index %g is past end of string" -msgstr "substr: startindeks %d er forbi slutningen på strengen" +msgstr "substr: startindeks %g er forbi slutningen på strengen" -#: builtin.c:1560 -#, fuzzy, c-format +#: builtin.c:1583 +#, 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)" +"substr: længden %g ved startindeks %g overskrider længden af første argument " +"(%lu)" -#: builtin.c:1637 -#, fuzzy +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "strftime: formatværdi i PROCINFO[\"strftime\"] har numerisk type" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: fik et ikke-numerisk andet argument" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "strftime: andet argument mindre end 0 eller for stort til time_t" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: fik et første argument som ikke er en streng" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: fik en tom formatstreng" -#: builtin.c:1652 -#, fuzzy -msgid "strftime: received non-numeric second argument" -msgstr "strftime: fik et ikke-numerisk andet argument" - -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: fik et argument som ikke er en streng" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" -msgstr "" +msgstr "mktime: mindst én af værdierne er udenfor standardområdet" -#: builtin.c:1783 -#, fuzzy +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "'system'-funktion ikke tilladt i sandkasse-tilstand" + +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system: fik et argument som ikke er en streng" -#: builtin.c:1904 eval.c:2157 -#, fuzzy, c-format +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "reference til ikke-initieret variabel '%s'" + +#: builtin.c:1941 +#, c-format msgid "reference to uninitialized field `$%d'" -msgstr "reference til ikke-initieret variabel \"%s\"" +msgstr "reference til ikke-initieret felt '$%d'" -#: builtin.c:2009 -#, fuzzy +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: fik et argument som ikke er en streng" -#: builtin.c:2039 -#, fuzzy +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: fik et argument som ikke er en streng" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: fik et ikke-numerisk første argument" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: fik et ikke-numerisk andet argument" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: fik et ikke-numerisk argument" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: fik et ikke-numerisk argument" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: fik et ikke-numerisk argument" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" -msgstr "match: tredje argument er ikke en vektor" +msgstr "match: tredje argument er ikke et array" -#: builtin.c:2744 -#, fuzzy +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: Nullet i tredje argument behandlet som et ét-tal" +msgstr "gensub: 0 i tredje argument behandlet som 1" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: fik et ikke-numerisk første argument" -#: builtin.c:2862 -#, fuzzy +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" -msgstr "atan2: fik et ikke-numerisk andet argument" +msgstr "lshift: fik et ikke-numerisk andet argument" -#: builtin.c:2868 +#: builtin.c:2784 #, 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:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): flydendetalsværdier vil blive trunkeret" +msgstr "lshift(%lf, %lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:2872 +#: builtin.c:2788 #, 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:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: fik et ikke-numerisk første argument" -#: builtin.c:2900 -#, fuzzy +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" -msgstr "atan2: fik et ikke-numerisk andet argument" +msgstr "rshift: fik et ikke-numerisk andet argument" -#: builtin.c:2906 +#: builtin.c:2821 #, 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:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): flydendetalsværdier vil blive trunkeret" +msgstr "rshift(%lf, %lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:2910 +#: builtin.c:2825 #, 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:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: fik et ikke-numerisk første argument" -#: builtin.c:2938 -#, fuzzy +#: builtin.c:2852 msgid "and: received non-numeric second argument" -msgstr "atan2: fik et ikke-numerisk andet argument" +msgstr "and: fik et ikke-numerisk andet argument" -#: builtin.c:2944 +#: builtin.c:2858 #, 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:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): flydendetalsværdier vil blive trunkeret" +msgstr "and(%lf, %lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: fik et ikke-numerisk første argument" -#: builtin.c:2974 -#, fuzzy +#: builtin.c:2887 msgid "or: received non-numeric second argument" -msgstr "atan2: fik et ikke-numerisk andet argument" +msgstr "or: fik et ikke-numerisk andet argument" -#: builtin.c:2980 +#: builtin.c:2893 #, 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:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): flydendetalsværdier vil blive trunkeret" +msgstr "or(%lf, %lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: fik et ikke-numerisk første argument" -#: builtin.c:3010 -#, fuzzy +#: builtin.c:2925 msgid "xor: received non-numeric second argument" -msgstr "atan2: fik et ikke-numerisk andet argument" +msgstr "xor: fik et ikke-numerisk andet argument" -#: builtin.c:3016 +#: builtin.c:2931 #, 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:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): flydendetalsværdier vil blive trunkeret" +msgstr "xor(%lf, %lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: fik et ikke-numerisk argument" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negative værdier vil give mærkelige resultater" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): flydendetalsværdier vil blive trunkeret" +msgstr "compl(%lf): kommatalsværdier vil blive trunkeret" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: \"%s\" er ikke en gyldig lokalekategori" +msgstr "dcgettext: '%s' er ikke en gyldig lokalitetskategori" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "ukendt nodetype %d" -#: eval.c:422 +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "ukendt opkode %d" + +#: eval.c:434 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "opkode %s er ikke en operator eller et nøgleord" + +#: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "bufferoverløb i genflags2str" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:698 #, 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:802 -#, fuzzy, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" msgstr "" -"for-løkke: vektoren \"%s\" ændrede størrelse fra %d til %d under løkke-" -"udførelsen" +"\n" +"\t# Funktionskaldsstak:\n" +"\n" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "\"break\" uden for en løkke er ikke portabelt" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "\"break\" uden for en løkke er ikke tilladt" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "\"continue\" uden for en løkke er ikke portabelt" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "\"continue\" uden for en løkke er ikke tilladt" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "\"next\" kan ikke kaldes fra en BEGIN-regel" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "\"next\" kan ikke kaldes fra en END-regel" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "\"nextfile\" kan ikke kaldes fra en BEGIN-regel" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "\"nextfile\" kan ikke kaldes fra en END-regel" +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "'IGNORECASE' er en gawk-udvidelse" -#: eval.c:952 -msgid "statement has no effect" -msgstr "kommandoen har ingen effekt" +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "'BINMODE' er en gawk-udvidelse" + +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE værdi '%s' er ugyldig, behandles som 3" + +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "forkert '%sFMT'-specifikation '%s'" + +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "deaktiverer '--lint' på grund af en tildeling til 'LINT'" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" -msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor" +msgstr "kan ikke bruge funktionsnavnet '%s' som variabel eller array" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" -msgstr "reference til ikke-initieret argument \"%s\"" +msgstr "reference til ikke-initieret argument '%s'" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "reference til ikke-initieret variabel \"%s\"" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "forsøg på at referere til et felt fra ikke-numerisk værdi" -#: eval.c:1197 -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:1179 +msgid "attempt to field reference from null string" +msgstr "forsøg på at referere til et felt fra tom streng" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "tildeling brugt i sammenligningsammenhæng" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "forsøg på at få adgang til felt %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "forsøgte at dividere med nul" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "reference til ikke-initieret felt '$%ld'" -#: eval.c:1409 profile.c:661 +#: eval.c:1256 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "ikke tilladt type (%s) i tree_eval" +msgid "function `%s' called with more arguments than declared" +msgstr "funktionen '%s' kaldt med flere argumenter end deklareret" + +#: eval.c:1437 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: uventet type `%s'" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" -msgstr "forsøgte at dividere med nul i \"/=\"" +msgstr "forsøgte at dividere med nul i '/='" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" -msgstr "forsøgte at dividere med nul i \"%%=\"" +msgstr "forsøgte at dividere med nul i '%%='" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funktionen \"%s\" kaldt med flere argumenter end deklareret" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "forsøg på at bruge array '%s[\"%.*s\"]' i skalarsammenhæng" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "funktionen \"%s\" er ikke defineret" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "tildeling brugt i sammenligningsammenhæng" + +#: eval.c:1911 +msgid "statement has no effect" +msgstr "kommandoen har ingen effekt" -#: eval.c:1983 +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# Funktionskaldsstak:\n" -"\n" +"for-løkke: array '%s' ændrede størrelse fra %ld til %ld under udførelse af " +"løkken" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "forsøg på at feltreferere fra ikke-numerisk værdi" +msgid "function called indirectly through `%s' does not exist" +msgstr "funktion kaldt indirekte via '%s' eksisterer ikke" -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "forsøg på at referere fra tom streng" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "funktionen '%s' er ikke defineret" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "forsøg på at få adgang til felt nummer %d" +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "ikke-omdirigeret 'getline' ugyldig inden i '%s'-regel" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "fejl ved læsning af inddatafilen '%s': %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "\"IGNORECASE\" er en gawk-udvidelse" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "'nextfile' kan ikke kaldes fra en '%s'-regel" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "\"BINMODE\" er en gawk-udvidelse" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "'exit' kan ikke kaldes i den aktuelle kontekst" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" +msgid "`next' cannot be called from a `%s' rule" +msgstr "'next' kan ikke kaldes fra en '%s'-regel" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "fejlagtig \"%sFMT\"-specifikation \"%s\"" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Véd desværre ikke hvordan '%s' skal fortolkes" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "deaktiverer \"--lint\" på grund af en tildeling til \"LINT\"" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "udvidelser er ikke tilladt i sandkasse-tilstand" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" -msgstr "\"extension\" er en gawk-udvidelse" +msgstr "'extension' er en gawk-udvidelse" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: kan ikke åbne \"%s\" (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "atalt: extension: kan ikke åbne '%s' (%s)\n" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatalt: extension: bibliotek '%s': definer ikke " +"'plugin_is_GPL_compatible' (%s)\n" -#: ext.c:105 -msgid "extension: missing function name" +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" +"fatalt: extension: bibliotek '%s': kan ikke kalde funktionen '%s' (%s)\n" -#: ext.c:110 -#, fuzzy, c-format +#: ext.c:127 +msgid "extension: missing function name" +msgstr "extension: mangler funktionsnavn" + +#: ext.c:132 +#, c-format msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n" +msgstr "extension: ugyldigt tegn '%c' i funktionsnavn '%s'" -#: ext.c:116 -#, fuzzy, c-format +#: ext.c:141 +#, c-format msgid "extension: can't redefine function `%s'" -msgstr "extension: kan ikke åbne \"%s\" (%s)\n" +msgstr "extension: kan ikke omdefinere funktion '%s'" -#: ext.c:120 -#, fuzzy, c-format +#: ext.c:145 +#, c-format msgid "extension: function `%s' already defined" -msgstr "funktionen \"%s\" er ikke defineret" +msgstr "extension: funktionen '%s' er allerede defineret" + +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: funktionsnavnet '%s' er defineret tidligere" -#: ext.c:125 +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" +msgstr "extension: kan ikke bruge gawk's indbyggede '%s' som funktionsnavn" -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "funktionsnavnet \"%s\" er allerede defineret" +#: ext.c:156 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: negativt argumentantal for funktion '%s'" -#: ext.c:204 -#, fuzzy, c-format +#: ext.c:259 +#, c-format msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "funktionen \"%s\" defineret, men aldrig kaldt" +msgstr "funktionen '%s' defineret til at tage ikke mere end %d argumenter" -#: ext.c:207 -#, fuzzy, c-format +#: ext.c:262 +#, c-format msgid "function `%s': missing argument #%d" -msgstr "funktionen \"%s\" er ikke defineret" +msgstr "funktion '%s': mangler argument nummer %d" -#: ext.c:217 -#, fuzzy, c-format +#: ext.c:279 +#, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "forsøg på at bruge skalaren \"%s\" som vektor" +msgstr "" +"funktion '%s': argument nummer %d: forsøg på at bruge skalar som et array" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" +"funktion '%s': argument nummer %d: forsøg på at bruge array som en skalar" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Operationen understøttes ikke" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "NF sat til en negativ værdi" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: fjerde argument er en gawk-udvidelse" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: fjerde argument er ikke et array" + +#: field.c:969 msgid "split: second argument is not an array" -msgstr "split: andet argument er ikke en vektor" +msgstr "split: andet argument er ikke et array" + +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "split: kan ikke bruge det samme array som andet og fjerde argument" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: kan ikke bruge et underarray af andet argument som fjerde argument" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: kan ikke bruge et underarray af fjerde argument som andet argument" -#: field.c:909 +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "split: tom streng som tredje argument er en gawk-udvidelse" -#: field.c:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: fjerde argument er ikke et array" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: andet argument er ikke et array" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patmatch: tredje argument er ikke et array" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "patsplit: kan ikke bruge det samme array som andet og fjerde argument" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: kan ikke bruge et underarray af andet argument som fjerde argument" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: kan ikke bruge et underarray af fjerde argument som andet argument" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "\"FIELDWIDTHS\" er en gawk-udvidelse" +msgstr "'FIELDWIDTHS' er en gawk-udvidelse" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" +msgstr "ugyldig FIELDWIDTHS værdi, nær '%s" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" -msgstr "tom streng som \"FS\" er en gawk-udvidelse" +msgstr "tom streng som 'FS' er en gawk-udvidelse" -#: field.c:1092 -#, fuzzy +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" -msgstr "gamle awk understøtter ikke operatoren \"**\"" +msgstr "gamle versioner af awk understøtter ikke regexp'er som værdi for 'FS'" -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: flaget \"%s\" er flertydigt\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "'FPAT' er en gawk-udvidelse" -#: getopt.c:623 getopt.c:627 +#: getopt.c:604 getopt.c:633 #, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: flaget '%s' er flertydigt\n" + +#: getopt.c:679 getopt.c:683 +#, c-format msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: flaget \"--%s\" tillader ikke noget argument\n" +msgstr "%s: flaget '--%s' tillader ikke noget argument\n" -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format +#: getopt.c:692 getopt.c:697 +#, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: flaget \"%c%s\" tillader ikke noget argument\n" +msgstr "%s: flaget '%c%s' tillader ikke noget argument\n" -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format +#: getopt.c:740 getopt.c:759 +#, c-format msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: flaget \"%s\" kræver et argument\n" +msgstr "%s: flaget '--%s' kræver et argument\n" -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format +#: getopt.c:797 getopt.c:800 +#, c-format msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: ukendt flag \"--%s\"\n" +msgstr "%s: ukendt flag '--%s'\n" -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format +#: getopt.c:808 getopt.c:811 +#, c-format msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: ukendt flag \"%c%s\"\n" +msgstr "%s: ukendt flag '%c%s'\n" -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format +#: getopt.c:860 getopt.c:863 +#, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: ugyldig flag -- %c\n" +msgstr "%s: ugyldigt flag - '%c'\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 +#, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: flaget kræver et argument -- %c\n" +msgstr "%s: flaget kræver et argument - '%c'\n" -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format +#: getopt.c:989 getopt.c:1005 +#, c-format msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: flaget \"-W %s\" er flertydigt\n" +msgstr "%s: flaget '-W %s' er flertydigt\n" -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format +#: getopt.c:1029 getopt.c:1047 +#, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: flaget \"-W %s\" tillader ikke noget argument\n" +msgstr "%s: flaget '-W %s' tillader ikke noget argument\n" -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format +#: getopt.c:1068 getopt.c:1086 +#, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: flaget \"%s\" kræver et argument\n" +msgstr "%s: flaget '-W %s' kræver et argument\n" + +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "kommandolinjeargument '%s' er et katalog, oversprunget" -#: io.c:322 io.c:352 +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" -msgstr "kan ikke åbne filen \"%s\" for læsning (%s)" +msgstr "kan ikke åbne filen '%s' for læsning (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" -msgstr "lukning af fd %d (\"%s\") mislykkedes (%s)" +msgstr "lukning af fd %d ('%s') mislykkedes (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "ugyldig trætype %s i redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "omdirigering ikke tilladt i sandkasse-tilstand" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" -msgstr "udtrykket i \"%s\"-omdirigering har kun numerisk værdi" +msgstr "udtrykket i '%s'-omdirigering har kun numerisk værdi" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" -msgstr "udtrykket for \"%s\"-omdirigering har en tom streng som værdi" +msgstr "udtrykket for '%s'-omdirigering har en tom streng som værdi" -#: io.c:600 +#: io.c:623 #, 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" +"filnavnet '%s' for '%s'-omdirigering kan være resultatet af et logisk udtryk" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "unødig blanding af \">\" og \">>\" for filen \"%.*s\"" +msgstr "unødig blanding af '>' og '>>' for filen '%.*s'" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" -msgstr "kan ikke åbne røret \"%s\" for udskrivning (%s)" +msgstr "kan ikke åbne datakanalen '%s' for udskrivning (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" -msgstr "kan ikke åbne røret \"%s\" for indtastning (%s)" +msgstr "kan ikke åbne datakanalen '%s' for indtastning (%s)" -#: io.c:717 +#: io.c:752 #, 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)" +msgstr "kan ikke åbne tovejsdatakanalen '%s' for ind-/uddata (%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" -msgstr "kan ikke omdirigere fra \"%s\" (%s)" +msgstr "kan ikke omdirigere fra '%s' (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" -msgstr "kan ikke omdirigere til \"%s\" (%s)" +msgstr "kan ikke omdirigere til '%s' (%s)" -#: io.c:851 +#: io.c:888 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:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." -msgstr "lukning af \"%s\" mislykkedes (%s)" +msgstr "lukning af '%s' mislykkedes (%s)." -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" -msgstr "for mange rør eller inddatafiler åbne" +msgstr "for mange datakanaler eller inddatafiler åbne" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" -msgstr "close: andet argument skal være \"to\" eller \"from\"" +msgstr "close: andet argument skal være 'to' eller 'from'" -#: io.c:912 +#: io.c:951 #, 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" +msgstr "close: '%.*s' er ikke en åben fil, datakanal eller ko-proces" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" -msgstr "lukning af omdirigering som aldrig åbnedes" +msgstr "lukning af omdirigering som aldrig blev åbnet" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -"close: omdirigeringen \"%s\" åbnedes ikke med \"|&\", andet argument " -"ignoreret" +"close: omdirigeringen '%s' blev ikke åbnet med '|&', andet argument ignoreret" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "fejlstatus (%d) fra rørlukning af \"%s\" (%s)" +msgstr "fejlstatus (%d) fra lukning af datakanalen '%s' (%s)" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "fejlstatus (%d) fra fillukning af \"%s\" (%s)" +msgstr "fejlstatus (%d) fra fillukning af '%s' (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" -msgstr "ingen eksplicit lukning af soklen \"%s\" angivet" +msgstr "ingen eksplicit lukning af soklen '%s' angivet" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" -msgstr "ingen eksplicit lukning af ko-processen \"%s\" angivet" +msgstr "ingen eksplicit lukning af ko-processen '%s' angivet" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" -msgstr "ingen eksplicit lukning af røret \"%s\" angivet" +msgstr "ingen eksplicit lukning af datakanalen '%s' angivet" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" -msgstr "ingen eksplicit lukning af filen \"%s\" angivet" +msgstr "ingen eksplicit lukning af filen '%s' angivet" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "fejl ved skrivning til standard ud (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "fejl ved skrivning til standard fejl (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." -msgstr "rørspuling af \"%s\" mislykkedes (%s)" +msgstr "datakanalsrensning af '%s' mislykkedes (%s)." -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "ko-processpuling af røret til \"%s\" mislykkedes (%s)" +msgstr "ko-procesrensning af datakanalen til '%s' mislykkedes (%s)." -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." -msgstr "filspuling af \"%s\" mislykkedes (%s)" +msgstr "filrensning af '%s' mislykkedes (%s)." -#: io.c:1222 -#, fuzzy, c-format +#: io.c:1262 +#, c-format msgid "local port %s invalid in `/inet'" -msgstr "lokal port ugyldig i \"%s\"" +msgstr "lokal port %s ugyldig i '/inet'" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" -msgstr "" +msgstr "fjernvært og portinformation (%s, %s) ugyldige" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw-klient er desværre ikke klar endnu" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "kun root kan bruge \"/inet/raw\"." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw-server er desværre ikke klar endnu" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" -msgstr "ingen (kendt) protokol opgivet i special-filnavn \"%s\"" +msgstr "ingen (kendt) protokol opgivet i special-filnavn '%s'" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" -msgstr "special-filnavn \"%s\" er ufuldstændigt" +msgstr "special-filnavn '%s' er ufuldstændigt" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" -msgstr "skal angive et fjernmaskinenavn til \"/inet\"" +msgstr "fjernmaskinenavn til '/inet' skal angives" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" -msgstr "skal angive en fjernport til \"/inet\"" +msgstr "fjernport til '/inet' skal angives" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation understøttes ikke" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "filen \"%s\" er et katalog" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "brug \"PROCINFO[\"%s\"]\" i stedet for \"%s\"" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "brug \"PROCINFO[...]\" i stedet for \"dev/user\"" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" -msgstr "kunne ikke åbne \"%s\", tilstand \"%s\"" +msgstr "kunne ikke åbne '%s', tilstand '%s'" -#: io.c:1923 -#, fuzzy, c-format +#: io.c:1747 +#, c-format msgid "close of master pty failed (%s)" -msgstr "lukning af røret mislykkedes (%s)" +msgstr "lukning af master-pty mislykkedes (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" -msgstr "lukning af standard ud i barnet mislykkedes (%s)" +msgstr "lukning af standard ud i underproces mislykkedes (%s)" -#: io.c:1928 -#, fuzzy, c-format +#: io.c:1752 +#, 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)" +msgstr "" +"flytning af slave-pty til standard ud i underproces mislykkedes (dup: %s)" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" -msgstr "lukning af standard ind i barnet mislykkedes (%s)" +msgstr "lukning af standard ind i underproces mislykkedes (%s)" -#: io.c:1933 -#, fuzzy, c-format +#: io.c:1757 +#, 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)" +msgstr "" +"flytning af slave-pty til standard ind i underproces mislykkedes (dup: %s)" -#: io.c:1935 io.c:1954 -#, fuzzy, c-format +#: io.c:1759 io.c:1780 +#, c-format msgid "close of slave pty failed (%s)" -msgstr "lukning af røret mislykkedes (%s)" +msgstr "lukning af slave-pty mislykkedes (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, 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)" +msgstr "" +"flytning af datakanal til standard ud i underproces mislykkedes (dup: %s)" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, 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)" +msgstr "" +"flytning af datakanalen til standard ind i underproces mislykkedes (dup: %s)" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "genskabelse af standard ud i forælderprocessen mislykkedes\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "genskabelse af standard ind i forælderprocessen mislykkedes\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" -msgstr "lukning af røret mislykkedes (%s)" +msgstr "lukning af datakanalen mislykkedes (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" -msgstr "\"|&\" understøttes ikke" +msgstr "'|&' understøttes ikke" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" -msgstr "kan ikke åbne røret \"%s\" (%s)" +msgstr "kan ikke åbne datakanalen '%s' (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" -msgstr "kan ikke oprette barneproces for \"%s\" (fork: %s)" +msgstr "kan ikke oprette barneproces for '%s' (fork: %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" -msgstr "datafilen \"%s\" er tom" +msgstr "datafilen '%s' er tom" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" -msgstr "" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "fejl ved læsning af inddatafilen \"%s\": %s" +msgstr "kunne ikke allokere mere hukommelse til inddata" -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" -msgstr "flertegnsværdien af \"RS\" er en gawk-udvidelse" +msgstr "'RS' som flertegnsværdi er en gawk-udvidelse" -#: main.c:306 -msgid "out of memory" -msgstr "slut på hukommelsen" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "IPv6-kommunikation understøttes ikke" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" -msgstr "\"-m[fr]\"-flaget er irrelevant i gawk" +msgstr "'-m[fr]'-flaget er irrelevant i gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m-flagets brug: \"-m[fr] nnn\"" +msgstr "brug af flaget -m: '-m[fr] nnn'" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "tomt argument til '-e/--source' ignoreret" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: flaget \"-W %s\" ukendt, ignoreret\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "tomt argument til \"--source\" ignoreret" +msgstr "%s: flaget '-W %s' ukendt, ignoreret\n" -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaget kræver et argument -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "miljøvariablen \"POSIXLY_CORRECT\" sat: aktiverer \"--posix\"" +msgstr "miljøvariablen 'POSIXLY_CORRECT' sat: aktiverer '--posix'" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" -msgstr "\"--posix\" tilsidesætter \"--traditional\"" +msgstr "'--posix' tilsidesætter '--traditional'" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "\"--posix\"/\"--traditional\" tilsidesætter \"--non-decimal-data\"" +msgstr "'--posix'/'--traditional' tilsidesætter '--non-decimal-data'" -#: main.c:530 -#, fuzzy, c-format +#: main.c:557 +#, 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:571 -#, fuzzy, c-format +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "'--posix' tilsidesætter '--binary'" + +#: main.c:613 +#, c-format msgid "can't set binary mode on stdin (%s)" -msgstr "kan ikke sætte tilstand på standard ind (%s)" +msgstr "kan ikke sætte binær tilstand på standard ind (%s)" -#: main.c:574 -#, fuzzy, c-format +#: main.c:616 +#, c-format msgid "can't set binary mode on stdout (%s)" -msgstr "kan ikke sætte tilstand på standard ud (%s)" +msgstr "kan ikke sætte binær tilstand på standard ud (%s)" -#: main.c:576 -#, fuzzy, c-format +#: main.c:618 +#, c-format msgid "can't set binary mode on stderr (%s)" -msgstr "kan ikke sætte tilstand på standard fejl (%s)" +msgstr "kan ikke sætte binær tilstand på standard fejl (%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" msgstr "ingen programtekst overhovedet!" -#: main.c:721 +#: main.c:734 #, 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" +msgstr "Brug: %s [flag i POSIX- eller GNU-stil] -f progfil [--] fil ...\n" -#: main.c:723 +#: main.c:736 #, 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" +msgstr "Brug: %s [flag i POSIX- eller GNU-stil] %cprogram%c fil ...\n" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX-flag:\t\tGNU lange flag:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "POSIX-flag:\t\tlange GNU-flag: (standard)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:731 +#: main.c:744 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:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] værdi\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W profile[=fil]\t--profile[=fil]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "POSIX-flag:\t\tlange GNU-flag: (udvidelser)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[fil]\t\t--dump-variables[=fil]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=fil]\t--profile[=fil]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'programtekst'\t--source='programtekst'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E fil\t\t\t--exec=fil\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=programtekst\t--source=programtekst\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[fil]\t\t--profile[=fil]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R file\t\t\t--command=fil\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 -#, fuzzy +#: main.c:779 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" +"\n" +"For at rapportere fejl kan du se punktet 'Bugs' i 'gawk.info', som er\n" +"sektionen 'Reporting Problems and Bugs' i den trykte version.\n" +"\n" +"Rapportér kommentarer til oversættelsen til .\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" +"gawk er et sprog til mønster-genkendelse og -behandling.\n" +"Almindeligvis læser gawk fra standard ind og skriver til standard ud.\n" +"\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" +"Eksempler:\n" +"\tgawk '{ sum += $1 }; END { print sum }' fil\n" +"\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 -#, fuzzy, c-format +#: main.c:807 +#, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" @@ -1687,11 +1854,12 @@ "\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" +"af Free Software Foundation, enten version 3 af licensen, eller (hvis du " +"vil)\n" "enhver senere version.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1705,177 +1873,174 @@ "General Public License for yderligere information.\n" "\n" -#: main.c:813 -#, fuzzy +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\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" +"med dette program. Hvis ikke, så se http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sætter ikke FS til tab i POSIX-awk" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "ukendt værdi for felt-spec: %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" +"%s: '%s' argument til '-v' ikke på formen 'var=værdi'\n" +"\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" -msgstr "" +msgstr "'%s' er ikke et gyldigt variabelnavn" -#: main.c:1145 +#: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "" +msgstr "'%s' er ikke et variabelnavn, leder efter fil '%s=%s'" + +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "kan ikke bruge gawk's indbyggede '%s' som variabelnavn" -#: main.c:1184 +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "kan ikke bruge funktion '%s' som variabelnavn" + +#: main.c:1262 msgid "floating point exception" msgstr "flydendetalsundtagelse" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "fatal fejl: intern fejl" -#: main.c:1206 -#, fuzzy +#: main.c:1284 msgid "fatal error: internal error: segfault" -msgstr "fatal fejl: intern fejl" +msgstr "fatal fejl: intern fejl: segmentfejl" -#: main.c:1218 -#, fuzzy +#: main.c:1296 msgid "fatal error: internal error: stack overflow" -msgstr "fatal fejl: intern fejl" +msgstr "fatal fejl: intern fejl: stakoverløb" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" -msgstr "ingen for-åbnet fd %d" +msgstr "ingen fd %d åbnet i forvejen" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" -msgstr "kunne ikke for-åbne /dev/null for fd %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "kunne ikke finde grupper: %s" +msgstr "kunne ikke i forvejen åbne /dev/null for fd %d" -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "kommandolinje:" -#: msg.c:120 -msgid "warning: " -msgstr "advarsel: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "fejl: " -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "kan ikke konvertere en streng til flydende tal" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "omvendt skråstreg i slutningen af strengen" -#: node.c:609 -#, fuzzy, c-format +#: node.c:517 +#, c-format msgid "old awk does not support the `\\%c' escape sequence" -msgstr "gamle awk understøtter ikke operatoren \"**\"" +msgstr "gamle versioner af awk understøtter ikke '\\%c' undvigesekvens" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX tillader ikke \"\\x\"-kontrolsekvenser" +msgstr "POSIX tillader ikke '\\x'-kontrolsekvenser" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" -msgstr "ingen heksadecimale cifre i \"\\x\"-kontrolsekvenser" +msgstr "ingen heksadecimale cifre i '\\x'-kontrolsekvenser" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" +"den heksadecimale sekvens \\x%.*s på %d tegn nok ikke forstået som du " +"forventer det" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "kontrolsekvensen \"\\%c\" behandlet som kun \"%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)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Ugyldigt multibyte data fundet. Måske er der uoverensstemmelse mellem dine " +"data og dit locale." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "kunne ikke åbne \"%s\" for skrivning: %s" - -#: profile.c:457 -#, fuzzy, c-format -msgid "internal error: %s with null vname" -msgstr "intern fejl: Node_var med null vname" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "%s %s '%s': kunne ikke få fat på fd flag: (fcntl F_GETFD: %s)" -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "" - -#: profile.c:1073 +#: posix/gawkmisc.c:188 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s '%s': kunne ikke sætte luk-ved-exec (fcntl F_SETFD: %s)" -#: profile.c:1104 +#: profile.c:83 #, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawkprofil, oprettet %s\n" +msgid "could not open `%s' for writing: %s" +msgstr "kunne ikke åbne '%s' for skrivning: %s" -#: profile.c:1107 +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "sender profilen til standard fejl" + +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# BEGIN-blok\n" +"\t# %s blokke\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" -"\t# Regel/regler\n" +"\t# Regler\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END-blok\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "intern fejl: %s med null vname" + +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# profil til gawk oprettet %s\n" -#: profile.c:1143 +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1884,167 +2049,201 @@ "\n" "\t# Funktioner, listede alfabetisk\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "uventet type %s i prec_level" +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: uykendt omdirigeringstype %d" -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "ukendt nodetype %d" +#: re.c:573 +#, c-format +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "område på formen `[%c-%c]' er locale-afhængig" + +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "regexp-komponent `%.*s' skulle nok være `[%.*s]'" -#: regcomp.c:132 +#: regcomp.c:131 msgid "Success" msgstr "Lykkedes" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Mislykkedes" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ugyldigt regulært udtryk" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" -msgstr "Ugyldigt kollationeringstegn" +msgstr "Ugyldigt sorteringstegn" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "Ugyldigt tegnklassenavn" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "Efterfølgende omvendt skråstreg" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "Ugyldig bagudreference" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Ubalanceret [ eller [^" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Ubalanceret ( eller \\(" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "Ubalanceret \\{" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ugyldigt indhold i \\{\\}" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "Ugyldig intervalslutning" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Hukommelsen opbrugt" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ugyldigt foregående regulært udtryk" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" msgstr "For tidligt slut på regulært udtryk" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "Regulært udtryk for stort" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ubalanceret ) eller \\)" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: ikke tilladt brug af variablen \"%s\" som vektor" +#~ msgid "could not find groups: %s" +#~ msgstr "kunne ikke finde grupper: %s" -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: første argument er ikke en vektor" +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion" -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: andet argument er ikke en vektor" +#~ msgid "attempt to use array in a scalar context" +#~ msgstr "forsøg på at bruge array i skalarsammenhæng" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: ikke tilladt flag -- %c\n" +#~ msgid "statement may have no effect" +#~ msgstr "kommandoen har måske ikke nogen effekt" -#~ 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 "out of memory" +#~ msgstr "slut på hukommelsen" -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "ugyldig syntaks i navnet \"%s\" for variabeltildeling" +#~ msgid "attempt to use scalar `%s' as array" +#~ msgstr "forsøg på at bruge skalaren '%s' som array" -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "intern fejl: Node_var_vektor med null vname" +#~ msgid "attempt to use array `%s' in scalar context" +#~ msgstr "forsøg på at bruge array '%s' i skalarsammenhæng" -#~ msgid "or used in other expression context" -#~ msgstr "eller brugt i andre udtrykssammenhænge" +#~ msgid "call of `length' without parentheses is deprecated by POSIX" +#~ msgstr "kald af 'length' uden parenteser er forældet ifølge POSIX" -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "\"%s\" er en funktion, tildeling er ikke tilladt" +#~ msgid "division by zero attempted in `/'" +#~ msgstr "forsøgte at dividere med nul i '/'" -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "BEGIN-blok skal have en handlingsdel" +#~ msgid "length: untyped parameter argument will be forced to scalar" +#~ msgstr "length: parameter uden type vil blive brugt som skalar" -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "\"nextfile\" brugt i BEGIN- eller END-handling" +#~ msgid "length: untyped argument will be forced to scalar" +#~ msgstr "length: argument uden type vil blive brugt som skalar" -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgid "`break' outside a loop is not portable" +#~ msgstr "'break' uden for en løkke er ikke portabelt" + +#~ msgid "`continue' outside a loop is not portable" +#~ msgstr "'continue' uden for en løkke er ikke portabelt" + +#~ msgid "`next' cannot be called from a BEGIN rule" +#~ msgstr "'next' kan ikke kaldes fra en BEGIN-regel" + +#~ msgid "`nextfile' cannot be called from a BEGIN rule" +#~ msgstr "'nextfile' kan ikke kaldes fra en BEGIN-regel" + +#~ msgid "" +#~ "concatenation: side effects in one expression have changed the length of " +#~ "another!" #~ msgstr "" -#~ "ikke-omdirigeret \"getline\" udefineret inde i BEGIN- eller END-handling" +#~ "konkatenering: sideeffekter i et udtryk har ændret længden af et andet!" + +#~ msgid "illegal type (%s) in tree_eval" +#~ msgstr "ugyldig type (%s) i tree_eval" + +#~ msgid "\t# -- main --\n" +#~ msgstr "\t# -- main --\n" -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x er ikke i tokentab\n" +#~ msgid "invalid tree type %s in redirect()" +#~ msgstr "ugyldig trætype %s i redirect()" -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "gsub: tredje argument er ikke et ændringsbart objekt" +#~ msgid "/inet/raw client not ready yet, sorry" +#~ msgstr "/inet/raw-klient er desværre ikke klar endnu" -#~ msgid "Unfinished \\ escape" -#~ msgstr "Uafsluttet \\-kontrolsekvens" +#~ msgid "only root may use `/inet/raw'." +#~ msgstr "kun root kan bruge '/inet/raw'." -#~ msgid "unfinished repeat count" -#~ msgstr "uafsluttet gentagelsesantal" +#~ msgid "/inet/raw server not ready yet, sorry" +#~ msgstr "/inet/raw-server er desværre ikke klar endnu" -#~ msgid "malformed repeat count" -#~ msgstr "fejlagtigt udformet gentagelsesantal" +#~ msgid "file `%s' is a directory" +#~ msgstr "filen '%s' er et katalog" -#~ msgid "Unbalanced [" -#~ msgstr "Ubalanceret [" +#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +#~ msgstr "brug 'PROCINFO[\"%s\"]' i stedet for '%s'" -#~ msgid "Unbalanced (" -#~ msgstr "Ubalanceret (" +#~ msgid "use `PROCINFO[...]' instead of `/dev/user'" +#~ msgstr "brug 'PROCINFO[...]' i stedet for '/dev/user'" -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Ingen syntaksbit for regulære udtryk angivet" +#~ msgid "\t-m[fr] val\n" +#~ msgstr "\t-m[fr] værdi\n" -#~ msgid "Unbalanced )" -#~ msgstr "Ubalanceret )" +#~ msgid "\t-W compat\t\t--compat\n" +#~ msgstr "\t-W compat\t\t--compat\n" -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "felt %d i FIELDWIDTHS skal være > 0" +#~ msgid "\t-W copyleft\t\t--copyleft\n" +#~ msgstr "\t-W copyleft\t\t--copyleft\n" -#~ msgid "function %s called\n" -#~ msgstr "funktionen %s kaldt\n" +#~ msgid "\t-W usage\t\t--usage\n" +#~ msgstr "\t-W usage\t\t--usage\n" -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "kan ikke åbne tovejssoklen \"%s\" for ind-/uddata (%s)" +#~ msgid "can't convert string to float" +#~ msgstr "kan ikke konvertere en streng til flydende tal" + +#~ msgid "# treated internally as `delete'" +#~ msgstr "# behandlet internt som 'delete'" + +#~ msgid "# this is a dynamically loaded extension function" +#~ msgstr "# dette er en dynamisk indlæst udvidelsesfunktion" + +#~ msgid "" +#~ "\t# BEGIN block(s)\n" +#~ "\n" +#~ msgstr "" +#~ "\t# BEGIN-blok\n" +#~ "\n" -#~ msgid "remote port invalid in `%s'" -#~ msgstr "fjernporten ugyldig i \"%s\"" +#~ msgid "unexpected type %s in prec_level" +#~ msgstr "uventet type %s i prec_level" -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "intern fejl: filen \"%s\", linje %d\n" +#~ msgid "Unknown node type %s in pp_var" +#~ msgstr "Ukendt nodetype %s i pp_var" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/de.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/de.gmo differ diff -Nru gawk-3.1.8+dfsg/po/de.po gawk-4.0.1+dfsg/po/de.po --- gawk-3.1.8+dfsg/po/de.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/de.po 2012-03-28 20:03:46.000000000 +0000 @@ -1,1693 +1,1910 @@ -# GNU awk message strings +# Deutsche Meldungen für GNU awk # Copyright (C) 2000 Free Software Foundation, Inc. -# Unknown Author, , 2000 +# This file is distributed under the same license as the gawk package. +# +# Philipp Thomas , 2011 2012 # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.0\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2002-04-03 18:55+02:00\n" -"Last-Translator: Christian Kirsch \n" -"Language-Team: German \n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-01-30 16:21+0100\n" +"Last-Translator: Philipp Thomas \n" +"Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:112 -#, fuzzy, c-format +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "von %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "Es wird versucht, einen Skalar als Feld zu verwenden" + +#: array.c:251 +#, c-format msgid "attempt to use function `%s' as an array" -msgstr "Versuch, die Funktion '%s' als Array zu verwenden." +msgstr "Es wird versucht, die Funktion »%s« als Feld zu verwenden" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" -msgstr "Versuch den skalaren Parameter '%s' als Array zu benutzen." +msgstr "Es wird versucht, den skalaren Parameter »%s« als Feld zu verwenden" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "Versuch, Skalar '%s' als Array zu verwenden." +msgid "attempt to use scalar `%s' as an array" +msgstr "Es wird versucht, den Skalar »%s« als Array zu verwenden" -#: array.c:156 -#, fuzzy, c-format -msgid "from %s" -msgstr "%s (von %s)" +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "Es wird versucht, das Feld »%s« in einem Skalarkontext zu verwenden" #: array.c:513 -#, fuzzy, c-format +#, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "Bezug auf nicht-initialisiertes Element »%s[\"%s\"]«" +msgstr "Bezug auf ein nicht initialisiertes Element »%s[\"%.*s\"]«" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" -msgstr "Index in Array »%s« ist Nullstring." +msgstr "Der Index von Feld »%s« ist ein Nullstring" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" -msgstr "delete: Index »%s« nicht in Feld »%s« vorhanden." +msgstr "delete: Index »%s« ist in Feld »%s« nicht vorhanden" + +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "Es wird versucht, den Skalar »%s[\"%.*s\"]« als Feld zu verwenden" -#: array.c:792 +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: leer (Null)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: leer (0)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: Table_size = %d, array_size = %d\n" +msgstr "%s: Tabellengröße = %d, Feldgröße = %d\n" -#: array.c:830 -#, fuzzy, c-format +#: array.c:954 +#, c-format msgid "%s: is parameter\n" msgstr "%s: ist ein Parameter\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" -msgstr "%s: Array-Referenz auf %s\n" +msgstr "%s: Feld-Referenz auf %s\n" -#: awkgram.y:218 -#, fuzzy, c-format +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: Das Argument ist kein Feld" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: Das zweite Argument ist kein Feld" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: Das zweite Argument ist kein Feld" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: Das erste Argument ist kein Feld" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: Das erste Argument ist kein Feld" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: ein untergeordnetes Feld des ersten Arguments kann nicht als zweites " +"Argument verwendet werden" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: ein untergeordnetes Feld des ersten Arguments kann nicht als zweites " +"Argument verwendet werden" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: ein untergeordnetes Feld des zweiten Arguments kann nicht als erstes " +"Argument verwendet werden" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: ein untergeordnetes Feld des zweiten Arguments kann nicht als erstes " +"Argument verwendet werden" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "»%s« ist ein unzulässiger Funktionsname" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "Die Vergleichsfunktion »%s« für das Sortieren ist nicht definiert" + +#: awkgram.y:249 +#, c-format msgid "%s blocks must have an action part" -msgstr "END-Blöcke müssen einen Aktionsteil haben." +msgstr "%s-Blöcke müssen einen Aktionsteil haben" -#: awkgram.y:221 -#, fuzzy +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" -msgstr "END-Blöcke müssen einen Aktionsteil haben." +msgstr "Jede Regel muss entweder ein Muster oder einen Aktionsteil haben" -#: awkgram.y:257 awkgram.y:266 -#, fuzzy +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "Das alte awk erlaubt den Operator '**' nicht." +msgstr "Das alte awk erlaubt keine mehrfachen »BEGIN«- oder »END«-Regeln" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "'%s' ist eine eingebaute Funktion und kann nicht umdefiniert werden." +msgstr "»%s« ist eine eingebaute Funktion und kann nicht umdefiniert werden" -#: awkgram.y:331 -#, fuzzy +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" -"Konstanter Regulärer Ausdruck '/%s' sieht wie ein C-Kommentar aus, ist aber " -"keiner." +"Die Regulärer-Ausdruck-Konstante »//« sieht wie ein C-Kommentar aus, ist " +"aber keiner" -#: awkgram.y:334 +#: awkgram.y:436 #, 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." +"Die Regulärer-Ausdruck-Konstante »/%s/« sieht wie ein C-Kommentar aus, ist " +"aber keiner" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "Statement möglicherweise ohne Effekt." +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "doppelte Case-Werte im Switch-Block: %s" -#: awkgram.y:458 awkgram.y:482 -#, fuzzy, c-format -msgid "`%s' used in %s action" -msgstr "'next' in BEGIN- oder END-Aktion benutzt." +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "doppeltes »default« im Switch-Block gefunden" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "" +"»break« ist außerhalb einer Schleife oder eines Switch-Blocks nicht zulässig" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "»continue« ist außerhalb einer Schleife nicht zulässig" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:828 +#, c-format +msgid "`next' used in %s action" +msgstr "»next« wird in %s-Aktion verwendet" + +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" -msgstr "'nextfile' ist eine gawk-Erweiterung." +msgstr "»nextfile« ist eine gawk-Erweiterung" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "»nextfile« wird in %s-Aktion verwendet" + +#: awkgram.y:865 msgid "`return' used outside function context" -msgstr "'return' außerhalb einer Funktion benutzt." +msgstr "»return« wird außerhalb einer Funktion verwendet" -#: awkgram.y:534 +#: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" -"Einfaches 'print' in BEGIN- oder END-Regel soll vermutlich 'print \"\"' sein." +"Einfaches »print« in BEGIN- oder END-Regel soll vermutlich »print \"\"« sein" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" -msgstr "'delete array' ist eine gawk-Erweiterung." +msgstr "»delete array« ist eine gawk-Erweiterung" -#: awkgram.y:572 awkgram.y:580 -#, fuzzy +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" -msgstr "'delete array' ist eine gawk-Erweiterung." - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" +msgstr "»delete(array)« ist eine gawk-Erweiterung" -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" -msgstr "'multistage' Zweiwege-Pipes funktionieren nicht." +msgstr "mehrstufige Zweiwege-Pipes funktionieren nicht" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" -msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung." +msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" -msgstr "Regulärer Ausdruck links vom '~'- oder '!~'-Operator." +msgstr "Regulärer Ausdruck links vom »~«- oder »!~«-Operator" -#: awkgram.y:830 awkgram.y:903 -#, fuzzy +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" -msgstr "Das alte awk erlaubt den Operator '**' nicht." +msgstr "Das alte awk unterstützt das Schlüsselwort »in« nur nach »for«" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" -msgstr "Regulärer Ausdruck rechts von einem Vergleich." +msgstr "Regulärer Ausdruck rechts von einem Vergleich" + +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "»getline var« ist ungültig innerhalb der »%s«-Regel" -#: awkgram.y:893 +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "»getline« ist ungültig innerhalb der »%s«-Regel" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" msgstr "" -"Nicht-umgelenktes 'getline' ist innerhalb der END-Aktion nicht definiert." +"Nicht-umgelenktes »getline« ist innerhalb der END-Aktion nicht definiert" -#: awkgram.y:904 -#, fuzzy +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" -msgstr "Das alte awk erlaubt den Operator '**' nicht." +msgstr "Das alte awk unterstützt keine mehrdimensionalen Felder" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" -msgstr "Aufruf von 'length' ohne Klammern ist nicht portabel." +msgstr "Aufruf von »length« ohne Klammern ist nicht portabel" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "Aufruf von 'length' ohne Klammern ist in POSIX-Mode veraltet." +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "indirekte Funktionsaufrufe sind eine gawk-Erweiterung" -#: awkgram.y:1009 -msgid "use of non-array as array" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" msgstr "" +"die besondere Variable »%s« kann nicht für den indirekten Funktionsaufruf " +"verwendet werden" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" -msgstr "Ungültiger Index-Ausdruck." +msgstr "Ungültiger Index-Ausdruck" -#: awkgram.y:1257 -#, fuzzy -msgid "unexpected newline or end of string" -msgstr "Unerwartetes Zeilenende" +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "Verwendung eines Nicht-Feldes als Feld" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "Kein Programmtext auf der Kommandozeile." +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "Warnung: " + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "Fatal: " -#: awkgram.y:1430 +#: awkgram.y:2043 +msgid "unexpected newline or end of string" +msgstr "Unerwarteter Zeilenumbruch oder Ende der Zeichenkette" + +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" -msgstr "Kann Quelldatei '%s' nicht zum Lesen öffnen (%s)." +msgstr "Quelldatei »%s« kann nicht zum Lesen geöffnet werden (%s)" + +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "Unbekannte Ursache" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "Quelldatei »%s« wurde bereits eingebunden" -#: awkgram.y:1528 +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "»@include« ist eine gawk-Erweiterung" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "leerer Dateiname nach @include" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "Kein Programmtext auf der Kommandozeile" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" -msgstr "Kann Quelldatei '%s' nicht lesen (%s)." +msgstr "Die Quelldatei »%s« kann nicht gelesen werden (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" -msgstr "Quelldatei '%s' ist leer." +msgstr "Die Quelldatei »%s« ist leer" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" -msgstr "Quelldatei hört nicht mit Zeilenende auf." +msgstr "Die Quelldatei hört nicht mit einem Zeilenende auf" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" -"Nicht-beendeter Regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei." +"Nicht beendeter regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" +"%s: %d: der tawk-Modifizierer für reguläre Ausdrücke »/.../%c« funktioniert " +"nicht in gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" +"Der tawk-Modifizierer für reguläre Ausdrücke »/.../%c« funktioniert nicht in " +"gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" -msgstr "Nicht-beendeter Regulärer Ausdruck" +msgstr "Nicht beendeter regulärer Ausdruck" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" -msgstr "Nicht-beendeter Regulärer Ausdruck am Dateiende." +msgstr "Nicht beendeter regulärer Ausdruck am Dateiende" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "" -"Die Verwendung von '\\#...' zur Fortsetzung von Zeilen ist nicht portabel." +"Die Verwendung von »\\#...« zur Fortsetzung von Zeilen ist nicht portabel" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" -msgstr "Backslash ist nicht letztes Zeichen auf der Zeile." +msgstr "das letzte Zeichen auf der Zeile ist kein Backslash (»\\«)" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" -msgstr "POSIX erlaubt den Operator '**=' nicht." +msgstr "POSIX erlaubt den Operator »**=« nicht" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" -msgstr "Das alte awk erlaubt den Operator '**=' nicht." +msgstr "Das alte awk unterstützt den Operator »**=« nicht" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" -msgstr "POSIX erlaubt den Operator '**' nicht." +msgstr "POSIX erlaubt den Operator »**« nicht" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" -msgstr "Das alte awk erlaubt den Operator '**' nicht." +msgstr "Das alte awk unterstützt den Operator »**« nicht" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" -msgstr "Das alte awk kennt den Operator '^=' nicht." +msgstr "Das alte awk unterstützt den Operator »^=« nicht" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" -msgstr "Das alte awk kennt den Operator '^' nicht." +msgstr "Das alte awk unterstützt den Operator »^« nicht" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" -msgstr "Nicht-beendeter String" +msgstr "Nicht beendete Zeichenkette" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" -msgstr "Ungültiges Zeichen '%c' in einem Ausdruck." +msgstr "Ungültiges Zeichen »%c« in einem Ausdruck" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" -msgstr "'%s' ist eine gawk-Erweiterung" +msgstr "»%s« ist eine gawk-Erweiterung" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" -msgstr "'%s' ist eine Erweiterung der Bell Labs." +msgstr "»%s« ist eine Erweiterung der Bell Labs" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" -msgstr "POSIX gestattet '%s' nicht." +msgstr "POSIX erlaubt »%s« nicht" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" -msgstr "Das alte awk gestattet '%s' nicht." +msgstr "»%s« wird im alten awk nicht unterstützt" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" -msgstr "'goto' gilt als schlechter Stil!\n" +msgstr "»goto« gilt als schlechter Stil!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" -msgstr "Unzulässige Argumentzahl %d für %s." +msgstr "Unzulässige Argumentzahl %d für %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: Das dritte Argument ist eine gawk-Erweiterung." - -#: awkgram.y:2472 +#: awkgram.y:3654 #, 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." +msgstr "%s: Ein String als letztes Argument von substitute hat keinen Effekt" -#: awkgram.y:2475 -#, fuzzy, c-format +#: awkgram.y:3659 +#, c-format msgid "%s third parameter is not a changeable object" -msgstr "Der dritte Parameter von sub ist ein unveränderliches Objekt." +msgstr "Der dritte Parameter von %s ist ein unveränderliches Objekt" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: Das dritte Argument ist eine gawk-Erweiterung" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" -msgstr "close: Das zweite Argument ist eine gawk-Erweiterung." +msgstr "close: Das zweite Argument ist eine gawk-Erweiterung" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" -"Entfernen Sie den führenden Unterstrich." +"Entfernen Sie den führenden Unterstrich" -#: awkgram.y:2530 -#, fuzzy +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" -"Entfernen Sie den führenden Unterstrich." +"Fehlerhafte Verwendung von dcngettext(_\"...\"): \n" +"Entfernen Sie den führenden Unterstrich" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "Funktion '%s': Parameter #%d, '%s' wiederholt Parameter #%d." +msgstr "Funktion »%s«: Parameter #%d, »%s« wiederholt Parameter #%d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" -msgstr "Funktion '%s': Parameter '%s' verdeckt eine globale Variable." +msgstr "Funktion »%s«: Parameter »%s« verdeckt eine globale Variable" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" -msgstr "Kann '%s' nicht zum Schreiben öffnen (%s)." +msgstr "»%s« kann nicht zum Schreiben geöffne werden(%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "Schicke Profile auf Stadard-Fehlerausgabe." +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "Die Liste der Variablen wird auf der Standardfehlerausgabe ausgegeben" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" -msgstr "%s: close gescheitert (%s)." +msgstr "%s: close ist gescheitert (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() zweimal aufgerufen!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." -msgstr "" +msgstr "es sind verdeckte Variablen vorhanden" -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" -msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen." +msgstr "Funktion »%s«: Funktionsnamen können nicht als Parameternamen benutzen" -#: awkgram.y:3004 -#, fuzzy, c-format +#: awkgram.y:4210 +#, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen." +msgstr "" +"Funktion »%s«: die spezielle Variable »%s« kann nicht als Parameter " +"verwendet werden" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" -msgstr "Funktion '%s' ist bereits definiert." +msgstr "Funktion »%s« wurde bereits definiert" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" -msgstr "Aufgerufene funktion '%s' ist nirgends definiert." +msgstr "Aufgerufene Funktion »%s« ist nirgends definiert" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "Funktion '%s' wird nirgends aufgerufen." +msgid "function `%s' defined but never called directly" +msgstr "Funktion »%s« wurde definiert aber nirgends aufgerufen" -#: awkgram.y:3201 +#: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" -"Konstanter Regulärer Ausdruck für Parameter #%d ergibt einen logischen Wert." +"Regulärer-Ausdruck-Konstante für Parameter #%d ergibt einen \n" +"logischen Wert" -#: awkgram.y:3245 -#, fuzzy, c-format +#: awkgram.y:4544 +#, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -"Funktion '%s' mit Leerzeichen zwischen Name und '(' aufgerufen, \n" -"%s" +"Funktion »%s« wird mit Leerzeichen zwischen Name und »(« aufgerufen, \n" +"oder als Variable oder Feld verwendet" -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "Division durch Null versucht in '/='." +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "Division durch Null wurde versucht" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" -msgstr "Division durch Null versucht in '%%'." +msgstr "Division durch Null versucht in »%%«" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s to \"%s\" fehlgeschlagen (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "Standardausgabe" -#: builtin.c:124 -msgid "reason unknown" -msgstr "Unbekannte Ursache" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" -msgstr "exp: Argument ist keine Zahl." +msgstr "exp: das Argument ist keine Zahl" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" -msgstr "exp: Argument %g außerhalb des gültigen Zahlenbereichs." +msgstr "exp: das Argument %g liegt außerhalb des gültigen Bereichs" -#: builtin.c:201 +#: builtin.c:200 #, 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." +"fflush: Leeren der Puffer nicht möglich, Pipe »%s« ist nur zum Lesen geöffnet" -#: builtin.c:204 +#: builtin.c:203 #, 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." +"fflush: Leeren der Puffer nicht möglich, Datei »%s« ist nur zum Lesen " +"geöffnet" -#: builtin.c:216 +#: builtin.c:215 #, 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." +msgstr "fflush: »%s« ist keine geöffnete Datei, Pipe oder Prozess" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" -msgstr "index: Erstes Argument ist kein String." +msgstr "index: Erstes Argument ist kein String" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" -msgstr "index: Zweites Argument ist kein string." +msgstr "index: Zweites Argument ist kein string" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" -msgstr "Argument ist keine Zahl." - -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "'delete array' ist eine gawk-Erweiterung." +msgstr "Argument ist keine Zahl" -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: Argument ist ein Feld" -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" +msgstr "»length(array)« ist eine gawk-Erweiterung" -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" -msgstr "length: Argument ist kein String." +msgstr "length: Argument ist kein String" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" -msgstr "log: Argument ist keine Zahl." +msgstr "log: Argument ist keine Zahl" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" -msgstr "log: Negatives Argument %g." +msgstr "log: Negatives Argument %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "Fatal: »count$« muss auf alle Formate angewandt werden oder auf keines" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" +msgid "field width is ignored for `%%' specifier" +msgstr "Feldbreite wird für die »%%«-Angabe ignoriert" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" +msgid "precision is ignored for `%%' specifier" +msgstr "Genauigkeit wird für die »%%«-Angabe ignoriert" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "Feldbreite und Genauigkeit werden für die »%%«-Angabe ignoriert" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "»$« ist in awk-Formaten nicht zulässig." +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "Fatal: »$« ist in awk-Formaten nicht zulässig" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "Argumentnummer bei »$« muss > 0 sein." +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "Fatal: die Anzahl der Argumen bei »$« muss > 0 sein" -#: builtin.c:853 -#, 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:830 +#, c-format +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "" +"Fatal: Argumentenanzahl %ld ist größer als die Gesamtzahl angegebener " +"Argumente" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "»$« nach Punkt in Formatangabe nicht zulässig." - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "»$« fehlt in positionsabhängiger Feldbreite oder Genauigkeit." +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "Fatal: »$« nach Punkt in Formatangabe nicht zulässig" + +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "Fatal: »$« fehlt in positionsabhängiger Feldbreite oder Genauigkeit" # -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" -msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert." +msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "»l« in POSIX-awk-Formaten nicht zulässig." +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "Fatal: »l« ist in POSIX-awk-Formaten nicht zulässig" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" -msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert." +msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "»L« in POSIX-awk-Formaten nicht zulässig." +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "Fatal: »L« ist in POSIX-awk-Formaten nicht zulässig" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" -msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert." +msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "»h« in POSIX-awk-Formaten nicht zulässig.<" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "Fatal: »h« ist in POSIX-awk-Formaten nicht zulässig" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "" +msgstr "[s]printf: Wert %g ist außerhalb des Bereichs für Format »%%%c«" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" +"das unbekannte Zeichen »%c« in der Formatspezifikation wird ignoriert: keine " +"Argumente umgewandelt" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "Nicht genügend Argumente für Formatangabe." +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "Fatal: Nicht genügend Argumente für die Formatangabe" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" -msgstr "^ ran out for this one" +msgstr "^ hierfür fehlte es" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: Format-Specifier hat keinen Controlcode." +msgstr "[s]printf: Format-Spezifikation hat keinen Controlcode" #: builtin.c:1349 msgid "too many arguments supplied for format string" -msgstr "Zu viele Argumente für Formatstring." +msgstr "Zu viele Argumente für den Formatstring" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: Keine Argumente" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" -msgstr "sqrt: Argument ist keine Zahl." - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: Argument %g ist negativ." +msgstr "sqrt: das Argument ist keine Zahl" #: builtin.c:1479 #, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: Start-Index %g ist ungültig, 1 wird benutzt." +msgid "sqrt: called with negative argument %g" +msgstr "sqrt: das Argument %g ist negativ" -#: builtin.c:1484 +#: builtin.c:1503 #, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: Start-Wert %g wird abgeschnitten." - -#: builtin.c:1510 -#, fuzzy, c-format msgid "substr: length %g is not >= 1" -msgstr "substr: Länge %g ist kleiner oder gleich 0." +msgstr "substr: Länge %g ist nicht >= 1" -#: builtin.c:1512 -#, fuzzy, c-format +#: builtin.c:1505 +#, c-format msgid "substr: length %g is not >= 0" -msgstr "substr: Länge %g ist kleiner oder gleich 0." +msgstr "substr: Länge %g ist nicht >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" -msgstr "substr: Länge %g wird abgeschnitten." +msgstr "substr: Nicht ganzzahlige Länge %g wird abgeschnitten" -#: builtin.c:1524 +#: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" +"substr: Länge %g ist zu groß für Stringindizierung, wird auf %g gekürzt" + +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: Start-Index %g ist ungültig, 1 wird verwendet" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: Nicht ganzzahliger Start-Wert %g wird abgeschnitten" -#: builtin.c:1536 +#: builtin.c:1559 msgid "substr: source string is zero length" -msgstr "substr: String ist leer." +msgstr "substr: Quellstring ist leer" -#: builtin.c:1552 -#, fuzzy, c-format +#: builtin.c:1575 +#, c-format msgid "substr: start index %g is past end of string" -msgstr "substr: Start-Wert %d liegt hinter dem Ende des Strings." +msgstr "substr: Start-Wert %g liegt hinter dem Ende des Strings" -#: builtin.c:1560 -#, fuzzy, c-format +#: builtin.c:1583 +#, 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)." +"substr: Länge %g am Start-Wert %g überschreitet die Länge des ersten " +"Arguments (%lu)" -#: builtin.c:1637 -#, fuzzy +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "strftime: Formatwert in PROCINFO[\"strftime\"] ist numerischen Typs" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: Das zweite Argument ist keine Zahl" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "" +"strftime: das zweite Argument ist kleiner als 0 oder zu groß für time_t" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" -msgstr "strftime: Erstes Argument ist kein String." +msgstr "strftime: Das erste Argument ist kein String" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" -msgstr "strftime: Format-String ist leer." - -#: builtin.c:1652 -#, fuzzy -msgid "strftime: received non-numeric second argument" -msgstr "strftime. Zweites Argument ist keine Zahl." +msgstr "strftime: Der Format-String ist leer" -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" -msgstr "mktime: Argument ist kein String." +msgstr "mktime: Das Argument ist kein String" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" -msgstr "" +msgstr "mktime: mindestens einer der Werte ist außerhalb des normalen Bereichs" + +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "Die Funktion »system« ist im Sandbox-Modus nicht erlaubt" -#: builtin.c:1783 -#, fuzzy +#: builtin.c:1819 msgid "system: received non-string argument" -msgstr "system: Argument ist kein String." +msgstr "system: Das Argument ist kein String" -#: builtin.c:1904 eval.c:2157 -#, fuzzy, c-format +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "Referenz auf die nicht initialisierte Variable »%s«" + +#: builtin.c:1941 +#, c-format msgid "reference to uninitialized field `$%d'" -msgstr "Referenz auf die nicht-initialisierte Variable '%s'." +msgstr "Referenz auf das nicht initialisierte Feld »$%d«" -#: builtin.c:2009 -#, fuzzy +#: builtin.c:2028 msgid "tolower: received non-string argument" -msgstr "tolower: Argument ist kein String." +msgstr "tolower: das Argument ist kein String" -#: builtin.c:2039 -#, fuzzy +#: builtin.c:2062 msgid "toupper: received non-string argument" -msgstr "toupper: Argument ist kein String." +msgstr "toupper: das Argument ist kein String" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" -msgstr "atan2: Erstes Argument ist keine Zahl." +msgstr "atan2: das erste Argument ist keine Zahl" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" -msgstr "atan2: Zweites Argument ist keine Zahl." +msgstr "atan2: das zweite Argument ist keine Zahl" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" -msgstr "sin: Argument istk eine Zahl." +msgstr "sin: das Argument ist keine Zahl" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" -msgstr "cos: Argument ist keine Zahl." +msgstr "cos: das Argument ist keine Zahl" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" -msgstr "srand: Argument ist keine Zahl." +msgstr "srand: das Argument ist keine Zahl" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" -msgstr "match: Drittes Argument ist kein Array." +msgstr "match: das dritte Argument ist kein Array" -#: builtin.c:2744 -#, fuzzy +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: Drittes Argument 0 als 1 interpretiert" +msgstr "gensub: 0 als drittes Argument wird als 1 interpretiert" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" -msgstr "lshift: Erstes Argument ist keine Zahl." +msgstr "lshift: das erste Argument ist keine Zahl" -#: builtin.c:2862 -#, fuzzy +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" -msgstr "atan2: Zweites Argument ist keine Zahl." +msgstr "lshift: das zweite Argument ist keine Zahl" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" -"lshift(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." +"lshift(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten." +msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten" -#: builtin.c:2872 +#: builtin.c:2788 #, 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." +"lshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen " +"führen" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" -msgstr "rshift: Erstes Argument ist keine Zahl." +msgstr "rshift: das erste Argument ist keine Zahl" -#: builtin.c:2900 -#, fuzzy +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" -msgstr "atan2: Zweites Argument ist keine Zahl." +msgstr "rshift: das zweite Argument ist keine Zahl" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" -"rshift (%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." +"rshift (%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten." +msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten" -#: builtin.c:2910 +#: builtin.c:2825 #, 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." +"rshift(%lf, %lf): Zu große Shift-Werte werden zu merkwürdigen Ergebnissen " +"führen" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" -msgstr "and: Erstes Argument ist keine Zahl." +msgstr "and: das erste Argument ist keine Zahl" -#: builtin.c:2938 -#, fuzzy +#: builtin.c:2852 msgid "and: received non-numeric second argument" -msgstr "atan2: Zweites Argument ist keine Zahl." +msgstr "and: das zweite Argument ist keine Zahl" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." +msgstr "" +"and(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten." +msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" -msgstr "or: Erstes Argument ist keine Zahl." +msgstr "or: das erste Argument ist keine Zahl" -#: builtin.c:2974 -#, fuzzy +#: builtin.c:2887 msgid "or: received non-numeric second argument" -msgstr "atan2: Zweites Argument ist keine Zahl." +msgstr "or: das zweite Argument ist keine Zahl" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." +msgstr "or(%lf, %lf): Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten." +msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" -msgstr "xor: Erstes Argument ist keine Zahl." +msgstr "xor: das erste Argument ist keine Zahl" -#: builtin.c:3010 -#, fuzzy +#: builtin.c:2925 msgid "xor: received non-numeric second argument" -msgstr "atan2: Zweites Argument ist keine Zahl." +msgstr "xor: das zweite Argument ist keine Zahl" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf: Negative Werte werden merkwürdige Ergebnisse liefern." +msgstr "xor(%lf, %lf: Negative Werte werden zu merkwürdigen Ergebnissen führen" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten." +msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" -msgstr "compl: Erstes Argument ist keine Zahl." +msgstr "compl: das erste Argument ist keine Zahl" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): Negativer Wert wird merkwürdige Ergebnisse liefern." +msgstr "compl(%lf): Negativer Wert wird zu merkwürdigen Ergebnissen führen" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): Dezimalteil wird abgeschnitten." +msgstr "compl(%lf): Dezimalteil wird abgeschnitten" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: '%s' ist keine gültige Locale-Kategorie." +msgstr "dcgettext: »%s« ist keine gültige Locale-Kategorie" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "Unbekannter Knotentyp %d" -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "Pufferüberlauf in genflags2str." - -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:423 eval.c:437 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden." - -#: eval.c:802 -#, 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." +msgid "unknown opcode %d" +msgstr "Unbekannter Opcode %d" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "'break' außerhalb einer Schleife ist nicht portabel." - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "'break' außerhalb einer Schleife ist nicht zulässig." +#: eval.c:434 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "Opcode %s ist weder ein Operator noch ein Schlüsselwort" -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "'continue' außerhalb einer Schleife ist nicht portabel." +#: eval.c:488 +msgid "buffer overflow in genflags2str" +msgstr "Pufferüberlauf in genflags2str" -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "'continue' außerhalb einer Schleife ist nicht zulässig." +#: eval.c:698 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktions-Aufruf-Stack\n" +"\n" -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden." +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "»IGNORECASE« ist eine gawk-Erweiterung" -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "'next' kann nicht in einer END-Regel benutzt werden." +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "»BINMODE« ist eine gawk-Erweiterung" -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "'nextfile' kann nicht in einer BEGIN-Regel benutzt werden." +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE Wert »%s« ist ungültig und wird als 3 behandelt" -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden." +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "Falsche »%sFMT«-Angabe »%s«" -#: eval.c:952 -msgid "statement has no effect" -msgstr "Anweisung hat keinen Effekt." +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "»--lint« wird abgeschaltet, da an »LINT« zugewiesen wird" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" -msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." +msgstr "Funktion »%s« kann nicht als Variable oder Feld verwendet werden" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" -msgstr "Referenz auf nicht-initialisiertes Argument '%s'." +msgstr "Referenz auf nicht initialisiertes Argument »%s«" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "Referenz auf die nicht-initialisierte Variable '%s'." +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "Nicht numerischer Wert für Feldreferenz verwendet" -#: eval.c:1197 -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:1179 +msgid "attempt to field reference from null string" +msgstr "Referenz auf ein Feld von einem Null-String" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "Zuweisung in einer Bedingung." +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "Versuch des Zugriffs auf Feld %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "Division durch Null versucht." +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "Referenz auf das nicht initialisierte Feld »$%ld«" -#: eval.c:1409 profile.c:661 +#: eval.c:1256 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "Illegaler Typ (%s) in tree_eval" +msgid "function `%s' called with more arguments than declared" +msgstr "Funktion »%s« mit zu vielen Argumenten aufgerufen" + +#: eval.c:1437 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: unerwarteter Typ »%s«" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" -msgstr "Division durch Null versucht in '/='." +msgstr "Division durch Null versucht in »/=«" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" -msgstr "Division durch Null versucht in '%%='." +msgstr "Division durch Null versucht in »%%=«" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "Funktion '%s' mit zu vielen Argumenten aufgerufen." +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "" +"Es wird versucht, das Feld »%s[\"%.*s\"]« in einem Skalarkontext zu verwenden" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "Funktion '%s' ist nicht definiert." +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "Zuweisung in einer Bedingung" -#: eval.c:1983 +#: eval.c:1911 +msgid "statement has no effect" +msgstr "Anweisung hat keinen Effekt" + +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# Funktion Aufruf-Stack\n" -"\n" +"for-Schleife: Feld »%s« ändert seine Größe von %ld innerhalb der Schleife zu " +"%ld" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "Nicht-numerischer Wert für Feldreferenz verwendet." +msgid "function called indirectly through `%s' does not exist" +msgstr "die durch »%s« indirekt aufgerufene Funktion existiert nicht" -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "Referenz von einem Null-String" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "Funktion »%s« ist nicht definiert" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "Versuch des Zugriffs auf Feld %d." +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "Nicht umgelenktes »getline« ist innerhalb der »%s«-Aktion unzuässig" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "" -"Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt." +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "Fehler beim Lesen der Eingabedatei »%s«: %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "'IGNORECASE' ist eine gawk-Erweiterung" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "»nextfile« kann nicht aus einer »«%s-Regel aufgerufen werden" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "'BINMODE' ist eine gawk-Erweiterung." +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "»exit« kann im aktuellen Kontext nicht aufgerufen werden" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" +msgid "`next' cannot be called from a `%s' rule" +msgstr "»next« kann nicht in einer »%s«-Regel verwendet werden" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "Falsche '%sFMT'-Angabe '%s'" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Entschuldigung, aber es ist unbekannt, wie »%s« zu interpretieren ist" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "'--lint' wird abgeschaltet, da 'LINT' gesetzt ist." +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "Erweiterungen sind im Sandbox-Modus nicht erlaubt" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" -msgstr "'extension' ist eine gawk-Erweiterung." +msgstr "»extension« ist eine gawk-Erweiterung" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: Kann '%s' nicht öffnen (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "Fatal: extension: »%s« kann nicht geöffnet werden (%s)\n" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"Fatal: Erweiterung: Bibliothek »%s«: definiert »plugin_is_GPL_compatible« " +"nicht (%s)\n" -#: ext.c:105 -msgid "extension: missing function name" +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" +"Fatal: Erweiterung: Bibliothek »%s«: Funktion »%s« kann nicht aufgerufen " +"werden (%s)\n" -#: ext.c:110 -#, fuzzy, c-format +#: ext.c:127 +msgid "extension: missing function name" +msgstr "Erweiterung: Funktionsname fehlt" + +#: ext.c:132 +#, c-format msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n" +msgstr "Erweiterung: unzulässiges Zeichen »%c« in Funktionsname »%s«" -#: ext.c:116 -#, fuzzy, c-format +#: ext.c:141 +#, c-format msgid "extension: can't redefine function `%s'" -msgstr "extension: Kann '%s' nicht öffnen (%s)\n" +msgstr "Erweiterung: Funktion »%s« kann nicht neu definiert werden" -#: ext.c:120 -#, fuzzy, c-format +#: ext.c:145 +#, c-format msgid "extension: function `%s' already defined" -msgstr "Funktion '%s' ist nicht definiert." +msgstr "Erweiterung: Funktion »%s« wurde bereits definiert" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "Erweiterung: Funktion »%s« wurde bereits vorher definiert" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" +"Erweiterung: die eingebaute Funktion »%s« kann nicht als Funktionsname " +"verwendet werden" -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "Funktion '%s' ist bereits definiert." +#: ext.c:156 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: negative Anzahl von Argumenten für Funktion »%s«" -#: ext.c:204 -#, fuzzy, c-format +#: ext.c:259 +#, c-format msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "Funktion '%s' wird nirgends aufgerufen." +msgstr "" +"Funktion »%s« wird als Funktion definiert, die nie mehr als %d Argument(e) " +"akzeptiert" -#: ext.c:207 -#, fuzzy, c-format +#: ext.c:262 +#, c-format msgid "function `%s': missing argument #%d" -msgstr "Funktion '%s' ist nicht definiert." +msgstr "Funktion »%s«: fehlendes Argument #%d" -#: ext.c:217 -#, fuzzy, c-format +#: ext.c:279 +#, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "Versuch, Skalar '%s' als Array zu verwenden." +msgstr "" +"Funktion »%s«: Argument #%d: Es wird versucht, einen Skalar als Feld zu " +"verwenden" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" +"Funktion »%s«: Argument #%d: Es wird versucht, ein Feld als Skalar zu " +"verwenden" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" -msgstr "Operation nicht möglich." +msgstr "Die Operation wird nicht unterstützt" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" -msgstr "" +msgstr "NF wird ein negativer Wert zugewiesen" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: das vierte Argument ist eine gawk-Erweiterung" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: das vierte Argument ist kein Feld" + +#: field.c:969 msgid "split: second argument is not an array" -msgstr "split: Zweites Argument ist kein Array." +msgstr "split: das zweite Argument ist kein Feld" + +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: als zweites und viertes Argument kann nicht das gleiche Feld " +"verwendet werden" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: Ein untergeordnetes Feld des zweiten Arguments kann nicht als viertes " +"Argument verwendet werden" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: Ein untergeordnetes Feld des vierten Arguments kann nicht als zweites " +"Argument verwendet werden" -#: field.c:909 +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" -msgstr "split: Null-String als drittes Argument ist eine gawk-Erweiterung." +msgstr "split: Null-String als drittes Argument ist eine gawk-Erweiterung" + +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: Das vierte Argument ist kein Feld" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: Das zweite Argument ist kein Feld" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: Das dritte Argument darf nicht Null sein" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: als zweites und viertes Argument kann nicht das gleiche Feld " +"verwendet werden" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: Ein untergeordnetes Feld des zweiten Arguments kann nicht als " +"viertes Argument verwendet werden" -#: field.c:961 +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: Ein untergeordnetes Feld des vierten Arguments kann nicht als " +"zweites Argument verwendet werden" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "'FIELDWIDTHS' ist eine gawk-Erweiterung." +msgstr "»FIELDWIDTHS« ist eine gawk-Erweiterung" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" +msgstr "ungültiger FIELDWIDTHS-Wert nah bei »%s«" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" -msgstr "Null-String für 'FS' ist eine gawk-Erweiterung." +msgstr "Null-String für »FS« ist eine gawk-Erweiterung" -#: field.c:1092 -#, fuzzy +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" -msgstr "Das alte awk erlaubt den Operator '**' nicht." +msgstr "Das alte awk unterstützt keine regulären Ausdrücke als Wert von »FS«" -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: Option '%s' ist mehrdeutig.\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "»FPAT« ist eine gawk-Erweiterung" -#: getopt.c:623 getopt.c:627 +#: getopt.c:604 getopt.c:633 #, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: Option »%s« ist mehrdeutig\n" + +#: getopt.c:679 getopt.c:683 +#, c-format msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: Option '--%s' erlaubt kein Argument.\n" +msgstr "%s: Die Option »--%s« hat keine Argumente\n" -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format +#: getopt.c:692 getopt.c:697 +#, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: Option '%c%s\" erlaubt kein Argument.\n" +msgstr "%s: Die Option »%c%s« hat keine Argument\n" -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format +#: getopt.c:740 getopt.c:759 +#, c-format msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: Option '%s' erfordert ein Argument.\n" +msgstr "%s: Die Option »%s« erfordert ein Argument\n" -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format +#: getopt.c:797 getopt.c:800 +#, c-format msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: Unbekannte Option '--%s'.\n" +msgstr "%s: Die Option »--%s« ist unbekannt\n" -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format +#: getopt.c:808 getopt.c:811 +#, c-format msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: Unbekannte Option '%c%s'.\n" +msgstr "%s: Die Option »%c%s« ist unbekannt\n" -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format +#: getopt.c:860 getopt.c:863 +#, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: Ungültige Option -- %c.\n" +msgstr "%s: Ungültige Option -- »%c«\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 +#, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s Option erfordert ein Argument -- %c.\n" +msgstr "%s Die Option »%c« erfordert ein Argument\n" -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format +#: getopt.c:989 getopt.c:1005 +#, c-format msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: Option '-W %s' ist mehrdeutig.\n" +msgstr "%s: Die Option »-W %s« ist mehrdeutig\n" -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format +#: getopt.c:1029 getopt.c:1047 +#, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s. Option '-W %s' erlaubt kein Argument.\n" +msgstr "%s: Die Option »-W %s« hat keine Argumente\n" -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format +#: getopt.c:1068 getopt.c:1086 +#, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: Option '%s' erfordert ein Argument.\n" +msgstr "%s: Die Option »-W %s« erfordert ein Argument\n" + +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "" +"das Kommandozeilen-Argument »%s« ist ein Verzeichnis: wird übersprungen" -#: io.c:322 io.c:352 +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" -msgstr "Kann Datei '%s' nicht zum Lesen öffnen (%s)." +msgstr "Die Datei »%s« kann nicht zum Lesen geöffnet werden (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" -msgstr "Schließen von Dateideskriptor %d ('%s') gescheitert (%s)." +msgstr "Das Schließen des Dateideskriptors %d (»%s«) ist gescheitert (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "Ungültiger Tree-Typ %s in redirect()." +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "Umlenkungen sind im Sandbox-Modus nicht erlaubt" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" -msgstr "Ausdruck in '%s' Umlenkung hat nur einen numerischen Wert." +msgstr "" +"Der Ausdruck in einer Umlenkung mittels »%s« hat nur einen numerischen Wert" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" -msgstr "Ausdruck für '%s' Umlenkung ist ein leerer String." +msgstr "Der Ausdruck für eine Umlenkung mittels »%s« ist ein leerer String" -#: io.c:600 +#: io.c:623 #, 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." +"Der Dateiname »%s« für eine Umlenkung mittels »%s« kann das Ergebnis eines " +"logischen Ausdrucks sein" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "Unnötige Kombination von '>' und '>>' für Datei '%.*s'." +msgstr "Unnötige Kombination von »>« und »>>« für Datei »%.*s«" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" -msgstr "Kann Pipe '%s' nicht für Ausgabe öffnen (%s)." +msgstr "Die Pipe »%s« kann nicht für die Ausgabe geöffnet werden (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" -msgstr "Kann Pipe '%s' nicht für Eingabe öffnen (%s)." +msgstr "Die Pipe »%s« kann nicht für die Eingabe geöffnet werden (%s)" -#: io.c:717 +#: io.c:752 #, 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)." +msgstr "" +"Die bidirektionale Pipe »%s« kann nicht für die Ein-/Ausgabe geöffnet werden " +"(%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" -msgstr "Kann nicht von '%s' umlenken (%s)." +msgstr "Von »%s« kann nicht umgelenkt werden (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" -msgstr "Kann nicht auf '%s' umlenken (%s)." +msgstr "Zu »%s« kann nicht umgelenkt werden (%s)" -#: io.c:851 +#: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" -"Systemgrenze offener Dateien erreicht; beginne mit Multiplexing von " -"Dateideskriptoren." +"Die Systemgrenze offener Dateien ist erreicht, daher werden nun " +"Dateideskriptoren mehrfach verwendet" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." -msgstr "Schließen von '%s' gescheitert (%s)." +msgstr "Das Schließen von »%s« ist gescheitert (%s)." -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" -msgstr "Zu viele Pipes oder Eingabedateien offen." +msgstr "Zu viele Pipes oder Eingabedateien offen" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" -msgstr "close: Zweites Argument muss 'to' oder 'from' sein." +msgstr "close: Das zweite Argument muss »to« oder »from« sein" -#: io.c:912 +#: io.c:951 #, 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." +msgstr "close: »%.*s« ist weder offene Datei, noch Pipe oder Ko-Prozess" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" -msgstr "'close' für eine Umlenkung, die nie geöffnet wurde." +msgstr "»close« für eine Umlenkung, die nie geöffnet wurde" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -"close: Umlenkung '%s' nicht mit '[&' geöffnet, zweites Argument wird " -"ignoriert." +"close: Umlenkung »%s« wurde nicht mit »[&« geöffnet, das zweite Argument " +"wird ignoriert" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "Fehlerstatus (%d) beim Schließen der Pipe '%s' (%s)." +msgstr "Fehlerstatus (%d) beim Schließen der Pipe »%s« (%s)" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "Fehlerstatus (%d) beim Schließen de rDatei '%s' (%s)." +msgstr "Fehlerstatus (%d) beim Schließen der Datei »%s« (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" -msgstr "Das explizite des Sockets '%s' fehlt." +msgstr "Das explizite Schließen des Sockets »%s« fehlt" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" -msgstr "Das explizite Schließen des Ko-Prozesses '%s' fehlt." +msgstr "Das explizite Schließen des Ko-Prozesses »%s« fehlt" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" -msgstr "Das explizite Schließen der Pipe '%s' fehlt." +msgstr "Das explizite Schließen der Pipe »%s« fehlt" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" -msgstr "Das explizite Schließen der Datei '%s' fehlt." +msgstr "Das explizite Schließen der Datei »%s« fehlt" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" -msgstr "Fehler beim Schreiben auf stdout (%s)." +msgstr "Fehler beim Schreiben auf die Standardausgabe (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" -msgstr "Fehler beim Schreiben auf stderr (%s)." +msgstr "Fehler beim Schreiben auf die Standardfehlerausgabe (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." -msgstr "Leeren der Pipe '%s' gescheitert (%s)." +msgstr "Das Leeren der Pipe »%s« ist gescheitert (%s)" -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "Ko-Prozess: Leeren der Pipe zu '%s' gescheitert (%s)." +msgstr "Ko-Prozess: Das Leeren der Pipe zu »%s« ist gescheitert (%s)" -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." -msgstr "Flush der Datei '%s' gescheitert (%s)." +msgstr "Das Leeren der Datei »%s« ist gescheitert (%s)" -#: io.c:1222 -#, fuzzy, c-format +#: io.c:1262 +#, c-format msgid "local port %s invalid in `/inet'" -msgstr "Lokaler Port in '%s' ist ungültig." +msgstr "Der lokale Port »%s« ist ungültig in »/inet«" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw Client noch nicht fertig." - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "Nur root darf '/inet/raw' benutzen" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "'/inet/raw'-Server noch nicht fertig." +msgstr "Die Angaben zu entferntem Host und Port (%s, %s) sind ungültig" -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" -msgstr "Kein bekanntes Protokoll in Dateinamen '%s' angegeben." +msgstr "Es wurde kein (bekanntes) Protokoll im Dateinamen »%s« angegeben" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" -msgstr "Dateiname '%s' ist unvollständig." +msgstr "Der Dateiname »%s« ist unvollständig" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" -msgstr "Sie müssen einen Rechnernamen in '/inet' angeben." +msgstr "Sie müssen in /inet einen Rechnernamen angeben" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" -msgstr "Sie müssen einen Port in '/inet' angeben." +msgstr "Sie müssen in »/inet« einen Port angeben" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" -msgstr "TCP/IP-Verbindungen sind nicht möglich." +msgstr "TCP/IP-Verbindungen werden nicht unterstützt" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "Datei '%s' ist ein Verzeichnis." - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "Benutzen Sie 'PROCINFO[\"%s\"]' statt '%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "Benutzen Sie 'PROCINFO[...] statt '/dev/user'." - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" -msgstr "Konnte '%s' nicht öffnen, Mode '%s'." +msgstr "»%s« konnte nicht geöffnet werden, Modus »%s«" -#: io.c:1923 -#, fuzzy, c-format +#: io.c:1747 +#, c-format msgid "close of master pty failed (%s)" -msgstr "Schließen der Pipe gescheitert (%s)." +msgstr "" +"Das Schließen der übergeordneten Terminal-Gerätedatei ist gescheitert (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" -msgstr "Schließen von stdout in Kindprozess gescheitert (%s)." +msgstr "Das Schließen der Standardausgabe im Kindprozess ist gescheitert (%s)" -#: io.c:1928 -#, fuzzy, c-format +#: io.c:1752 +#, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." +msgstr "" +"Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardausgabe " +"im Kindprozess ist gescheitert (dup: %s)" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" -msgstr "Schließen von stdin im Kindprozess gescheitert (%s)." +msgstr "Schließen von stdin im Kindprozess gescheitert (%s)" -#: io.c:1933 -#, fuzzy, c-format +#: io.c:1757 +#, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." +msgstr "" +"Das Verschieben der untergeordneten Terminal-Gerätedatei zur Standardeingabe " +"im Kindprozess ist gescheitert (dup: %s)" -#: io.c:1935 io.c:1954 -#, fuzzy, c-format +#: io.c:1759 io.c:1780 +#, c-format msgid "close of slave pty failed (%s)" -msgstr "Schließen der Pipe gescheitert (%s)." +msgstr "" +"Das Schließen der untergeordneten Terminal-Gerätedatei ist gescheitert (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." +msgstr "" +"Das Verschieben der Pipe zur Standardausgabe im Kindprozess ist gescheitert " +"(dup: %s)" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." +msgstr "" +"Das Verschieben der Pipe zur Standardeingabe im Kindprozess ist gescheitert " +"(dup: %s)" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "" +"Das Wiederherstellen der Standardausgabe im Elternprozess ist gescheitert\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "" +"Das Wiederherstellen der Standardeingabe im Elternprozess ist gescheitert\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" -msgstr "Schließen der Pipe gescheitert (%s)." +msgstr "Das Schließen der Pipe ist gescheitert (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" -msgstr "'|&' nicht möglich." +msgstr "»|&« wird nicht unterstützt" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" -msgstr "Kann Pipe '%s' nicht öffnen (%s)." +msgstr "Pipe »%s« kann nicht geöffnet werden (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" -msgstr "Kann Kindprozess für '%s' nicht erzeugen (fork: %s)." +msgstr "Kindprozess für »%s« kann nicht erzeugt werden (fork: %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" -msgstr "Datei '%s' ist leer." +msgstr "Die Datei »%s« ist leer" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" -msgstr "" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "Fehler beim Lesen der Eingabedatei '%s': %s." +msgstr "Es konnte kein weiterer Speicher für die Eingabe beschafft werden" -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" -msgstr "Multicharacter-Wert von 'RS' ist eine gawk-Erweiterung." +msgstr "Multicharacter-Wert von »RS« ist eine gawk-Erweiterung" -#: main.c:306 -msgid "out of memory" -msgstr "Kein Speicher mehr." +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "IPv6-Verbindungen werden nicht unterstützt" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" -msgstr "Option '-m[fr]' ist in gawk bedeutungslos." +msgstr "Die Option »-m[fr]« ist in gawk bedeutungslos" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" -msgstr "Anwendung der Option -m: '-m[fr] nnn'" +msgstr "Anwendung der Option -m: »-m[fr] nnn«" + +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "Das leere Argument für »--source« wird ignoriert" -#: main.c:393 +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: Option '-W %s' unbekannt, ignoriert.\n" +msgstr "%s: Die Option »-W %s« ist unbekannt und wird ignoriert\n" -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "Leeres Argument für '--source' ignoriert." - -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "%s Option erfordert ein Argument -- %c.\n" +msgstr "%s: Die Option %c erfordert ein Argument\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" -"Umgebungsvariable 'POSIXLY_CORRECT' ist gesetzt: '--posix' angeschaltet." +"Die Umgebungsvariable »POSIXLY_CORRECT« ist gesetzt: »--posix« wird " +"eingeschaltet" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" -msgstr "'--posix' hat Vorrang vor '--traditional'" +msgstr "»--posix« hat Vorrang vor »--traditional«" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "'--posix' /'--traditional' hat Vorrang vor '--non-decimal-data'." +msgstr "»--posix« /»--traditional« hat Vorrang vor »--non-decimal-data«" -#: main.c:530 -#, fuzzy, c-format +#: main.c:557 +#, c-format msgid "running %s setuid root may be a security problem" -msgstr "%s als setuid root auszuführen, kann zu Sicherheitsproblemen führen." +msgstr "%s als setuid root auszuführen kann zu Sicherheitsproblemen führen" -#: main.c:571 -#, fuzzy, c-format +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "»--posix« hat Vorrang vor »--binary«" + +#: main.c:613 +#, c-format msgid "can't set binary mode on stdin (%s)" -msgstr "Kann Mode für stdin nicht setzen (%s)." +msgstr "" +"Das Setzen des Binärermodus für die Standardeingabe ist nicht möglich (%s)" -#: main.c:574 -#, fuzzy, c-format +#: main.c:616 +#, c-format msgid "can't set binary mode on stdout (%s)" -msgstr "Kann Mode für stdout nicht setzen (%s)." +msgstr "" +"Das Setzen des Binärermodus für die Standardausgabe ist nicht möglich (%s)" -#: main.c:576 -#, fuzzy, c-format +#: main.c:618 +#, c-format msgid "can't set binary mode on stderr (%s)" -msgstr "Kann Mode für stderr nicht setzen (%s)." +msgstr "" +"Das Setzen des Binärermodus für die Standardfehlerausgabe ist nicht möglich " +"(%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" -msgstr "Kein Programmtext." +msgstr "Es wurde überhaupt kein Programmtext angegeben!" -#: main.c:721 +#: main.c:734 #, 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" +msgstr "Aufruf: %s [POSIX- oder GNU-Optionen] -f PROGRAMM [--] Datei ...\n" -#: main.c:723 +#: main.c:736 #, 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" +msgstr "Aufruf: %s [POSIX- oder GNU-Optionen] -- %cPROGRAMM%c Datei ...\n" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX-Optionen\t\tGNU-Optionen (lang):\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "POSIX-Optionen\t\tlange GNU-Optionen: (standard)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f PROGRAM\t\t--file=PROGRAM\n" +msgstr "\t-f PROGRAMM\t\t--file=PROGRAMM\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F Feldtrenner\t\t\t--field-separator=Feldtrenner\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=Wert\t\t--assign=var=Wert\n" -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] Wert\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=Datei]\t--dump-variables[=Datei]\n" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "POSIX-Optionen\t\tGNU-Optionen (lang): (Erweiterungen)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d [Datei]\t\t--dump-variables[=Datei]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'Programmtext'\t--source=Programmtext\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E Datei\t\t\t--exec=Datei\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=Programmtext\t--source=Programmtext\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p [Datei]\t\t--profile[=Datei]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R Datei\t\t\t--command=Datei\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 -#, fuzzy +#: main.c:779 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 "" -"den Sie im Kapitel 'Reporting Problems and Bugs' in der \n" -"gedruckten Version finden.\n" +"\n" +"Zum Berichten von Fehlern sehen Sie bitte den Punkt »Bugs«\n" +"in »gawk.info«, den Sie als Kapitel »Reporting Problems and Bugs«\n" +"in der gedruckten Version finden.\n" +"\n" +"Fehler in der Ãœbersetzuung senden Sie bitte als E-Mail an\n" +"an translation-team-de@lists.sourceforge.net\n" +"\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" +"gawk ist eine Sprache zur Suche nach und dem Verarbeiten von Mustern.\n" +"Normalerweise ließt das Programm von der Standardeingabe und gibt\n" +"auf der Standardausgabe aus.\n" +"\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" +"Beispiele:\n" +"\tgawk '{ sum += $1 }; END { print sum }' file\n" +"\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 -#, fuzzy, c-format +#: main.c:807 +#, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" @@ -1697,16 +1914,16 @@ "(at your option) any later version.\n" "\n" msgstr "" -"Copyright (C) 1989, 1991-2001 Free Software Foundation.\n" +"Copyright © 1989, 1991-%d Free Software Foundation.\n" "\n" -"Dieses Programm ist Freie Software. Sie können es unter den Bedingungen\n" -"der von der Free Software Foundation veröffentlichten GNU \n" -"General Public License weitergeben und/oder ändern.\n" +"Dieses Programm ist Freie Software. Sie können es unter den Bedingungen\n" +"der von der Free Software Foundation veröffentlichten GNU \n" +"General Public License weitergeben und/oder ändern.\n" "Es gilt Version 2 dieser Lizenz oder (nach Ihrer Wahl) irgendeine\n" -"spätere Version.\n" +"spätere Version.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1714,362 +1931,285 @@ "GNU General Public License for more details.\n" "\n" msgstr "" -"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" +"Dieses Programm wird weitergegeben in der Hoffnung, dass es nützlich ist,\n" +"aber OHNE JEDE GEWÄHRLEISTUNG; nicht einmal mit der impliziten Gewähr-\n" +"leistung einer HANDELBARKEIT oder der EIGNUNG FÃœR EINEN BESTIMMTEN ZWECK.\n" +"Sehen Sie bitte die GNU General Public License für weitere Details.\n" -#: main.c:813 -#, fuzzy +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" msgstr "" "Sie sollten eine Kopie der GNU General Publice License zusammen mit\n" -"diesem Programm erhalten haben. Wenn nicht, schreiben Sie an die Free \n" -"Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-" -"1307, USA.\n" +"diesem Programm erhalten haben. Wenn nicht, lesen Sie bitte\n" +"http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft setzt FS im POSIX-awk nicht auf Tab." +msgstr "-Ft setzt FS im POSIX-awk nicht auf Tab" + +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "unbekannter Wert für eine Feldangabe: %d\n" -#: main.c:1122 +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" +"%s: Argument »%s« von »-v« ist nicht in der Form »Variable=Wert«\n" +"\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" -msgstr "" +msgstr "»%s« ist kein gültiger Variablenname" -#: main.c:1145 +#: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "»%s« ist kein Variablenname, es wird nach der Datei »%s=%s« gesucht" + +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" msgstr "" +"die eingebaute Funktion »%s« kann nicht als Variablenname verwendet werden" + +# c-format +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "Funktion »%s« kann nicht als Name einer Variablen verwendet werden" -#: main.c:1184 +#: main.c:1262 msgid "floating point exception" -msgstr "Floating point exception" +msgstr "Fließkomma-Ausnahme" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "Fataler Fehler: interner Fehler" -#: main.c:1206 -#, fuzzy +#: main.c:1284 msgid "fatal error: internal error: segfault" -msgstr "Fataler Fehler: interner Fehler" +msgstr "Fataler Fehler: interner Fehler: Speicherbegrenzungsfehler" -#: main.c:1218 -#, fuzzy +#: main.c:1296 msgid "fatal error: internal error: stack overflow" -msgstr "Fataler Fehler: interner Fehler" +msgstr "Fataler Fehler: interner Fehler: Stapelüberlauf" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" -msgstr "Kein geöffneter Dateideskriptor %d" +msgstr "Kein bereits geöffneter Dateideskriptor %d" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" -msgstr "Konnte /dev/null nicht für Dateideskriptor %d öffnen." - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "Konnte Gruppen nicht finden: %s" +msgstr "/dev/null konnte nicht für Dateideskriptor %d geöffnet werden" -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "Kommandozeile:" -#: msg.c:120 -msgid "warning: " -msgstr "Warnung: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "Fehler: " -#: msg.c:178 -msgid "fatal: " -msgstr "Fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "Kann String nicht in Gleitkommazahl konvertieren." - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" -msgstr "Backslash am String-Ende." +msgstr "Backslash am Ende der Zeichenkette" -#: node.c:609 -#, fuzzy, c-format +#: node.c:517 +#, c-format msgid "old awk does not support the `\\%c' escape sequence" -msgstr "Das alte awk erlaubt den Operator '**' nicht." +msgstr "Das alte awk unterstützt die Fluchsequenz »\\%c« nicht" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX erlabut keine '\\x'-Escapes." +msgstr "POSIX erlaubt keine »\\x«-Escapes" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" -msgstr "Keine Hex-Ziffern in '\\x'-Escape." +msgstr "In der »\\x«-Fluchtsequenz sind keine hexadezimalen Zahlen" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" +"Die Hex-Sequenz \\x%.*s aus %d Zeichen wird wahrscheinlich nicht wie " +"gewünscht interpretiert" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "Escape-Sequenz '\\%c' als '%c' behandelt." +msgstr "Fluchtsequenz »\\%c« wird wie ein normales »%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" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Es wurden unbekannte Multibyte-Daten gefunden. Ihre Daten entsprechen " +"neventuell nicht der gesetzten Locale" -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "Konnte '%s' nicht zum Schreiben öffnen: %s" - -#: profile.c:457 -#, fuzzy, c-format -msgid "internal error: %s with null vname" -msgstr "Interner Fehler: Node_var with null vname." - -#: profile.c:521 -msgid "# treated internally as `delete'" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" +"%s %s »%s«: Die Kennungen des Dateideskriptors konnten nicht abgefragt " +"werden: (fcntl F_GETFD: %s)" -#: profile.c:1073 +#: posix/gawkmisc.c:188 #, c-format -msgid "# this is a dynamically loaded extension function" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" +"%s %s »%s«: close-on-exec konnte nicht gesetzt werden: (fcntl F_SETFD: %s)" -#: profile.c:1104 +#: profile.c:83 #, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawk-Profil, erzeugt %s\n" +msgid "could not open `%s' for writing: %s" +msgstr "»%s« konnte nicht zum Schreiben geöffnet werden: %s" -#: profile.c:1107 +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "Das Profil wird auf der Standardfehlerausgabe ausgegeben" + +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# BEGIN block(s)\n" +"\t# %s Blöcke\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" -"\t# Rule(s)\n" +"\t# Regeln(s)\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END block(s)\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "Interner Fehler: %s mit null vname" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# gawk-Profil, erzeugt %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" -"\t# Functionen, alphabetisch sortiert\n" +"\t# Funktionen in alphabetischer Reihenfolge\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "Unerwarteter Typ %s in prec_level." +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: unbekannter Umlenkungstyp %d" -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Unbekannter Knotentyp %d" +#: re.c:573 +#, c-format +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "" +"Ein Bereich in der Form »[%c-%c]« ist abhängig von der gesetzten Locale" -#: regcomp.c:132 +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"Regulärer-Ausdruck-Komponente »%.*s« sollte wahrscheinlich »[%.*s]« sein" + +#: regcomp.c:131 msgid "Success" msgstr "Erfolg" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Kein Treffer" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" -msgstr "Ungültiger Regulärer Ausdruck." +msgstr "Ungültiger Regulärer Ausdruck" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" -msgstr "Ungültiges Zeichen." +msgstr "Ungültiges Zeichen" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" -msgstr "Ungültier Name für Zeichenklasse." +msgstr "Ungültiger Name für eine Zeichenklasse" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" -msgstr "Angehängter Backslash" +msgstr "Angehängter Backslash" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" -msgstr "Ungültige Referenze" +msgstr "Ungültige Rück-Referenz" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" -msgstr "[ oder [^ nicht geschlossen" +msgstr "[ oder [^ werden nicht geschlossen" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" -msgstr "( oder \\( nicht geschlossen" +msgstr "( oder \\( werden nicht geschlossen" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" -msgstr "\\{ nicht geschlossen" +msgstr "\\{ wird nicht geschlossen" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" -msgstr "Ungültiger Inhalt von \\{\\}" +msgstr "Ungültiger Inhalt von \\{\\}" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" -msgstr "Ungültiges Bereichsende" +msgstr "Ungültiges Bereichsende" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" -msgstr "Kein Speicher mehr." +msgstr "Kein freier Speicher mehr vorhanden" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" -msgstr "Vorangehender Regulärer Ausdruck ist ungültig." +msgstr "Vorangehender regulärer Ausdruck ist ungültig" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" -msgstr "Vorzeitiges Ende des Regulären Ausdrucks." +msgstr "Vorzeitiges Ende des regulären Ausdrucks" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" -msgstr "Regulärer Ausdruck zu groß." +msgstr "Regulärer Ausdruck ist zu groß" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" -msgstr ") oder \\) nicht geöffnet" +msgstr ") oder \\) werden nicht geöffnet" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" -msgstr "Kein vorangehender Regulärer Ausdruck." - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: Benutzung der Variablen »%s« als Array ist nicht zulässig." - -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: Erstes Argument ist kein Array." - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: Zweites Argument ist kein array." +msgstr "Kein vorangehender regulärer Ausdruck" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: Illegale Option -- %c.\n" +#~ msgid "could not find groups: %s" +#~ msgstr "Die Gruppen konnten nicht gefunden werden: %s" -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" +#~ msgid "assignment is not allowed to result of builtin function" #~ msgstr "" -#~ "\n" -#~ "Um Fehler zu melden, lesen Sie bitte den Abschnitt 'Bugs' in " -#~ "'gawk_info',\n" - -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "Ungültige Syntax im Namen '%s' für Variablenzuweisung." - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "Interner Fehler: Node_var_array with null vname." - -#~ msgid "or used in other expression context" -#~ msgstr "or in anderem Kontext benutzt" - -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "'%s' ist eine Funktion, Zuweisungen sind nicht erlaubt." - -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "BEGIN-Blöcke müssen einen Aktionsteil haben." - -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "'nextfile' in BEGIN- oder END-Aktion benutzt." - -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "" -#~ "Nicht-umgelenktes 'getline' ist innerhalb der BEGIN- und END-Aktion nicht " -#~ "definiert." - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x nicht in tokentab\n" - -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "Der dritte Parameter von gsub ist ein unveränderliches Objekt." - -#~ msgid "Unfinished \\ escape" -#~ msgstr "Nicht-beendetes \\\\-Escape." - -#~ msgid "unfinished repeat count" -#~ msgstr "Nicht-beendeter Wiederholungszähler." - -#~ msgid "malformed repeat count" -#~ msgstr "Fehlerhafter Wiederholungszähler." - -#~ msgid "Unbalanced [" -#~ msgstr "[ wird nicht geschlossen." - -#~ msgid "Unbalanced (" -#~ msgstr "( wird nicht geschlossen." - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Kein Regulärer Ausdruck angegeben." - -#~ msgid "Unbalanced )" -#~ msgstr ") wird nicht geöffnet." - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "Feld %d in FIELDWIDTHS muss > 0 sein." - -#~ msgid "function %s called\n" -#~ msgstr "Funktion %s aufgerufen\n" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "" -#~ "Kann bidirektionalen Socket '%s' nicht für Ein-/Ausgabe öffnen (%s)." - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "Port-Angabe in '%s' ist ungültig." - -#~ msgid "pipe from `%s': could not set close-on-exec (fcntl: %s)" -#~ msgstr "Pipe von '%s': Konnte close-on-exec nicht setzen (fcntl: %s)." - -#~ msgid "pipe to `%s': could not set close-on-exec (fcntl: %s)" -#~ msgstr "Pipe zu '%s': Konnte close-on-exec nicht setzen (fcntl: %s)." - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "Interner Fehler: Datei '%s', Zeile %d\n" +#~ "Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/es.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/es.gmo differ diff -Nru gawk-3.1.8+dfsg/po/es.po gawk-4.0.1+dfsg/po/es.po --- gawk-3.1.8+dfsg/po/es.po 2010-05-06 17:57:36.000000000 +0000 +++ gawk-4.0.1+dfsg/po/es.po 2012-03-28 20:03:46.000000000 +0000 @@ -1,39 +1,51 @@ -# Mensajes en español para gawk-3.1.7i. -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# Mensajes en español para gawk-4.0.0h. +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. -# Cristian Othón Martínez Vera , 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010. +# Cristian Othón Martínez Vera , 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.7i\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2010-04-30 12:18-0500\n" -"Last-Translator: Cristian Othón Martínez Vera \n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-01-30 07:42-0600\n" +"Last-Translator: Cristian Othón Martínez Vera \n" "Language-Team: Spanish \n" +"Language: es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "desde %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "se intentó usar un valor escalar como una matriz" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" -msgstr "se intentó usar la función `%s' como una matriz" +msgstr "se intentó usar la función `%s' como una matriz" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" -msgstr "se intentó usar el parámetro escalar `%s como una matriz'" +msgstr "se intentó usar el parámetro escalar `%s como una matriz'" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "se intentó usar el dato escalar `%s' como una matriz" +msgid "attempt to use scalar `%s' as an array" +msgstr "se intentó usar el escalar `%s' como una matriz" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "desde %s" +msgid "attempt to use array `%s' in a scalar context" +msgstr "se intentó usar la matriz `%s' en un contexto escalar" #: array.c:513 #, c-format @@ -43,553 +55,656 @@ #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" -msgstr "el subíndice de la matriz `%s' es la cadena nula" +msgstr "el subíndice de la matriz `%s' es la cadena nula" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" -msgstr "delete: el índice `%s' no está en la matriz `%s'" +msgstr "delete: el índice `%s' no está en la matriz `%s'" + +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "se intentó usar el dato escalar `%s[\"%.*s\"]' como una matriz" -#: array.c:792 +#: array.c:910 #, c-format msgid "%s: empty (null)\n" -msgstr "%s: vacío (nulo)\n" +msgstr "%s: vacío (nulo)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" -msgstr "%s: vacío (cero)\n" +msgstr "%s: vacío (cero)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: tamaño_tabla = %d, tamaño_matriz = %d\n" +msgstr "%s: tamaño_tabla = %d, tamaño_matriz = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" -msgstr "%s: es un parámetro\n" +msgstr "%s: es un parámetro\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref a %s\n" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: el argumento no es una matriz" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: el segundo argumento no es una matriz" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: el segundo argumento no es una matriz" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: el primer argumento no es una matriz" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: el primer argumento no es una matriz" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: no se puede usar una submatriz del primer argumento para el segundo " +"argumento" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: no se puede usar una submatriz del primer argumento para el segundo " +"argumento" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: no se puede usar una submatriz del segundo argumento para el primer " +"argumento" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: no se puede usar una submatriz del segundo argumento para el primer " +"argumento" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "`%s' es inválido como un nombre de función" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "la función de comparación de ordenamiento `%s' no está definida" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" -msgstr "Los bloques %s deben tener una parte de acción" +msgstr "los bloques %s deben tener una parte de acción" -#: awkgram.y:221 +#: awkgram.y:252 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" +msgstr "cada regla debe tener un patrón o una parte de acción" -#: awkgram.y:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "el awk antiguo no admite múltiples reglas `BEGIN' o `END'" +msgstr "el awk antiguo no admite múltiples reglas `BEGIN' o `END'" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' es una función interna, no se puede redefinir" +msgstr "`%s' es una función interna, no se puede redefinir" -#: awkgram.y:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" -"la constante de expresión regular `//' parece un comentario de C++, pero no " +"la constante de expresión regular `//' parece un comentario de C++, pero no " "lo es" -#: awkgram.y:334 +#: awkgram.y:436 #, 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 " +"la constante de expresión regular `/%s/' parece un comentario de C, pero no " "lo es" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "la sentencia puede no tener efecto" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "valores case duplicados en el cuerpo de un switch: %s" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "se detectó un `default' duplicado en el cuerpo de un switch" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "no se permite `break' fuera de un bucle o switch" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "no se permite `continue' fuera de un bucle" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "se usó `%s' en la acción %s" +msgid "`next' used in %s action" +msgstr "se usó `next' en la acción %s" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' es una extensión de gawk" +msgstr "`nextfile' es una extensión de gawk" + +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "se usó `nextfile' en la acción %s" -#: awkgram.y:492 +#: awkgram.y:865 msgid "`return' used outside function context" -msgstr "se usó `return' fuera del contexto de la función" +msgstr "se usó `return' fuera del contexto de la función" -#: awkgram.y:534 +#: awkgram.y:925 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:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" -msgstr "`delete array' es una extensión de gawk" +msgstr "`delete array' es una extensión de gawk" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete(array)' es una extensión de gawk que no es transportable" +msgstr "`delete(array)' es una extensión de tawk que no es transportable" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "valores case duplicados en el cuerpo de un switch: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "Se detectó un `default' duplicado en el cuerpo de un switch" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" -msgstr "las líneas de trabajo de dos vías multiestado no funcionan" +msgstr "las líneas de trabajo de dos vías multiestado no funcionan" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" -msgstr "expresión regular del lado derecho de una asignación" +msgstr "expresión regular del lado derecho de una asignación" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" -msgstr "expresión regular a la izquierda del operador `~' o `!~'" +msgstr "expresión regular a la izquierda del operador `~' o `!~'" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" -"el awk antiguo no admite la palabra clave `in' excepto después de `for'" +"el awk antiguo no admite la palabra clave `in' excepto después de `for'" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" -msgstr "expresión regular a la derecha de una comparación" +msgstr "expresión regular a la derecha de una comparación" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "`getline var' inválido dentro de la regla `%s'" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "`getline' inválido dentro de la regla `%s'" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" -msgstr "`getline' no redirigido indefinido dentro de la acción de END" +msgstr "`getline' no redirigido indefinido dentro de la acción de END" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "el awk antiguo no admite matrices multidimensionales" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" -msgstr "la llamada de `length' sin paréntesis no es transportable" +msgstr "la llamada de `length' sin paréntesis no es transportable" + +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "las llamadas indirectas a función son una extensión de gawk" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "" +"no se puede usar la variable especial `%s' como llamada indirecta a función" + +#: awkgram.y:1671 +msgid "invalid subscript expression" +msgstr "expresión de subíndice inválida" -#: awkgram.y:1009 +#: awkgram.y:1711 msgid "use of non-array as array" msgstr "uso de una matriz que no es matriz" -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "expresión de subíndice inválida" +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "aviso: " -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "nueva línea o fin de la cadena inesperados" +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "fatal: " -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "texto de programa vacío en la linea de comando" +#: awkgram.y:2043 +msgid "unexpected newline or end of string" +msgstr "nueva línea o fin de la cadena inesperados" -#: awkgram.y:1430 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, 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:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "razón desconocida" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "ya se incluyó el fichero fuente `%s'" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include es una extensión de gawk" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "nombre de fichero vacío después de @include" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "texto de programa vacío en la linea de órdenes" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "no se puede leer el fichero fuente `%s' (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" -msgstr "el fichero fuente `%s' está vacío" +msgstr "el fichero fuente `%s' está vacío" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" -msgstr "el fichero fuente no termina con línea nueva" +msgstr "el fichero fuente no termina con línea nueva" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" -msgstr "expresión regular sin terminar termina con `\\` al final del fichero" +msgstr "expresión regular sin terminar termina con `\\` al final del fichero" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" -"%s: %d: el modificador de expresión regular `/.../%c` de tawk no funciona en " +"%s: %d: el modificador de expresión regular `/.../%c` de tawk no funciona en " "gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" -"el modificador de expresión regular `/.../%c` de tawk no funciona en gawk" +"el modificador de expresión regular `/.../%c` de tawk no funciona en gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" -msgstr "expresión regular sin terminar" +msgstr "expresión regular sin terminar" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" -msgstr "expresión regular sin terminar al final del fichero" +msgstr "expresión regular sin terminar al final del fichero" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" -msgstr "el uso de la continuación de línea `\\ #...' no es transportable" +msgstr "el uso de la continuación de línea `\\ #...' no es transportable" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" -msgstr "la barra invertida no es el último caracter en la línea" +msgstr "la barra invertida no es el último caracter en la línea" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX no permite el operador `**='" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "el awk antiguo no admite el operador `**='" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX no permite el operador `**'" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "el awk antiguo no admite el operador `**='" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "el operador `^=' no se admite en el awk antiguo" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "el operador `^' no se admite en el awk antiguo" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "cadena sin terminar" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" -msgstr "caracter '%c' inválido en la expresión" +msgstr "caracter '%c' inválido en la expresión" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" -msgstr "`%s' es una extensión de gawk" +msgstr "`%s' es una extensión de gawk" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" -msgstr "`%s' es una extensión de Bell Labs" +msgstr "`%s' es una extensión de Bell Labs" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX no permite `%s'" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' no se admite en el awk antiguo" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" -msgstr "¡`goto' se considera dañino!\n" +msgstr "¡`goto' se considera dañino!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, 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:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: el tercer argumento es una extensión de gawk" +msgstr "%d es inválido como número de argumentos para %s" -#: awkgram.y:2472 +#: awkgram.y:3654 #, 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" +"%s: la literal de cadena como último argumento de substitute no tiene efecto" -#: awkgram.y:2475 +#: awkgram.y:3659 #, 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" +msgstr "el tercer argumento de %s no es un objecto modificable" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: el tercer argumento es una extensión de gawk" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" -msgstr "close: el segundo argumento es una extensión de gawk" +msgstr "close: el segundo argumento es una extensión de gawk" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcgettext(_\"...\") es incorrecto: quite el subrayado inicial" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d" +msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" -msgstr "función `%s': parámetro `%s' oscurece la variable global" +msgstr "función `%s': parámetro `%s' oscurece la variable global" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "no se puede abrir `%s' para escritura (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "se envía el perfil a la salida estándar de error" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "se envía la lista de variables a la salida estándar de error" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" -msgstr "%s: falló close (%s)" +msgstr "%s: falló close (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" -msgstr "¡se llamó shadow_funcs() dos veces!" +msgstr "¡se llamó shadow_funcs() dos veces!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "hay variables opacadas." -#: awkgram.y:3001 +#: awkgram.y:4206 #, 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" +"función `%s': no se puede usar un nombre de función como nombre de parámetro" -#: awkgram.y:3004 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" -"función `%s': no se puede usar la variable especial `%s' como un parámetro " -"de función" +"función `%s': no se puede usar la variable especial `%s' como un parámetro " +"de función" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" -msgstr "el nombre de función `%s' se definió previamente" +msgstr "el nombre de función `%s' se definió previamente" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" -msgstr "se llamó a la función `%s' pero nunca se definió" +msgstr "se llamó a la función `%s' pero nunca se definió" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "se definió la función `%s' pero nunca se llamó" +msgid "function `%s' defined but never called directly" +msgstr "se definió la función `%s' pero nunca se llamó directamente" -#: awkgram.y:3201 +#: awkgram.y:4435 #, 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" +"la constante de expresión regular para el parámetro #%d da un valor booleano" -#: awkgram.y:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -"se llamó la función `%s' con espacio entre el nombre y el `(',\n" -"o se usó como una variable o una matriz" +"se llamó la función `%s' con espacio entre el nombre y el `(',\n" +"o se usó como una variable o una matriz" -#: awkgram.y:3664 -msgid "division by zero attempted in `/'" -msgstr "se intentó una división por cero en `/'" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "se intentó una división por cero" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" -msgstr "se intentó una división por cero en `%%'" +msgstr "se intentó una división por cero en `%%'" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" -msgstr "falló %s a \"%s\" (%s)" +msgstr "falló %s a \"%s\" (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" -msgstr "salida estándar" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "razón desconocida" +msgstr "salida estándar" -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" -msgstr "exp: se recibió un argumento que no es un número" +msgstr "exp: se recibió un argumento que no es númerico" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" -msgstr "exp: el argumento %g está fuera de rango" +msgstr "exp: el argumento %g está fuera de rango" -#: builtin.c:201 +#: builtin.c:200 #, 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 " +"fflush: no se puede limpiar: se abrió la tubería `%s' para lectura, no para " "escritura" -#: builtin.c:204 +#: builtin.c:203 #, 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 " +"fflush: no se puede limpiar: se abrió el fichero `%s' para lectura, no para " "escritura" -#: builtin.c:216 +#: builtin.c:215 #, 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" +msgstr "fflush: `%s' no es un fichero abierto, tubería o co-proceso" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: el primer argumento recibido no es una cadena" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: el segundo argumento recibido no es una cadena" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" -msgstr "int: se recibió un argumento que no es un número" +msgstr "int: se recibió un argumento que no es númerico" -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "`length(array)' es una extensión de gawk" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length: un argumento de parámetro sin tipo se forzará a escalar" +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: se recibió un argumento de matriz" -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: un argumento sin tipo se forzará a escalar" +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" +msgstr "`length(array)' es una extensión de gawk" -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" -msgstr "length: se recibió un argumento que no es una cadena" +msgstr "length: se recibió un argumento que no es una cadena" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" -msgstr "log: se recibió un argumento que no es un número" +msgstr "log: se recibió un argumento que no es númerico" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" -msgstr "log: se recibió el argumento negativo %g" +msgstr "log: se recibió el argumento negativo %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "se debe utilizar `count$' en todos los formatos o en ninguno" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "fatal: se debe utilizar `count$' en todos los formatos o en ninguno" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "se descarta la anchura del campo para el especificador `%%%%'" +msgid "field width is ignored for `%%' specifier" +msgstr "se descarta la anchura del campo para el especificador `%%'" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "se descarta la precisión para el especificador `%%%%'" +msgid "precision is ignored for `%%' specifier" +msgstr "se descarta la precisión para el especificador `%%'" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" +msgid "field width and precision are ignored for `%%' specifier" msgstr "" -"se descartan la anchura del campo y la precisión para el especificador `%%%%'" +"se descartan la anchura del campo y la precisión para el especificador `%%'" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "no se permite `$' en los formatos de awk" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "fatal: no se permite `$' en los formatos de awk" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "la cuenta de argumentos con `$' debe ser > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "fatal: la cuenta de argumentos con `$' debe ser > 0" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" +msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "" -"la cuenta de argumentos %ld es mayor que el número total de argumentos " -"proporcionados" +"fatal: la cuenta de argumentos %ld es mayor que el número total de " +"argumentos proporcionados" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "no se permite `$' después de un punto en el formato" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "fatal: no se permite `$' después de un punto en el formato" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" msgstr "" -"no se proporciona `$' para el ancho o la precisión del campo posicional" +"fatal: no se proporciona `$' para la anchura o la precisión del campo " +"posicional" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' no tiene significado en los formatos de awk; se descarta" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "no se permite `l' en los formatos POSIX de awk" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "fatal: no se permite `l' en los formatos POSIX de awk" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' no tiene significado en los formatos de awk; se descarta" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "no se permite `L' en los formatos POSIX de awk" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "fatal: no se permite `L' en los formatos POSIX de awk" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' no tiene significado en los formatos de awk; se descarta" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "no se permite `h' en los formatos POSIX de awk" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "fatal: no se permite `h' en los formatos POSIX de awk" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: el valor %g está fuera del rango para el formato `%%%c'" +msgstr "[s]printf: el valor %g está fuera del rango para el formato `%%%c'" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" -"se descarta el carácter especificador de formato `%c' desconocido: no se " -"convirtió ningún argumento" +"se descarta el carácter especificador de formato `%c' desconocido: no se " +"convirtió ningún argumento" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "no hay suficientes argumentos para satisfacer a la cadena de formato" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "" +"fatal: no hay suficientes argumentos para satisfacer a la cadena de formato" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" -msgstr "se acabó ^ para éste" +msgstr "se acabó ^ para éste" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" @@ -599,1079 +714,1143 @@ msgid "too many arguments supplied for format string" msgstr "se proporcionaron demasiados argumentos para la cadena de formato" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: sin argumentos" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" -msgstr "sqrt: se recibió un argumento que no es un número" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: se llamó con el argumento negativo %g" +msgstr "sqrt: se recibió un argumento que no es un númerico" #: builtin.c:1479 #, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: el índice de inicio %g es inválido, se usa 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: se truncará el índice de inicio no entero %g" +msgid "sqrt: called with negative argument %g" +msgstr "sqrt: se llamó con el argumento negativo %g" -#: builtin.c:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: la longitud %g no es >= 1" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: la longitud %g no es >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" -msgstr "substr: se truncará la longitud no entera %g" +msgstr "substr: se truncará la longitud no entera %g" -#: builtin.c:1524 +#: builtin.c:1517 #, 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 " +"substr: la longitud %g es demasiado grande para ser índice de cadena, se " "trunca a %g" -#: builtin.c:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: el índice de inicio %g es inválido, se usa 1" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: se truncará el índice de inicio no entero %g" + +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr: la cadena de origen es de longitud cero" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format 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" +msgstr "substr: el índice de inicio %g está después del fin de la cadena" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format 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 " +"substr: la cadena %g en el índice de inicio %g excede la longitud del primer " "argumento (%lu)" -#: builtin.c:1637 +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "" +"strftime: el valor de formato en PROCINFO[\"strftime\"] tiene tipo numérico" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: el segundo argumento recibido no es númerico" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "" +"strftime: el segundo argumento es menor que 0 o demasiado grande para time_t" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: el primer argumento recibido no es una cadena" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" -msgstr "strftime: se recibió una cadena de formato vacía" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: el segundo argumento recibido no es un número" +msgstr "strftime: se recibió una cadena de formato vacía" -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" -msgstr "mktime: se recibió un argumento que no es una cadena" +msgstr "mktime: se recibió un argumento que no es una cadena" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "" -"mktime: por lo menos uno de los valores está fuera del rango por defecto" +"mktime: por lo menos uno de los valores está fuera del rango por defecto" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "no se permite la función 'system' en modo sandbox" + +#: builtin.c:1819 msgid "system: received non-string argument" -msgstr "system: se recibió un argumento que no es una cadena" +msgstr "system: se recibió un argumento que no es una cadena" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referencia a la variable sin inicializar `%s'" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "referencia al campo sin inicializar `$%d'" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" -msgstr "tolower: se recibió un argumento que no es una cadena" +msgstr "tolower: se recibió un argumento que no es una cadena" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" -msgstr "toupper: se recibió un argumento que no es una cadena" +msgstr "toupper: se recibió un argumento que no es una cadena" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" -msgstr "atan2: el primer argumento recibido no es un número" +msgstr "atan2: el primer argumento recibido no es númerico" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" -msgstr "atan2: el segundo argumento recibido no es un número" +msgstr "atan2: el segundo argumento recibido no es númerico" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" -msgstr "sin: se recibió un argumento que no es un número" +msgstr "sin: se recibió un argumento que no es númerico" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" -msgstr "cos: se recibió un argumento que no es un número" +msgstr "cos: se recibió un argumento que no es númerico" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" -msgstr "srand: se recibió un argumento que no es un número" +msgstr "srand: se recibió un argumento que no es númerico" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: el tercer argumento no es una matriz" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: el tercer argumento de 0 se trata como 1" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" -msgstr "lshift: el primer argumento recibido no es un número" +msgstr "lshift: el primer argumento recibido no es númerico" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" -msgstr "lshift: el segundo argumento recibido no es un número" +msgstr "lshift: el segundo argumento recibido no es númerico" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños" +msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): los valores fraccionarios se truncarán" +msgstr "lshift(%lf, %lf): los valores fraccionarios se truncarán" -#: builtin.c:2872 +#: builtin.c:2788 #, 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" +"lshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " +"extraños" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" -msgstr "rshift: el primer argumento recibido no es un número" +msgstr "rshift: el primer argumento recibido no es númerico" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" -msgstr "rshift: el segundo argumento recibido no es un número" +msgstr "rshift: el segundo argumento recibido no es númerico" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños" +msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados" +msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2910 +#: builtin.c:2825 #, 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" +"rshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " +"extraños" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" -msgstr "and: el primer argumento recibido no es un número" +msgstr "and: el primer argumento recibido no es númerico" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" -msgstr "and: el segundo argumento recibido no es un número" +msgstr "and: el segundo argumento recibido no es númerico" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): los valores negativos darán resultados extraños" +msgstr "and(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" +msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" -msgstr "or: el primer argumento recibido no es un número" +msgstr "or: el primer argumento recibido no es númerico" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" -msgstr "or: el segundo argumento recibido no es un número" +msgstr "or: el segundo argumento recibido no es númerico" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" +msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" +msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" -msgstr "xor: el primer argumento recibido no es un número" +msgstr "xor: el primer argumento recibido no es númerico" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" -msgstr "xor: el segundo argumento recibido no es un número" +msgstr "xor: el segundo argumento recibido no es númerico" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños" +msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán" +msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" -msgstr "compl: se recibió un argumento que no es un número" +msgstr "compl: se recibió un argumento que no es númerico" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): el valor negativo dará resultados extraños" +msgstr "compl(%lf): el valor negativo dará resultados extraños" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): el valor fraccionario se truncará" +msgstr "compl(%lf): el valor fraccionario se truncará" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' no es una categoría local válida" +msgstr "dcgettext: `%s' no es una categoría local válida" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "tipo de nodo %d desconocido" -#: eval.c:422 +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "código de operación %d desconocido" + +#: eval.c:434 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "el código de operación %s no es un operador o una palabra clave" + +#: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "desbordamiento de almacenamiento temporal en genflags2str" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:698 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "se intentó usar la matriz `%s' en un contexto escalar" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Pila de Llamadas de Funciones:\n" +"\n" + +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' es una extensión de gawk" + +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' es una extensión de gawk" -#: eval.c:802 +#: eval.c:812 #, c-format -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" +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "el valor BINMODE `%s' es inválido; se trata como 3" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "`break' fuera de un ciclo no es transportable" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "no se permite `break' fuera de un ciclo" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' fuera de un ciclo no es transportable" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "no se permite `continue' fuera de un ciclo" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' no se puede llamar desde una regla BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' no se puede llamar desde una regla END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' no se puede llamar desde una regla BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' no se puede llamar desde una regla END" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "especificación `%sFMT' `%s' errónea" -#: eval.c:952 -msgid "statement has no effect" -msgstr "la declaración no tiene efecto" +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "se desactiva `--lint' debido a una asignación a `LINT'" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, 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" +msgstr "no se puede usar el nombre de la función `%s' como variable o matriz" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referencia al argumento sin inicializar `%s'" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referencia a la variable sin inicializar `%s'" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "se intentó una referencia de campo desde un valor que no es númerico" -#: eval.c:1197 -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:1179 +msgid "attempt to field reference from null string" +msgstr "se intentó una referencia de campo desde una cadena nula" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "se usó una asignación en un contexto condicional" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "se intentó acceder al campo %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "se intentó una división por cero" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "referencia al campo sin inicializar `$%ld'" -#: eval.c:1409 profile.c:661 +#: eval.c:1256 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipo ilegal (%s) en tree_eval" +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:1572 +#: eval.c:1437 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: tipo `%s' inesperado" + +#: eval.c:1532 msgid "division by zero attempted in `/='" -msgstr "se intentó una división por cero en `/='" +msgstr "se intentó una división por cero en `/='" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" -msgstr "se intentó una división por cero en `%%='" +msgstr "se intentó una división por cero en `%%='" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, 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" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "se intentó usar la matriz `%s[\"%.*s\"]' en un contexto escalar" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "la función `%s' no está definida" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "se usó una asignación en un contexto condicional" + +#: eval.c:1911 +msgid "statement has no effect" +msgstr "la declaración no tiene efecto" -#: eval.c:1983 +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# Pila de Llamadas de Funciones:\n" -"\n" +"bucle for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución " +"del bucle" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- principal --\n" +msgid "function called indirectly through `%s' does not exist" +msgstr "no existe la función llamada indirectamente a través de `%s'" -#: eval.c:2141 -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:2143 -msgid "attempt to reference from null string" -msgstr "se intentó una referencia desde una cadena nula" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "la función `%s' no está definida" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "se intentó accesar al campo %d" +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "`getline' no redirigido es inválido dentro de la regla `%s'" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "no se permite la asignación como resultado de una función interna" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "error al leer el fichero de entrada `%s': %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' es una extensión de gawk" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "`nextfile' no se puede llamar desde una regla `%s'" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' es una extensión de gawk" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "`exit' no se puede llamar en el contexto actual" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "el valor BINMODE `%s' es inválido; se trata como 3" +msgid "`next' cannot be called from a `%s' rule" +msgstr "`next' no se puede llamar desde una regla `%s'" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "especificación `%sFMT' `%s' errónea" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Perdón, no se cómo interpretar `%s'" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "se desactiva `--lint' debido a una asignación a `LINT'" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "no se permiten las extensiones en modo sandbox" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" -msgstr "`extension' es una extensión de gawk" +msgstr "`extension' es una extensión de gawk" + +#: ext.c:75 +#, c-format +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "fatal: extension: no se puede abrir `%s' (%s)\n" -#: ext.c:77 +#: ext.c:84 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: no se puede abrir `%s' (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatal: extension: la biblioteca `%s': no define " +"`plugin_is_GPL_compatible' (%s)\n" -#: ext.c:85 +#: ext.c:93 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" -"extension: la biblioteca `%s': no puede llamar a la función `%s' (%s)\n" +"fatal: extension: la biblioteca `%s': no puede llamar a la función `" +"%s' (%s)\n" -#: ext.c:105 +#: ext.c:127 msgid "extension: missing function name" -msgstr "extension: falta el nombre de la función" +msgstr "extension: falta el nombre de la función" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: carácter ilegal `%c' en el nombre de la función `%s'" +msgstr "extension: carácter ilegal `%c' en el nombre de la función `%s'" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" -msgstr "extension: no se puede redefinir la función `%s'" +msgstr "extension: no se puede redefinir la función `%s'" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" -msgstr "extension: la función `%s' ya está definida" +msgstr "extension: la función `%s' ya está definida" + +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: el nombre de función `%s' se definió previamente" -#: ext.c:125 +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "extension: no se puede utilizar la orden interna de gawk `%s' como nombre de " -"función" +"función" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: el nombre de función `%s' se definió previamente" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: cuenta de argumento negativa para la función `%s'" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "la función `%s' se definió para tomar no más de %d argumento(s)" +msgstr "la función `%s' se definió para tomar no más de %d argumento(s)" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" -msgstr "función `%s': falta el argumento #%d" +msgstr "función `%s': falta el argumento #%d" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" -"función `%s': argumento #%d: se intentó usar un escalar como una matriz" +"función `%s': argumento #%d: se intentó usar un escalar como una matriz" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" -"función `%s': argumento #%d: se intentó usar una matriz como un escalar" +"función `%s': argumento #%d: se intentó usar una matriz como un escalar" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" -msgstr "No Se Da Soporte A La Operación" +msgstr "No Se Admite La Operación" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" -msgstr "NF con un valor negativo" +msgstr "se definió NF con un valor negativo" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: el cuarto argumento es una extensión de gawk" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: el cuarto argumento no es una matriz" + +#: field.c:969 msgid "split: second argument is not an array" msgstr "split: el segundo argumento no es una matriz" -#: field.c:909 +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: no se puede usar la misma matriz para el segundo y cuarto argumentos" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: no se puede usar una submatriz del segundo argumento para el cuarto " +"argumento" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: no se puede usar una submatriz del cuarto argumento para el segundo " +"argumento" + +#: field.c:1010 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" +"split: la cadena nula para el tercer argumento es una extensión de gawk" + +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: el cuarto argumento no es una matriz" -#: field.c:961 +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: el segundo argumento no es una matriz" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: el tercer argumento no debe ser nulo" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: no se puede usar la misma matriz para el segundo y cuarto " +"argumentos" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: no se puede usar una submatriz del segundo argumento para el " +"cuarto argumento" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: no se puede usar una submatriz del cuarto argumento para el " +"segundo argumento" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' es una extensión gawk" +msgstr "`FIELDWIDTHS' es una extensión gawk" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "valor de FIELDWIDTHS inválido, cerca de `%s'" +msgstr "valor de FIELDWIDTHS inválido, cerca de `%s'" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" -msgstr "la cadena nula para `FS' es una extensión de gawk" +msgstr "la cadena nula para `FS' es una extensión de gawk" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "el awk antiguo no admite expresiones regulares como valor de `FS'" -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: la opción '%s' es ambigua\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "`FPAT' es una extensión de gawk" + +#: getopt.c:604 getopt.c:633 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: la opción '%s' es ambigua\n" -#: getopt.c:623 getopt.c:627 +#: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: la opción '--%s' no admite ningún argumento\n" +msgstr "%s: la opción '--%s' no admite ningún argumento\n" -#: getopt.c:636 getopt.c:641 +#: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: la opción '%c%s' no admite ningún argumento\n" +msgstr "%s: la opción '%c%s' no admite ningún argumento\n" -#: getopt.c:684 getopt.c:703 +#: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: la opción '--%s' requiere un argumento\n" +msgstr "%s: la opción '--%s' requiere un argumento\n" -#: getopt.c:741 getopt.c:744 +#: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: no se reconoce la opción '--%s'\n" +msgstr "%s: no se reconoce la opción '--%s'\n" -#: getopt.c:752 getopt.c:755 +#: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: no se reconoce la opción '%c%s'\n" +msgstr "%s: no se reconoce la opción '%c%s'\n" -#: getopt.c:804 getopt.c:807 +#: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opción inválida -- '%c'\n" +msgstr "%s: opción inválida -- '%c'\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 #, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: la opción requiere un argumento -- '%c'\n" +msgstr "%s: la opción requiere un argumento -- '%c'\n" -#: getopt.c:930 getopt.c:946 +#: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: la opción '-W %s' es ambigua\n" +msgstr "%s: la opción '-W %s' es ambigua\n" -#: getopt.c:970 getopt.c:988 +#: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: la opción '-W %s' no admite ningún argumento\n" +msgstr "%s: la opción '-W %s' no admite ningún argumento\n" -#: getopt.c:1009 getopt.c:1027 +#: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: la opción '-W %s' requiere un argumento\n" +msgstr "%s: la opción '-W %s' requiere un argumento\n" + +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "el argumento de la línea de órdenes `%s' es un directorio: se salta" -#: io.c:322 io.c:352 +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "no se puede abrir el fichero `%s' para lectura (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" -msgstr "falló al cerrar el df %d (`%s') (%s)" +msgstr "falló al cerrar el df %d (`%s') (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipo de árbol %s inválido en redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "no se permite la redirección en modo sandbox" -#: io.c:589 +#: io.c:612 #, 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" +msgstr "la expresión en la redirección `%s' sólo tiene valor numérico" -#: io.c:595 +#: io.c:618 #, 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" +msgstr "la expresión para la redirección `%s' tiene un valor de cadena nula" -#: io.c:600 +#: io.c:623 #, 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" +"el fichero `%s' para la redirección `%s' puede ser resultado de una " +"expresión lógica" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" -msgstr "no se puede abrir la tubería `%s' para la salida (%s)" +msgstr "no se puede abrir la tubería `%s' para la salida (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" -msgstr "no se puede abrir la tubería `%s' para la entrada (%s)" +msgstr "no se puede abrir la tubería `%s' para la entrada (%s)" -#: io.c:717 +#: io.c:752 #, 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)" +msgstr "no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "no se puede redirigir desde `%s' (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "no se puede redirigir a `%s' (%s)" -#: io.c:851 +#: io.c:888 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 " +"se alcanzó el límite del sistema para ficheros abiertos: comenzando a " "multiplexar los descriptores de fichero" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." -msgstr "falló al cerrar `%s' (%s)." +msgstr "falló al cerrar `%s' (%s)." -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" -msgstr "demasiadas tuberías o ficheros de entrada abiertos" +msgstr "demasiadas tuberías o ficheros de entrada abiertos" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: el segundo argumento debe ser `to' o `from'" -#: io.c:912 +#: io.c:951 #, 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" +msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" -msgstr "cerrado de una redirección que nunca fue abierta" +msgstr "se cerró una redirección que nunca se abrió" -#: io.c:1014 +#: io.c:1053 #, 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 " +"close: la redirección `%s' no se abrió con `|&', se descarta el segundo " "argumento" -#: io.c:1030 +#: io.c:1069 #, 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)" +msgstr "estado de fallo (%d) al cerrar la tubería de `%s' (%s)" -#: io.c:1033 +#: io.c:1072 #, 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:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" -msgstr "no se provee el cerrado explícito del `socket' `%s'" +msgstr "no se provee el cerrado explícito del `socket' `%s'" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" -msgstr "no se provee el cerrado explícito del co-proceso `%s'" +msgstr "no se provee el cerrado explícito del co-proceso `%s'" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" -msgstr "no se provee el cerrado explícito del la tubería `%s'" +msgstr "no se provee el cerrado explícito del la tubería `%s'" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" -msgstr "no se provee el cerrado explícito del fichero `%s'" +msgstr "no se provee el cerrado explícito del fichero `%s'" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" -msgstr "error al escribir en la salida estándar (%s)" +msgstr "error al escribir en la salida estándar (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" -msgstr "error al escribir en la salida estándar de error (%s)" +msgstr "error al escribir en la salida estándar de error (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." -msgstr "falló la limpieza de la tubería de `%s' (%s)." +msgstr "falló la limpieza de la tubería de `%s' (%s)." -#: io.c:1105 +#: io.c:1144 #, 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)." +msgstr "falló la limpieza del co-proceso de la tubería a `%s' (%s)." -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." -msgstr "falló la limpieza del fichero de `%s' (%s)." +msgstr "falló la limpieza del fichero de `%s' (%s)." -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" -msgstr "puerto local %s inválido en `/inet'" +msgstr "puerto local %s inválido en `/inet'" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" -msgstr "anfitrión remoto e información de puerto (%s, %s) inválidos" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "el cliente /inet/raw no está listo aún, perdón" +msgstr "anfitrión remoto e información de puerto (%s, %s) inválidos" -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "sólo root puede utilizar `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "el servidor /inet/raw no está listo aún, perdón" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" -"no se proporciona algún protocolo (conocido) en el nombre de fichero " +"no se proporciona algún protocolo (conocido) en el nombre de fichero " "especial `%s'" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" -msgstr "el nombre de fichero especial `%s' está incompleto" +msgstr "el nombre de fichero especial `%s' está incompleto" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" -msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" +msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "se debe proporcionar a `/inet' un puerto remoto" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" -msgstr "No se admiten las comunicaciones TCP/IP" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "el fichero `%s' es un directorio" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "use `PROCINFO[...]' en lugar de `/dev/user'" +msgstr "no se admiten las comunicaciones TCP/IP" -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "no se puede abrir `%s', modo `%s'" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" -msgstr "falló al cerrar el pty maestro (%s)" +msgstr "falló al cerrar el pty maestro (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" -msgstr "falló al cerrar la salida estándar en el hijo (%s)" +msgstr "falló al cerrar la salida estándar en el hijo (%s)" -#: io.c:1928 +#: io.c:1752 #, 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)" +"falló el movimiento del pty esclavo a la salida estándar en el hijo (dup: %s)" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" -msgstr "falló al cerrar la entrada estándar en el hijo (%s)" +msgstr "falló al cerrar la entrada estándar en el hijo (%s)" -#: io.c:1933 +#: io.c:1757 #, 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)" +"falló el movimiento del pty esclavo a la entrada estándar en el hijo (dup: " +"%s)" -#: io.c:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" -msgstr "falló al cerrar el pty esclavo (%s)" +msgstr "falló al cerrar el pty esclavo (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, 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)" +msgstr "falló el movimiento a la salida estándar en el hijo (dup: %s)" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, 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)" +"falló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" -msgstr "falló la restauración de la salida estándar en el proceso padre\n" +msgstr "falló la restauración de la salida estándar en el proceso padre\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" -msgstr "falló la restauración de la entrada estándar en el proceso padre\n" +msgstr "falló la restauración de la entrada estándar en el proceso padre\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" -msgstr "falló al cerrar la tubería (%s)" +msgstr "falló al cerrar la tubería (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" -msgstr "`|&' no se admite" +msgstr "no se admite `|&'" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" -msgstr "no se puede abrir la tubería `%s' (%s)" +msgstr "no se puede abrir la tubería `%s' (%s)" -#: io.c:2240 +#: io.c:2087 #, 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:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" -msgstr "el fichero de datos `%s' está vacío" +msgstr "el fichero de datos `%s' está vacío" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" -msgstr "no se puede reservar más memoria de entrada" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "error al leer el fichero de entrada `%s': %s" +msgstr "no se puede reservar más memoria de entrada" -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" -msgstr "el valor multicaracter de `RS' es una extensión de gawk" +msgstr "el valor multicaracter de `RS' es una extensión de gawk" -#: main.c:306 -msgid "out of memory" -msgstr "memoria agotada" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "no se admite la comunicación IPv6" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" -msgstr "la opción -m[fr] es irrelevante en gawk" +msgstr "la opción -m[fr] es irrelevante en gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" -msgstr "uso de la opción -m: `-m[fr]' nnn" +msgstr "uso de la opción -m: `-m[fr]' nnn" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "se descarta el argumento vacío para `-e/--source'" + +#: main.c:462 #, 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:434 -msgid "empty argument to `--source' ignored" -msgstr "se ignora el argumento vacío para `--source'" +msgstr "%s: no se reconoce la opción `-W %s', se descarta\n" -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "%s: la opción requiere un argumento -- %c\n" +msgstr "%s: la opción requiere un argumento -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" -"la variable de ambiente `POSIXLY_CORRECT' está establecida: se activa `--" -"posix'" +"la variable de ambiente `POSIXLY_CORRECT' está definida: se activa `--posix'" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' se impone a `--traditional'" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'" -#: main.c:530 +#: main.c:557 #, 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:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "`--posix' se impone a `--binary'" + +#: main.c:613 #, 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)" +msgstr "no se puede establecer el modo binario en la entrada estándar (%s)" -#: main.c:574 +#: main.c:616 #, 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)" +msgstr "no se puede establecer el modo binario en la salida estándar (%s)" -#: main.c:576 +#: main.c:618 #, 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)" +"no se puede establecer el modo binario en la salida estándar de error (%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" -msgstr "¡No hay ningún programa de texto!" +msgstr "¡No hay ningún programa de texto!" -#: main.c:721 +#: main.c:734 #, 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:723 +#: main.c:736 #, 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:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opciones POSIX:\t\tOpciones largas GNU:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "Opciones POSIX:\t\tOpciones largas GNU: (estándar)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichprog\t\t--file=fichprog\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F sc\t\t\t--field-separator=sc\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valor\t\t--assign=var=valor\n" -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valor\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=fichero]\t--dump-variables[=fichero]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=fichero\t\t--exec=fichero\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "Opciones cortas:\t\tOpciones largas GNU: (extensiones)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[fichero]\t\t--dump-variables[=fichero]\n" +# Esta es la línea más larga de la lista de argumentos. +# Probar con gawk para revisar tabuladores. cfuga #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=fichero]\t--profile[=fichero]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'texto-prog'\t--source='texto-prog'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E fichero\t\t--exec=fichero\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" -# Esta es la línea más larga de la lista de argumentos. -# Probar con gawk para revisar tabuladores. cfuga #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=texto-prog\t--source=texto-prog\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[fichero]\t\t--profile[=fichero]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R fichero\t\t\t--command=fichero\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1680,22 +1859,22 @@ msgstr "" "\n" "Para reportar bichos, consulte el nodo `Bugs' en `gawk.info', el cual\n" -"corresponde a la sección `Reporting Problems and Bugs' en la versión " +"corresponde a la sección `Reporting Problems and Bugs' en la versión " "impresa.\n" -"Reporte los errores de los mensajes en español a .\n" +"Reporte los errores de los mensajes en español a .\n" "\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" "gawk es un lenguaje de reconocimiento y procesamiento de patrones.\n" -"Por omisión lee la entrada estándar y escribe en la salida estándar.\n" +"Por defecto lee la entrada estándar y escribe en la salida estándar.\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1705,7 +1884,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' fichero\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1719,13 +1898,13 @@ "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Este programa es software libre; se puede redistribuir y/o modificar\n" -"bajo los términos de la Licencia Pública General de GNU tal como es " +"bajo los términos de la Licencia Pública General de GNU tal como es " "publicada\n" -"por la Free Software Foundation; ya sea por la versión 3 de la Licencia, o\n" -"(a su elección) cualquier versión posterior.\n" +"por la Free Software Foundation; ya sea por la versión 3 de la Licencia, o\n" +"(a su elección) cualquier versión posterior.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1733,26 +1912,31 @@ "GNU General Public License for more details.\n" "\n" msgstr "" -"Este programa se distribuye con la esperanza que será útil,\n" -"pero SIN NINGUNA GARANTÍA; aún sin la garantía implícita de\n" +"Este programa se distribuye con la esperanza que será útil,\n" +"pero SIN NINGUNA GARANTÃA; aún sin la garantía implícita de\n" "COMERCIABILIDAD o IDONEIDAD PARA UN FIN DETERMINADO. Vea la\n" -"Licencia Pública General de GNU para más detalles.\n" +"Licencia Pública General de GNU para más detalles.\n" "\n" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" msgstr "" -"Debió recibir una copia de la Licencia Pública General de GNU\n" -"junto con este programa. Si no es así, consulte\n" +"Debió recibir una copia de la Licencia Pública General de GNU\n" +"junto con este programa. Si no es así, consulte\n" "http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 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:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "valor desconocido para la especificación de campo: %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1761,138 +1945,131 @@ "%s: el argumento `%s' para `-v' no es de la forma `var=valor'\n" "\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' no es un nombre de variable legal" -#: main.c:1145 +#: main.c:1200 #, c-format 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:1184 +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "" +"no se puede utilizar la orden interna de gawk `%s' como nombre de variable" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "no se puede usar la función `%s' como nombre de variable" + +#: main.c:1262 msgid "floating point exception" -msgstr "excepción de coma flotante" +msgstr "excepción de coma flotante" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "error fatal: error interno" -#: main.c:1206 +#: main.c:1284 msgid "fatal error: internal error: segfault" -msgstr "error fatal: error interno: falla de segmentación" +msgstr "error fatal: error interno: falla de segmentación" -#: main.c:1218 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "error fatal: error interno: desbordamiento de pila" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "no existe el df %d abierto previamente" -#: main.c:1275 +#: main.c:1353 #, 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:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "no se pueden encontrar los grupos: %s" - -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" -msgstr "línea ord.:" +msgstr "línea ord.:" -#: msg.c:120 -msgid "warning: " -msgstr "aviso: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "error: " -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "no se puede convertir una cadena a coma flotante" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "barra invertida al final de la cadena" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "el awk antiguo no admite la secuencia de escape `\\%c'" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX no permite escapes `\\x'" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" -msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'" +msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" -"en el escape hexadecimal \\x%.*s de %d caracteres tal vez no se interpreten " -"de la forma esperada" +"el escape hexadecimal \\x%.*s de %d caracteres tal vez no se interprete de " +"la forma esperada" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "la secuencia de escape `\\%c' se trata como una simple `%c'" -#: posix/gawkmisc.c:172 -#, 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)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Se detectaron datos multibyte inválidos. Puede ser que no coincidan sus " +"datos con su local." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "no se puede abrir `%s' para escritura: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "" +"%s %s `%s': no se pueden obtener las opciones del fd: (fcntl F_GETFD: %s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "error interno: %s con vname nulo" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s `%s': no se puede establecer close-on-exec: (fcntl F_SETFD: %s)" -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# se trata internamente como `delete'" - -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# esta es una función de extensión cargada dinámicamente" +msgid "could not open `%s' for writing: %s" +msgstr "no se puede abrir `%s' para escritura: %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# perfil de gawk, creado %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "se envía el perfil a la salida estándar de error" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# bloque(s) BEGIN\n" +"\t# bloque(s) %s\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" @@ -1901,167 +2078,278 @@ "\t# Regla(s)\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# bloque(s) END\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "error interno: %s con vname nulo" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# perfil de gawk, creado %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" -"\t# Funciones, enumeradas alfabéticamente\n" +"\t# Funciones, enumeradas alfabéticamente\n" + +#: profile.c:1370 +#, c-format +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: tipo de redirección %d desconocida" -#: profile.c:1405 +#: re.c:573 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "tipo %s inesperado en prec_level" +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "el rango de la forma `[%c-%c]' depende del local" -#: profile.c:1527 +#: re.c:600 #, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Tipo de nodo %s desconocido en pp_var" +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"el componente de expresión regular `%.*s' probablemente debe ser `[%.*s]'" -#: regcomp.c:132 +#: regcomp.c:131 msgid "Success" -msgstr "Éxito" +msgstr "Éxito" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "No hay coincidencia" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" -msgstr "Expresión regular inválida" +msgstr "Expresión regular inválida" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" -msgstr "Caracter de ordenación inválido" +msgstr "Caracter de ordenación inválido" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" -msgstr "Nombre de clase de caracter inválido" +msgstr "Nombre de clase de caracter inválido" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "Barra invertida extra al final" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" -msgstr "Referencia hacia atrás inválida" +msgstr "Referencia hacia atrás inválida" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ o [^ desemparejados" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( o \\( desemparejados" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ desemparejado" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" -msgstr "Contenido inválido de \\{\\}" +msgstr "Contenido inválido de \\{\\}" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" -msgstr "Final de rango inválido" +msgstr "Final de rango inválido" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Memoria agotada" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" -msgstr "Expresión regular precedente inválida" +msgstr "Expresión regular precedente inválida" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" -msgstr "Fin prematuro de la expresión regular" +msgstr "Fin prematuro de la expresión regular" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" -msgstr "La expresión regular es demasiado grande" +msgstr "La expresión regular es demasiado grande" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") o \\) desemparejados" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" -msgstr "No hay una expresión regular previa" +msgstr "No hay una expresión regular previa" + +#~ msgid "could not find groups: %s" +#~ msgstr "no se pueden encontrar los grupos: %s" + +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "no se permite la asignación como resultado de una función interna" + +#~ msgid "attempt to use array in a scalar context" +#~ msgstr "se intentó usar una matriz en un contexto escalar" + +#~ msgid "statement may have no effect" +#~ msgstr "la sentencia puede no tener efecto" + +#~ msgid "out of memory" +#~ msgstr "memoria agotada" + +#~ msgid "attempt to use scalar `%s' as array" +#~ msgstr "se intentó usar el dato escalar `%s' como una matriz" + +#~ msgid "attempt to use array `%s' in scalar context" +#~ msgstr "se intentó usar la matriz `%s' en un contexto escalar" + +#~ msgid "call of `length' without parentheses is deprecated by POSIX" +#~ msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX" + +#~ msgid "division by zero attempted in `/'" +#~ msgstr "se intentó una división por cero en `/'" + +#~ msgid "length: untyped parameter argument will be forced to scalar" +#~ msgstr "length: un argumento de parámetro sin tipo se forzará a escalar" + +#~ msgid "length: untyped argument will be forced to scalar" +#~ msgstr "length: un argumento sin tipo se forzará a escalar" + +#~ msgid "`break' outside a loop is not portable" +#~ msgstr "`break' fuera de un ciclo no es transportable" + +#~ msgid "`continue' outside a loop is not portable" +#~ msgstr "`continue' fuera de un ciclo no es transportable" + +#~ msgid "`next' cannot be called from a BEGIN rule" +#~ msgstr "`next' no se puede llamar desde una regla BEGIN" + +#~ msgid "`nextfile' cannot be called from a BEGIN rule" +#~ msgstr "`nextfile' no se puede llamar desde una regla BEGIN" + +#~ 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!" + +#~ msgid "illegal type (%s) in tree_eval" +#~ msgstr "tipo ilegal (%s) en tree_eval" + +#~ msgid "\t# -- main --\n" +#~ msgstr "\t# -- principal --\n" + +#~ msgid "invalid tree type %s in redirect()" +#~ msgstr "tipo de árbol %s inválido en redirect()" + +#~ msgid "/inet/raw client not ready yet, sorry" +#~ msgstr "el cliente /inet/raw no está listo aún, perdón" + +#~ msgid "only root may use `/inet/raw'." +#~ msgstr "sólo root puede utilizar `/inet/raw'." + +#~ msgid "/inet/raw server not ready yet, sorry" +#~ msgstr "el servidor /inet/raw no está listo aún, perdón" + +#~ msgid "file `%s' is a directory" +#~ msgstr "el fichero `%s' es un directorio" + +#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +#~ msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'" + +#~ msgid "use `PROCINFO[...]' instead of `/dev/user'" +#~ msgstr "use `PROCINFO[...]' en lugar de `/dev/user'" + +#~ msgid "\t-m[fr] val\n" +#~ msgstr "\t-m[fr] valor\n" + +#~ msgid "\t-W compat\t\t--compat\n" +#~ msgstr "\t-W compat\t\t--compat\n" + +#~ msgid "\t-W copyleft\t\t--copyleft\n" +#~ msgstr "\t-W copyleft\t\t--copyleft\n" + +#~ msgid "\t-W usage\t\t--usage\n" +#~ msgstr "\t-W usage\t\t--usage\n" + +#~ msgid "can't convert string to float" +#~ msgstr "no se puede convertir una cadena a coma flotante" + +#~ msgid "# treated internally as `delete'" +#~ msgstr "# se trata internamente como `delete'" + +#~ msgid "# this is a dynamically loaded extension function" +#~ msgstr "# esta es una función de extensión cargada dinámicamente" + +#~ msgid "" +#~ "\t# BEGIN block(s)\n" +#~ "\n" +#~ msgstr "" +#~ "\t# bloque(s) BEGIN\n" +#~ "\n" + +#~ msgid "unexpected type %s in prec_level" +#~ msgstr "tipo %s inesperado en prec_level" + +#~ msgid "Unknown node type %s in pp_var" +#~ msgstr "Tipo de nodo %s desconocido en pp_var" #~ 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)" +#~ "no se puede abrir el `socket' de dos vías `%s' para entrada/salida (%s)" #~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opción ilegal -- %c\n" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "puerto remoto inválido en `%s'" +#~ msgstr "%s: opción ilegal -- %c\n" #~ msgid "function %s called\n" -#~ msgstr "se llamó a la función %s\n" +#~ msgstr "se llamó a la función %s\n" #~ msgid "field %d in FIELDWIDTHS, must be > 0" #~ msgstr "el campo %d en FIELDWIDTHS, debe ser > 0" #~ msgid "or used as a variable or an array" -#~ msgstr "o se usó como una variable o una matriz" +#~ msgstr "o se usó como una variable o una matriz" #~ msgid "substr: length %g is < 0" #~ msgstr "substr: la longitud %g es < 0" #~ 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 " +#~ "falló la coincidencia de la expresión regular, no hay suficiente memoria " #~ "para que coincida la cadena \"%.*s%s\"" #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: uso ilegal de la variable `%s' como una matriz" -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: el primer argumento no es una matriz" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: el segundo argumento no es una matriz" - #~ msgid "internal error: Node_var_array with null vname" #~ msgstr "error interno: Node_var_array con vname nulo" #~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "sintaxis inválida en el nombre `%s' para la asignación de variable" +#~ msgstr "sintaxis inválida en el nombre `%s' para la asignación de variable" #~ msgid "or used in other expression context" -#~ msgstr "se usó or en otro contexto de la expresión" +#~ msgstr "se usó or en otro contexto de la expresión" #~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "`%s' es una función, no se permite asignación" +#~ msgstr "`%s' es una función, no se permite asignación" #~ msgid "BEGIN blocks must have an action part" -#~ msgstr "Los bloques BEGIN deben tener una parte de acción" +#~ msgstr "Los bloques BEGIN deben tener una parte de acción" #~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "`nextfile' es usado en la acción de BEGIN o END" +#~ msgstr "`nextfile' es usado en la acción de BEGIN o END" #~ msgid "non-redirected `getline' undefined inside BEGIN or END action" #~ msgstr "" -#~ "`getline' no redirigido indefinido dentro de la acción de BEGIN o END" +#~ "`getline' no redirigido indefinido dentro de la acción de BEGIN o END" # tokentab? cfuga #~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x no está en tokentab\n" +#~ msgstr "fptr %x no está en tokentab\n" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "el tercer argumento de gsub no es un objecto que se puede cambiar" @@ -2073,22 +2361,22 @@ #~ msgstr "Escape \\ sin terminar" #~ msgid "unfinished repeat count" -#~ msgstr "cuenta de repetición sin terminar" +#~ msgstr "cuenta de repetición sin terminar" #~ msgid "malformed repeat count" -#~ msgstr "cuenta de repetición malformada" +#~ msgstr "cuenta de repetición malformada" #~ msgid "Unbalanced (" #~ msgstr "( desbalanceado" #~ msgid "No regexp syntax bits specified" -#~ msgstr "No se especifican los bits de sintaxis de la expresión regular" +#~ msgstr "No se especifican los bits de sintaxis de la expresión regular" #~ msgid "Unbalanced )" #~ msgstr ") desbalanceado" #~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "error interno: fichero `%s', línea %d\n" +#~ msgstr "error interno: fichero `%s', línea %d\n" #~ msgid "" #~ "\n" @@ -2098,7 +2386,7 @@ #~ "Para reportar `bugs', vea el nodo `Bugs' en gawk.info, que es\n" #~ msgid "pipe from `%s': could not set close-on-exec (fcntl: %s)" -#~ msgstr "tubería de `%s': no se puede establecer close-on-exec (fcntl: %s)" +#~ msgstr "tubería de `%s': no se puede establecer close-on-exec (fcntl: %s)" #~ msgid "pipe to `%s': could not set close-on-exec (fcntl: %s)" -#~ msgstr "tubería a `%s': no se puede establecer close-on-exec (fcntl: %s)" +#~ msgstr "tubería a `%s': no se puede establecer close-on-exec (fcntl: %s)" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/fi.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/fi.gmo differ diff -Nru gawk-3.1.8+dfsg/po/fi.po gawk-4.0.1+dfsg/po/fi.po --- gawk-3.1.8+dfsg/po/fi.po 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/po/fi.po 2012-03-28 20:03:47.000000000 +0000 @@ -0,0 +1,2276 @@ +# Finnish messages for gawk. +# Copyright © 2010, 2011, 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the gawk package. +# Jorma Karvonen , 2010-2012. +# +msgid "" +msgstr "" +"Project-Id-Version: gawk 4.0.0h\n" +"Report-Msgid-Bugs-To: arnold@skeeve.com\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-03-13 18:00+0200\n" +"Last-Translator: Jorma Karvonen \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "taulukosta %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "yritettiin käyttää skalaariarvoa taulukkona" + +#: array.c:251 +#, c-format +msgid "attempt to use function `%s' as an array" +msgstr "yritettiin käyttää funktiota â€%s†taulukkona" + +#: array.c:254 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "yritettiin käyttää skalaariparametria â€%s†taulukkona" + +#: array.c:257 +#, c-format +msgid "attempt to use scalar `%s' as an array" +msgstr "yritettiin käyttää skalaaria â€%s†taulukkona" + +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "yritettiin käyttää taulukkoa â€%s†skalaarikontekstissa" + +#: array.c:513 +#, c-format +msgid "reference to uninitialized element `%s[\"%.*s\"]'" +msgstr "viite alustamattomaan elementtiin â€%s[\"%.*s\"]â€" + +#: array.c:519 +#, c-format +msgid "subscript of array `%s' is null string" +msgstr "taulukon alaindeksi â€%s†on null-merkkijono" + +#: array.c:723 +#, c-format +msgid "delete: index `%s' not in array `%s'" +msgstr "delete: indeksi â€%s†ei ole taulukossa â€%sâ€" + +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "yritettiin käyttää skalaaria â€%s[\"%.*s\"]†taulukkona" + +#: array.c:910 +#, c-format +msgid "%s: empty (null)\n" +msgstr "%s: tyhjä (null)\n" + +#: array.c:915 +#, c-format +msgid "%s: empty (zero)\n" +msgstr "%s: tyhjä (nolla)\n" + +#: array.c:919 +#, c-format +msgid "%s: table_size = %d, array_size = %d\n" +msgstr "%s: table_size = %d, array_size = %d\n" + +#: array.c:954 +#, c-format +msgid "%s: is parameter\n" +msgstr "%s: on parametri\n" + +#: array.c:958 +#, c-format +msgid "%s: array_ref to %s\n" +msgstr "%s: array_ref-viite taulukkoon %s\n" + +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: argumentti ei ole taulukko" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: toinen argumentti ei ole taulukko" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: toinen argumentti ei ole taulukko" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: ensimmäinen argumentti ei ole taulukko" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: ensimmäinen argumentti ei ole taulukko" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: ei voida käyttää ensimmäisen argumentin alitaulukkoa toiselle " +"argumentille" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: ei voida käyttää ensimmäisen argumentin alitaulukkoa toiselle " +"argumentille" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: ei voida käyttää toisen argumentin alitaulukkoa ensimmäiselle " +"argumentille" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: ei voida käyttää toisen argumentin alitaulukkoa ensimmäiselle " +"argumentille" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "â€%s†on virheellinen funktionimenä" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "lajitteluvertailufunktiota â€%s†ei ole määritelty" + +#: awkgram.y:249 +#, c-format +msgid "%s blocks must have an action part" +msgstr "%s lohkoilla on oltava toiminto-osa" + +#: awkgram.y:252 +msgid "each rule must have a pattern or an action part" +msgstr "jokaisella säännöllä on oltava malli tai toiminto-osa" + +#: awkgram.y:323 awkgram.y:334 +msgid "old awk does not support multiple `BEGIN' or `END' rules" +msgstr "vanha awk ei tue useita â€BEGINâ€- tai â€ENDâ€-sääntöjä" + +#: awkgram.y:371 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "â€%s†on sisäänrakennettu funktio. Sitä ei voi määritellä uudelleen" + +#: awkgram.y:432 +msgid "regexp constant `//' looks like a C++ comment, but is not" +msgstr "" +"säännöllisen lausekkeen vakio â€//†näyttää C++-kommentilta, mutta ei ole" + +#: awkgram.y:436 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "" +"säännöllisen lausekkeen vakio â€/%s/†näyttää C-kommentilta, mutta ei ole" + +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "kaksi samanlaista case-arvoa switch-rakenteen rungossa: %s" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "kaksoiskappale â€default†havaittu switch-rungossa" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "â€break†ei ole sallittu silmukan tai switch-lauseen ulkopuolella" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "â€continue†ei ole sallittu silmukan ulkopuolella" + +#: awkgram.y:828 +#, c-format +msgid "`next' used in %s action" +msgstr "â€next†käytetty %s-toiminnossa" + +#: awkgram.y:836 +msgid "`nextfile' is a gawk extension" +msgstr "â€nextfile†on gawk-laajennus" + +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "â€nextfile†käytetty %s-toiminnossa" + +#: awkgram.y:865 +msgid "`return' used outside function context" +msgstr "â€return†käytetty funktiokontekstin ulkopuolella" + +#: awkgram.y:925 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "" +"pelkkä â€print†BEGIN- tai END-säännössä pitäisi luultavasti olla â€print \"\"â€" + +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 +msgid "`delete array' is a gawk extension" +msgstr "â€delete array†on gawk-laajennus" + +#: awkgram.y:1019 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "â€delete(array)†ei ole siirrettävä tawk-laajennus" + +#: awkgram.y:1135 +msgid "multistage two-way pipelines don't work" +msgstr "monivaiheiset kaksisuuntaiset putket eivät toimi" + +#: awkgram.y:1238 +msgid "regular expression on right of assignment" +msgstr "säännöllinen lauseke sijoituksen oikealla puolella" + +#: awkgram.y:1249 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "säännöllinen lauseke â€~â€- tai â€!~â€-operaattorin vasemmalla puolella" + +#: awkgram.y:1265 awkgram.y:1419 +msgid "old awk does not support the keyword `in' except after `for'" +msgstr "vanha awk ei tue avainsanaa â€in†paitsi â€forâ€-sanan jälkeen" + +#: awkgram.y:1275 +msgid "regular expression on right of comparison" +msgstr "säännöllinen lauseke vertailun oikealla puolella" + +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "â€getline var†virheellinen säännön â€%s†sisällä" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "â€getline†virheellinen säännön â€%s†sisällä" + +#: awkgram.y:1402 +msgid "non-redirected `getline' undefined inside END action" +msgstr "edelleenohjaamaton â€getline†määrittelemätön END-toiminnon sisällä" + +#: awkgram.y:1421 +msgid "old awk does not support multidimensional arrays" +msgstr "vanha awk ei tue moniulotteisia taulukkoja" + +#: awkgram.y:1517 +msgid "call of `length' without parentheses is not portable" +msgstr "â€lengthâ€-kutsu ilman sulkumerkkejä ei ole siirrettävä" + +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "epäsuorat funktiokutsut ovat gawk-laajennus" + +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "ei voi käyttää erikoismuuttujaa â€%s†epäsuoralle funktiokutsulle" + +#: awkgram.y:1671 +msgid "invalid subscript expression" +msgstr "virheellinen indeksointilauseke" + +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "ei-taulukon käyttö taulukkona" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "varoitus:" + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "tuhoisa:" + +#: awkgram.y:2043 +msgid "unexpected newline or end of string" +msgstr "odottamaton rivinvaihto tai merkkijonon loppu" + +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "ei voi avata lähdetiedostoa â€%s†lukemista varten (%s)" + +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "syy tuntematon" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "on jo sisällytetty lähdetiedostoon â€%sâ€" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include on gawk-laajennus" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "tyhjä tiedostonimi @include:n jälkeen" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "tyhjä ohjelmateksti komentorivillä" + +#: awkgram.y:2609 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "ei voi lukea lähdetiedostoa â€%s†(%s)" + +#: awkgram.y:2620 +#, c-format +msgid "source file `%s' is empty" +msgstr "lähdetiedosto â€%s†on tyhjä" + +#: awkgram.y:2797 +msgid "source file does not end in newline" +msgstr "lähdetiedoston lopussa ei ole rivinvaihtoa" + +#: awkgram.y:2900 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "" +"päättämätön säännöllinen lauseke loppuu â€\\â€-merkkeihin tiedoston lopussa" + +#: awkgram.y:2924 +#, c-format +msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" +msgstr "%s: %d: tawk:n regex-määre â€/.../%c†ei toimi gawk:ssa" + +#: awkgram.y:2928 +#, c-format +msgid "tawk regex modifier `/.../%c' doesn't work in gawk" +msgstr "tawkin regex-määre â€/.../%c†ei toimi gawkissa" + +#: awkgram.y:2935 +msgid "unterminated regexp" +msgstr "päättämätön säännöllinen lauseke" + +#: awkgram.y:2939 +msgid "unterminated regexp at end of file" +msgstr "päättämätön säännöllinen lauseke tiedoston lopussa" + +#: awkgram.y:2998 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "â€\\ #...â€-rivijatkamisen käyttö ei ole siirrettävä" + +#: awkgram.y:3014 +msgid "backslash not last character on line" +msgstr "kenoviiva ei ole rivin viimeinen merkki" + +#: awkgram.y:3075 +msgid "POSIX does not allow operator `**='" +msgstr "POSIX ei salli operaattoria â€**=â€" + +#: awkgram.y:3077 +msgid "old awk does not support operator `**='" +msgstr "vanha awk ei tue operaattoria â€**=â€" + +#: awkgram.y:3086 +msgid "POSIX does not allow operator `**'" +msgstr "POSIX ei salli operaattoria â€**â€" + +#: awkgram.y:3088 +msgid "old awk does not support operator `**'" +msgstr "vanha awk ei tue operaattoria â€**â€" + +#: awkgram.y:3123 +msgid "operator `^=' is not supported in old awk" +msgstr "operaattoria â€^=†ei tueta vanhassa awk:ssa" + +#: awkgram.y:3131 +msgid "operator `^' is not supported in old awk" +msgstr "operaattoria â€^†ei tueta vanhassa awk:ssa" + +#: awkgram.y:3224 awkgram.y:3240 +msgid "unterminated string" +msgstr "päättämätön merkkijono" + +#: awkgram.y:3436 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "virheellinen merkki ’%c’ lausekkeessa" + +#: awkgram.y:3483 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "â€%s†on gawk-laajennus" + +#: awkgram.y:3488 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "â€%s†on Bell Labs -laajennus" + +#: awkgram.y:3493 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "POSIX ei salli operaattori â€%sâ€" + +#: awkgram.y:3501 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "â€%s†ei ole tuettu vanhassa awk-ohjelmassa" + +#: awkgram.y:3568 +msgid "`goto' considered harmful!\n" +msgstr "â€gotoâ€-käskyä pidetään haitallisena!\n" + +#: awkgram.y:3619 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "%d on virheellinen argumenttilukumäärä operaattorille %s" + +#: awkgram.y:3654 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "" +"%s: merkkijonoliteraalilla ei ole vaikutusta korvauksen viimeisenä " +"argumenttina" + +#: awkgram.y:3659 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "%s kolmas parametri ei ole vaihdettava objekti" + +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: kolmas argumentti on gawk-laajennus" + +#: awkgram.y:3789 awkgram.y:3792 +msgid "close: second argument is a gawk extension" +msgstr "close: toinen argumentti on gawk-laajennus" + +#: awkgram.y:3804 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "dcgettext(_\"...\")-käyttö on virheellinen: poista alaviiva alusta" + +#: awkgram.y:3819 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "dcngettext(_\"...\")-käyttö on virheellinen: poista alaviiva alusta" + +#: awkgram.y:3911 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "funktio â€%sâ€: parametri #%d, â€%sâ€, samanlainen parametri #%d" + +#: awkgram.y:3953 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "funktio â€%sâ€: parametri â€%s†varjostaa yleismuuttujaa" + +#: awkgram.y:4111 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "ei voitu avata tiedostoa â€%s†kirjoittamista varten (%s)" + +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "lähetetään muuttujaluettelo vakiovirheeseen" + +#: awkgram.y:4118 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: sulkeminen epäonnistui (%s)" + +#: awkgram.y:4170 +msgid "shadow_funcs() called twice!" +msgstr "shadow_funcs() kutsuttu kahdesti!" + +#: awkgram.y:4176 +msgid "there were shadowed variables." +msgstr "siellä oli varjostettuja muuttujia." + +#: awkgram.y:4206 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "funktio â€%sâ€: ei voi käyttää funktionimeä parametrinimenä" + +#: awkgram.y:4210 +#, c-format +msgid "function `%s': can't use special variable `%s' as a function parameter" +msgstr "funktio â€%sâ€: ei voi käyttää erikoismuuttujaa â€%s†funktioparametrina" + +#: awkgram.y:4226 +#, c-format +msgid "function name `%s' previously defined" +msgstr "funktionimi â€%s†on jo aikaisemmin määritelty" + +#: awkgram.y:4394 awkgram.y:4400 +#, c-format +msgid "function `%s' called but never defined" +msgstr "funktiota â€%s†kutsuttiin, mutta sitä ei ole koskaan määritelty" + +#: awkgram.y:4403 +#, c-format +msgid "function `%s' defined but never called directly" +msgstr "funktio â€%s†määriteltiin, mutta sitä ei ole koskaan kutsuttu suoraan" + +#: awkgram.y:4435 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "säännöllisen lausekkeen vakio parametrille #%d antaa boolean-arvon" + +#: awkgram.y:4544 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"or used as a variable or an array" +msgstr "" +"funktio â€%s†kutsuttu välilyönnillä nimen ja â€(â€-merkin\n" +"välillä, tai käytetty muuttujana tai taulukkona" + +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "nollalla jakoa yritettiin" + +#: awkgram.y:4800 eval.c:2072 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "jakoa nollalla yritettiin operaattorissa â€%%â€" + +# kohteena voi olla vakiotuloste tai joku muu +#: builtin.c:120 +#, c-format +msgid "%s to \"%s\" failed (%s)" +msgstr "%s kohteeseen â€%s†epäonnistui (%s)" + +#: builtin.c:121 +msgid "standard output" +msgstr "vakiotuloste" + +#: builtin.c:135 +msgid "exp: received non-numeric argument" +msgstr "exp: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:141 +#, c-format +msgid "exp: argument %g is out of range" +msgstr "exp: argumentti %g on lukualueen ulkopuolella" + +#: builtin.c:200 +#, c-format +msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" +msgstr "" +"fflush: ei voi tyhjentää: putki â€%s†avattu lukemista varten, ei " +"kirjoittamiseen" + +#: builtin.c:203 +#, c-format +msgid "fflush: cannot flush: file `%s' opened for reading, not writing" +msgstr "" +"fflush: ei voi tyhjentää: tiedosto â€%s†avattu lukemista varten, ei " +"kirjoittamiseen" + +#: builtin.c:215 +#, c-format +msgid "fflush: `%s' is not an open file, pipe or co-process" +msgstr "fflush: â€%s†ei ole avoin tiedosto, putki tai apuprosessi" + +#: builtin.c:333 +msgid "index: received non-string first argument" +msgstr "index: ensimmäinen vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:335 +msgid "index: received non-string second argument" +msgstr "index: toinen vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:457 +msgid "int: received non-numeric argument" +msgstr "int: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: vastaanotettu taulukkoargumentti" + +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" +msgstr "â€length(array)†on gawk-laajennus" + +#: builtin.c:504 +msgid "length: received non-string argument" +msgstr "length: vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:535 +msgid "log: received non-numeric argument" +msgstr "log: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:538 +#, c-format +msgid "log: received negative argument %g" +msgstr "log: vastaanotettu negatiivinen argumentti %g" + +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "kohtalokas: on käytettävä â€count$†kaikilla muodoilla tai ei missään" + +#: builtin.c:762 +#, c-format +msgid "field width is ignored for `%%' specifier" +msgstr "kenttäleveys ohitetaan â€%%%%â€-määritteelle" + +#: builtin.c:764 +#, c-format +msgid "precision is ignored for `%%' specifier" +msgstr "tarkkuus ohitetaan â€%%%%â€-määritteelle" + +#: builtin.c:766 +#, c-format +msgid "field width and precision are ignored for `%%' specifier" +msgstr "kenttäleveys ja tarkkuus ohitetaan â€%%%%â€-määritteelle" + +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "kohtalokas: â€$â€-argumentti ei ole sallittu awk-muodoissa" + +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "kohtalokas: argumenttilukumäärän argumentilla â€$†on oltava > 0" + +#: builtin.c:830 +#, c-format +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "" +"kohtalokas: argumenttilukumäärä %ld on suurempi kuin toimitettujen " +"argumenttien lukumäärä" + +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "kohtalokas: â€$â€-argumentti ei ole sallittu pisteen jälkeen muodossa" + +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "" +"kohtalokas: ei â€$â€-argumenttia tarjottu sijantikenttäleveydelle tai " +"tarkkuudelle" + +#: builtin.c:921 +msgid "`l' is meaningless in awk formats; ignored" +msgstr "â€l†on merkityksetön awk-muodoissa; ohitetaan" + +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "kohtalokas: â€l†ei ole sallittu POSIX awk -muodoissa" + +#: builtin.c:938 +msgid "`L' is meaningless in awk formats; ignored" +msgstr "â€L†on merkityksetön awk-muodoissa; ohitetaan" + +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "kohtalokas: â€L†ei ole sallittu POSIX awk -muodoissa" + +#: builtin.c:955 +msgid "`h' is meaningless in awk formats; ignored" +msgstr "â€h†on merkityksetön awk-muodoissa; ohitetaan" + +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "kohtalokas: â€h†ei ole sallittu POSIX awk -muodoissa" + +#: builtin.c:1272 +#, c-format +msgid "[s]printf: value %g is out of range for `%%%c' format" +msgstr "[s]printf: arvo %g on lukualueen ulkopuolella â€%%%câ€-muodolle" + +#: builtin.c:1332 +#, c-format +msgid "ignoring unknown format specifier character `%c': no argument converted" +msgstr "" +"ohitetaan tuntematon muotoargumenttimerkki â€%câ€: ei muunnettu argumenttia" + +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "kohtalokas: ei kylliksi argumentteja muotomerkkijonon tyydyttämiseksi" + +#: builtin.c:1339 +msgid "^ ran out for this one" +msgstr "^ tällainen loppui kesken" + +#: builtin.c:1346 +msgid "[s]printf: format specifier does not have control letter" +msgstr "[s]printf: muotoargumentilla ei ole ohjauskirjainta" + +#: builtin.c:1349 +msgid "too many arguments supplied for format string" +msgstr "muotomerkkijonoon toimitettu liian monta argumenttia" + +#: builtin.c:1423 builtin.c:1434 +msgid "printf: no arguments" +msgstr "printf: ei argumentteja" + +#: builtin.c:1475 +msgid "sqrt: received non-numeric argument" +msgstr "sqrt: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:1479 +#, c-format +msgid "sqrt: called with negative argument %g" +msgstr "sqrt: kutsuttu negatiivisella argumentilla %g" + +#: builtin.c:1503 +#, c-format +msgid "substr: length %g is not >= 1" +msgstr "substr: pituus %g ei ole >= 1" + +#: builtin.c:1505 +#, c-format +msgid "substr: length %g is not >= 0" +msgstr "substr: pituus %g ei ole >= 0" + +#: builtin.c:1512 +#, c-format +msgid "substr: non-integer length %g will be truncated" +msgstr "substr: typistetään pituus %g, joka ei ole kokonaisluku" + +#: builtin.c:1517 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "" +"substr: pituus %g liian suuri merkkijononindeksointiin, typistetään arvoon %g" + +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: aloitusindeksi %g on virheellinen, käytetään 1:tä" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: typistetään aloitusindeksi %g, joka ei ole kokonaisluku" + +#: builtin.c:1559 +msgid "substr: source string is zero length" +msgstr "substr: lähdemerkkijono on nollapituinen" + +#: builtin.c:1575 +#, c-format +msgid "substr: start index %g is past end of string" +msgstr "substr: aloitusindeksi %g on merkkijonon lopun jälkeen" + +#: builtin.c:1583 +#, c-format +msgid "" +"substr: length %g at start index %g exceeds length of first argument (%lu)" +msgstr "" +"substr: pituus %g alkuindeksissä %g ylittää ensimmäisen argumentin pituuden " +"(%lu)" + +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "" +"strftime: muotoarvolla kohteessa PROCINFO[\"strftime\"] on numerotyyppi" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "" +"strftime: toinen argumentti on pienempi kuin 0 tai liian suuri time_t-" +"rakenteeseen" + +#: builtin.c:1690 +msgid "strftime: received non-string first argument" +msgstr "strftime: ensimmäinen vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:1696 +msgid "strftime: received empty format string" +msgstr "strftime: vastaanotettu tyhjä muotomerkkijono" + +#: builtin.c:1762 +msgid "mktime: received non-string argument" +msgstr "mktime: vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:1779 +msgid "mktime: at least one of the values is out of the default range" +msgstr "mktime: vähintään yksi arvoista on oletuslukualueen ulkopuolella" + +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "â€systemâ€-funktio ei ole sallittu hiekkalaatikkotilassa" + +#: builtin.c:1819 +msgid "system: received non-string argument" +msgstr "system: vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "viite alustamattomaan muuttujaan â€%sâ€" + +#: builtin.c:1941 +#, c-format +msgid "reference to uninitialized field `$%d'" +msgstr "viite alustamattomaan kenttään â€$%dâ€" + +#: builtin.c:2028 +msgid "tolower: received non-string argument" +msgstr "tolower: vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:2062 +msgid "toupper: received non-string argument" +msgstr "toupper: vastaanotettu argumentti ei ole merkkijono" + +#: builtin.c:2098 +msgid "atan2: received non-numeric first argument" +msgstr "atan2: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2100 +msgid "atan2: received non-numeric second argument" +msgstr "atan2: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2119 +msgid "sin: received non-numeric argument" +msgstr "sin: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2135 +msgid "cos: received non-numeric argument" +msgstr "cos: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2188 +msgid "srand: received non-numeric argument" +msgstr "srand: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2219 +msgid "match: third argument is not an array" +msgstr "match: kolmas argumentti ei ole taulukko" + +#: builtin.c:2483 +msgid "gensub: third argument of 0 treated as 1" +msgstr "gensub: 0-arvoinen kolmas argumentti käsitellään kuin 1" + +#: builtin.c:2776 +msgid "lshift: received non-numeric first argument" +msgstr "lshift: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2778 +msgid "lshift: received non-numeric second argument" +msgstr "lshift: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2784 +#, c-format +msgid "lshift(%lf, %lf): negative values will give strange results" +msgstr "lshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: builtin.c:2786 +#, c-format +msgid "lshift(%lf, %lf): fractional values will be truncated" +msgstr "lshift(%lf, %lf): jaosarvot typistetään" + +#: builtin.c:2788 +#, c-format +msgid "lshift(%lf, %lf): too large shift value will give strange results" +msgstr "lshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksia" + +#: builtin.c:2813 +msgid "rshift: received non-numeric first argument" +msgstr "rshift: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2815 +msgid "rshift: received non-numeric second argument" +msgstr "rshift: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2821 +#, c-format +msgid "rshift(%lf, %lf): negative values will give strange results" +msgstr "rshift(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: builtin.c:2823 +#, c-format +msgid "rshift(%lf, %lf): fractional values will be truncated" +msgstr "rshift(%lf, %lf): jaosarvot typistetään" + +#: builtin.c:2825 +#, c-format +msgid "rshift(%lf, %lf): too large shift value will give strange results" +msgstr "rshift(%lf, %lf): liian suuri siirrosarvo antaa outoja tuloksia" + +#: builtin.c:2850 +msgid "and: received non-numeric first argument" +msgstr "and: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2852 +msgid "and: received non-numeric second argument" +msgstr "and: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2858 +#, c-format +msgid "and(%lf, %lf): negative values will give strange results" +msgstr "and(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: builtin.c:2860 +#, c-format +msgid "and(%lf, %lf): fractional values will be truncated" +msgstr "and(%lf, %lf): jaosarvot typistetään" + +#: builtin.c:2885 +msgid "or: received non-numeric first argument" +msgstr "or: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2887 +msgid "or: received non-numeric second argument" +msgstr "or: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2893 +#, c-format +msgid "or(%lf, %lf): negative values will give strange results" +msgstr "or(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: builtin.c:2895 +#, c-format +msgid "or(%lf, %lf): fractional values will be truncated" +msgstr "or(%lf, %lf): jaosarvot typistetään" + +#: builtin.c:2923 +msgid "xor: received non-numeric first argument" +msgstr "xor: ensimmäinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2925 +msgid "xor: received non-numeric second argument" +msgstr "xor: toinen vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2931 +#, c-format +msgid "xor(%lf, %lf): negative values will give strange results" +msgstr "xor(%lf, %lf): negatiiviset arvot antavat outoja tuloksia" + +#: builtin.c:2933 +#, c-format +msgid "xor(%lf, %lf): fractional values will be truncated" +msgstr "xor(%lf, %lf): jaosarvot typistetään" + +#: builtin.c:2957 builtin.c:2963 +msgid "compl: received non-numeric argument" +msgstr "compl: vastaanotettu argumentti ei ole numeerinen" + +#: builtin.c:2965 +#, c-format +msgid "compl(%lf): negative value will give strange results" +msgstr "compl(%lf): negatiiviset arvot antavat outoja tuloksia" + +#: builtin.c:2967 +#, c-format +msgid "compl(%lf): fractional value will be truncated" +msgstr "compl(%lf): jaosarvo typistetään" + +#: builtin.c:3136 +#, c-format +msgid "dcgettext: `%s' is not a valid locale category" +msgstr "dcgettext: â€%s†ei ole kelvollinen paikallinen kategoria" + +#: eval.c:412 +#, c-format +msgid "unknown nodetype %d" +msgstr "tuntematon solmutyyppi %d" + +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "tuntematon käskykoodi %d" + +#: eval.c:434 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "käskykoodi %s ei ole operaattori tai avainsana" + +#: eval.c:488 +msgid "buffer overflow in genflags2str" +msgstr "puskurin ylivuoto funktiossa genflags2str" + +#: eval.c:698 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktiokutsupino:\n" +"\n" + +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "â€IGNORECASE†on gawk-laajennus" + +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "â€BINMODE†on gawk-laajennus" + +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE-arvo â€%s†on virheellinen, käsiteltiin arvona 3" + +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "väärä â€%sFMTâ€-määritys â€%sâ€" + +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "käännetään pois â€--lintâ€-valitsin â€LINTâ€-sijoituksen vuoksi" + +#: eval.c:1127 eval.c:1777 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "funktionimeä â€%s†ei voi käyttää muuttujana tai taulukkona" + +#: eval.c:1158 eval.c:1789 eval.c:1802 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "viite alustamattomaan argumenttiin â€%sâ€" + +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "yritettiin kenttäviitettä arvosta, joka ei ole numeerinen" + +#: eval.c:1179 +msgid "attempt to field reference from null string" +msgstr "yritettiin kenttäviitettä null-merkkijonosta" + +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "yritettiin saantia kenttään %ld" + +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "viite alustamattomaan kenttään â€$%ldâ€" + +#: eval.c:1256 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funktio â€%s†kutsuttiin useammalla argumentilla kuin esiteltiin" + +#: eval.c:1437 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: odottamaton tyyppi â€%sâ€" + +#: eval.c:1532 +msgid "division by zero attempted in `/='" +msgstr "jakoa nollalla yritettiin operaatiossa â€/=â€" + +#: eval.c:1539 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "jakoa nollalla yritettiin operaatiossa â€%%=â€" + +#: eval.c:1876 eval.c:2122 +#, c-format +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "yritettiin käyttää taulukkoa â€%s[\"%.*s\"]†skalaarikontekstissa" + +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "sijoitusta käytetty ehdollisessa kontekstissa" + +#: eval.c:1911 +msgid "statement has no effect" +msgstr "käskyllä ei ole vaikutusta" + +#: eval.c:2343 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"for-silmukka: taulukon â€%s†koko muuttui arvosta %ld arvoon %ld silmukan " +"suorituksen aikana" + +#: eval.c:2458 +#, c-format +msgid "function called indirectly through `%s' does not exist" +msgstr "kohteen â€%s†kautta epäsuorasti kutsuttu funktio ei ole olemassa" + +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "funktio â€%s†ei ole määritelty" + +#: eval.c:2511 +#, c-format +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "edelleenohjaamaton â€getline†virheellinen â€%sâ€-säännön sisällä" + +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "virhe luettaessa syötetiedostoa â€%sâ€: %s" + +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "â€nextfile†ei voida kutsua â€%sâ€-säännöstä" + +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "â€exit†ei voida kutsua nykyisessä asiayhteydessä" + +#: eval.c:2700 +#, c-format +msgid "`next' cannot be called from a `%s' rule" +msgstr "â€next†ei voida kutsua â€%sâ€-säännöstä" + +#: eval.c:2766 +#, c-format +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Ei osata tulkita kohdetta â€%sâ€" + +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "laajennuksia ei sallita hiekkalaatikkotilassa" + +#: ext.c:60 ext.c:65 +msgid "`extension' is a gawk extension" +msgstr "â€extension†on gawk-laajennus" + +#: ext.c:75 +#, c-format +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "tuhoisa: extension: ei voi avata solmua â€%s†(%s)\n" + +#: ext.c:84 +#, c-format +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"tuhoisa: extension: kirjasto â€%sâ€: ei määrittele " +"â€plugin_is_GPL_compatible†(%s)\n" + +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "tuhoisa: extension: kirjasto â€%sâ€: ei voi kutsua funktiota â€%s†(%s)\n" + +#: ext.c:127 +msgid "extension: missing function name" +msgstr "extension: puuttuva funktionimi" + +#: ext.c:132 +#, c-format +msgid "extension: illegal character `%c' in function name `%s'" +msgstr "extension: virheellinen merkki â€%c†funktionimessä â€%sâ€" + +#: ext.c:141 +#, c-format +msgid "extension: can't redefine function `%s'" +msgstr "extension: ei voi määritellä uudelleen funktiota â€%sâ€" + +#: ext.c:145 +#, c-format +msgid "extension: function `%s' already defined" +msgstr "extension: funktio â€%s†on jo määritelty" + +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: funktionimi â€%s†on määritelty jo aiemmin" + +#: ext.c:152 +#, c-format +msgid "extension: can't use gawk built-in `%s' as function name" +msgstr "" +"extension: ei voi käyttää gawk-ohjelman sisäistä muuttujanimeä â€%s†" +"funktionimenä" + +#: ext.c:156 +#, c-format +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: negatiivinen argumenttilukumäärä funktiolle â€%sâ€" + +#: ext.c:259 +#, c-format +msgid "function `%s' defined to take no more than %d argument(s)" +msgstr "funktio â€%s†on määritelty ottamaan enemmän kuin %d argumenttia" + +#: ext.c:262 +#, c-format +msgid "function `%s': missing argument #%d" +msgstr "function â€%sâ€: puuttuva argumentti #%d" + +#: ext.c:279 +#, c-format +msgid "function `%s': argument #%d: attempt to use scalar as an array" +msgstr "funktio â€%sâ€: argumentti #%d: yritettiin käyttää skalaaria taulukkona" + +#: ext.c:283 +#, c-format +msgid "function `%s': argument #%d: attempt to use array as a scalar" +msgstr "funktio â€%sâ€: argumentti #%d: yritettiin käyttää taulukkoa skalaarina" + +#: ext.c:296 +msgid "Operation Not Supported" +msgstr "Toimintoa ei tueta" + +#: field.c:328 +msgid "NF set to negative value" +msgstr "NF asetettu negatiiviseen arvoon" + +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: neljäs argumentti on gawk-laajennus" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: neljäs argumentti ei ole taulukko" + +#: field.c:969 +msgid "split: second argument is not an array" +msgstr "split: toinen argumentti ei ole taulukko" + +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: ei voida käyttää samaa taulukkoa toiselle ja neljännelle argumentille" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: ei voida käyttää toisen argumentin alitaulukkoa neljännelle " +"argumentille" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: ei voida käyttää neljännen argumentin alitaulukkoa toiselle " +"argumentille" + +#: field.c:1010 +msgid "split: null string for third arg is a gawk extension" +msgstr "split: null-merkkijono kolmantena argumenttina on gawk-laajennus" + +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: neljäs argumentti ei ole taulukko" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: toinen argumentti ei ole taulukko" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: kolmas argumentti ei ole taulukko" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: ei voida käyttää samaa taulukkoa toiselle ja neljännelle " +"argumentille" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: ei voida käyttää toisen argumentin alitaulukkkoa neljännelle " +"argumentille" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: ei voida käyttää neljännen argumentin alitaulukkoa toiselle " +"argumentille" + +#: field.c:1110 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "â€FIELDWIDTHS†on gawk-laajennus" + +#: field.c:1173 +#, c-format +msgid "invalid FIELDWIDTHS value, near `%s'" +msgstr "virheellinen FIELDWIDTHS-arvo, lähellä â€%sâ€" + +#: field.c:1246 +msgid "null string for `FS' is a gawk extension" +msgstr "null-merkkijono â€FSâ€-kenttäerotinmuuttujalle on gawk-laajennus" + +#: field.c:1250 +msgid "old awk does not support regexps as value of `FS'" +msgstr "vanha awk ei tue regexp-arvoja â€FSâ€-kenttäerotinmuuttujana" + +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "â€FPAT†on gawk-laajennus" + +#: getopt.c:604 getopt.c:633 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: valitsin ’%s’ ei ole yksiselitteinen\n" + +#: getopt.c:679 getopt.c:683 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: valitsin ’--%s’ ei salli argumenttia\n" + +#: getopt.c:692 getopt.c:697 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: valitsin ’%c%s’ ei salli argumenttia\n" + +#: getopt.c:740 getopt.c:759 +#, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: valitsin ’--%s’ vaatii argumentin\n" + +#: getopt.c:797 getopt.c:800 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: tunnistamaton valitsin ’--%s’\n" + +#: getopt.c:808 getopt.c:811 +#, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: tunnistamaton valitsin ’%c%s’\n" + +#: getopt.c:860 getopt.c:863 +#, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: virheellinen valitsin -- ’%c’\n" + +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: valitsin vaatii argumentin -- ’%c’\n" + +#: getopt.c:989 getopt.c:1005 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: valitsin ’-W %s’ ei ole yksiselitteinen\n" + +#: getopt.c:1029 getopt.c:1047 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: valitsin ’-W %s’ ei salli argumenttia\n" + +#: getopt.c:1068 getopt.c:1086 +#, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: valitsin ’-W %s’ vaatii argumentin\n" + +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "komentoriviargumentti â€%s†on hakemisto: ohitettiin" + +#: io.c:283 io.c:385 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "ei voi avata tiedostoa â€%s†lukemista varten (%s)" + +#: io.c:501 +#, c-format +msgid "close of fd %d (`%s') failed (%s)" +msgstr "tiedostomäärittelijän %d (â€%sâ€) sulkeminen epäonnistui (%s)" + +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "edelleenohjaus ei ole sallittua hiekkalaatikkotilassa" + +#: io.c:612 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "lausekkeella â€%sâ€-uudellenohjauksessa on vain numeerinen arvo" + +#: io.c:618 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "lausekkeella â€%sâ€-uudelleenohjauksessa on null-merkkijonoarvo" + +#: io.c:623 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "" +"tiedostonimi â€%s†â€%sâ€-uudelleenohjaukselle saattaa olla loogisen lausekkeen " +"tulos" + +#: io.c:666 +#, c-format +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "turha merkkien â€>†ja â€>>†sekoittaminen tiedostolle â€%.*sâ€" + +#: io.c:719 +#, c-format +msgid "can't open pipe `%s' for output (%s)" +msgstr "ei voi avata putkea â€%s†tulosteelle (%s)" + +#: io.c:729 +#, c-format +msgid "can't open pipe `%s' for input (%s)" +msgstr "ei voi avata putkea â€%s†syötteelle (%s)" + +#: io.c:752 +#, c-format +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "ei voi avata kaksisuuntaista putkea â€%s†syötteelle/tulosteelle (%s)" + +#: io.c:834 +#, c-format +msgid "can't redirect from `%s' (%s)" +msgstr "ei voi uudelleenohjata putkesta â€%s†(%s)" + +#: io.c:837 +#, c-format +msgid "can't redirect to `%s' (%s)" +msgstr "ei voi uudelleenohjata putkeen â€%s†(%s)" + +#: io.c:888 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" +msgstr "" +"saavutettiin avoimien tiedostojen järjestelmäraja: aloitetaan " +"tiedostomäärittelijöiden lomittaminen" + +#: io.c:904 +#, c-format +msgid "close of `%s' failed (%s)." +msgstr "uudelleenohjauksen â€%s†sulkeminen epäonnistui (%s)." + +#: io.c:912 +msgid "too many pipes or input files open" +msgstr "avoinna liian monta putkea tai syötetiedostoa" + +#: io.c:934 +msgid "close: second argument must be `to' or `from'" +msgstr "close: toisen argumentin on oltava â€to†tai â€fromâ€" + +#: io.c:951 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: â€%.*s†ei ole avoin tiedosto, putki tai apuprosessi" + +#: io.c:956 +msgid "close of redirection that was never opened" +msgstr "suljettiin uudelleenohjaus, jota ei avattu koskaan" + +#: io.c:1053 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "" +"close: uudelleenohjaus â€%s†ei ole avattu operaattoreilla â€|&â€, toinen " +"argumentti ohitettu" + +#: io.c:1069 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "virhetila (%d) putken â€%s†sulkemisessa (%s)" + +#: io.c:1072 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "virhetila (%d) tiedoston â€%s†sulkemisessa (%s)" + +#: io.c:1092 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "pistokkeen â€%s†eksplisiittistä sulkemista ei tarjota" + +#: io.c:1095 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "apuprosessin â€%s†eksplisiittistä sulkemista ei tarjota" + +#: io.c:1098 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "putken â€%s†eksplisiittistä sulkemista ei tarjota" + +#: io.c:1101 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "tiedoston â€%s†eksplisiittistä sulkemista ei tarjota" + +#: io.c:1129 io.c:1184 main.c:794 main.c:831 +#, c-format +msgid "error writing standard output (%s)" +msgstr "virhe kirjoitettaessa vakiotulosteeseen (%s)" + +#: io.c:1133 io.c:1189 +#, c-format +msgid "error writing standard error (%s)" +msgstr "virhe kirjoitettaessa vakiovirheeseen (%s)" + +#: io.c:1141 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "uudelleenohjauksen â€%s†putken tyhjennys epäonnistui (%s)." + +#: io.c:1144 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "putken apuprosessityhjennys uudelleenohjaukseen â€%s†epäonnistui (%s)." + +#: io.c:1147 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "uudelleenohjauksen â€%s†tiedostontyhjennys epäonnistui (%s)." + +#: io.c:1262 +#, c-format +msgid "local port %s invalid in `/inet'" +msgstr "paikallinen portti %s virheellinen pistokkeessa â€/inetâ€" + +#: io.c:1279 +#, c-format +msgid "remote host and port information (%s, %s) invalid" +msgstr "etäkone- ja porttitiedot (%s, %s) ovat virheellisiä" + +#: io.c:1431 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "ei (tunnettua) yhteyskäytäntöä tarjottu erikoistiedostonimessä â€%sâ€" + +#: io.c:1445 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "erikoistiedostonimi â€%s†on vaillinainen" + +#: io.c:1462 +msgid "must supply a remote hostname to `/inet'" +msgstr "on tarjottava etäkoneen nimi pistokkeeseen â€/inetâ€" + +#: io.c:1480 +msgid "must supply a remote port to `/inet'" +msgstr "on tarjottava etäportti pistokkeeseen â€/inetâ€" + +#: io.c:1526 +msgid "TCP/IP communications are not supported" +msgstr "TCP/IP-viestintää ei tueta" + +#: io.c:1693 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "ei voitu avata laitetta â€%sâ€, tila â€%sâ€" + +#: io.c:1747 +#, c-format +msgid "close of master pty failed (%s)" +msgstr "â€master ptyâ€-sulkeminen epäonnistui (%s)" + +#: io.c:1749 io.c:1917 io.c:2074 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "vakiotulosteen sulkeminen lapsiprosessissa epäonnistui (%s)" + +#: io.c:1752 +#, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "" +"â€slave ptyâ€:n siirtäminen vakiotulosteeseen lapsiprosessissa epäonnistui " +"(dup: %s)" + +#: io.c:1754 io.c:1922 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "vakiosyötteen sulkeminen lapsiprosessissa epäonnistui (%s)" + +#: io.c:1757 +#, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "" +"â€slave ptyâ€:n siirtäminen vakiosyötteeseen lapsiprosessissa epäonnistui " +"(dup: %s)" + +#: io.c:1759 io.c:1780 +#, c-format +msgid "close of slave pty failed (%s)" +msgstr "â€slave ptyâ€:n sulkeminen epäonnistui (%s)" + +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "" +"putken siirtäminen vakiotulosteeseen lapsiprosessissa epäonnistui (dup: %s)" + +#: io.c:1865 io.c:1925 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "" +"putken siirtäminen vakiosyötteeseen lapsiprosessissa epäonnistui (dup: %s)" + +#: io.c:1885 io.c:2067 +msgid "restoring stdout in parent process failed\n" +msgstr "vakiotulosteen palauttaminen äitiprosessissa epäonnistui\n" + +#: io.c:1893 +msgid "restoring stdin in parent process failed\n" +msgstr "vakiosyötön palauttaminen äitiprosessissa epäonnistui\n" + +#: io.c:1928 io.c:2079 io.c:2093 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "putken sulkeminen epäonnistui (%s)" + +#: io.c:1973 +msgid "`|&' not supported" +msgstr "â€|&†ei tueta" + +#: io.c:2039 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "ei voi avata putkea â€%s†(%s)" + +#: io.c:2087 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "ei voida luoda lapsiprosessia komennolle â€%s†(fork: %s)" + +#: io.c:2520 +#, c-format +msgid "data file `%s' is empty" +msgstr "data-tiedosto â€%s†on tyhjä" + +#: io.c:2561 io.c:2569 +msgid "could not allocate more input memory" +msgstr "ei voitu varata lisää syötemuistia" + +#: io.c:3127 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "â€RSâ€-monimerkkiarvo on gawk-laajennus" + +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "IPv6-viestintää ei tueta" + +#: main.c:366 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "â€-m[fr]â€-valitsin asiaanliittymätön gawk:ssa" + +#: main.c:368 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "-m valitsinkäyttö: â€-m[fr] nnnâ€" + +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "tyhjä argumentti valitsimelle â€-e/--source†ohitetaan" + +#: main.c:462 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: valitsin â€-W %s†on tunnistamaton, ohitetaan\n" + +#: main.c:515 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: valitsin vaatii argumentin -- %c\n" + +#: main.c:536 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "" +"ympäristömuuttuja â€POSIXLY_CORRECT†asetettu: käännetään päälle valitsin â€--" +"posixâ€" + +#: main.c:542 +msgid "`--posix' overrides `--traditional'" +msgstr "valitsin â€--posix†korvaa valitsimen â€--traditionalâ€" + +#: main.c:553 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "" +"valitsin â€--posix†tai â€--traditional†korvaa valitsimen â€--non-decimal-dataâ€" + +#: main.c:557 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "suorittaminen â€%s setuid rootâ€-käyttäjänä saattaa olla turvapulma" + +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "valitsin â€--posix†korvaa valitsimen â€--binaryâ€" + +#: main.c:613 +#, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "ei voi asettaa binaaritilaa vakiosyötteessä (%s)" + +#: main.c:616 +#, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "ei voi asettaa binaaritilaa vakiotulosteessa (%s)" + +#: main.c:618 +#, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "ei voi asettaa binaaritilaa vakiovirheessä (%s)" + +#: main.c:657 +msgid "no program text at all!" +msgstr "ei ohjelmatekstiä ollenkaan!" + +#: main.c:734 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "" +"Käyttö: %s [POSIX- tai GNU-tyyliset valitsimet] -f ohjelmatiedosto [--] " +"tiedosto ...\n" + +#: main.c:736 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "" +"Käyttö: %s [POSIX- tai GNU-tyyliset valitsimet] [--] %cohjelma%c " +"tiedosto ...\n" + +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "POSIX-valitsimet:\t\tGNU-pitkät valitsimet: (vakio)\n" + +#: main.c:742 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f ohjelmatiedosto\t\t--file=ohjelmatiedosto\n" + +#: main.c:743 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr "\t-F fs\t\t\t--field-separator=fs\n" + +#: main.c:744 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr "\t-v var=arvo\t\t--assign=muuttuja=arvo\n" + +#: main.c:745 +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "Lyhyet valitsimet:\t\tGNU-pitkät valitsimet: (laajennukset)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" + +#: main.c:748 +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[tiedosto]\t\t--dump-variables[=tiedosto]\n" + +#: main.c:750 +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'program-text'\t--source='program-text'\n" + +#: main.c:751 +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E file\t\t\t--exec=tiedosto\n" + +#: main.c:752 +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-po\n" + +#: main.c:753 +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" + +#: main.c:754 +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" + +#: main.c:755 +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" + +#: main.c:756 +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" + +#: main.c:757 +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[tiedosto]\t\t--profile[=tiedosto]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R tiedosto\t\t\t--exec=tiedosto\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" + +#. TRANSLATORS: --help output 5 (end) +#. TRANSLATORS: the placeholder indicates the bug-reporting address +#. for this application. Please add _another line_ with the +#. address for translation bugs. +#. no-wrap +#: main.c:779 +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" +"Virheiden ilmoittamista varten, katso solmua â€Bugs†tiedostossa â€gawk." +"infoâ€,\n" +"joka on kappale â€Reporting Problems and Bugs†painetussa versiossa.\n" +"\n" + +#: main.c:783 +msgid "" +"gawk is a pattern scanning and processing language.\n" +"By default it reads standard input and writes standard output.\n" +"\n" +msgstr "" +"gawk on mallietsintä- ja käsittelykieli.\n" +"Oletuksena se lukee vakiosyötettä ja kirjoittaa vakiotulosteeseen.\n" +"\n" + +#: main.c:787 +msgid "" +"Examples:\n" +"\tgawk '{ sum += $1 }; END { print sum }' file\n" +"\tgawk -F: '{ print $1 }' /etc/passwd\n" +msgstr "" +"Esimerkkejä:\n" +"\tgawk '{ sum += $1 }; END { print sum }' tiedosto\n" +"\tgawk -F: '{ print $1 }' /etc/passwd\n" + +#: main.c:807 +#, 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 3 of the License, or\n" +"(at your option) any later version.\n" +"\n" +msgstr "" +"Copyright © 1989, 1991-%d Free Software Foundation.\n" +"\n" +"Tämä ohjelma on ilmainen; voit jakaa sitä edelleen ja/tai muokata sitä\n" +"Free Software Foundation julkaisemien GNU General Public License-lisenssin\n" +"version 3, tai (valintasi mukaan) minkä tahansa myöhäisemmän version\n" +"ehtojen mukaisesti.\n" +"\n" + +#: main.c:815 +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 "" +"Tätä ohjelmaa levitetään toivossa, että se on hyödyllinen, mutta\n" +"ILMAN MITÄÄN TAKUUTA; ilman edes viitattua takuuta KAUPALLISUUDESTA\n" +"tai SOPIVUUDESTA TIETTYYN TARKOITUKSEEN. Katso yksityiskohdat\n" +"GNU General Public License-ehdoista.\n" +"\n" + +#: main.c:821 +msgid "" +"You should have received a copy of the GNU General Public License\n" +"along with this program. If not, see http://www.gnu.org/licenses/.\n" +msgstr "" +"Sinun pitäisi vastaanottaa kopion GNU General Public Licence-lisenssistä\n" +"tämän ohjelman mukana. Jos näin ei ole, katso http://www.gnu.org/licenses/.\n" + +#: main.c:856 +msgid "-Ft does not set FS to tab in POSIX awk" +msgstr "-Ft ei aseta FS välilehteen POSIX awk:ssa" + +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "tuntematon arvo kenttämääritteelle: %d\n" + +#: main.c:1171 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" +"%s: â€%s†argumentti valitsimelle â€-v†ei ole â€var=arvoâ€-muodossa\n" +"\n" + +#: main.c:1197 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "â€%s†ei ole laillinen muuttujanimi" + +#: main.c:1200 +#, c-format +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "â€%s†ei ole muuttujanimi, etsitään tiedostoa â€%s=%sâ€" + +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "ei voi käyttää gawk-ohjelman sisäistä â€%sâ€-määrittelyä muuttujanimenä" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "funktionimeä â€%s†ei voi käyttää muuttujanimenä" + +#: main.c:1262 +msgid "floating point exception" +msgstr "liukulukupoikkeus" + +#: main.c:1269 +msgid "fatal error: internal error" +msgstr "tuhoisa virhe: sisäinen virhe" + +#: main.c:1284 +msgid "fatal error: internal error: segfault" +msgstr "tuhoisa virhe: sisäinen virhe: segmenttivirhe" + +#: main.c:1296 +msgid "fatal error: internal error: stack overflow" +msgstr "tuhoisa virhe: sisäinen virhe: pinoylivuoto" + +#: main.c:1346 +#, c-format +msgid "no pre-opened fd %d" +msgstr "ei avattu uudelleen tiedostomäärittelijää %d" + +#: main.c:1353 +#, c-format +msgid "could not pre-open /dev/null for fd %d" +msgstr "ei voitu avata uudelleen laitetta /dev/null tiedostomäärittelijälle %d" + +#: msg.c:63 +#, c-format +msgid "cmd. line:" +msgstr "komentorivi:" + +#: msg.c:107 +msgid "error: " +msgstr "virhe:" + +#: node.c:406 +msgid "backslash at end of string" +msgstr "kenoviiva merkkijonon lopussa" + +#: node.c:517 +#, c-format +msgid "old awk does not support the `\\%c' escape sequence" +msgstr "vanha awk ei tue â€\\%câ€-koodinvaihtosekvenssiä" + +#: node.c:568 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX ei salli â€\\xâ€-koodinvaihtoja" + +#: node.c:574 +msgid "no hex digits in `\\x' escape sequence" +msgstr "ei heksadesimaalilukuja â€\\xâ€-koodinvaihtosekvenssissä" + +#: node.c:596 +#, c-format +msgid "" +"hex escape \\x%.*s of %d characters probably not interpreted the way you " +"expect" +msgstr "" +"heksadesimaalikoodinvaihtomerkkejä \\x%.*s / %d ei ole luultavasti tulkittu " +"sillä tavalla kuin odotat" + +#: node.c:611 +#, c-format +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "koodinvaihtosekvenssi â€\\%c†käsitelty kuin pelkkä â€%câ€" + +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Virheellinen monitavutieto havaittu. Paikallisasetuksesi ja tietojesi " +"välillä saattaa olla täsmäämättömyys." + +#: posix/gawkmisc.c:176 +#, c-format +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "%s %s â€%sâ€: ei voitu hakea fd-lippuja: (fcntl F_GETFD: %s)" + +#: posix/gawkmisc.c:188 +#, c-format +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s â€%sâ€: ei voitu asettaa close-on-exec: (fcntl F_SETFD: %s)" + +#: profile.c:83 +#, c-format +msgid "could not open `%s' for writing: %s" +msgstr "ei voitu avata tiedostoa â€%s†kirjoittamista varten: %s" + +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "lähetetään profiili vakiovirheeseen" + +#: profile.c:203 +#, c-format +msgid "" +"\t# %s block(s)\n" +"\n" +msgstr "" +"\t# %s-lohko(t)\n" +"\n" + +#: profile.c:208 +#, c-format +msgid "" +"\t# Rule(s)\n" +"\n" +msgstr "" +"\t# Säännöt\n" +"\n" + +#: profile.c:279 +#, c-format +msgid "internal error: %s with null vname" +msgstr "sisäinen virhe: %s null vname-arvolla" + +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# gawk-profiili, luotu %s\n" + +#: profile.c:1331 +#, c-format +msgid "" +"\n" +"\t# Functions, listed alphabetically\n" +msgstr "" +"\n" +"\t# Funktiot, luetteloitu aakkosjärjestyksessä\n" + +#: profile.c:1370 +#, c-format +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: tuntematon edelleenohjaustyyppi %d" + +#: re.c:573 +#, c-format +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "muodon â€[%c-%c]†lukualue on paikallisasetuksesta riippuvainen" + +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"säännöllisen lausekkeen komponentin â€%.*s†pitäisi luultavasti olla â€[%.*s]â€" + +#: regcomp.c:131 +msgid "Success" +msgstr "Onnistui" + +#: regcomp.c:134 +msgid "No match" +msgstr "Ei täsmäystä" + +#: regcomp.c:137 +msgid "Invalid regular expression" +msgstr "Virheellinen säännöllinen lauseke" + +#: regcomp.c:140 +msgid "Invalid collation character" +msgstr "Virheellinen vertailumerkki" + +#: regcomp.c:143 +msgid "Invalid character class name" +msgstr "Virheellinen merkkiluokkanimi" + +#: regcomp.c:146 +msgid "Trailing backslash" +msgstr "Jäljessä oleva kenoviiva" + +#: regcomp.c:149 +msgid "Invalid back reference" +msgstr "Virheellinen paluuviite" + +#: regcomp.c:152 +msgid "Unmatched [ or [^" +msgstr "Pariton [ tai [^" + +#: regcomp.c:155 +msgid "Unmatched ( or \\(" +msgstr "Pariton ( tai \\(" + +#: regcomp.c:158 +msgid "Unmatched \\{" +msgstr "Pariton \\{" + +#: regcomp.c:161 +msgid "Invalid content of \\{\\}" +msgstr "Virheellinen \\{\\}-sisältö" + +#: regcomp.c:164 +msgid "Invalid range end" +msgstr "Virheellinen lukualueen loppu" + +#: regcomp.c:167 +msgid "Memory exhausted" +msgstr "Muisti loppui" + +#: regcomp.c:170 +msgid "Invalid preceding regular expression" +msgstr "Virheellinen edeltävä säännöllinen lauseke" + +#: regcomp.c:173 +msgid "Premature end of regular expression" +msgstr "Ennenaikainen säännöllisen lausekkeen loppu" + +#: regcomp.c:176 +msgid "Regular expression too big" +msgstr "Säännöllinen lauseke on liian iso" + +#: regcomp.c:179 +msgid "Unmatched ) or \\)" +msgstr "Pariton ) tai \\)" + +#: regcomp.c:700 +msgid "No previous regular expression" +msgstr "Ei edellistä säännöllistä lauseketta" + +#~ msgid "could not find groups: %s" +#~ msgstr "ei voitu löytää ryhmiä: %s" + +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "sijoitusta ei sallita sisäänrakennetun funktion tulokselle" + +#~ msgid "attempt to use array in a scalar context" +#~ msgstr "yritettiin käyttää taulukkoa skalaarikontekstissa" + +#~ msgid "statement may have no effect" +#~ msgstr "käsky saattaa olla tehoton" + +#~ msgid "out of memory" +#~ msgstr "muisti loppui" + +#~ msgid "call of `length' without parentheses is deprecated by POSIX" +#~ msgstr "" +#~ "â€lengthâ€-kutsu ilman sulkumerkkejä on vanhentunut POSIX-standardissa" + +#~ msgid "division by zero attempted in `/'" +#~ msgstr "jakoa nollalla yritettiin operaatiossa â€/â€" + +#~ msgid "length: untyped parameter argument will be forced to scalar" +#~ msgstr "length: tyypitön parametri pakotetaan skalaariksi" + +#~ msgid "length: untyped argument will be forced to scalar" +#~ msgstr "length: tyypitön argumentti pakotetaan skalaariksi" + +#~ msgid "`break' outside a loop is not portable" +#~ msgstr "â€break†silmukan ulkopuolella ei ole siirrettävä" + +#~ msgid "`continue' outside a loop is not portable" +#~ msgstr "â€continue†silmukan ulkopuolella ei ole siirrettävä" + +#~ msgid "`next' cannot be called from a BEGIN rule" +#~ msgstr "â€next†ei voida kutsua BEGIN-säännöstä" + +#~ msgid "`nextfile' cannot be called from a BEGIN rule" +#~ msgstr "â€nextfile†ei voida kutsua BEGIN-säännöstä" + +#~ msgid "" +#~ "concatenation: side effects in one expression have changed the length of " +#~ "another!" +#~ msgstr "" +#~ "concatenation: sivuvaikutukset yhdessä lausekkeessa ovat muuttaneet " +#~ "toisen pituutta!" + +#~ msgid "illegal type (%s) in tree_eval" +#~ msgstr "virheellinen tyyppi (%s) funktiossa tree_eval" + +#~ msgid "\t# -- main --\n" +#~ msgstr "\t# -- main --\n" + +#~ msgid "invalid tree type %s in redirect()" +#~ msgstr "virheellinen puutyyppi %s funktiossa redirec()" + +#~ msgid "/inet/raw client not ready yet, sorry" +#~ msgstr "/inet/raw-asiakas ei ole vielä valitettavasti valmis" + +#~ msgid "only root may use `/inet/raw'." +#~ msgstr "vain root-käyttäjä voi käyttää asiakasta â€/inet/rawâ€." + +#~ msgid "/inet/raw server not ready yet, sorry" +#~ msgstr "/inet/raw-palvelin ei ole vielä valitettavasti valmis" + +#~ msgid "file `%s' is a directory" +#~ msgstr "tiedosto `%s' on hakemisto" + +#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +#~ msgstr "käytä â€PROCINFO[\"%s\"]†eikä â€%sâ€" + +#~ msgid "use `PROCINFO[...]' instead of `/dev/user'" +#~ msgstr "käytä â€PROCINFO[...]†eikä â€/dev/userâ€" + +#~ msgid "\t-m[fr] val\n" +#~ msgstr "\t-m[fr] arvo\n" + +#~ msgid "\t-W compat\t\t--compat\n" +#~ msgstr "\t-W compat\t\t--compat\n" + +#~ msgid "\t-W copyleft\t\t--copyleft\n" +#~ msgstr "\t-W copyleft\t\t--copyleft\n" + +#~ msgid "\t-W usage\t\t--usage\n" +#~ msgstr "\t-W usage\t\t--usage\n" + +#~ msgid "can't convert string to float" +#~ msgstr "ei voi muuntaa merkkijonoa liukuluvuksi" + +#~ msgid "# treated internally as `delete'" +#~ msgstr "# käsitelty sisäisesti kuin â€deleteâ€" + +#~ msgid "# this is a dynamically loaded extension function" +#~ msgstr "# tämä on dynaamisesti ladattu laajennusfunktio" + +#~ msgid "" +#~ "\t# BEGIN block(s)\n" +#~ "\n" +#~ msgstr "" +#~ "\t# BEGIN-lohko(t)\n" +#~ "\n" + +#~ msgid "unexpected type %s in prec_level" +#~ msgstr "odottamaton tyyppi %s funktiossa prec_level" + +#~ msgid "Unknown node type %s in pp_var" +#~ msgstr "Tuntematon solmutyyppi %s funktiossa pp_var" + +#~ msgid "can't open two way socket `%s' for input/output (%s)" +#~ msgstr "" +#~ "ei voi avata kaksisuuntaista pistoketta â€%s†syötteelle/tulosteelle (%s)" + +#~ msgid "attempt to use scalar `%s' as array" +#~ msgstr "yritettiin käyttää skalaaria â€%s†taulukkona" + +#~ msgid "attempt to use array `%s' in scalar context" +#~ msgstr "yritettiin käyttää taulukkoa â€%s†skalaarikontekstissa" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/fr.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/fr.gmo differ diff -Nru gawk-3.1.8+dfsg/po/fr.po gawk-4.0.1+dfsg/po/fr.po --- gawk-3.1.8+dfsg/po/fr.po 2010-05-06 17:57:36.000000000 +0000 +++ gawk-4.0.1+dfsg/po/fr.po 2012-03-28 20:03:47.000000000 +0000 @@ -3,40 +3,53 @@ # Ce fichier est distribué sous la même licence que le paquet gawk. # Copyright © 2004 Free Software Foundation, Inc. # Michel Robitaille , 1996-2005. -# Jean-Philippe Guérard , 2010. +# Jean-Philippe Guérard , 2010, 2011. +# msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.7i\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2010-05-01 00:08+0200\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-01-30 23:52+0100\n" "Last-Translator: Jean-Philippe Guérard \n" "Language-Team: French \n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "de %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "tentative d'utiliser un scalaire comme tableau" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" msgstr "tentative d'utiliser la fonction « %s » comme tableau" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "tentative d'utiliser le paramètre scalaire « %s » comme tableau" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" +msgid "attempt to use scalar `%s' as an array" msgstr "tentative d'utiliser le scalaire « %s » comme tableau" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "de %s" +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" #: array.c:513 #, c-format @@ -48,367 +61,471 @@ msgid "subscript of array `%s' is null string" msgstr "l'indice du tableau « %s » est une chaîne vide" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete : l'indice « %s » est absent du tableau « %s »" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "tentative d'utiliser le scalaire « %s[\"%.*s\"] » comme tableau" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s : vide (non défini)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s : vide (vide)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s : table_size = %d, array_size = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s : est un paramètre\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s : array_ref à %s\n" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump : l'argument n'est pas un tableau" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort : le 2nd argument n'est pas un tableau" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti : le 2nd argument n'est pas un tableau" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort : le 1er argument n'est pas un tableau" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti : le 1er argument n'est pas un tableau" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "asort : le 2nd argument ne doit pas être un sous-tableau du 1er" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "asorti : le 2nd argument ne doit pas être un sous-tableau du 1er" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "asort : le 1er argument ne doit pas être un sous-tableau du 2nd" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "asorti : le 1er argument ne doit pas être un sous-tableau du 2nd" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "« %s » n'est pas un nom de fonction valide" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "la fonction de comparaison « %s » du tri n'est pas définie" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "les blocs %s doivent avoir une partie action" -#: awkgram.y:221 +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "chaque règle doit avoir au moins une partie motif ou action" -#: awkgram.y:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "l'ancien awk ne permet pas les « BEGIN » ou « END » multiples" -#: awkgram.y:285 +#: awkgram.y:371 #, 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:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "l'expression rationnelle constante « // » n'est pas un commentaire C++" -#: awkgram.y:334 +#: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "l'expression rationnelle constante « /%s/ » n'est pas un commentaire C" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "la déclaration peut ne pas avoir d'effet" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "le corps du switch comporte des cas répétés : %s" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "plusieurs « default » ont été détectés dans le corps du switch" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "« break » est interdit en dehors d'une boucle ou d'un switch" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "« continue » est interdit en dehors d'une boucle ou d'un switch" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "« %s » est utilisé dans l'action %s" +msgid "`next' used in %s action" +msgstr "« next » est utilisé dans l'action %s" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" -msgstr "« nextfile » est une extension de gawk" +msgstr "« nextfile » est une extension gawk" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "« nextfile » est utilisé dans l'action %s" + +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "« return » est utilisé hors du contexte d'une fonction" -#: awkgram.y:534 +#: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" -"dans BEGIN ou END, un « print » devrait sans doute être un « print \"\" »" +"dans BEGIN ou END, un « print » seul devrait sans doute être un « print " +"\"\" »" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" -msgstr "« delete array » est une extension de gawk" +msgstr "« delete array » est une extension gawk" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "« delete(array) » est une extension non portable de tawk" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "le corps du switch comporte des cas répétés : %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "le corps du switch comporte plusieurs « default »" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "impossible d'utiliser des tubes bidirectionnels en série" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "expression rationnelle à droite d'une affectation" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "expression rationnelle à gauche d'un opérateur « ~ » ou « !~ »" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "l'ancien awk n'autorise le mot-clef « in » qu'après « for »" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "expression rationnelle à droite d'une comparaison" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "« getline var » n'est pas valable dans une règle « %s »" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "« getline » n'est pas valable dans une règle « %s »" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" -msgstr "un « getline » non redirigé n'est pas défini dans une action END" +msgstr "dans une action END, un « getline » non redirigé n'est pas défini" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "l'ancien awk ne dispose pas des tableaux multidimensionnels" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "l'appel de « length » sans parenthèses n'est pas portable" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "l'appel de « length » sans parenthèses est obsolète pour POSIX" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "les appels indirects de fonctions sont une extension gawk" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "utilisation d'un non tableau comme tableau" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "" +"impossible d'utiliser la variable spéciale « %s » pour un appel indirect de " +"fonction" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "expression indice non valide" -#: awkgram.y:1257 +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "utilisation d'un non tableau comme tableau" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "avertissement : " + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "fatal : " + +#: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "fin de chaîne ou passage à la ligne inattendu" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "le programme indiqué en ligne de commande est vide" - -#: awkgram.y:1430 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "impossible d'ouvrir le fichier source « %s » en lecture (%s)" -#: awkgram.y:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "raison inconnue" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "le fichier source « %s » a déjà été intégré" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include est une extension gawk" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "Le nom de fichier après @include est vide" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "le programme indiqué en ligne de commande est vide" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "impossible de lire le fichier source « %s » (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "le fichier source « %s » est vide" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "le fichier source ne se termine pas par un passage à la ligne" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "expression rationnelle non refermée terminée par un « \\ » en fin de fichier" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s : %d : le modificateur d'expressions rationnelles « /.../%c » de tawk ne " "marche pas dans gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "le modificateur d'expressions rationnelles « /.../%c » de tawk ne marche pas " "dans gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "expression rationnelle non refermée" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "expression rationnelle non refermée en fin de fichier" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "" "l'utilisation de « \\ #... » pour prolonger une ligne n'est pas portable" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "la barre oblique inverse n'est pas le dernier caractère de la ligne" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX n'autorise pas l'opérateur « **= »" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "l'ancien awk ne dispose pas de l'opérateur « **= »" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX n'autorise pas l'opérateur « ** »" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "l'ancien awk ne dispose pas de l'opérateur « ** »" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de l'opérateur « ^= »" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de l'opérateur « ^ »" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "chaîne non refermée" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "caractère non valide « %c » dans l'expression" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" -msgstr "« %s » est une extension de gawk" +msgstr "« %s » est une extension gawk" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "« %s » est une extension Bell Labs" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX n'autorise pas « %s »" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "l'ancien awk ne dispose pas de « %s »" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "« goto est jugé dangereux ! » (Edsger W. Dijkstra)\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d n'est pas un nombre d'arguments valide de %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match : le 3e argument est une extension gawk" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s : une chaîne littérale en dernier argument d'une substitution est sans " "effet" -#: awkgram.y:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "le 3e paramètre de %s n'est pas un objet modifiable" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match : le 3e argument est une extension gawk" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" -msgstr "close : le 2e argument est une extension de gawk" +msgstr "close : le 2e argument est une extension gawk" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "utilisation incorrecte de dcgettext(_\"...\") : enlevez le souligné de tête" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "utilisation incorrecte de dcngettext(_\"...\") : enlevez le souligné de tête" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "fonction « %s » : paramètre #%d, « %s » est un doublon du paramètre #%d" +msgstr "" +"fonction « %s » : paramètre #%d, « %s » est un doublon du paramètre #%d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "fonction « %s » : le paramètre « %s » masque la variable globale" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "impossible d'ouvrir « %s » en écriture (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "envoi du profil vers la sortie d'erreur standard" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "envoi de la liste des variables vers la sortie d'erreur standard" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s : échec de la fermeture (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadows_funcs() a été appelé deux fois !" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "il y avait des variables masquées." -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" "fonction « %s » : impossible d'utiliser un nom de fonction comme paramètre" -#: awkgram.y:3004 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "fonction « %s » : impossible d'utiliser la variable spéciale « %s » comme " "paramètre d'une fonction" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "nom de fonction « %s » déjà défini" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "fonction « %s » appelée sans être définie" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "fonction « %s » définie mais non utilisée" +msgid "function `%s' defined but never called directly" +msgstr "fonction « %s » définie mais jamais appelée directement" -#: awkgram.y:3201 +#: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" -msgstr "le paramètre #%d, une expr. rationnelle constante, fourni un booléen" +msgstr "le paramètre #%d, une expr. rationnelle constante, fournit un booléen" -#: awkgram.y:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -417,174 +534,168 @@ "fonction « %s » appelée avec un espace entre son nom\n" "et « ( », ou utilisée comme variable ou tableau" -#: awkgram.y:3664 -msgid "division by zero attempted in `/'" -msgstr "tentative de division par zéro dans « / »" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "tentative de division par zéro" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentative de division par zéro dans « %% »" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "échec de %s vers « %s » (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "sortie standard" -#: builtin.c:124 -msgid "reason unknown" -msgstr "raison inconnue" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" -msgstr "exponentielle : l'argument n'est pas numérique" +msgstr "exp : l'argument n'est pas numérique" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" -msgstr "exponentielle : l'argument %g est hors limite" +msgstr "exp : l'argument %g est hors limite" -#: builtin.c:201 +#: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush : vidage impossible : le tube « %s » est ouvert en lecture et non en " "écriture" -#: builtin.c:204 +#: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" -"fflush : vidage impossible : fichier « %s » ouvert en lecture, pas en écriture" +"fflush : vidage impossible : fichier « %s » ouvert en lecture, pas en " +"écriture" -#: builtin.c:216 +#: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" -"fflush : « %s » n'est ni un fichier ouvert, ni un tube ou ni un co-processus" +"fflush : « %s » n'est ni un fichier ouvert, ni un tube, ni un co-processus" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index : le premier argument n'est pas une chaîne" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index : le second argument n'est pas une chaîne" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int : l'argument n'est pas numérique" -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "« length(tableau) » est une extension de gawk" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length : le paramètre non typé sera converti en scalaire" +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length : l'argument reçu est un tableau" -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length : l'argument non typé sera converti en scalaire" +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" +msgstr "« length(tableau) » est une extension gawk" -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length : l'argument n'est pas une chaîne" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log : l'argument n'est pas numérique" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log : l'argument est négatif %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" msgstr "" -"« numéro$ » doit être utilisé pour toutes les spécifications ou pour aucune" +"fatal : « numéro$ » doit être utilisé pour toutes les formats ou pour aucun" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "taille du champ de la spécification « %%%% » ignorée" +msgid "field width is ignored for `%%' specifier" +msgstr "taille du champ de la spécification « %% » ignorée" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "précision de la spécification « %%%% » ignorée" +msgid "precision is ignored for `%%' specifier" +msgstr "précision de la spécification « %% » ignorée" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "taille du champ et précision de la spécification « %%%% » ignorées" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "taille du champ et précision de la spécification « %% » ignorées" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "« $ » n'est pas un format awk valide" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "fatal : « $ » n'est pas autorisé dans les formats awk" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "le numéro de l'argument attaché à « $ » doit être > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "fatal : le numéro d'argument de « $ » doit être > 0" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "le numéro d'argument %ld est > au nombre total d'arguments fournis" +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "" +"fatal : le numéro d'argument %ld est > au nombre total d'arguments fournis" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "dans un format, « $ » doit précéder le point" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "fatal : dans un format, « $ » ne doit pas suivre un point" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "aucun « $ » fourni pour positionner la taille du champ ou la précision" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "" +"fatal : aucun « $ » fourni pour la taille ou la précision du champ positionné" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" -msgstr "« l » n'a aucun sens dans une spécification de format awk ; ignoré" +msgstr "« l » n'a aucun sens dans un format awk ; ignoré" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "« l » est interdit dans une spécification de format awk POSIX" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "fatal : « l » est interdit dans un format awk POSIX" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" -msgstr "« L » n'a aucun sens dans une spécification de format awk ; ignoré" +msgstr "« L » n'a aucun sens dans un format awk ; ignoré" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "« L » est interdit dans une spécification de format awk POSIX" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "fatal : « L » est interdit dans un format awk POSIX" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" -msgstr "« h » n'a aucun sens dans une spécification de format awk ; ignoré" +msgstr "« h » n'a aucun sens dans un format awk ; ignoré" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "« h » est interdit dans une spécification de format awk POSIX" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "fatal : « h » est interdit dans un format awk POSIX" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf : valeur %g hors limite pour la spécification « %%%c »" +msgstr "[s]printf : valeur %g hors limite pour le format « %%%c »" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" -"caractère de spécification inconnu « %c » ignoré : aucun argument converti" +msgstr "caractère de format inconnu « %c » ignoré : aucun argument converti" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "pas assez d'arguments pour satisfaire la chaîne de format" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "fatal : pas assez d'arguments pour satisfaire la chaîne de formatage" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "^ à court pour celui-ci" @@ -594,1082 +705,1144 @@ #: builtin.c:1349 msgid "too many arguments supplied for format string" -msgstr "trop d'arguments pour la chaîne de format" +msgstr "trop d'arguments pour la chaîne de formatage" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf : aucun argument" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt : l'argument n'est pas numérique" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt : appelé avec un argument négatif %g" -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr : l'index de début %g n'est pas valide, utilisation de 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr : l'index de début %g n'est pas un entier, il sera tronqué" - -#: builtin.c:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr : la longueur %g n'est pas >= 1" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr : la longueur %g n'est pas >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr : la longueur %g n'est pas entière, elle sera tronquée" -#: builtin.c:1524 +#: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr : la longueur %g est trop grande, tronquée à %g" -#: builtin.c:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr : l'index de début %g n'est pas valide, utilisation de 1" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr : l'index de début %g n'est pas un entier, il sera tronqué" + +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr : la chaîne source est de longueur nulle" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr : l'index de début %g est au-delà de la fin de la chaîne" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr : la longueur %g à partir de %g dépasse la fin du 1er argument (%lu)" -#: builtin.c:1637 +# Exemple : gawk --lint 'BEGIN { PROCINFO["strftime"]=123 ; print strftime() }' +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "" +"strftime : la valeur de formatage PROCINFO[\"strftime\"] est de type " +"numérique" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime : le second argument n'est pas numérique" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "strftime: second argument négatif ou trop grand pour time_t" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftim : le premier argument n'est pas une chaîne" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" -msgstr "strftime : la chaîne de format est vide" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime : le second argument n'est pas numérique" +msgstr "strftime : la chaîne de formatage est vide" -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime : l'argument n'est pas une chaîne" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "" "mktime : au moins l'une des valeurs est en dehors de la plage par défaut" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "La fonction « system » est interdite en isolement (mode sandbox)" + +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system : l'argument n'est pas une chaîne" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "référence à une variable non initialisée « %s »" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "référence à un champ non initialisé « $%d »" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower : l'argument n'est pas une chaîne" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper : l'argument n'est pas une chaîne" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2 : le premier argument n'est pas numérique" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2 : le second argument n'est pas numérique" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin : l'argument n'est pas numérique" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos : l'argument n'est pas numérique" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand : l'argument n'est pas numérique" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match : le 3e argument n'est pas un tableau" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub : le 3e argument vaut 0, il sera traité comme un 1" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift : le premier argument n'est pas numérique" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift : le second argument reçu n'est pas numérique" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" "lshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf) : les valeurs non entières seront tronquées" -#: builtin.c:2872 +#: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendus" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift : le premier argument n'est pas numérique" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift : le second argument reçu n'est pas numérique" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" "rshift(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf) : les valeurs non entières seront tronquées" -#: builtin.c:2910 +#: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf) : un décalage trop grand donnera des résultats inattendus" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and : le premier argument n'est pas numérique" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and : le second argument reçu n'est pas numérique" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "" "and(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): les valeurs non entières seront tronquées" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or : le premier argument n'est pas numérique" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or : le second argument reçu n'est pas numérique" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "" "or(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf) : les valeurs non entières seront tronquées" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor : le premier argument n'est pas numérique" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor : le second argument reçu n'est pas numérique" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "" "xor(%lf, %lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf) : les valeurs non entières seront tronquées" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl : l'argument n'est pas numérique" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf) : les valeurs négatives donneront des résultats inattendus" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf) : les valeurs non entières seront tronquées" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext : « %s » n'est pas dans un catégorie valide de la locale" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "type de nÅ“ud %d inconnu" -#: eval.c:422 +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "code opération %d inconnu" + +#: eval.c:434 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "le code opération %s n'est pas un opérateur ou un mot-clef" + +#: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "débordement de tampon dans genflag2str" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:698 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Pile des appels de fonctions :\n" +"\n" + +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "« IGNORECASE » est une extension gawk" -#: eval.c:802 +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "« BINMODE » est une extension gawk" + +#: eval.c:812 #, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "boucle for : la taille du tableau « %s » est passée de %ld à %ld" +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "la valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la place" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "« break » hors d'une boucle n'est pas portable" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "« break » est interdit en dehors d'une boucle" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "« continue » hors d'une boucle n'est pas portable" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "« continue » est interdit en dehors d'une boucle" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "« next » ne peut être appelé depuis une règle BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "« next » ne peut être appelé depuis une règle END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "« nextfile » ne peut être appelé depuis une règle BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "« nextfile » ne peut être appelé depuis une règle END" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "spécification de « %sFMT » erronée « %s »" -#: eval.c:952 -msgid "statement has no effect" -msgstr "la déclaration est sans effet" +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "désactivation de « --lint » en raison d'une affectation à « LINT »" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "impossible d'utiliser la fonction « %s » comme variable ou tableau" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "référence à un argument non initialisé « %s »" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "référence à une variable non initialisée « %s »" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "tentative de référence à un champ via une valeur non numérique" -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concaténation : un effet secondaire de l'une des expressions à modifié la " -"longueur d'une autre !" +#: eval.c:1179 +msgid "attempt to field reference from null string" +msgstr "tentative de référence à un champ via une chaîne nulle" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "affectation utilisée dans un contexte conditionnel" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "tentative d'accès au champ %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "tentative de division par zéro" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "référence à un champ non initialisé « $%ld »" + +#: eval.c:1256 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "la fonction « %s » a été appelée avec trop d'arguments" -#: eval.c:1409 profile.c:661 +#: eval.c:1437 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "type illégal (%s) dans tree_eval" +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: type « %s » inattendu" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "tentative de division par zéro dans « /= »" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "tentative de division par zéro dans « %%= »" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "la fonction « %s » a été appelée avec trop d'arguments" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "" +"tentative d'utilisation du tableau « %s[\"%.*s\"] » dans un contexte scalaire" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "fonction « %s » non définie" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "affectation utilisée dans un contexte conditionnel" -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Pile des appels de fonctions :\n" -"\n" +#: eval.c:1911 +msgid "statement has no effect" +msgstr "la déclaration est sans effet" -#: eval.c:1986 +#: eval.c:2343 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- programme principal --\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "boucle for : la taille du tableau « %s » est passée de %ld à %ld" -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "tentative de référence à un champ via une valeur non numérique" +#: eval.c:2458 +#, c-format +msgid "function called indirectly through `%s' does not exist" +msgstr "la fonction indirectement appelée via « %s » n'existe pas" -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "tentative de référence à un champ via une chaîne nulle" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "fonction « %s » non définie" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "tentative d'accès au champ %d" +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "un « getline » non redirigé n'est pas valable dans une règle « %s »" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "impossible d'affecter au résultat d'une fonction interne" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "erreur lors de la lecture du fichier en entrée « %s » : %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "« IGNORECASE » est une extension gawk" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "« nextfile » ne peut pas être appelé depuis une règle « %s »" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "« BINMODE » est une extension gawk" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "« exit » ne peut pas être appelé dans ce contexte" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "la valeur « %s » de BINMODE n'est pas valide, 3 utilisé à la place" +msgid "`next' cannot be called from a `%s' rule" +msgstr "« next » ne peut pas être appelé depuis une règle « %s »" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "spécification de « %sFMT » erronée « %s »" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Désolé, je ne sais pas comment interpréter « %s »" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "désactivation de « --lint » en raison d'une affectation à « LINT »" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "les extensions sont interdites en isolement (mode sandbox)" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" -msgstr "« extension » est une extension de gawk" +msgstr "« extension » est une extension gawk" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension : impossible d'ouvrir « %s » (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "fatal : extension : impossible d'ouvrir « %s » (%s)\n" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" msgstr "" -"extension : bibliothèque « %s » : impossible d'appeler la fonction « %s » (%" -"s)\n" +"fatal : extension : la bibliothèque « %s »ne définit pas " +"« plugin_is_GPL_compatible » (%s)\n" -#: ext.c:105 +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"fatal : extension : bibliothèque « %s » : impossible d'appeler la fonction " +"« %s » (%s)\n" + +#: ext.c:127 msgid "extension: missing function name" msgstr "extension : nom de fonction manquant" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension : caractère illégal « %c » dans le nom de la fonction « %s »" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension : impossible de redéfinir la fonction « %s »" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension : fonction « %s » est déjà définie" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension : nom de la fonction « %s » déjà défini" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "extension : impossible d'utiliser la fonction interne gawk « %s » comme nom " "de fonction" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension : nom de la fonction « %s » déjà défini" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin : la fonction « %s » a un nombre négatif d'arguments" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "fonction « %s » définie comme ayant au maximum« %d » argument(s)" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "fonction « %s » : argument #%d manquant" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" "fonction « %s » : argument #%d : tentative d'utilisation d'un scalaire comme " "tableau" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" "fonction « %s » : argument #%d : tentative d'utiliser un tableau comme " "scalaire" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Opération non disponible" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "une valeur négative a été assignée à NF" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split : le 4e argument est une extension gawk" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split : le 4e argument n'est pas un tableau" + +#: field.c:969 msgid "split: second argument is not an array" -msgstr "split : le second argument n'est pas un tableau" +msgstr "split : le 2e argument n'est pas un tableau" + +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "split : impossible d'utiliser le même tableau comme 2e et 4e argument" -#: field.c:909 +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split : impossible d'utiliser un sous-tableau du 2e argument en 4e argument" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split : impossible d'utiliser un sous-tableau du 4e argument en 2e argument" + +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "split : utiliser une chaîne vide en 3e argument est une extension gawk" -#: field.c:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit : le 4e argument n'est pas un tableau" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit : le 2e argument n'est pas un tableau" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit : le 3e argument n'est pas un tableau" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit : impossible d'utiliser le même tableau comme 2e et 4e argument" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit : impossible d'utiliser un sous-tableau du 2e argument en 4e " +"argument" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit : impossible d'utiliser un sous-tableau du 4e argument en 2e " +"argument" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "« FIELDWIDTHS » est une extension gawk" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "valeur de FIELDWIDTHS non valide, près de « %s »" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "utiliser une chaîne vide pour « FS » est une extension gawk" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "" "l'ancien awk n'accepte pas les expr. rationnelles comme valeur de « FS »" -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "« FPAT » est une extension gawk" + +#: getopt.c:604 getopt.c:633 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s : l'option « %s » est ambiguë\n" -#: getopt.c:623 getopt.c:627 +#: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s : l'option « --%s » n'accepte pas d'argument\n" -#: getopt.c:636 getopt.c:641 +#: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s : l'option « %c%s » n'accepte pas d'argument\n" -#: getopt.c:684 getopt.c:703 +#: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s : l'option « --%s » nécessite un argument\n" -#: getopt.c:741 getopt.c:744 +#: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s : option non reconnue « --%s »\n" -#: getopt.c:752 getopt.c:755 +#: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s : option non reconnue « %c%s »\n" -#: getopt.c:804 getopt.c:807 +#: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s : option non valide -- « %c »\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s : l'option requiert un argument -- « %c »\n" -#: getopt.c:930 getopt.c:946 +#: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s : l'option « -W %s » est ambiguë\n" -#: getopt.c:970 getopt.c:988 +#: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s : l'option « -W %s » n'accepte pas d'argument\n" -#: getopt.c:1009 getopt.c:1027 +#: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s : l'option « -W %s » nécessite un argument\n" -#: io.c:322 io.c:352 +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "L'argument « %s » de la ligne de commande est un répertoire : ignoré" + +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "impossible d'ouvrir le fichier « %s » en lecture (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "échec de la fermeture du fd %d (« %s ») : %s" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "type d'arbre %s non valide dans redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "les redirections sont interdites en isolement (mode sandbox)" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "l'expression dans la redirection « %s » n'a qu'une valeur numérique" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "l'expression dans la redirection « %s » donne une chaîne nulle" -#: io.c:600 +#: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "le fichier « %s » de la redirection « %s » pourrait être le résultat d'une " "expression booléenne" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mélange non nécessaire de « > » et « >> » pour le fichier « %.*s »" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "impossible d'ouvrir le tube « %s » en sortie (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "impossible d'ouvrir le tube « %s » en entrée (%s)" -#: io.c:717 +#: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "impossible d'ouvrir un tube bidirectionnel « %s » en entrées-sorties (%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "impossible de rediriger depuis « %s » (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "impossible de rediriger vers « %s » (%s)" -#: io.c:851 +#: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "limite système du nombre de fichiers ouverts atteinte : début du " "multiplexage des descripteurs de fichiers" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "échec de la fermeture de « %s » (%s)" -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" msgstr "trop de fichiers d'entrées ou de tubes ouverts" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close : le second argument doit être « to » ou « from »" -#: io.c:912 +#: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close : « %.*s » n'est ni un fichier ouvert, ni un tube ou un co-processus" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "fermeture d'une redirection qui n'a jamais été ouverte" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -"close : la redirection « %s » n'a pas été ouverte avec « |& », second argument " -"ignoré" +"close : la redirection « %s » n'a pas été ouverte avec « |& », second " +"argument ignoré" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "résultat d'échec (%d) sur la fermeture du tube « %s » (%s)" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "résultat d'échec (%d) sur la fermeture du fichier « %s » (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "aucune fermeture explicite du connecteur « %s » fournie" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "aucune fermeture explicite du co-processus « %s » fournie" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "aucune fermeture explicite du tube « %s » fournie" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "aucune fermeture explicite du fichier « %s » fournie" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "erreur lors de l'écriture vers la sortie standard (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "erreur lors de l'écriture vers l'erreur standard (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "échec du vidage du tube « %s » (%s)." -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "échec du vidage du tube vers « %s » par le co-processus (%s)." -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "échec du vidage vers le fichier « %s » (%s)" -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "le port local %s n'est pas valide dans « /inet »" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "" "les informations sur l'hôte et le port distants (%s, %s) ne sont pas valides" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "le client /inet/raw n'est pas encore prêt, désolé" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "seul root peut utiliser « /inet/raw »" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "le serveur /inet/raw n'est pas encore prêt, désolé" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "aucun protocole (connu) n'a été fourni dans le nom de fichier spécial « %s »" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "nom de fichier spécial « %s » incomplet" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "un nom d'hôte distant doit être fourni à « /inet »" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "un port distant doit être fourni à « /inet »" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "les communications TCP/IP ne sont pas disponibles" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "le fichier « %s » est un répertoire" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "utilisez « PROCINFO[\"%s\"] » au lieu de « %s »" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "utlisez « PROCINFO[\"%s\"] » au lieu de « /dev/user »" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "impossible d'ouvrir « %s », mode « %s »" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "échec de la fermeture du pty maître (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "échec de la fermeture de stdout du processus fils (%s)" -#: io.c:1928 +#: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" -"échec du déplacement du pty esclave vers le stdout du processus fils (dup : %" -"s)" +"échec du déplacement du pty esclave vers le stdout du processus fils (dup : " +"%s)" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "échec de fermeture du stdin du processus fils (%s)" -#: io.c:1933 +#: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" -"échec du déplacement du pty esclave vers le stdin du processus fils (dup : %" -"s)" +"échec du déplacement du pty esclave vers le stdin du processus fils (dup : " +"%s)" -#: io.c:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "échec de la fermeture du pty esclave (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "échec du déplacement du tube vers stdout du processus fils (dup : %s)" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "échec de déplacement du tube vers stdin du processus fils (dup : %s)" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "échec de la restauration du stdout dans le processus parent\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "échec de la restauration du stdin dans le processus parent\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "échec de la fermeture du tube (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" msgstr "« |& » non disponible" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "impossible d'ouvrir le tube « %s » (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "impossible de créer le processus fils pour « %s » (fork : %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "le fichier de données « %s » est vide" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "impossible d'allouer plus de mémoire d'entrée" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "erreur lors de la lecture du fichier en entrée « %s » : %s" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" "l'utilisation d'un « RS » de plusieurs caractères est une extension gawk" -#: main.c:306 -msgid "out of memory" -msgstr "mémoire épuisée" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "les communications IPv6 ne sont pas disponibles" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "l'option « -m[fr] » n'est pas pertinente en gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "utilisation de l'option « -m » : « -m[fr] nnn »" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "argument vide de l'option « -e / --source » ignoré" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s : option « -W %s » non reconnue, ignorée\n" -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "argument de l'option « --source » vide, ignorée" - -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s : l'option requiert un argument -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "variable d'environnement « POSIXLY__CORRECT » définie : activation de « --" "posix »" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "« --posix » prend le pas sur « --traditional »" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" "« --posix » et « --traditional » prennent le pas sur « --non-decimal-data »" -#: main.c:530 +#: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "l'exécution de %s en mode setuid root peut être un problème de sécurité" -#: main.c:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "« --posix » prend le pas sur « --binary »" + +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "impossible d'activer le mode binaire sur stdin (%s)" -#: main.c:574 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "impossible d'activer le mode binaire sur stdout (%s)" -#: main.c:576 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "impossible d'activer le mode binaire sur stderr (%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" msgstr "aucun programme !" -#: main.c:721 +#: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Utilisation : %s [options GNU ou POSIX] -f fichier_prog [--] fichier ...\n" -#: main.c:723 +#: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" "Utilisation : %s [options GNU ou POSIX] [--] %cprogramme%c fichier ...\n" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Options POSIX :\t\tOptions longues GNU :\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "Options POSIX :\t\tOptions longues GNU : (standard)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fichier_prog\t\t--file=fichier_prog\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valeur\t\t--assign=var=valeur\n" -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valeur\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=fichier]\t--dump-variables[=fichier]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=fichier\t\t--exec=fichier\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "Options POSIX :\t\tOptions longues GNU : (extensions)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[fichier]\t\t--dump-variables[=fichier]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=fichier]\t--profile[=fichier]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'programme'\t\t--source='programme'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E fichier\t\t--exec=fichier\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source='programme'\t--source='programme'\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[fichier]\t\t--profile[=fichier]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R fichier\t\t\t--command=fichier\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1684,7 +1857,7 @@ ".\n" "\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1694,7 +1867,7 @@ "Par défaut, il lit l'entrée standard et écrit sur la sortie standard.\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1704,7 +1877,7 @@ "\tgawk '{ somme += $1 }; END { print somme }' fichier\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1718,13 +1891,13 @@ "Copyright © 1998, 1991-%d Free Software Foundation.\n" "\n" "Ce programme est un logiciel libre ; vous pouvez le redistribuer et le\n" -"modifier selon les termes de la Licence publique générale GNU [GNU\n" -"General Public License], telle que publiée par la Free Software\n" +"modifier selon les termes de la licence publique générale GNU (GNU\n" +"General Public License), telle que publiée par la Free Software\n" "Foundation ; soit selon la version 3 de cette licence, soit selon une\n" "version ultérieure de votre choix.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1735,24 +1908,29 @@ "Ce logiciel est distribué en espérant qu'il sera utile, mais SANS AUCUNE\n" "GARANTIE, y compris les garanties implicites D'ADAPTATION À UN BUT\n" "SPÉCIFIQUE et de COMMERCIALISATION. Pour plus d'informations à ce\n" -"sujet, consultez le texte de la Licence publique générale GNU [GNU\n" -"General Public License].\n" +"sujet, consultez le texte de la licence publique générale GNU (GNU\n" +"General Public License).\n" "\n" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" msgstr "" -"Vous devriez avoir reçu copie de la Licence publique générale de GNU\n" -"[GNU General Public License] avec ce programme. Sinon, consultez\n" +"Vous devriez avoir reçu copie de la licence publique générale GNU\n" +"(GNU General Public License) avec ce programme. Sinon, consultez\n" "http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft ne définit pas le FS comme étant une tabulation en awk POSIX" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "valeur inconnue pour la définition de champ : %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1761,86 +1939,79 @@ "%s : « %s » l'argument de « -v » ne respecte pas la forme « var=valeur »\n" "\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "« %s » n'est pas un nom de variable valide" -#: main.c:1145 +#: main.c:1200 #, c-format 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:1184 +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "impossible d'utiliser le mot clef gawk « %s » comme variable" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "impossible d'utiliser la fonction « %s » comme variable" + +#: main.c:1262 msgid "floating point exception" msgstr "exception du traitement en virgule flottante" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" -msgstr "erreur fatale : erreur interne" +msgstr "fatal : erreur interne" -#: main.c:1206 +#: main.c:1284 msgid "fatal error: internal error: segfault" -msgstr "erreur fatale : erreur interne : erreur de segmentation" +msgstr "fatal : erreur interne : erreur de segmentation" -#: main.c:1218 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" -msgstr "erreur fatale : erreur interne : débordement de la pile" +msgstr "fatal : erreur interne : débordement de la pile" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "aucun descripteur fd %d pré-ouvert" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "impossible de pré-ouvrir /dev/null pour le descripteud fd %d" -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "impossible de trouver les groupes : %s" - -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" -msgstr "ligne de commande :" +msgstr "ligne de commande:" -#: msg.c:120 -msgid "warning: " -msgstr "avertissement : " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "erreur : " -#: msg.c:178 -msgid "fatal: " -msgstr "erreur fatale : " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "impossible de convertir la chaîne en nombre flottant" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "barre oblique inverse à la fin de la chaîne" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "l'ancien awk ne dispose pas de la séquence d'échappement « \\%c »" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX n'autorise pas les séquences d'échappement « \\x »" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "aucun chiffre hexadécimal dans la séquence d'échappement « \\x » " -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " @@ -1849,50 +2020,50 @@ "la séquence d'échappement hexa. \\x%.*s de %d caractères ne sera " "probablement pas interprétée comme vous l'imaginez" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "séquence d'échappement « \\%c » traitée comme un simple « %c »" -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s « %s »: impossible de positionner close-on-exec: (fcntl: %s)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Données multioctets non valables détectées. Possible incohérence entre " +"données et paramètres régionaux (locale)." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "impossible d'ouvrir « %s » en écriture : %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "" +"%s %s « %s » : impossible d'obtenir les drapeaux du fd : (fcntl F_GETFD: %s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "erreur interne : %s avec un vname nul" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# traité en interne comme un « delete »" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "" +"%s %s « %s »: impossible de positionner close-on-exec: (fcntl F_SETFD: %s)" -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# ceci est une fonction d'extension chargée dynamiquement" +msgid "could not open `%s' for writing: %s" +msgstr "impossible d'ouvrir « %s » en écriture : %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# profile gawk, créé %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "envoi du profil vers la sortie d'erreur standard" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# Bloc(s) BEGIN\n" +"\t# Bloc(s) %s\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" @@ -1901,16 +2072,17 @@ "\t# Règle(s)\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# Bloc(s) END\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "erreur interne : %s avec un vname nul" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# profile gawk, créé %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1919,195 +2091,97 @@ "\n" "\t# Fonctions, par ordre alphabétique\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "type %s inattendu dans prec_level" +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str : type de redirection %d inconnu" -#: profile.c:1527 +#: re.c:573 #, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Type de nÅ“ud inconnu %s dans pp_var" +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "les plages « [%c-%c] » sont dépendantes des paramètres régionaux" -#: regcomp.c:132 +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"le composant d'expression rationnelle « %.*s » devrait probablement être " +"« [%.*s] »" + +#: regcomp.c:131 msgid "Success" msgstr "Succès" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Aucune concordance" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "Expression rationnelle non valide" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" msgstr "Caractère d'interclassement non valide" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "Nom de classe de caractères non valide" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "Barre oblique inverse finale" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "Référence arrière non valide" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "[ ou [^ sans correspondance" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "( ou \\( sans correspondance" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ sans correspondance" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenu de \\{\\} non valide" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "Borne finale non valide" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Mémoire épuisée" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Expression rationnelle précédente non valide" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression rationnelle" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "Expression rationnelle trop grande" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr ") ou \\) sans correspondance" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "Aucune expression rationnelle précédente" -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "" -#~ "impossible d'ouvrir un connecteur bidirectionnel « %s » en entrées-sorties " -#~ "(%s)" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s : option illégale -- %c\n" - -#, fuzzy -#~ msgid "remote port invalid in `%s'" -#~ msgstr "port local non valide dans « %s »" - -#, fuzzy -#~ msgid "function %s called\n" -#~ msgstr "fonction « %s » non définie" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "champ %d dans FIELDWIDTHS, doit être > 0" - -#, fuzzy -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "tentative d'utiliser le scalaire « %s » comme tableau" - -#, fuzzy -#~ msgid "asort: first argument is not an array" -#~ msgstr "match : le 3e argument n'est pas un tableau" - -#, fuzzy -#~ msgid "asort: second argument is not an array" -#~ msgstr "split : 2e argument n'est pas un tableau" - -#, fuzzy -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" -#~ msgstr "" -#~ "\n" -#~ "Pour signaler une anomalie, consultez la section « Bugs » du\n" -#~ "fichier « gawk.info », qui est dans la section « Problems and Bugs »\n" -#~ "de la version imprimée.\n" -#~ "Pour signaler une erreur de traduction, envoyez un message à la\n" -#~ "liste .\n" -#~ "\n" - -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "syntaxe invalide dans le nom « %s » pour l'affectation de variable" - -#, fuzzy -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "erreur interne: %s avec un vname nul" - -#, fuzzy -#~ msgid "or used in other expression context" -#~ msgstr "« return » est utilisé hors du contexte d'une fonction" - -#, fuzzy -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "« %s » est une fonction interne, elle ne peut être redéfinie" - -#, fuzzy -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "les blocs %s doivent avoir une partie action" - -#, fuzzy -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "« %s » est utilisé dans l'action %s" - -#, fuzzy -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "un « getline » non redirigé n'est pas défini dans une action END" - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x n'est pas dans la table des jetons\n" - -#, fuzzy -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "le 3e paramètre de %s n'est pas un objet modifiable" - -#~ msgid "Unfinished \\ escape" -#~ msgstr "séquence d'échappement \\ non terminée" - -#~ msgid "unfinished repeat count" -#~ msgstr "répétition de compteur non terminé" - -#~ msgid "malformed repeat count" -#~ msgstr "compteur de répétition mal composé" - -#~ msgid "Unbalanced [" -#~ msgstr "Non appariement de [" - -#~ msgid "Unbalanced (" -#~ msgstr "Non appariement de (" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Aucune syntaxe d'expression régulière des bits fournie" - -#~ msgid "Unbalanced )" -#~ msgstr "Non appariement de )" - -#, fuzzy -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "erreur interne: %s avec un vname nul" - -#, fuzzy -#~ msgid "pipe from `%s': could not set close-on-exec (fcntl: %s)" -#~ msgstr "%s %s « %s »: ne peut initialiser close-on-exec: (fcntl: %s)" - -#, fuzzy -#~ msgid "pipe to `%s': could not set close-on-exec (fcntl: %s)" -#~ msgstr "%s %s « %s »: ne peut initialiser close-on-exec: (fcntl: %s)" +#~ msgid "could not find groups: %s" +#~ msgstr "impossible de trouver les groupes : %s" + +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "impossible d'affecter au résultat d'une fonction interne" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/ga.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/ga.gmo differ diff -Nru gawk-3.1.8+dfsg/po/ga.po gawk-4.0.1+dfsg/po/ga.po --- gawk-3.1.8+dfsg/po/ga.po 2010-05-06 17:57:38.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ga.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2037 +0,0 @@ -# Irish translations for gawk. -# Copyright (C) 2004 Free Software Foundation, Inc. -# Kevin Patrick Scannell , 2004. -# Peadar Ó Guilín , 2005, 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.5h\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2007-10-01 13:47-0500\n" -"Last-Translator: Peadar Ó Guilín \n" -"Language-Team: Irish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: array.c:112 -#, c-format -msgid "attempt to use function `%s' as an array" -msgstr "iarracht feidhm `%s' a úsáid mar eagar" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "iarracht paraiméadar scálach `%s' a úsáid mar eagar" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "iarracht scálach '%s' a úsáid mar eagar" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "ó %s" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "tagairt d'eilimint gan túsú `%s[\"%s\"]'" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "is teaghrán folamh é foscript an eagair `%s'" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: níl innéacs `%s' san eagar `%s'" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: folamh (neamhní)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: folamh (nialas)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: méid_tábla = %d, méid_eagair = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: is paraiméadar é\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: tagairt_eagair do %s\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "tá gá le páirt ghníomhach ag blocanna %s" - -#: awkgram.y:221 -msgid "each rule must have a pattern or an action part" -msgstr "tá gá le patrún nó páirt ghníomhach ag gach riail" - -#: awkgram.y:257 awkgram.y:266 -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "ní thacaíonn sean-awk le rialacha iomadúla `BEGIN' nó `END'" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "is feidhm insuite í `%s', ní féidir í a shainmhíniú" - -#: awkgram.y:331 -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "tá cuma nóta tráchta C++ ar an dtairiseach `//', ach ní nóta tráchta é" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "tá cuma nóta tráchta C ar an dtairiseach `/%s/', ach ní nóta tráchta é" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "seans nach mbeidh éifeacht ag an ráiteas" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "`%s' á úsáid i ngníomh %s" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "is feabhsúchán gawk é `nextfile'" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "`return' á úsáid lasmuigh den chomhthéacs feidhmeach" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"is dóigh gur chóir go mbeadh an gnáth `print' sa riail TÚS nó CRÍOCH scríofa " -"mar `print \"\"'" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "is feabhsúchán gawk é `delete array'" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "is feabhsúchán neamh-iniompartha tawk é `delete(eagar)'" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "luachanna cás dúbailte sa chorp laisce: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "`default' dúbailte aimsithe sa chorp laisce" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "ní oibríonn píblínte déthreo ilchéimeacha" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "slonn ionadaíochta ar dhéis an tsannacháin" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "slonn ionadaíochta ar chlé na oibreoirí `~' nó `!~'" - -#: awkgram.y:830 awkgram.y:903 -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "ní thacaíonn sean-awk le heochairfhocal `in' ach tar éis `for'" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "slonn ionadaíochta ar dhéis na comparáide" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "ní shannadh `getline' neamhatreoraithe lasmuigh den ghníomh CRÍOCH" - -#: awkgram.y:904 -msgid "old awk does not support multidimensional arrays" -msgstr "ní thacaíonn sean-awk le heagair iltoiseacha" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "tá glao `length' gan lúibíní doiompartha" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "lochtaíonn POSIX glao `length' gan lúibíní" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "neamheagar á úsáid mar eagar" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "slonn foscripte neamhbhailí" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "líne nua nó deireadh teaghráin gan choinne" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "téacs feidhmchlár folamh ar líne na n-orduithe" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "ní féidir an comhad foinseach `%s' a oscailt chun léamh (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "ní féidir an comhad foinseach `%s' a léamh (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "comhad foinseach `%s' folamh" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "ní chríochnaíonn an comhad foinseach le líne nua" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "críochnaíonn regexp gan chríochnú le `\\' ag an gcomhadchríoch" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "%s: %d: ní oibríonn an mionathraitheoir tawk regex `/.../%c' i ngawk" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "ní oibríonn an mionathraitheoir tawk regex `/.../%c' i ngawk" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "slonn ionadaíochta gan críochnú" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "slonn ionadaíochta gan críochnú ag an gcomhadchríoch" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "níl úsáid `\\ #...' mar leanúint líne doiompartha" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "ní cúlslais é carachtar deireanach an líne" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "ní cheadaíonn POSIX an t-oibreoir `**='" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "ní cheadaíonn sean-awk an t-oibreoir `**='" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "ní cheadaíonn POSIX an t-oibreoir `**='" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "ní cheadaíonn sean-awk an t-oibreoir `**='" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "tá an t-oibreoir `^=' gan tacaíocht sa shean awk" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "tá an t-oibreoir `^' gan tacaíocht sa shean awk" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "teaghrán gan chríochnú" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "carachtar neamhbhailí '%c' sa slonn" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "is feabhsúchán gawk é `%s'" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "is feabhsúchán Bell Labs é `%s'" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "ní cheadaíonn POSIX `%s'" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "tá `%s' gan tacaíocht sa shean awk" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "deirtear go bhfuil `goto' dochrach!\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d oiread argóintí neamhbhailí le haghaidh %s" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "meaitseáil: is feabhsúchán gawk é an tríú hargóint" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: ní bhíonn aon éifeacht ag teaghrán litriúil mar arg deireanach an ionadaí" - -#: awkgram.y:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "ní oibiacht athraitheach í an tríú paraiméadar %s" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: is feabhsúchán gawk é an dara hargóint" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "tá úsáid dcgettext(_\"...\") mícheart: bain amach an chéad fhostríoc" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "tá úsáid dcgettext(_\"...\") mícheart: bain amach an chéad fhostríoc" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "feidhm `%s': is cóip é paraiméadar #%d, `%s', den pharaiméadar #%d" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "feidhm `%s': leanann paraiméadar `%s' athróg chomhchoiteann" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "níorbh fhéidir `%s' a oscailt chun scríobh (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "próifíl á seoladh go hearráid chaighdeánach" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: theip ar an dún (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "glaodh dhá uair ar shadow_funcs()!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "bhí scáthathrógaí ann." - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "feidhm `%s': níl cead ainm feidhme a úsáid mar ainm paraiméadar" - -#: awkgram.y:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "feidhm `%s': níl cead ainm feidhme a úsáid mar ainm paraiméadar" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "ainm feidhme `%s' sainmhínithe cheana" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "glaodh ar an bhfeidhm `%s' nach bhfuil sainithe" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "tá sainiú ag an bhfeidhm `%s' ach ní ghlaodh é" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "tagann luach Boole de bharr ón dtairiseach regexp don pharaiméadar #%d" - -#: awkgram.y:3245 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"glaodh feidhm `%s' le spás idir ainm agus `(',\n" -"nó úsáideadh é mar athróg nó mar eagar" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "iarracht roinnt le nialas a dhéanamh i `/='" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "iarracht roinnt le nialas a dhéanamh i `%%'" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "theip ar %s go \"%s\" (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "aschur caighdeánach" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "níl fhios an fáth" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: fuarthas argóint neamhuimhriúil" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: argóint %g as raon" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "fflush: ní dhúisófear: píopa `%s' oscailte do léamh, ní do scríobh" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "fflush: ní dhúisófear: comhad `%s' oscailte do léamh, ní do scríobh" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: ní comhad, píopa nó comhphróiseas oscailte é `%s'" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "index: ní teaghrán é an chéad argóint" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: ní teaghrán é an dara hargóint" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: fuarthas argóint neamhuimhriúil" - -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "is feabhsúchán gawk é `length(array)'" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: fuarthas argóint nach teaghrán é" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: fuarthas argóint neamhuimhriúil" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: fuarthas argóint diúltach %g" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "" -"má úsáidtear `count$' i bhformáid ar bith, caithfidh é a úsáid i ngach " -"formáid é" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "Níl `$' ceadaithe i bhformáidí awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "caithfidh áireamh na harg. le `$' bheith > 0" - -#: builtin.c:853 -#, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "áireamh na harg. %ld níos mó ná na hargóintí faighte" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "níl `$' ceadaithe i bhformáid théis punc" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "níor thugadh `$' do leithead nó beachtas an réimse ionaid" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "níl ciall ag `l' i bhformáidí awk; neamhairdithe" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "ní cheadaítear `l' i bhformáidí awk POSIX" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "níl ciall ag `L' i bhformáidí awk; neamhairdithe" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "ní cheadaítear `L' i bhformáidí awk POSIX" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "níl ciall ag `h' i bhformáidí awk; neamhairdithe" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "ní cheadaítear `h' i bhformáidí awk POSIX" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: tá luach %g as raon don bhformáid `%%%c'" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "ní leor argóintí le haghaidh an teaghráin formáide" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ imithe thar bráid don cheann seo" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: níl litir rialúcháin ag an sonraitheoir formáide" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "fuarthas an iomarca argóintí don teaghrán formáide" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: níl aon argóint" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: fuarthas argóint neamhuimhriúil" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: glaodh le argóint diúltach %g" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: tá tús innéacs %g neamhbhailí, ag úsáid a 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: teascfar tús neamhuimhriúil an innéacs %g" - -#: builtin.c:1510 -#, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: níl fad %g >= 1" - -#: builtin.c:1512 -#, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: níl fad %g >= 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "ubstr: teascfar an fad neamhuimhriúil %g" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "substr: fad %g ró-mhór d'innéacsú teaghráin, ag teascadh go %g" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: tá an teaghrán foinse folamh" - -#: builtin.c:1552 -#, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: innéacs tosaithe %g tar éis deireadh an teaghráin" - -#: builtin.c:1560 -#, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "substr: fad %g ag innéacs tosaithe %g rófhada don chéad argóint (%lu)" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: ní teaghrán í an chéad argóint" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: fuarthas teaghrán formáide folamh" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: fuarthas dara hargóint neamhuimhriúil" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: ní teaghrán é an argóint" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: fuarthas argóint nach teaghrán í" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "tagairt d'athróg nach bhfuil túsaithe `$%d'" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: fuarthas argóint nach teaghrán í" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: fuarthas argóint nach teaghrán í" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: ní huimhir é an chéad argóint" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: ní huimhir é an dara hargóint" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: fuarthas argóint neamhuimhriúil" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: fuarthas argóint neamhuimhriúil" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: fuarthas argóint neamhuimhriúil" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: ní eagar é an tríú hargóint" - -#: builtin.c:2744 -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: 3ú hargóint 0 úsáidte mar 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: ní huimhir é an chéad argóint" - -#: builtin.c:2862 -msgid "lshift: received non-numeric second argument" -msgstr "lshift: ní huimhir é an dara hargóint" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): tiocfaidh torthaí aisteacha as luachanna diúltacha" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): teascfar luachanna codánacha" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"lshift(%lf, %lf): gheobhfar torthaí aisteacha le luach iomlaoideach ró-mhór" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: ní huimhir é an chéad argóint" - -#: builtin.c:2900 -msgid "rshift: received non-numeric second argument" -msgstr "rshift: ní huimhir é an dara hargóint" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): teascfar luachanna codánacha" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"rshift(%lf, %lf): gheobhfar torthaí aisteacha le luach iomlaoideach ró-mhór" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: ní huimhir é an chéad argóint" - -#: builtin.c:2938 -msgid "and: received non-numeric second argument" -msgstr "and: ní huimhir é an dara hargóint" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): teascfar luachanna codánacha" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: ní huimhir é an chéad argóint" - -#: builtin.c:2974 -msgid "or: received non-numeric second argument" -msgstr "or: ní huimhir é an dara hargóint" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): teascfar luachanna codánacha" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: ní huimhir é an chéad argóint" - -#: builtin.c:3010 -msgid "xor: received non-numeric second argument" -msgstr "xor: ní huimhir é an dara hargóint" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): teascfar luachanna codánacha" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: fuarthas argóint neamhuimhriúil" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): gheobhfar torthaí aisteacha le luachanna diúltacha" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): teascfar luachanna codánacha" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: ní catagóir logánach ceart é `%s'" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr " cineál anaithnid nóid %d" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "maolán thar maoil i genflags2str" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "iarracht eagar `%s' a úsáid i gcomhthéacs scálach" - -#: eval.c:802 -#, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "lúb for: d'athraigh méid an eagair `%s' ó %ld go %ld i lár na lúibe" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "níl `break' lasmuigh den lúb iniompartha" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "níl `break' lasmuigh den lúb ceadaithe" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "níl `continue' lasmuigh den lúb iniompartha" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "níl `continue' lasmuigh den lúb ceadaithe" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "ní féidir glaoigh ar `next' ó riail TÚS" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "ní féidir glaoigh ar `next' ó riail CRÍOCH" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "ní féidir glaoigh ar `nextfile' ó riail TÚS" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "ní féidir glaoigh ar `nextfile' ó riail CRÍOCH" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "níl aon éifeacht ag an ráiteas" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "ní féidir ainm feidhme `%s' a úsáid mar athróg nó eagar" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "tagairt d'argóint nach bhfuil túsaithe `%s'" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "tagairt d'athróg nach bhfuil túsaithe `%s'" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "comhchaitéiniú: d'athraigh éifeachtaí sloinn amháin fad ceann eile!" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "sannadh úsáidte i gcomhthéacs coinníollach" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "iarracht roinnt le nialas a dhéanamh" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "cineál neamhcheadaithe (%s) i tree_eval" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "iarracht roinnt le nialas a dhéanamh i `/='" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "iarracht roinnt le nialas a dhéanamh i `%%='" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "glaodh ar fheidhm `%s' le níos mó argóintí nó mar a bhí fógartha" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "feidhm `%s' gan sainmhíniú" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Cruach an Glaoigh ar an bhFeidhm:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- príomh --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "iarracht tagairt a fháil ó luach neamhuimhriúil" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "iarracht tagairt a fháil ó theaghrán neamhnitheach" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "iarracht rochtain a dhéanamh ar réimse %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "ní féidir sannachán a dhéanamh le toradh ó fheidhm insuite" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "is feabhsúchán gawk é `IGNORECASE'" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "is feabhsúchán gawk é `BINMODE'" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "drochshonraíocht`%sFMT' `%s'" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`--lint' á mhúchadh de bharr sannachán go `LINT'" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "is feabhsúchán gawk é `extension'" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: ní féidir oscailt `%s' (%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: leabharlann `%s': ní féidir glaoigh ar fheidhm `%s' (%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "extension: ainm feidhme in easnamh" - -#: ext.c:110 -#, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: carachtar neamhcheadaithe `%c' in ainm na feidhme `%s'" - -#: ext.c:116 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: ní féidir feidhm `%s' a shainmhíniú arís" - -#: ext.c:120 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: sainmhíníodh an fheidhm `%s' cheana" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "extension: ní féidir insuite gawk `%s' a úsáid mar ainm feidhme" - -#: ext.c:127 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: ainm feidhme `%s' sainmhínithe cheana" - -#: ext.c:204 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "ní cheadaíonn feidhm `%s' níos mó ná %d argóint" - -#: ext.c:207 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "feidhm `%s': argóint #%d ar iarraidh" - -#: ext.c:217 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "feidhm `%s': argóint #%d: iarracht scálach a úsáid mar eagar" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "feidhm `%s': argóint #%d: iarracht scálach a úsáid mar eagar" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Oibríocht Gan Tacaíocht" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF socraithe go luach diúltach" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "scoilt: ní eagar é an dara hargóint" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "" -"scoilt: is feabhsúchán gawk é an teaghrán neamhnitheach don tríú hargóint" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "is feabhsúchán gawk é `FIELDWIDTHS'" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "luach FIELDWIDTHS neamhbhailí cóngarach le `%s'" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "is feabhsúchán gawk é an teaghrán neamhnitheach do `FS'" - -#: field.c:1092 -msgid "old awk does not support regexps as value of `FS'" -msgstr "ní thacaíonn sean-awk le slonn ionadaíochta mar luach de `FS'" - -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: Tá an rogha `%s' débhríoch\n" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `--%s'\n" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `%c%s'\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: rogha anaithnid `--%s'\n" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: rogha anaithnid `%c%s'\n" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: rogha neamhbhailí -- %c\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: Tá an rogha `-W %s' débhríoch\n" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `-W %s'\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "ní féidir `%s' a oscailt chun é a léamh (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "dúnadh fd %d (`%s') teipthe (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "cineál crainn %s neamhbhailí san atreorú()" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "níl ach luach uimhriúil ag an slonn in atreorú `%s'" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "tá luach teaghráin neamhnitheach ag an slonn in atreorú `%s'" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"seans gur toradh sloinn loighciúil é an comhadainm `%s' don atreorú `%s'" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "meascán neamhriachtanach de `>' agus `>>' do chomhad `%.*s'" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "ní féidir píopa `%s' a oscailt d'aschur (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "ní féidir píopa `%s' a oscailt d'ionchur (%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "ní féidir an píopa déthreo `%s' a oscailt d'ionchur/aschur (%s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "ní féidir atreorú ó `%s' (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "ní féidir atreorú go `%s' (%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"tagtha chuig teorainn an chórais do chomhadlanna oscailte: ag tosú " -"tuairisceoirí na gcomhadlann a ilphléacsadh" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "dúnadh `%s' teipthe (%s)." - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "tá an iomarca píopaí nó comhadlanna ionchuir oscailte" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: tá `to' nó `from' de dhíth mar dara hargóint" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: ní comhad oscailte, píopa nó comhphróiseas é `%.*s'" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "dúnadh atreoraithe nach n-osclóadh riamh" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: níl atreorú `%s' oscailte le `|&', rinneadh neamhaird ar an dara " -"hargóint" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "stádas teipfhulangach (%d) ar dúnadh an phíopa `%s' (%s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "stádas teipfhulangach (%d) ar dúnadh an chomhaid `%s' (%s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "ní fhuarthas dúnadh léir an tsoicéid `%s'" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "ní fhuarthas dúnadh léir an chomhphróisis `%s'" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "ní fhuarthas dúnadh léir an phíopa `%s'" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "ní fhuarthas dúnadh léir an chomhaid `%s'" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "earráid agus aschur caighdeánach á scríobh (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "earráid agus earráid caighdeánach á scríobh (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "sruthladh píopa `%s' teipthe (%s)." - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "sruthladh comhphróisis an phíopa go `%s' teipthe (%s)." - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "sruthladh comhaid `%s' teipthe (%s)." - -#: io.c:1222 -#, c-format -msgid "local port %s invalid in `/inet'" -msgstr "port logánta %s neamhbhailí i `/inet'" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "eolas neamhbhailí faoin chianósta agus port (%s, %s)" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "tá brón orm, níl an cliant /inet/raw réidh go fóill" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "`/inet/raw' ceadaithe do root amháin." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "tá brón orm, níl an freastalaí /inet/raw ré go fóill" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "ní fhuarthas fíor phrótacal sa chomhadainm speisialta `%s'" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "níl an comhadainm speisialta `%s' iomlán" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "tá ainm cianóstaigh de dhíth ag `/inet'" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "tá cianphort de dhíth ag `/inet'" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "cumarsáid TCP/IP gan tacaíocht" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "ní comhadlann é an comhad `%s'" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "úsáid `PROCINFO[\"%s\"]' in ionad `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "úsáid `PROCINFO[...]' in ionad `/dev/user'" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "níorbh fhéidir `%s' a oscailt, mód `%s'" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "theip ar dúnadh máistir-pty (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "theip ar dúnadh aschuir caighdeánach i mac teipthe (%s)" - -#: io.c:1928 -#, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "" -"theip ar bogadh an pty sclábhánta go haschur caighdeánach sa mhac (dup: %s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "theip ar dúnadh ionchuir caighdeánach i mac (%s)" - -#: io.c:1933 -#, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "" -"theip ar bogadh an pty sclábhánta go hionchuir caighdeánach sa mhac (dup: %s)" - -#: io.c:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "theip ar dúnadh an pty sclábhánta (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "theip ar bhogadh píopa go haschur caighdeánach i mac (dup: %s)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "theip ar bhogadh píopa go hionchur caighdeánach i mac (dup: %s)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "theip ar dhul ar ais go haschur caighdeánach i máthair teipthe\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "theip ar dhul ar ais go hionchur caighdeánach i máthair teipthe\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "theip ar dúnadh phíopa (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&' gan tacaíocht" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "ní féidir píopa `%s' a oscailt (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "ní féidir mac a dhéanamh do `%s' (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "tá comhad sonraí `%s' folamh" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "níorbh fhéidir níos mó cuimhne ionchuir a leithdháileadh" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "earráid ag léamh comhad aschuir `%s': %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "is feabhsúchán gawk é an luach ilcharachtar 'RS'" - -#: main.c:306 -msgid "out of memory" -msgstr "cuimhne ídithe" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "`-m[fr]' rogha neamhábhartha i ngawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "úsáid rogha -m: `-m[fr] nnn'" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: rogha `-W %s' anaithnid, rinneadh neamhshuim air\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "rinneadh neamhshuim ar argóint fholamh go `--source'" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "athróg thimpeallachta `POSIXLY_CORRECT' socraithe: ag lasadh `--posix'" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "sáraíonn `--posix' `--traditional'" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "sáraíonn `--posix'/`--traditional' `--non-decimal-data'" - -#: main.c:530 -#, c-format -msgid "running %s setuid root may be a security problem" -msgstr "seans gur neamhdhaingean é ag rith %s setuid root" - -#: main.c:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "ní féidir mód dénártha a shocrú ar stdin (%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "ní féidir mód dénártha a shocrú ar stdout (%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "ní féidir mód dénártha a shocrú ar stderr (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "níl aon téacs sa ríomhchlár!" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"Úsáid: %s [roghanna cineál POSIX nó GNU] -f clárchomhad [--] comhad ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Úsáid: %s [roghanna cineál POSIX nó GNU] [--] %críomhchlár%c comhad ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "roghanna POSIX:\t\tGNU roghanna fada:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f comhad\t\t--file=progfile\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v athróg=luach\t\t--assign=athróg=luach\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] luach\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=comhad]\t--dump-variables[=comhad]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=comhad\t\t--exec=comhad\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=comhad]\t--profile[=comhad]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=program-text\t--source=program-text\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"Chun tuairiscí fabhtanna a sheoladh, féach ar `Bugs' sa `gawk.info', atá\n" -"sa rannán `Reporting Problems and Bugs' sa leagan faoi chló.\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"is teanga é gawk a scanann agua a phróiseáileann patrúin.\n" -"De réir réamhsocraithe léann sé ionchur caighdeánach agus scríobhann sé go " -"haschur caighdeánach.\n" -"\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -"Samplaí:\n" -"\tgawk '{ sum += $1 }; END { print sum }' comhad\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Copyright © 1989, 1991-%d Free Software Foundation.\n" -"\n" -"Is saorbhogearra é an ríomhchlár seo; is féidir leat é a scaipeadh agus/nó\n" -"a athrú de réir na gcoinníollacha den GNU General Public License mar atá\n" -"foilsithe ag an Free Software Foundation; faoi leagan 3 den cheadúnas,\n" -"nó (más mian leat) aon leagan níos déanaí.\n" -"\n" - -#: main.c:802 -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 "" -"Scaiptear an ríomhchlár seo le súil go mbeidh sé áisiúil,\n" -"ach GAN AON BARÁNTA; go fiú gan an barántas intuigthe\n" -"d'INDÍOLTACHT nó FEILIÚNACHT D'FHEIDHM AR LEITH. Féach ar an\n" -"GNU General Public License chun níos mó sonraí a fháil.\n" -"\n" - -#: main.c:813 -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"Ba chóir go mbeifeá tar éis cóip den GNU General Public License\n" -"a fháil in éineacht leis an ríomhchlár seo; mura bhfuair,\n" -"féach ar http://www.gnu.org/licenses/.\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "ní athraíonn -Ft FS go táb san awk POSIX" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" -"%s: níl an argóint `%s' go `-v' san fhoirm `var=value'\n" -"\n" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "ní ainm athróige dleathúil é `%s'" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "ní ainm athróige é `%s', ag lorg comhad `%s=%s'" - -#: main.c:1184 -msgid "floating point exception" -msgstr "eisceacht snámhphointe" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "earráid mharfach: earráid inmheánach" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "earráid mharfach: earráid inmheánach" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "earráid mharfach: earráid inmheánach" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "níl aon fd %d réamhoscailte" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "níorbh fhéidir /dev/null a réamhoscailt do fd %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "ní féidir na grúpaí a aimsiú: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "líne na n-orduithe:" - -#: msg.c:120 -msgid "warning: " -msgstr "rabhadh: " - -#: msg.c:142 -msgid "error: " -msgstr "earráid: " - -#: msg.c:178 -msgid "fatal: " -msgstr "marfach: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "ní féidir teaghrán a thiontú go snámhphointe" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "cúlslais ag deireadh an teaghráin" - -#: node.c:609 -#, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "ní thacaíonn sean-awk le seicheamh éalaithe `\\%c'" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "ní cheadaíonn POSIX éalaithe `\\x'" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "níl digití heicsidheachúlach sa seicheamh éalaithe `\\x'" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "seicheamh éalaithe `\\%c' úsáidte mar ghnáth `%c'" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': níorbh fhéidir close-on-exec a shannadh: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "Níorbh fhéidir `%s' a oscailt chun scríobh ann: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "earráid inmheánach: %s le vname nialasach" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# úsáidte go hinmheánach mar `delete'" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# is feidhm iarmhíreach é seo atá le luchtú go dinimiciúil" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# cuntas gawk, cruthaíodh %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# TÚS bloc(anna)\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Riail(eacha)\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# CRÍOCH bloc(anna)\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Feidhmeanna, i liosta aibítreach\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "cineál gan súil %s i prec_level" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr " cineál anaithnid nóid %d" - -#: regcomp.c:132 -msgid "Success" -msgstr "D'éirigh leis" - -#: regcomp.c:135 -msgid "No match" -msgstr "Níl a leithéid ann" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Slonn ionadaíochta neamhbhailí" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Carachtar neamhbhailí cóimheasa" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "Aicme neamhbhailí charachtair" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Cúlslais ag deireadh" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Cúltagairt neamhbhailí" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "[ nó [^ corr" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "( nó \\( corr" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "\\{ corr" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Inneachar neamhbhailí idir \\{\\}" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Deireadh raoin neamhbhailí" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Cuimhne ídithe" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Is neamhbhailí an slonn ionadaíochta roimhe seo" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Deireadh le slonn ionadaíochta gan choinne" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "Slonn ionadaíochta rómhór" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr ") nó \\) corr" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Níl aon slonn ionadaíochta roimhe seo" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: rogha neamhcheadaithe -- %c\n" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "ní féidir an soicéad déthreo `%s' a oscailt d'ionchur/aschur (%s)" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "cianphort neamhbhailí i `%s'" - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: úsáid neamhdhleathach na hathróige `%s' mar eagar" - -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: ní eagar é an chéad argóint" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: ní eagar é an dara hargóint" - -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" -#~ msgstr "" -#~ "\n" -#~ "Chun tuairiscí fabhtanna a sheoladh, féach ar `Bugs' sa `gawk.info', atá\n" - -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "comhréir mícheart san ainm `%s' chun athróga a shannadh" - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "earráid inmheánach: Node_var_array le vname nialasacha" - -#~ msgid "or used in other expression context" -#~ msgstr "nó úsaidte i gcomhthéacs sloinn eile" - -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "is feidhm í `%s', ní féidir sannachán a dhéanamh" - -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "tá gá le páirt gníomhach ag blocanna TÚS" - -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "`nextfile' á úsáid ag an gníomh TÚS nó CRÍOCH" - -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "" -#~ "ní shannadh `getline' neamhatreoraithe lasmuigh den ghníomh TÚS nó CRÍOCH" - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "níl fptr %x ar fáil sa táb ceadchomharthaí\n" - -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "ní oibiacht athraitheach é an tríú paraiméadar ionadaíoch gsub" - -# FARF - KPS -#~ msgid "Unfinished \\ escape" -#~ msgstr "Seicheamh éalúcháin \\ gan chríochnú" - -#~ msgid "unfinished repeat count" -#~ msgstr "Tá líon na hathráite neamhiomlán" - -# more precisely, "the string indicating the repeat count" is malformed -- KPS -#~ msgid "malformed repeat count" -#~ msgstr "Tá líon na hathráite míchumtha" - -#~ msgid "Unbalanced [" -#~ msgstr "[ corr" - -#~ msgid "Unbalanced (" -#~ msgstr "( corr" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Níl bearta comhréire regexp sainithe" - -#~ msgid "Unbalanced )" -#~ msgstr ") corr" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "caithfidh go bhfuil réimse %d i FIELDWIDTHS > 0" - -#~ msgid "function %s called\n" -#~ msgstr "glaodh ar fheidhm %s\n" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "earráid inmheánach: comhad `%s', líne %d\n" diff -Nru gawk-3.1.8+dfsg/po/gawk.pot gawk-4.0.1+dfsg/po/gawk.pot --- gawk-3.1.8+dfsg/po/gawk.pot 2010-05-06 17:57:36.000000000 +0000 +++ gawk-4.0.1+dfsg/po/gawk.pot 2012-03-28 20:03:46.000000000 +0000 @@ -6,34 +6,46 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.8\n" +"Project-Id-Version: gawk 4.0.1\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" msgstr "" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" +msgid "attempt to use scalar `%s' as an array" msgstr "" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" +msgid "attempt to use array `%s' in a scalar context" msgstr "" #: array.c:513 @@ -46,507 +58,599 @@ msgid "subscript of array `%s' is null string" msgstr "" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "" -#: awkgram.y:221 +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "" -#: awkgram.y:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "" -#: awkgram.y:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" -#: awkgram.y:334 +#: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" msgstr "" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "" + +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" +msgid "`next' used in %s action" msgstr "" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "" + +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "" -#: awkgram.y:534 +#: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" msgstr "" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" msgstr "" -#: awkgram.y:1009 -msgid "use of non-array as array" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" msgstr "" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "" -#: awkgram.y:1257 -msgid "unexpected newline or end of string" +#: awkgram.y:1711 +msgid "use of non-array as array" msgstr "" -#: awkgram.y:1374 -msgid "empty program text on command line" +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " msgstr "" -#: awkgram.y:1430 +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "" + +#: awkgram.y:2043 +msgid "unexpected newline or end of string" +msgstr "" + +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "" -#: awkgram.y:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" -#: awkgram.y:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" +#: awkgram.y:4112 +msgid "sending variable list to standard error" msgstr "" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "" -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "" -#: awkgram.y:3004 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" +msgid "function `%s' defined but never called directly" msgstr "" -#: awkgram.y:3201 +#: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" -#: awkgram.y:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -#: awkgram.y:3664 -msgid "division by zero attempted in `/'" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" msgstr "" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "" -#: builtin.c:124 -msgid "reason unknown" -msgstr "" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "" -#: builtin.c:201 +#: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" -#: builtin.c:204 +#: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" -#: builtin.c:216 +#: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "" -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" +#: builtin.c:493 +msgid "length: received array argument" msgstr "" -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" msgstr "" -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" msgstr "" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" +msgid "field width is ignored for `%%' specifier" msgstr "" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" +msgid "precision is ignored for `%%' specifier" msgstr "" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" +msgid "field width and precision are ignored for `%%' specifier" msgstr "" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" msgstr "" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" msgstr "" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" +msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "" -#: builtin.c:855 -msgid "`$' not permitted after period in format" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" msgstr "" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" msgstr "" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "" @@ -556,11 +660,11 @@ msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" msgstr "" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "" @@ -572,1028 +676,1079 @@ msgid "too many arguments supplied for format string" msgstr "" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "" -#: builtin.c:1479 +#: builtin.c:1503 #, c-format -msgid "substr: start index %g is invalid, using 1" +msgid "substr: length %g is not >= 1" msgstr "" -#: builtin.c:1484 +#: builtin.c:1505 #, c-format -msgid "substr: non-integer start index %g will be truncated" +msgid "substr: length %g is not >= 0" msgstr "" -#: builtin.c:1510 +#: builtin.c:1512 #, c-format -msgid "substr: length %g is not >= 1" +msgid "substr: non-integer length %g will be truncated" msgstr "" -#: builtin.c:1512 +#: builtin.c:1517 #, c-format -msgid "substr: length %g is not >= 0" +msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -#: builtin.c:1519 +#: builtin.c:1529 #, c-format -msgid "substr: non-integer length %g will be truncated" +msgid "substr: start index %g is invalid, using 1" msgstr "" -#: builtin.c:1524 +#: builtin.c:1534 #, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" +msgid "substr: non-integer start index %g will be truncated" msgstr "" -#: builtin.c:1536 +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -#: builtin.c:1637 -msgid "strftime: received non-string first argument" +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" msgstr "" -#: builtin.c:1643 -msgid "strftime: received empty format string" +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" msgstr "" -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" msgstr "" -#: builtin.c:1729 +#: builtin.c:1690 +msgid "strftime: received non-string first argument" +msgstr "" + +#: builtin.c:1696 +msgid "strftime: received empty format string" +msgstr "" + +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "" + +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2872 +#: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2910 +#: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "" -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "" - -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:423 eval.c:437 #, c-format -msgid "attempt to use array `%s' in a scalar context" +msgid "unknown opcode %d" msgstr "" -#: eval.c:802 +#: eval.c:434 #, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" +msgid "opcode %s not an operator or keyword" msgstr "" -#: eval.c:844 -msgid "`continue' outside a loop is not portable" +#: eval.c:488 +msgid "buffer overflow in genflags2str" msgstr "" -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" +#: eval.c:698 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" msgstr "" -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" msgstr "" -#: eval.c:884 -msgid "`next' cannot be called from an END rule" +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" msgstr "" -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" msgstr "" -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" msgstr "" -#: eval.c:952 -msgid "statement has no effect" +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" msgstr "" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" msgstr "" -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" +#: eval.c:1179 +msgid "attempt to field reference from null string" msgstr "" -#: eval.c:1301 -msgid "assignment used in conditional context" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" msgstr "" -#: eval.c:1379 -msgid "division by zero attempted" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "" + +#: eval.c:1256 +#, c-format +msgid "function `%s' called with more arguments than declared" msgstr "" -#: eval.c:1409 profile.c:661 +#: eval.c:1437 #, c-format -msgid "illegal type (%s) in tree_eval" +msgid "unwind_stack: unexpected type `%s'" msgstr "" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" msgstr "" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" +#: eval.c:1907 +msgid "assignment used in conditional context" msgstr "" -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +#: eval.c:1911 +msgid "statement has no effect" msgstr "" -#: eval.c:1986 +#: eval.c:2343 #, c-format -msgid "\t# -- main --\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" +#: eval.c:2458 +#, c-format +msgid "function called indirectly through `%s' does not exist" msgstr "" -#: eval.c:2143 -msgid "attempt to reference from null string" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" msgstr "" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" +msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" msgstr "" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" msgstr "" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" msgstr "" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" +msgid "`next' cannot be called from a `%s' rule" msgstr "" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" +msgid "Sorry, don't know how to interpret `%s'" msgstr "" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" msgstr "" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" msgstr "" -#: ext.c:105 +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "" + +#: ext.c:127 msgid "extension: missing function name" msgstr "" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" +msgid "make_builtin: negative argument count for function `%s'" msgstr "" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "" + +#: field.c:969 msgid "split: second argument is not an array" msgstr "" -#: field.c:909 +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" + +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "" -#: field.c:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "" -#: getopt.c:574 getopt.c:590 +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "" + +#: getopt.c:604 getopt.c:633 #, c-format -msgid "%s: option '%s' is ambiguous\n" +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "" -#: getopt.c:623 getopt.c:627 +#: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" -#: getopt.c:636 getopt.c:641 +#: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" -#: getopt.c:684 getopt.c:703 +#: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "" -#: getopt.c:741 getopt.c:744 +#: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "" -#: getopt.c:752 getopt.c:755 +#: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "" -#: getopt.c:804 getopt.c:807 +#: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "" -#: getopt.c:930 getopt.c:946 +#: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "" -#: getopt.c:970 getopt.c:988 +#: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" -#: getopt.c:1009 getopt.c:1027 +#: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "" -#: io.c:322 io.c:352 +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "" + +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" msgstr "" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "" -#: io.c:600 +#: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "" -#: io.c:717 +#: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "" -#: io.c:851 +#: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "" -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" msgstr "" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "" -#: io.c:912 +#: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "" -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "" -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" -#: io.c:1928 +#: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" -#: io.c:1933 +#: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" -#: io.c:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" msgstr "" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "" -#: main.c:306 -msgid "out of memory" +#: io.c:3232 +msgid "IPv6 communication is not supported" msgstr "" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "" -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" msgstr "" -#: main.c:434 -msgid "empty argument to `--source' ignored" +#: main.c:462 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "" -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" -#: main.c:530 +#: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" -#: main.c:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "" + +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "" -#: main.c:574 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "" -#: main.c:576 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" msgstr "" -#: main.c:721 +#: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" -#: main.c:723 +#: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" -#: main.c:732 -msgid "\t-m[fr] val\n" +#: main.c:745 +msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "" -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "" -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" msgstr "" -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" +#: main.c:748 +msgid "\t-C\t\t\t--copyright\n" msgstr "" -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "" -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" +#: main.c:750 +msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "" -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" +#: main.c:751 +msgid "\t-E file\t\t\t--exec=file\n" msgstr "" -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" +#: main.c:752 +msgid "\t-g\t\t\t--gen-pot\n" msgstr "" -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" +#: main.c:753 +msgid "\t-h\t\t\t--help\n" msgstr "" -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" +#: main.c:754 +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "" -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" +#: main.c:755 +msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "" -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" +#: main.c:756 +msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "" -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" +#: main.c:757 +msgid "\t-O\t\t\t--optimize\n" msgstr "" -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "" -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" msgstr "" -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" msgstr "" -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" msgstr "" -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" msgstr "" -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" msgstr "" -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" +#: main.c:765 +msgid "\t-V\t\t\t--version\n" msgstr "" -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "" -#: main.c:757 -msgid "\t-W version\t\t--version\n" +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" msgstr "" #. TRANSLATORS: --help output 5 (end) @@ -1601,7 +1756,7 @@ #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1609,21 +1764,21 @@ "\n" msgstr "" -#: main.c:770 +#: main.c:783 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:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1635,7 +1790,7 @@ "\n" msgstr "" -#: main.c:802 +#: main.c:815 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" @@ -1644,249 +1799,251 @@ "\n" msgstr "" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" msgstr "" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "" -#: main.c:1145 +#: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: main.c:1184 +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "" + +#: main.c:1262 msgid "floating point exception" msgstr "" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "" -#: main.c:1206 +#: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "" -#: main.c:1218 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "" -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "" - -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "" -#: msg.c:120 -msgid "warning: " -msgstr "" - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "" -#: msg.c:178 -msgid "fatal: " -msgstr "" - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "" -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." msgstr "" -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" msgstr "" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "" - -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" +msgid "could not open `%s' for writing: %s" msgstr "" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" +#: profile.c:85 +msgid "sending profile to standard error" msgstr "" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "" + +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" msgstr "" -#: profile.c:1143 +#: profile.c:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" -#: profile.c:1405 +#: profile.c:1370 +#, c-format +msgid "redir2str: unknown redirection type %d" +msgstr "" + +#: re.c:573 #, c-format -msgid "unexpected type %s in prec_level" +msgid "range of the form `[%c-%c]' is locale dependent" msgstr "" -#: profile.c:1527 +#: re.c:600 #, c-format -msgid "Unknown node type %s in pp_var" +msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" -#: regcomp.c:132 +#: regcomp.c:131 msgid "Success" msgstr "" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" msgstr "" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" msgstr "" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/he.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/he.gmo differ diff -Nru gawk-3.1.8+dfsg/po/he.po gawk-4.0.1+dfsg/po/he.po --- gawk-3.1.8+dfsg/po/he.po 2010-05-06 17:57:36.000000000 +0000 +++ gawk-4.0.1+dfsg/po/he.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2042 +0,0 @@ -# Hebrew messages for GNU Awk -*- coding: hebrew-iso-8bit -*- -# Copyright (C) 2001 Free Software Foundation, Inc. -# Eli Zaretskii , 2001, 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.1a\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2002-04-28 21:46+0300\n" -"Last-Translator: Eli Zaretskii \n" -"Language-Team: Hebrew \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-8\n" -"Content-Transfer-Encoding: 8-bit\n" - -#: array.c:112 -#, fuzzy, c-format -msgid "attempt to use function `%s' as an array" -msgstr "êøòîë `%s' äéö÷ðåôá ùåîéù ïåéñð" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "êøòî äéä åìéàë `%s' éøì÷ñ øèîøôá ùåîéù ïåéñð" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù" - -# This is not translated because it cannot be reworded in Hebrew -# without looking awkward. -#: array.c:156 -#, fuzzy, c-format -msgid "from %s" -msgstr "%s (from %s)" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "ìçåúî åðéàù `%s[\"%s\"]' èðîìàì äééðô" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "`%s' êøòî ïééöîë ä÷éø úæåøçîá ùåîéù" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "`%s' ïééöî ìéëî åðéà `%s' êøòî :delete" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: (ñôåàî) ÷éø\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: (ä÷éø hash úìáè) ÷éø\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: table_size = %d, array_size = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "øèîøô åðéä %s\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: %s-ì (array_ref) äéðôä\n" - -#: awkgram.y:218 -#, fuzzy, c-format -msgid "%s blocks must have an action part" -msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá" - -#: awkgram.y:221 -#, fuzzy -msgid "each rule must have a pattern or an action part" -msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá" - -#: awkgram.y:257 awkgram.y:266 -#, fuzzy -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "äúøãâä úà úåðùì ïéà ,úéðáåî äéö÷ðåô äðéä `%s'" - -#: awkgram.y:331 -#, fuzzy -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "úéìëú íåù äéäú àì äæ éåèéáìù ïëúé" - -#: awkgram.y:458 awkgram.y:482 -#, fuzzy, c-format -msgid "`%s' used in %s action" -msgstr "END åà BEGIN ìù äìåòô úøãâäá `next'-á ùåîéù" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "äéö÷ðåô ìù èñ÷èðå÷á àìù `return'-á ùåîéù" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "`print \"\"' úåéäì íúñä ïî êéøö END åà BEGIN éììëá èåùô `print'" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" - -#: awkgram.y:572 awkgram.y:580 -#, fuzzy -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "íéãáåò íðéà íéáìù éáåøî íééðååéë-åã íé÷éôà" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "êøò úîùä úàøåä ìù ïéîé ãöá éøìåâø éåèéá" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "`!~' åà `~' øåèøôåàì ìàîùî éøìåâø éåèéá" - -#: awkgram.y:830 awkgram.y:903 -#, fuzzy -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "äàååùä ìù ïéîé ãöá éøìåâø éåèéá" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "END úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" - -#: awkgram.y:904 -#, fuzzy -msgid "old awk does not support multidimensional arrays" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "úéìéáèøåô äðéà íééøâåñ àìì `length'-ì äàéø÷" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "POSIX ï÷úì ãåâéðá äðéä íééøâåñ àìì `length'-ì äàéø÷" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "êøòî ïééöîá éåâù øéáçú ìòá éåèéá" - -#: awkgram.y:1257 -#, fuzzy -msgid "unexpected newline or end of string" -msgstr "éåôö-éúìá íå÷îá äøåù óåñ" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "äãå÷ôä úøåùî äìá÷úä ä÷éø úéðëú" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "åúàéø÷ íùì `%s' øå÷î õáå÷ úçéúôá (%s) äì÷ú" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "`%s' øå÷î õáå÷î äàéø÷á (%s) äì÷ú" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "÷éø åðéä `%s' øå÷î õáå÷" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "äøåù-óåñ åúá íééúñî åðéà øå÷îä õáå÷" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "õáå÷ä óñá `\\'-á íééúñî øåîâ-éúìá éøìåâø éåèéá" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "øåîâ-éúìá éøìåâø éåèéá" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "õáå÷ä óåñá øåîâ-éúìá éøìåâø éåèéá" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "éìéáèøåô åðéà äøåù êùîäì ïîéñë `\\ #...'-á ùåîéù" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "äøåùá ïåøçà åú åðéàù êåôä ïñëåì" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "`**=' øåèøôåà äùøî åðéà POSIX" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "`**=' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "`**' øåèøôåà äùøî åðéà POSIX" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "ïùé awk-á êîúð åðéà `^=' øåèøôåà" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "ïùé awk-á êîúð åðéà `^' øåèøôåà" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "äøåîâ-éúìá úæåøçî" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "éåèéáá '%c' éåâù åú" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `%s'" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "Bell úåãáòî úñøâá awk-ì úéôéöôñ äáçøä åðéä `%s'" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "`%s' äùøî åðéà POSIX" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "ïùé awk-á êîúð åðéà `%s'" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "!òø-òâô áùçð `goto'\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "íéèðîåâøà øôñîë %d ìá÷ì ìåëé åðéà %s" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `match' ìù éùéìù èðîåâøà" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "úéìëú íåù äì ïéà `%s' ìù ïåøçà èðîåâøàë äòåá÷ úæåøçî" - -#: awkgram.y:2475 -#, fuzzy, c-format -msgid "%s third parameter is not a changeable object" -msgstr "éåðéù-øá è÷ééáåà åðéà `sub' ìù éùéìù èðîåâøà" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `close' ìù éðù èðîåâøà" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dcgettext(_\"...\")-á éåâù ùåîéù" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dncgettext(_\"...\")-á éåâù ùåîéù" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "`%s' äéö÷ðåôá %d 'ñî øèîøôì ääæ ,`%s' ,%d 'ñî øèîøô ìù åîù" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "éìáåìâ äðúùî ìò ìéôàî `%s' äéö÷ðåôá `%s' øèîøô" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "äáéúë íùì `%s' úçéúôá (%s) äì÷ú" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "éð÷ú úåàéâù õåøòì çìùð òåöéá ìéôåøô" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "`%s' úøéâñ úòá (%s) äì÷ú" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "!íééîòô äàø÷ð shadow_funcs()" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "" - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá" - -#: awkgram.y:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "úøãâåî äðéàù `%s' äéö÷ðåôì äàéø÷" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "éðàéìåá êøò áéðî %d 'ñî øèîøôë òåá÷ éøìåâø éåèéá" - -#: awkgram.y:3245 -#, fuzzy, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -",`(' ïéáì äîù ïéá íéçååø íò `%s' äéö÷ðåôì äàéø÷\n" -"%s" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "`/='-á ñôàá ä÷åìç ïåéñð" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "`%%'-á ñôàá ä÷åìç ïåéñð" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s é\"ò \"%s\"-ì äáéúëá (%s) äì÷ú" - -#: builtin.c:123 -msgid "standard output" -msgstr "úéèøãðèñ èìô úãéçé" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "äòåãé-éúìá äáéñî" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :exp" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "øúåîä íåçúá åðéà %g èðîåâøà :exp" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' ÷éôà :õöåçä ï÷åøì ïúéð àì :fflush" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' õáå÷ :õöåçä ï÷åøì ïúéð àì :fflush" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%s' :fflush" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "úæåøçî åðéà ïåùàø èðîåâøà :index" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "úæåøçî åðéà éðù èðîåâøà :index" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :int" - -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "úæåøçî åðéà èðîåâøà :length" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :log" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "%g éìéìù èðîåâøà íò àø÷ð :log" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "ãçà óàá åà íéèîøåôä ìëá åà øúåî `count$'-á ùåîéù" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "awk ìù íéèîøåôá ùåîéùì øåñà `$'" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "0-î ìåãâ úåéäì áééç `$' ãéì èðîåâøàä äðåî" - -#: builtin.c:853 -#, fuzzy, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "íéèðîåâøàä ìù ììåëä íøôñîî ìåãâ %d èðîåâøàä äðåî" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "èîøåôá äãå÷ðä éøçà òéôåäì ìåëé åðéà `$'" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "å÷åéã åà äãù áçåø ïééöîá èðîåâøàä äðåî øåáò `$' àöîð àì" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `l'" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `l'" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `L'" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `L'" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `h'" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `h'" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "èîøåôä øåáò íéèðîåâøà ÷éôñî ïéà" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ íéèðîåâøàä éì åøîâð ïàë" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "äøîää úø÷á úåà ìéëî åðéà èîøåôä :[s]printf" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "èîøåôä øåáò íéèðîåâøà éãî øúåé" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "èðîåâøà óà ïéà :printf" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :sqrt" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "%g éìéìù èðîåâøà íò àø÷ð :sqrt" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "1-á óìçåä ,éåâù åðéä %g äìçúä ïééöî :substr" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "õöå÷é ,íìù øôñî åðéàù, %g äìçúä ïééöî ìù åëøò :substr" - -#: builtin.c:1510 -#, fuzzy, c-format -msgid "substr: length %g is not >= 1" -msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" - -#: builtin.c:1512 -#, fuzzy, c-format -msgid "substr: length %g is not >= 0" -msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "õöå÷é ,íìù øôñî åðéàù ,%g êøåà :substr" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "ñôà êøåàá äðéä øå÷îä úæåøçî :substr" - -#: builtin.c:1552 -#, fuzzy, c-format -msgid "substr: start index %g is past end of string" -msgstr "úæåøçîä óåñì øáòî åðéä %d äìçúä ïééöî :substr" - -#: builtin.c:1560 -#, fuzzy, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"%d äëøåàå %d ïééöîá äúìéçúù úæåøçî-úúì ÷éôñî åðéà (%d) úæåøçî êøåà :substr" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "úæåøçî åðéà ïåùàø èðîåâøà :strftime" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "ä÷éø èîøåô úæåøçî :strftime" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :strftime" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "úæåøçî åðéà èðîåâøà :mktime" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "úæåøçî åðéà èðîåâøà :system" - -#: builtin.c:1904 eval.c:2157 -#, fuzzy, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "úæåøçî åðéà èðîåâøà :tolower" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "úæåøçî åðéà èðîåâøà :toupper" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "øôñî åðéà ïåùàø èðîåâøà :atan2" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :atan2" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :sin" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :cos" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :srand" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "êøòî åðéà éùéìù èðîåâøà :match" - -#: builtin.c:2744 -#, fuzzy -msgid "gensub: third argument of 0 treated as 1" -msgstr "1-á óìçåä 0 åëøòù éùéìù èðîåâøà :gensub" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "øôñî åðéà ïåùàø èðîåâøà :lshift" - -#: builtin.c:2862 -#, fuzzy -msgid "lshift: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :strftime" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :lshift(%lf, %lf)" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "åööå÷é íéøåáù íéëøò :lshift(%lf, %lf)" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :lshift(%lf, %lf)" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "øôñî åðéà ïåùàø èðîåâøà :rshift" - -#: builtin.c:2900 -#, fuzzy -msgid "rshift: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :strftime" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :rshift(%lf, %lf)" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "åööå÷é íéøåáù íéëøò :rshift(%lf, %lf)" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :rshift(%lf, %lf)" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "øôñî åðéà ïåùàø èðîåâøà :and" - -#: builtin.c:2938 -#, fuzzy -msgid "and: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :atan2" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :and(%lf, %lf)" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "åööå÷é íéøåáù íéëøò :and(%lf, %lf)" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "øôñî åðéà ïåùàø èðîåâøà :or" - -#: builtin.c:2974 -#, fuzzy -msgid "or: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :atan2" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :or(%lf, %lf)" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "åööå÷é íéøåáù íéëøò :or(%lf, %lf)" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "øôñî åðéà ïåùàø èðîåâøà :xor" - -#: builtin.c:3010 -#, fuzzy -msgid "xor: received non-numeric second argument" -msgstr "øôñî åðéà éðù èðîåâøà :atan2" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :xor(%lf, %lf)" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "åööå÷é íéøåáù íéëøò :xor(%lf, %lf)" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "øôñî åðéà èðîåâøà :compl" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "úåéåôö-éúìá úåàöåú áéðé éìéìù êøò :compl(%lf)" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "õöå÷é øåáù êøò :compl(%lf)" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "äðé÷ú íå÷éî úééøåâè÷ åðéà `%s' :dcgettext" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "%d ääåæî-éúìá âåñ ìòá node" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str-á õöåç úùéìâ" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð" - -#: eval.c:802 -#, fuzzy, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "(`%s' êøòî) äàìåìä òåöéá êìäîá %d-î %d-ì äðåù êøòî ìù åìãåâ :for úàìåì" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "éìéáèøåô åðéà äàìåìì õåçî `break'" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "éìéáèøåô åðéà äàìåìì õåçî `continue'" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "BEGIN éììë êåúî `nextfile'-ì àåø÷ì ïéà" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "úéìëú-úìåèð äàøåä" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "`%s' ìçåúî-éúìá èðîåâøàì äéðôä" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"!øçà éåèéá ìù åëøåà éåðéùì åîøâ ãçà éåèéá áåùéç ìù éàåì-úåòôåú :concatenation" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "éàðú ìù èñ÷èðå÷á äîùäá ùåîéù" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "ñôàá ä÷åìç ïåéñð" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tree_eval-á (%s) éåâù âåñ" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "`/='-á ñôàá ä÷åìç ïåéñð" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "`%%='-á ñôàá ä÷åìç ïåéñð" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "äúæøëäá øùàî íéèðîåâøà øúåé íò `%s' äéö÷ðåôì äàéø÷" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "úøãâåî äðéà `%s' äéö÷ðåô" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# :úåéö÷ðåôì úåàéø÷ä úéðñçî\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "øôñî åðéàù êøò úåòöîàá äãùì äéðôä ïåéñð" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "ä÷éø úæåøçî úåòöîàá äãùì äéðôä ïåéñð" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "%d 'ñî äãùì äùéâ ïåéñð" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "úéðáåî äéö÷ðåô ìù äàöåúá êøò áéöäì ïéà" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `IGNORECASE'" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `BINMODE'" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "äðé÷ú `%sFMT' úøãâä åðéà `%s'" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`LINT'-ì êøò úîùä á÷ò `--lint' ìèáî" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `extension'" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "" - -#: ext.c:110 -#, fuzzy, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n" - -#: ext.c:116 -#, fuzzy, c-format -msgid "extension: can't redefine function `%s'" -msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n" - -#: ext.c:120 -#, fuzzy, c-format -msgid "extension: function `%s' already defined" -msgstr "úøãâåî äðéà `%s' äéö÷ðåô" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" - -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô" - -#: ext.c:204 -#, fuzzy, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô" - -#: ext.c:207 -#, fuzzy, c-format -msgid "function `%s': missing argument #%d" -msgstr "úøãâåî äðéà `%s' äéö÷ðåô" - -#: ext.c:217 -#, fuzzy, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "úëîúð äðéà åæ äìåòô" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "éìéìù êøò ìáé÷ NF" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `split'-ì éùéìù èðåîâøàë úñôåàî úæåøçî" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `FIELDWIDTHS'" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `FS'-ë úñôåàî úæåøçî" - -#: field.c:1092 -#, fuzzy -msgid "old awk does not support regexps as value of `FS'" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -# The way the leading "%s:" is translated is a terrible kludge, -# but what can I do? FIXME. -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s úéðëú øåáò éòîùî-ãç åðéà `%s' ïééôàî\n" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `--%s' ïééôàî\n" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `%c%s' ïééôàî\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s úéðëú øåáò èðîåâøà áééçî `%s' ïééôàî\n" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s úéðëú øåáò `--%s' ääåæî-éúìá ïééôàî\n" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s úéðëú øåáò `%c%s' ääåæî-éúìá ïééôàî\n" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s úéðëú øåáò éåâù ïééôàî -- %c\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: èðîåâøà áééçî ïééôàî -- %c\n" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s úéðëú øåáò éòîùî-ãç åðéà `-W %s' ïééôàî\n" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `-W %s' ïééôàî\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s úéðëú øåáò èðîåâøà áééçî `%s' ïééôàî\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "åúàéø÷ íùì `%s' õáå÷ úçéúôá (%s) äì÷ú" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "(%d èìô/èì÷ õåøò) `%s' úøéâñá (%s) äì÷ú" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "redirect() äéö÷ðåôá %s éåâù õò âåñ" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "ãáìá éøîåð êøò áéðî `%s' èìô/èì÷ úééðôäá éåèéá" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "ä÷éø úæåøçî áéðî `%s' èìô/èì÷ úééðôäá éåèéá" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "éâåì éåèéá ìù äàöåú úåéäì ìåìò `%s' õáå÷ íù `%s' èìô/èì÷ úééðôäá" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "`%.*s' õáå÷ øåáò `>>'-á ïäå `>'-á ïä øúåéî ùåîéù" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "èìô êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "èì÷ êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "èìô/èì÷ êøåöì éðååéë-åã (pipe) ÷éôàë `%s' úçéúôá (%s) äì÷ú" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "`%s'-î äééðôäá (%s) äì÷ú" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "`%s' ìà äééðôäá (%s) äì÷ú" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "èìô/èì÷ éöåøò áåáéø úìéçú ;íéçåúô íéöá÷ øôñî ìù úëøòî úìáâîì äòâä" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "`%s' úøéâñá (%s) äì÷ú" - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "úéðîæ-åá íéçåúô èì÷ éöá÷ åà (pipes) íé÷éôà éãî øúåé" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "`from' åà `to' úåéäì áééç `close' ìù éðùä èðîåâøàä" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "íìåòî äçúôð àìù äééðôä úøéâñ" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "çðæåä éðùä èðîåâøàä ,`|&' é\"ò äçúôð àì `%s' äééðôä" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "(%d äì÷ú ãå÷) `%s'-ì ÷éôà úøéâñá (%s) äì÷ú" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "(%d äì÷ú ãå÷) `%s' õáå÷ úøéâñá (%s) äì÷ú" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "ùøåôîá øâñð àì (socket) `%s' ò÷ù" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "ùøåôîá øâñð àì (co-process) `%s' ìéá÷î êéìäú" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "ùøåôîá øâñð àì (pipe) `%s' ÷éôà" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "ùøåôîá øâñð àì `%s' õáå÷" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "éð÷ú èìô õåøòì äáéúëá (%s) äì÷ú" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "éð÷ú úåàéâù õåøòì äáéúëá (%s) äì÷ú" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "`%s'-ì ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "`%s'-ì ìéá÷î êéìäú ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "`%s' ìù õáå÷ éðåúð õöåç ïå÷éøá (%s) äì÷ú" - -#: io.c:1222 -#, fuzzy, c-format -msgid "local port %s invalid in `/inet'" -msgstr "`%s'-á äéåâù úéîå÷î äàéöé" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "ïëåî íøè /inet/raw çå÷ì ,íéøòèöî" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "ãáìá root ùîúùîì øúåî `inet/raw'-á ùåîéù" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "ïëåî íøè /inet/raw úøù ,íéøòèöî" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "`%s' ãçåéî õáå÷ íùá ääåæî-éúìá åà øñç ìå÷åèåøô" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "íìù åðéà `%s' ãçåéî õáå÷" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "`/inet' øåáò ÷çåøî çøàî-áùçî íù øéãâäì äáåç" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "`/inet' øåáò ú÷çåøî äàéöé øéãâäì äáåç" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP úøåù÷úá äëéîú ïéà" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "äé÷éú åðéä `%s' õáå÷" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "`PROCINFO[\"%s\"]'-á ùîúùäì óéãò `%s' íå÷îá" - -#: io.c:1610 -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:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "`%s' øåáò `%s' äìåòô ïôåà úçéúôá ïåìùë" - -#: io.c:1923 -#, fuzzy, c-format -msgid "close of master pty failed (%s)" -msgstr "÷éôà úøéâñá (%s) äì÷ú" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "úá-úéðëúá stdout úøéâñá (%s) äì÷ú" - -#: io.c:1928 -#, fuzzy, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "úá-úéðëúá stdin úøéâñá (%s) äì÷ú" - -#: io.c:1933 -#, fuzzy, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" - -#: io.c:1935 io.c:1954 -#, fuzzy, c-format -msgid "close of slave pty failed (%s)" -msgstr "÷éôà úøéâñá (%s) äì÷ú" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "áà-úéðëúá stdout ÷éôà øåæçùá äì÷ú\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "áà-úéðëúá stdin ÷éôà øåæçùá äì÷ú\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "÷éôà úøéâñá (%s) äì÷ú" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&'-á äëéîú ïéà" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "`%s' ÷éôà úçéúôá (%s) äì÷ú" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "`%s' úá-úéðëúì êéìäú úøéöéá (fork: %s) äì÷ú" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "÷éø åðéä `%s' íéðåúð õáå÷" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "`%s' õáå÷ úàéø÷á (%s) äì÷ú" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `RS' ìù êøòá íéåú øôñîá äëéîú" - -#: main.c:306 -msgid "out of memory" -msgstr "ïåøëæä øîâð" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "gawk øåáò éèðååìø åðéà `-m[fr]' ïééôàî" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "`-m[fr] nnn' :-m ïééôàîá ùåîéù ïôåà" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "çðæåä ,%s úéðëú øåáò øëåî åðéà `-W %s' ïééôàî\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "çðæåä `--source'-ì ÷éø èðîåâøà" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: èðîåâøà áééçî ïééôàî -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "`--posix' ìéòôî :øãâåî `POSIXLY_CORRECT' äáéáñ äðúùî" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "`--traditional' ìò øáåâ `--posix'" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--non-decimal-data' ìò øáåâ `--posix'/`--traditional'" - -#: main.c:530 -#, c-format -msgid "running %s setuid root may be a security problem" -msgstr "òãéî úçèáàá òåâôì äìåìò setuid root-ë %s úöøä" - -#: main.c:571 -#, fuzzy, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "stdin úìåòô ïôåà úòéá÷á (%s) äì÷ú" - -#: main.c:574 -#, fuzzy, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "stdout úìåòô ïôåà úòéá÷á (%s) äì÷ú" - -#: main.c:576 -#, fuzzy, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "stderr úìåòô ïôåà úòéá÷á (%s) äì÷ú" - -#: main.c:617 -msgid "no program text at all!" -msgstr "!ììë àöîðá äéä àì úéðëú ìù èñ÷è" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"%s [GNU åà POSIX ïåðâñá íéðééôàî] -f úéðëú-íù [--] õáå÷-íù ... :ùåîéù ïôåà\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"%s [GNU åà POSIX ïåðâñá íéðééôàî] [--] %cúéðëú%c õáå÷-íù ... :ùåîéù ïôåà\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr ":POSIX éðééôàî\t\t:íéëåøà GNU éðééôàî\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f úéðëú-õáå÷\t\t--file=úéðëú-õáå÷\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F úåãù-ãéøôî\t\t--field-separator=úåãù-ãéøôî\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v äðúùî=êøò\t\t--assign=äðúùî=êøò\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] êøò\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=õáå÷-íù]\t--dump-variables[=õáå÷-íù]\n" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=úéðëú-èñ÷è\t--source=úéðëú-èñ÷è\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"àåäù ,`gawk.info' õáå÷á `Bugs' úîåö äàø ,úåì÷ú ìò çååéãì\n" -" .ñôãåîä êéøãîá `Reporting Problems and Bugs' ä÷ñô\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -".èñ÷è úåéðáú ìù ãåáéòå äé÷øñì äôù åðéä gawk\n" -".éð÷ú èìôì áúåëå éð÷ú èì÷ õåøò àøå÷ àåä ìãçî úøéøáë\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -" :úåàîâåã\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, fuzzy, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Copyright (C) 1989, 1991-%d Free Software Foundation.\n" -"\n" -"óåôëá äúåðùì åà/å äöéôäì íëúåëæ ;úéùôç äðëú äðéä åæ úéðëú\n" -" é\"ò øåàì àöåéä ,GNU General Public License ïåéùøä éàðúì\n" -" íàå ,ïåéùøä ìù 2 àñøâá íà ;Free Software Foundation\n" -" .øúåé úøçåàî àñøâ ìëá (íëì äøåîùä äéöôåàë)\n" - -#: main.c:802 -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 "" -",úìòåú àéáú àéäù äåå÷ú êåúî úöôåî åæ úéðëú\n" -"òîúùîá-úåéøçà àì åìéôà ;úåéøçà áúë ìë àìì íìåà\n" -",íéèøôì .úîéåñî úéìëú åæéàì äîàúä åà úåøéçñ ìù\n" -" .GNU General Public License-á åðééò àðà\n" - -#: main.c:813 -#, fuzzy -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -";GNU General Public License ìù ÷úåòá äååìî úåéäì äøåîà åæ úéðëú\n" -"Free Software Foundation, Inc.-ì åáúë àðà ,åúåà íúìáé÷ àì íà\n" -".59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "awk ìù POSIX úñøâá TAB úåéäì FS-ì íøåâ åðéà -Ft" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "" - -#: main.c:1184 -msgid "floating point exception" -msgstr "äôö äãå÷ð éáåùéçá äâéøç" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú" - -# FIXME: I wonder how many people will understand what "fd 2" means. -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "ùàøî çåúô åðéà %d èìô/èì÷ õåøò" - -# FIXME: /dev/null might not be known to all. -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "/dev/null-ì %d èìô/èì÷ õåøò çåúôì ïúéð àì" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "%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 -#, c-format -msgid "cmd. line:" -msgstr "cmd. line:" - -#: msg.c:120 -msgid "warning: " -msgstr "warning: " - -#: msg.c:142 -msgid "error: " -msgstr "error: " - -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "øôñîì äøîäì úðúéð äðéà úæåøçî" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "úæåøçî óåñá êåôä ïñëåì" - -#: node.c:609 -#, fuzzy, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "`\\x' âåñî äø÷á úåøãñ äùøî åðéà POSIX ï÷ú" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "`\\x' äø÷á úøãñá úåéìîéöãñ÷ä úåøôñá ùîúùäì ïéà" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "éìåìéî åúë ìôåè `\\%c' äø÷á úøãñá `%c' åú" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s' øåáò close-on-exec ïééôàî úìòôäá (fcntl: %s) äì÷ú" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "äáéúë êøåöì `%s' úçéúô úòá (%s) äì÷ú" - -#: profile.c:457 -#, fuzzy, c-format -msgid "internal error: %s with null vname" -msgstr "ñôåàî åìù vname-äù Node_var :úéîéðô äðëú úàéâù" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# %s êéøàúî gawk ìù ìéôåøô\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# BEGIN ÷åìá\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# (íé)ììë\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END ÷åìá\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# úéá-óìà øãñá ,úåéö÷ðåô\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "prec_level-á %s éåâù âåñ" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "%d ääåæî-éúìá âåñ ìòá node" - -#: regcomp.c:132 -msgid "Success" -msgstr "äçìöä" - -#: regcomp.c:135 -msgid "No match" -msgstr "äîéàúî úæåøçî äàöîð àì" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "éåâù éøìåâø éåèéá" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "øãâåî-éúìá øåãéñ åú" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "íéåú úöåá÷ ìù øãâåî-éúìá íù" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "`\\' éøåçà ïñëåìá íééúñî éøìåâø éåèéá" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "íãå÷ éåèéá-úúì äéåâù äééðôä" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "âåæ-ïá åì ïéàù [^ åà [" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "âåæ-ïá åì ïéàù \\( åà (" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "âåæ-ïá åì ïéàù \\{" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "\\{\\} êåúá éåâù äðáî" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "íéåú íåçú ìù äéåâù äøãâä" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "ïåøëæä øîâð" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "íéé÷ åðéà åà éåâù íãå÷ éøìåâø éåèéá" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "éãî íã÷åî íééúñî éøìåâø éåèéá" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "éãî áëøåî åà ìåãâ éøìåâø éåèéá" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr "âåæ-ïá åì ïéàù \\) åà )" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "íãå÷ éøìåâø éåèéá ïéà" - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "êøòîë `%s' äðúùîá éåâù ùåîéù :delete" - -#~ msgid "asort: first argument is not an array" -#~ msgstr "êøòî åðéà ïåùàø èðîåâøà :asort" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "êøòî åðéà éðù èðîåâøà :asort" - -# "Illegal" is against GNU coding standards, but since Posix requires -# it (see the comment below), let's say that in Hebrew as well... -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: é÷åç-éúìá ïééôàî -- %c\n" - -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "êøò úîùäá `%s' äðúùî íù ìù éåâù øéáçú" - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "ñôåàî åìù vname-äù Node_var_array :úéîéðô äðëú úàéâù" - -#~ msgid "or used in other expression context" -#~ msgstr "øçà éåèéá ìù èñ÷èðå÷á äá ùåîéù åà" - -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "äøåñà äá êøò úîùä ,äéö÷ðåô àéä `%s'" - -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "äìåòô úøãâä ìåìëì áééç BEGIN ÷åìá" - -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "END åà BEGIN ìù äìåòô úøãâäá `nextfile'-á ùåîéù" - -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "END åà BEGIN úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "tokentab-á àöîð àì fptr %x\n" - -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "éåðéù-øá è÷ééáåà åðéà `gsub' ìù éùéìù èðîåâøà" - -#~ msgid "Unbalanced [" -#~ msgstr "âåæ-ïá åì ïéàù [" - -#~ msgid "Unfinished \\ escape" -#~ msgstr "äøåîâ-éúìá \\ äø÷á úøãñ" - -#~ msgid "unfinished repeat count" -#~ msgstr "äøåîâ-éúìá úåðùéä äðåî úøãâä" - -#~ msgid "malformed repeat count" -#~ msgstr "úåðùéä äðåî úøãâäá éåâù øéáçú" - -#~ msgid "Unbalanced (" -#~ msgstr "âåæ-ïá åì ïéàù (" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "íééøìåâø íééåèéá ìù øéáçú úøãâä ïéà" - -#~ msgid "Unbalanced )" -#~ msgstr "âåæ-ïá åì ïéàù )" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "0-î ìåãâ úåéäì áééç FIELDWIDTHS-á %d 'ñî äãù" - -#~ msgid "function %s called\n" -#~ msgstr "`%s' äéö÷ðåôì äàéø÷\n" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "èìô/èì÷ êøåöì éðååéë-åã (socket) ò÷ùë `%s' úçéúôá (%s) äì÷ú" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "`%s'-á äéåâù ú÷çåøî äàéöé" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "`%s' õáå÷ ìù %d äøåùá úéîéðô äðëú äàéâù\n" - -#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -#~ msgstr "" -#~ "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/id.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/id.gmo differ diff -Nru gawk-3.1.8+dfsg/po/id.po gawk-4.0.1+dfsg/po/id.po --- gawk-3.1.8+dfsg/po/id.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/id.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,1977 +0,0 @@ -# Pesan bahasa indonesia untuk gawk. -# Copyright (C) 2008 Free Software Foundation, Inc. -# This file is distributed under the same license as the gawk package. -# Arif E. Nugroho , 2008, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.7\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2009-12-23 07:30+0700\n" -"Last-Translator: Arif E. Nugroho \n" -"Language-Team: Indonesian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: array.c:112 -#, c-format -msgid "attempt to use function `%s' as an array" -msgstr "mencoba untuk menggunakan fungsi `%s' sebagai sebuah array" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "mencoba untuk menggunakan parameter `%s' sebagai sebuah array" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "mencoba untuk menggunakan skalar `%s' sebagai sebuah array" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "dari %s" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "referensi ke elemen tidak terinisialisasi `%s[\"%s\"]'" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "subscript dari array `%s' adalah string null" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: indeks `%s' tidak dalam array `%s'" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: kosong (null)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: kosong (nol)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: table_size = %d, array_size = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: adalah parameter\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: array_ref ke %s\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "%s blok harus memiliki sebuah bagian aksi" - -#: awkgram.y:221 -msgid "each rule must have a pattern or an action part" -msgstr "setiap aturan harus memiliki sebuah pola atau sebuah bagian aksi" - -#: awkgram.y:257 awkgram.y:266 -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "awk lama tidak mendukung multiple aturan `BEGIN' atau `END'" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' adalah sebuah fungsi bawaan, ini tidak dapat di redefinisi" - -#: awkgram.y:331 -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "konstanta regexp `//' tampak seperti sebuah komentar C++, tetapi bukan" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "konstanta regexp `/%s/' tampak seperti sebuah komentar C, tetapi bukan" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "pernyataan mungkin tidak memiliki pengaruh" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "`%s' digunakan dalam aksi %s" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' adalah sebuah ekstensi gawk" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "`return' digunakan diluar konteks fungsi" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"plain `print' dalam aturan BEGIN atau AKHIR seharusnya berupa `print \"\"'" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' adalah sebuah ekstensi gawk" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete(array)' adalah sebuah ekstensi tidak portabel tawk" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "duplikasi nilai case dalam tubuh switch: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "Duplikasi `default' terdeteksi dalam tubuh switch" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "multi tahap dua jalur pipe lines tidak bekerja" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "ekspresi regular di penempatan kanan" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "ekspresi regular di kiri dari operator `~' atau `!~'" - -#: awkgram.y:830 awkgram.y:903 -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "awk lama tidak mendukung kata kunci `in' kecuali setelah `for'" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "ekspresi regular di kanan dari perbandingan" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "tidak terdireksi `getline' tidak terdefinisi didalam aksi END" - -#: awkgram.y:904 -msgid "old awk does not support multidimensional arrays" -msgstr "awk lama tidak mendukung array multi dimensi" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "panggilan dari `length' tanpa tanda kurung tidak portabel" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "" -"panggilan dari `length' tanpa tanda kurung sudah ditinggalkan oleh POSIX" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "penggunaan dari bukan array sebagai array" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "ekspresi subscript tidak valid" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "tidak terduga baris baru atau akhir dari string" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "aplikasi teks kosong di baris perintah" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "tidak dapat membuka berkas sumber `%s' untuk pembacaan (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "tidak dapat membaca berkas sumber `%s' (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "berkas sumber `%s' kosong" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "berkas sumber tidak berakhir dalam baris baru" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "tidak terakhiri regexp akhir denga `\\' diakhir dari berkas" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "%s: %d: tawk regex pemodifikasi `/.../%c' tidak bekerja dalam gawk" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "tawk regex pemodifikasi `/.../%c' tidak bekerja dalam gawk" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "tidak terselesaikan regexp" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "tidak terselesaikan di akhir dari berkas" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "penggunaan dari `\\ #...' kelanjutan baris tidak portabel" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "backslash bukan karakter terakhir di baris" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX tidak mengijinkan operator `**='" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "awk lama tidak mendukung operator `**='" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX tidak mengijinkan operator `**'" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "awk lama tidak mendukung operator `**'" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "operator `^=' tidak didukung dalam awk lama" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "operator `^' tidak didukung dalam awk lama" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "string tidak terselesaikan" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "karakter '%c' tidak valid dalam ekspresi" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' adalah sebuah ekstensi gawk" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' adalah sebuah ekstensi Bell Labs" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX tidak mengijinkan `%s'" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' tidak didukung dalam awk lama" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "`goto' dipertimbangkan berbahaya!\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d tidak valid sebagai jumlah dari argumen untuk %s" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "cocok: argumen ketiga adalah sebuah ekstensi gawk" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: literal string sebagai argumen terakhir dari pergantian tidak memiliki " -"efek" - -#: awkgram.y:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "%s parameter ketika bukan sebuah objek yang dapat diubah" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "tutup: argumen kedua adalah sebuah ekstensi gawk" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"penggunaan dari dcgettext(_\"...\") adalah tidak benar: hapus garis bawah " -"yang mengawali" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"penggunaan dari dcngettext(_\"...\") adalah tidak benar: hapus garis bawah " -"yang mengawali" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "fungsi `%s': parameter #%d, `%s', duplikasi paramter #%d" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "fungsi `%s': parameter `%s' bayangan variabel global" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "tidak dapat membuka `%s' untuk menulis (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "mengirim profile ke standar error" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: tutup gagal (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() dipanggil dua kali!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "disana tidak ada variabel bayangan." - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "" -"fungsi `%s': tidak dapat menggunakan nama fungsi sebagai nama parameter" - -#: awkgram.y:3004 -#, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "" -"fungsi `%s': tidak dapat menggunakan variabel `%s' sebagai fungsi parameter" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "nama fungsi `%s' sebelumnya telah didefinisikan" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "fungsi `%s' dipanggil tetapi tidak pernah didefinisikan" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "fungsi `%s' didefinisikan tetapi tidak pernah dipanggil" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "konstanta regexp untuk parameter #%d menghasilkan nilai boolean" - -#: awkgram.y:3245 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"fungsi `%s' dipanggil dengan spasi diantara nama dan `(',\n" -"atau gunakan sebagai sebuah variabel atau sebuah array" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "pembagian dengan nol dicoba dalam `/='" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "pembagian dengan nol dicoba dalam `%%'" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s ke \"%s\" gagal (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "standar keluaran" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "alasan tidak diketahui" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: diterima argumen bukan-numerik" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: argumen %g diluar dari jangkauan" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "" -"fflush: tidak dapat flush: pipe `%s' dibuka untuk dibaca, bukan ditulis" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "" -"fflush: tidak dapat flush: berkas `%s' dibuka untuk dibaca, bukan ditulis" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: `%s' bukan sebuah berkas terbuka, pipe atau co-proses" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "indeks: diterima argumen pertama bukan string" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "indeks: diterima argumen kedua bukan string" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: diterima argumen bukan numerik" - -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "`length(array)' adalah sebuah ekstensi gawk" - -#: builtin.c:471 -#, fuzzy -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length: argument tidak terketik akan dipaksa ke skalar" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: argument tidak terketik akan dipaksa ke skalar" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: diterima argumen bukan-string" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: diterima argumen bukan numerik" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: diterima argumen negatif %g" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "harus menggunakan `count$' di semua format atau tidak sama sekali" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "lebar daerah diabaikan untuk penspesifikasi `%%%%'" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "ketepatan diabaikan untuk penspesifikasi `%%%%'" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "lebar daerah dan presisi diabaikan untuk penspesifikasi `%%%%'" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' tidak diijinkan dalam format awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "arg count dengan `$' harus > 0" - -#: builtin.c:853 -#, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "" -"arg count %ld lebih besar dari jumlah total dari argumen yang diberikan" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "`$' tidak diijinkan setelah periode dalam format" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "tidak ada `$' yang diberikan untuk posisional field width atau presisi" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "`l' tidak berarti dalam format awk; diabaikan" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`l' tidak diijinkan dalam format POSIX awk" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "`L' tidak berarti dalam format awk; diabaikan" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`L' tidak diijinkan dalam format awk POSIX" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "`h' tidak berarti dalam format awk; diabaikan" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`h' tidak diijinkan dalam format awk POSIX" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: nilai %g diluar dari jangkauan untuk format `%%%c'" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" -"mengabaikan format tidak dikenal karakter penspesifikasi `%c': tidak ada " -"argumen yang diubah" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "tidak cukup argumen untuk memuaskan format string" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ kehabisan untuk yang ini" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: penspesifikasi format tidak memiliki pengontrol huruf" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "terlalu banyak argumen diberikan untuk format string" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: tidak ada argumen" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: diterima argumen bukan numerik" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: dipanggil dengan argumen %g negatif" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: awal indeks %g tidak valid, menggunakan 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: awal indeks %g bukan integer akan dipotong" - -#: builtin.c:1510 -#, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: panjang %g tidak >= 1" - -#: builtin.c:1512 -#, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: panjang %g tidak >= 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr: panjang bukan integer %g akan dipotong" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "" -"substr: panjang %g terlalu besar untuk pengindeksan string, dipotong ke %g" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: sumber string memiliki panjang nol" - -#: builtin.c:1552 -#, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: awal indeks %g melewati akhir dari string" - -#: builtin.c:1560 -#, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"substr: panjang %g di awal indeks %g melewati panjang dari argumen pertama (%" -"lu)" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: diterima argumen pertama bukan string" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: diterima format string kosong" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: diterima argumen kedua bukan numerik" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: diterima argumen bukan string" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: diterima argumen bukan string" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "referensi ke field tidak terinisialisasi `$%d'" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: diterima argumen bukan string" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: diterima argumen bukan string" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: diterima argumen pertama bukan numerik" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: diterima argumen kedua bukan numerik" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: diterima argumen bukan numerik" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: diterima argumen bukan numerik" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: diterima argumen bukan numerik" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: argumen ketiga bukan sebuah array" - -#: builtin.c:2744 -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: argumen ketiga dari 0 diperlakukan sebagai 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: diterima argumen pertama bukan numerik" - -#: builtin.c:2862 -msgid "lshift: received non-numeric second argument" -msgstr "lshift: diterima argumen kedua bukan numerik" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): nilai negatif akan memberikan hasil aneh" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): nilai pecahan akan dipotong" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "lshift(%lf, %lf): nilai shift terlalu besar akan memberikan hasil aneh" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: diterima argumen pertama bukan numerik" - -#: builtin.c:2900 -msgid "rshift: received non-numeric second argument" -msgstr "rshift: diterima argumen kedua bukan-numerik" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf. %lf): nilai negatif akan memberikan hasil aneh" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): nilai pecahan akan dipotong" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "rshift(%lf, %lf): nilai shift terlalu besar akan memberikan hasil aneh" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: diterima argumen pertama tidak numerik" - -#: builtin.c:2938 -msgid "and: received non-numeric second argument" -msgstr "and: diterima argumen kedua bukan numerik" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): nilai negatif akan memberikan hasil aneh" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): nilai pecahan akan dipotong" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: diterima argumen pertama bukan numerik" - -#: builtin.c:2974 -msgid "or: received non-numeric second argument" -msgstr "or: diterima argumen kedua bukan numerik" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): nilai negatif akan memberikan hasil aneh" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): nilai pecahan akan dipotong" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: diterima argumen pertama bukan numerik" - -#: builtin.c:3010 -msgid "xor: received non-numeric second argument" -msgstr "xor: diterima argumen kedua bukan numerik" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): nilai negatif akan memberikan hasil aneh" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): nilai pecahan akan dipotong" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: diterima argumen bukan numerik" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): nilai negatif akan memberikan hasil aneh" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): nilai pecahan akan dipotong" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' bukan sebuah kategori lokal yang valid" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "tipe titik %d tidak diketahui" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "buffer overflow dalam genflags2str" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "mencoba menggunakan array `%s' dalam sebuah konteks skalar" - -#: eval.c:802 -#, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"for loop: array `%s' berubah ukuran dari %ld ke %ld selama eksekusi loop" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "`break' diluar sebuah loop adalah tidak portabel" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "`break' diluar sebuah loop tidak diijinkan" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' diluar sebuah loop tidak portabel" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "`continue' diluar sebuah loop tidak diijinkan" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' tidak dapat dipanggil dari sebuah aturan BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' tidak dapat dipanggil dari sebuah aturan END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan END" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "pernyataan tidak memiliki efek" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "" -"tidak dapat menggunakan nama fungsi `%s' sebagai sebuah variabel atau array" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referensi ke argumen `%s' tidak terinisialisasi" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referensi ke variabel `%s' tidak terinisialisasi" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenation: efek samping dalam satu ekspresi telah mengubah panjang dari " -"yang lain!" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "penempatan digunakan dalam konteks kondisional" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "pembagian dengan nol telah dicoba" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipe (%s) tidak legal dalam tree_eval" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "pembagian dengan nol dicoba dalam `/='" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "pembagian dengan nol dicoba dalam `%%='" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "fungsi `%s' dipanggil argumen lebih dari yang dideklarasikan" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "fungsi `%s' tidak didefinisikan" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Fungsi Call Stack:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "mencoba untuk mereferensi field dari nilai bukan numerik" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "mencoba untuk mereferensi dari null string" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "mencoba untuk mengakses field %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "penempatan tidak diijinkan untuk menghasilkan fungsi bawaan" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' adalah ekstensi gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' adalah ekstensi gawk" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE nilai `%s' tidak valid, diperlakukan sebagai 3" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "buruk `%sFMT' spesifikasi `%s'" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "menonaktifkan `--lint' karena penempatan ke `LINT'" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "`extension' adalah sebuah ekstensi gawk" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: tidak dapat membuka `%s' (%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: perpustakaan `%s': tidak dapat memanggil fungsi `%s' (%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "extension: hilang nama fungsi" - -#: ext.c:110 -#, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: karakter `%c' tidak legal dalam nama fungsi `%s'" - -#: ext.c:116 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: tidak dapat meredefinisi fungsi `%s'" - -#: ext.c:120 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: fungsi `%s' telah didefinisikan" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" -"extension: tidak dapat menggunakan gawk bawaan `%s' sebagai nama fungsi" - -#: ext.c:127 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: nama fungsi `%s' telah didefinisikan sebelumnya" - -#: ext.c:204 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "fungsi `%s' didefinisikan untuk mengambil lebih dari %d argumen" - -#: ext.c:207 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "fungsi `%s': hilang argumen #%d" - -#: ext.c:217 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "" -"fungsi `%s': argumen #%d: mencoba menggunaka skalar sebagai sebuah array" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" -"fungsi `%s': argumen #%d: mencoba untuk menggunakan array sebagai sebuah " -"skalar" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Operasi Tidak Didukung" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF set ke nilai negatif" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: argumen kedua bukan sebuah array" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: null string untuk arg ketika adalah sebuah ekstensi gawk" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' adalah sebuah ekstensi gawk" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "nilai FIELDWIDTHS tidak valid, didekat `%s'" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "null string untuk `FS' adalah sebuah ekstensi gawk" - -#: field.c:1092 -msgid "old awk does not support regexps as value of `FS'" -msgstr "awk lama tidak mendukung regexps sebagai nilai dari `FS'" - -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: pilihan '%s' adalah ambigu\n" - -#: getopt.c:623 getopt.c:627 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: pilihan '--%s' tidak mengijinkan sebuah argumen\n" - -#: getopt.c:636 getopt.c:641 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: pilihan '%c%s' tidak mengijinkan sebuah argumen\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: pilihan '%s' membutuhkan sebuah argumen\n" - -#: getopt.c:741 getopt.c:744 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: pilihan tidak dikenal '--%s'\n" - -#: getopt.c:752 getopt.c:755 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: pilihan tidak dikenal '%c%s'\n" - -#: getopt.c:804 getopt.c:807 -#, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: pilihan tidak valid -- '%c'\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: pilihan membutuhkan sebuah argumen -- '%c'\n" - -#: getopt.c:930 getopt.c:946 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: pilihan '-W %s' adalah ambigu\n" - -#: getopt.c:970 getopt.c:988 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: pilihan '-W %s' tidak mengijinkan sebuah argumen\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: pilihan '%s' membutuhkan sebuah argumen\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "tidak dapat membuka berkas `%s' untuk membaca (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "penutupan dari fd %d (`%s') gagal (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipe tree %s tidak valid dalam redirect()" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "ekspresi dalam `%s' redireksi hanya memiliki nilai numerik" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "ekspresi untuk `%s' redireksi hanya memiliki nilai string null" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"nama berkas `%s' untuk `%s' redireksi hanya menghasilkan ekspresi logikal" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "pencampuran tidak perlu dari `>' dan `>>' untuk berkas `%.*s'" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "tidak dapat membuka pipe `%s' untuk keluaran (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "tidak dapat membuka pipe `%s' untuk masukan (%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "tidak dapat membuka pipe dua arah `%s' untuk input/output (%s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "tidak dapat redirek dari `%s' (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "tidak dapat redirek ke `%s' (%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"batas sistem tercapi untuk berkas terbuka: mulai untuk multiplex berkas " -"deskripsi" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "penutupan dari `%s' gagal (%s)." - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "terlalu banyak pipes atau berkas masukan terbuka" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: argumen kedua harus berupa `to' atau `from'" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: `%.*s' bukan sebuah berkas terbuka, pipe atau co-proses" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "penutupan dari redireksi yang tidak pernah terbuka" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: redireksi `%s' tidak dibuka dengan `|&', argumen kedua diabaikan" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "status gagal (%d) di tutup pipe dari `%s' (%s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "status gagal (%d) di tutup berkas dari `%s' (%s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "tidak ada eksplisit tutup dari socket `%s' yang disediakan" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "tidak ada eksplisit tutup dari co-proses `%s' yang disediakan" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "tidak ada eksplisit tutup dari pipe `%s' disediakan" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "tidak ada eksplisit close dari berkas `%s' disediakan" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "error menulis standar keluaran (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "error menulis standar error (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "pipe flush dari `%s' gagal (%s)." - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "co-proses flush dari pipe ke `%s' gagal (%s)." - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "file flush dari `%s' gagal (%s)." - -#: io.c:1222 -#, c-format -msgid "local port %s invalid in `/inet'" -msgstr "lokal port %s tidak valid dalam `/inet'" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "remote host dan informasi port (%s, %s) tidak valid" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw client belum siap, maaf" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "hanya root yang boleh menggunakan `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw server belum siap, maaf" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "" -"tidak (diketahui) protokol yang diberikan dalam nama berkas spesial `%s'" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "nama berkas spesial `%s' tidak lengkap" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "harus memberikan sebuah remote hostname ke `/inet'" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "harus memberikan sebuah remote port ke `/inet'" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "komunikasi TCP/IP tidak didukung" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "berkas `%s' adalah sebuah direktori" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "lebih baik gunakan `PROCINFO[\"%s\"]' daripada `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "lebih baik gunakan `PROCINFO[...]' daripada `/dev/user'" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "tidak dapat membuka `%s', mode `%s'" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "penutupan dari master pty gagal (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "penutupan dari stdout dalam child gagal (%s)" - -#: io.c:1928 -#, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "memindahkan slave pty ke stdout dalam child gagal (dup: %s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "penutupan dari stdin dalam anak gagal (%s)" - -#: io.c:1933 -#, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "memindahkan slave pty ke stdin dalam anak gagal (dup: %s)" - -#: io.c:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "penutupan dari pty budak gagal (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "memindahkan pipe ke stdout dalam anak gaal (dup: %s)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "memindahkan pipe ke stdin dalam anak gagal (dup: %s)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "mengembalikan stdout dalam proses orang tua gagal\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "mengembalikan stdin dalam proses orang tua gagal\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "penutupan dari pipe gagal (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&' tidak didukung" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "tidak dapat membuka pipe `%s' (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "tidak dapat membuat proses anak untuk `%s' (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "berkas data `%s' kosong" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "tidak dapat mengalokasikan lebih dari masukan memori" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "error membaca berkas masukan `%s': %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "nilai multi karakter dari `RS' adalah sebuah ekstensi gawk" - -#: main.c:306 -msgid "out of memory" -msgstr "kehabisan memori" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "pilihan `-m[fr]' tidak relevan dalam gawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "penggunaan pilihan -m: `-m[fr] nnn'" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: pilihan `-W %s' tidak dikenal, diabaikan\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "argumen kosong ke `--source' diabaikan" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: pilihan membutuhkan sebuah argumen -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "variabel lingkungan `POSIXLY_CORRECT' set: mengaktifkan `--posix'" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' overrides `--traditional'" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--posix'/`--traditional' overrides `--non-decimal-data'" - -#: main.c:530 -#, c-format -msgid "running %s setuid root may be a security problem" -msgstr "menjalankan %s setuid root mungkin sebuah masalah keamanan" - -#: main.c:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "tidak dapat menset mode binari di stdin (%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "tidak dapat menset mode binari di stdout (%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "tidak dapat menset mode binari di stderr (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "tidak ada teks aplikasi apapun!" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"Penggunaan: %s [pilihan POSIX atau gaya GNU] -f progfile [--] berkas ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Penggunaan: %s[ pilihan POSIX atau gaya GNU] [--] %cprogram%c berkas ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "pilihan POSIX:\t\tpilihan panjang GNU:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f progfile\t\t--file=progfile\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=val\t\t--assign=var=val\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] val\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-0\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compabilitas\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W hak cipta\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W tampilkan variabel[=berkas]\t--dump-variables[=berkas]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=berkas\t\t--exec=berkas\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W bantuan\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=file]\t--profile[=file]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W sumber=teks-program\t--source=teks-program\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W tradisional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W penggunaan\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W versi\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"Untuk melaporkan bugs, lihat titik `Bugs' dalam `gawk.info', dalam\n" -"daerah `Reporting Problems and Bugs' dalam versi tercetak.\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"gawk adalah sebuah pencarian pola dan bahasa pemrosesan.\n" -"Secara baku ini membaca standar masukan dan menulis standa keluaran.\n" -"\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -"Contoh:\n" -"\tgawk '{ sum += $1 }; END { print sum }' berkas\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Hak Cipta (C) 1989, 1991-%d Free Software Foundationn.\n" -"\n" -"Aplikasi ini adalah aplikasi bebas; anda dapat meredistribusikannya dan/atau " -"memodifikasinya\n" -"dibawah ketentuan dari GNU General Public License seperti dipublikasikan " -"oleh\n" -"Free Software Foundation; baik versi 3 dari Lisensi, atau\n" -"(di pilihan anda) untuk versi selanjutnya.\n" -"\n" - -#: main.c:802 -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 "" -"Aplikasi ini didistribusikan dengan harapan ini akan berguna,\n" -"tetapi TANPA GARANSI APAPUN; bahkan tanpa garansi yang diimplisikasikan " -"dari\n" -"PERDAGANGAN atau KESESUAIAN UNTUK SEBUAH TUJUAN TERTENTU. Lihat\n" -"GNU General Public License untuk lebih lengkapnya.\n" -"\n" - -#: main.c:813 -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"Anda seharusnya menerima salinan dari GNU General Public License\n" -"bersama dengan aplikasi ini. Jika tidak, lihat http://www.gnu.org/" -"licenses/.\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft tidak menset FS ke tab dalam POSIX awk" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" -"%s: `%s' argumen ke `-v' tidak dalam bentuk `var=value'\n" -"\n" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "`%s' bukan sebuah nama variabel legal" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "`%s' bukan sebuah nama variabel, pencarian untuk berkas `%s=%s'" - -#: main.c:1184 -msgid "floating point exception" -msgstr "eksepsi titik pecahan" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "fatal error: internal error" - -#: main.c:1206 -msgid "fatal error: internal error: segfault" -msgstr "fatal error: internal error: segfault" - -#: main.c:1218 -msgid "fatal error: internal error: stack overflow" -msgstr "fatal error: internal error: stack overflow" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "tidak ada pre-opened fd %d" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "tidak dapat pre-open /dev/null untuk fd %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "tidak dapat menemukan grup: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "cmd. baris:" - -#: msg.c:120 -msgid "warning: " -msgstr "peringatan: " - -#: msg.c:142 -msgid "error: " -msgstr "error: " - -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "tidak dapat mengubah string ke float" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "backslash di akhir dari string" - -#: node.c:609 -#, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "awk lama tidak mendukung escape sequence `\\%c'" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX tidak mengijinkan escapes `\\x'" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "tidak ada digit heksa dalam escape sequence `\\x'" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" -"hex escape \\x%.*s dari karakter %d mungkin tidak dapat diinterpretrasikan " -"seperti yang anda kira" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "escape sequence `\\%c' diperlakukan sebagai plain `%c'" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': tidak dapat menset close-on-exec: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "tidak dapat membuka `%s' untuk penulisan: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "internal error: %s dengan null vname" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# diperlakukan secara internal sebagai `delete'" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# ini adalah sebuah fungsi yang secara dinamis diload ekstensi" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawk profile, dibuat %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t # BEGIN blok\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Aturan\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END blok\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Fungsi, terdaftar secara alphabet\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "tipe %s tidak terduga dalam prec_level" - -#: profile.c:1527 -#, c-format -msgid "Unknown node type %s in pp_var" -msgstr "tipe titik %s dalam pp_var tidak diketahui" - -#: regcomp.c:132 -msgid "Success" -msgstr "Sukses" - -#: regcomp.c:135 -msgid "No match" -msgstr "Tidak cocok" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Ekspresi regular tidak valid" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Karakter kolasi tidak valid" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "nama kelas karakter tidak valid" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Akhiran backslash" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Referensi balik tidak valid" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "Tidak cocok [ atau [^" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "Tidak cocok ( atau \\(" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "Tidak cocok \\{" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Isi dari \\{\\} tidak valid" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Akhir jangkauan tidak valid" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Kehabisan memori" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Ekspresi regular yang mengawali tidak valid" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Akhir dari ekspresi regular prematur" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "Ekspresi regular terlalu besar" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr "Tidak cocok ) atau \\)" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Tidak ada ekspresi regular sebelumnya" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "tidak dapat membuka socket dua arah `%s' untuk input/output (%s)" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: pilihan tidak legal -- %c\n" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/it.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/it.gmo differ diff -Nru gawk-3.1.8+dfsg/po/it.po gawk-4.0.1+dfsg/po/it.po --- gawk-3.1.8+dfsg/po/it.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/it.po 2012-03-28 20:03:47.000000000 +0000 @@ -1,38 +1,50 @@ # Italian messages for GNU Awk -# Copyright (C) 2002-2010 Free Software Foundation, Inc. +# Copyright (C) 2002-2011 Free Software Foundation, Inc. # Antonio Colombo . # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.5h\n" +"Project-Id-Version: gawk 3.1.81\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2010-04-22 10:00+0100\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2011-03-19 16:52+0100\n" "Last-Translator: Antonio Colombo \n" "Language-Team: Italian \n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "da %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "tentativo di usare valore scalare come vettore" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" msgstr "tentativo di usare funzione '%s' come vettore" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" -msgstr "tentativo di unare il parametro scalare `%s' come un vettore" +msgstr "tentativo di usare il parametro scalare `%s' come un vettore" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" +msgid "attempt to use scalar `%s' as an array" msgstr "tentativo di usare scalare '%s' come vettore" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "da %s" +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentativo di usare vettore `%s' in un contesto scalare" #: array.c:513 #, c-format @@ -44,361 +56,472 @@ msgid "subscript of array `%s' is null string" msgstr "l'indice del vettore '%s' è una stringa nulla" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indice `%s' non presente nel vettore `%s'" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "tentativo di usare scalare`%s[\"%.*s\"]' come vettore" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vuoto (nullo)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vuoto (zero)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: dimensione_tabella = %d, dimensione_vettore = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: è parametro\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: riferimento_vettoriale a %s\n" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: l'argomento non è un vettore" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: il secondo argomento non è un vettore" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: il secondo argomento non è un vettore" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: il primo argomento non è un vettore" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: il primo argomento non è un vettore" + +#: array.c:1102 +#, fuzzy +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: array.c:1103 +#, fuzzy +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: array.c:1108 +#, fuzzy +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"split: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: array.c:1109 +#, fuzzy +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"split: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: array.c:1655 +#, fuzzy, c-format +msgid "`%s' is invalid as a function name" +msgstr "estensione: manca nome di funzione" + +#: array.c:1659 +#, fuzzy, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "funzione `%s' non definita" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "blocchi %s richiedono una 'azione'" -#: awkgram.y:221 +#: awkgram.y:252 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:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "il vecchio awk non supporta più di una regola `BEGIN' o `END'" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' è una funzione interna, non si può ridefinire" -#: awkgram.y:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "espressione regolare costante `//' sembra un commento C, ma non lo è" +msgstr "espressione regolare costante `//' sembra un commento C++, ma non lo è" -#: awkgram.y:334 +#: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "espressione regolare costante `/%s/' sembra un commento C, ma non lo è" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "istruzione che può non aver alcun effetto" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "valori di 'case' doppi all'interno di uno 'switch': %s" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "valori di default doppi all'interno di uno 'switch'" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "`break' non permesso fuori da un ciclo o da uno 'switch'" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "`continue' non permesso fuori da un un ciclo" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "`%s' usato in 'azione' %s" +msgid "`next' used in %s action" +msgstr "`next' usato in 'azione' %s" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' è un'estensione gawk" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "`nextfile' usato in 'azione' %s" + +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "`return' usato fuori da una funzione" -#: awkgram.y:534 +#: awkgram.y:925 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:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete array' è un'estensione gawk" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' è un'estensione tawk non-portabile" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "valori di 'case' doppi all'interno di uno 'switch': %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "Valori per difetto doppi all'interno di uno 'switch'" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" -msgstr "'pipelines' multistadio bidirezionali non funzionano" +msgstr "'pipeline' multistadio bidirezionali non funzionano" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "espressione regolare usata per assegnare un valore" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "espressione regolare prima di operatore `~' o `!~'" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "il vecchio awk non supporta la parola-chiave `in' se non dopo `for'" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "espressione regolare a destra in un confronto" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "`getline var' invalida all'interno della regola `%s'" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "`getline' invalida all'interno della regola `%s'" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' non re-diretta indefinita dentro 'azione' END" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "il vecchio awk non supporta vettori multidimensionali" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "chiamata a `length' senza parentesi non portabile" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "chiamata a `length' senza parentesi sconsigliata da POSIX" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "chiamate a funzione indirette sono un'estensione gawk" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "uso di non-vettore come vettore" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "" +"non posso usare la variabile speciale `%s' come parametro indiretto di " +"funzione " -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "espressione indice invalida" -#: awkgram.y:1257 +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "uso di non-vettore come vettore" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "attenzione: " + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "fatale: " + +#: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "carattere 'a capo' o fine stringa inaspettati" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "programma nullo sulla linea comandi" - -#: awkgram.y:1430 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, 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:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "ragione indeterminata" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "file sorgente `%s' già incluso" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include è un'estensione gawk" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "nome-file mancante dopo @include" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "programma nullo sulla linea comandi" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "non riesco a leggere file sorgente `%s' (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "file sorgente `%s' vuoto" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "file sorgente non termina con carattere 'a capo'" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "espressione regolare non completata termina con `\\' a fine file" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: modificatore di espressione regolare tawk `/.../%c' non valido in " "gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "modificatore di espressione regolare tawk `/.../%c' non valido in gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "espressione regolare non completata" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "espressione regolare non completata a fine file" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso di `\\ #...' continuazione linea non portabile" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "'\\' non è l'ultimo carattere della linea" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX non permette l'operatore `**='" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "il vecchio awk non supporta l'operatore `**='" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX non permette l'operatore `**'" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "il vecchio awk non supporta l'operatore `**'" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "l'operatore `^=' non è supportato nel vecchio awk" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "l'operatore `^' non è supportato nel vecchio awk" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "stringa non terminata" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "carattere '%c' non valido in un'espressione" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' è un'estensione gawk" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' è un'estensione Bell Labs" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX non permette `%s'" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' non è supportato nel vecchio awk" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "`goto' considerato pericoloso!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d non valido come numero di argomenti per %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: il terzo argomento è un'estensione gawk" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, 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:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "il terzo parametro di '%s' non è un oggetto modificabile" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: il terzo argomento è un'estensione gawk" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: il secondo argomento è un'estensione gawk" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funzione `%s': parametro `%s' nasconde variabile globale" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "non riesco ad aprire `%s' in scrittura (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" +#: awkgram.y:4112 +#, fuzzy +msgid "sending variable list to standard error" msgstr "mando profilo a 'standard error'" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: 'close' fallita (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chiamata due volte!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "c'erano variabili nascoste." -#: awkgram.y:3001 +#: awkgram.y:4206 #, 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:3004 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funzione `%s': non posso usare la variabile speciale `%s' come parametro di " "funzione" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "funzione di nome `%s' definita in precedenza" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funzione `%s' chiamata ma mai definita" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "funzione `%s' definita ma mai chiamata" +msgid "function `%s' defined but never called directly" +msgstr "funzione `%s' definita ma mai chiamata direttamente" -#: awkgram.y:3201 +#: awkgram.y:4435 #, 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:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -407,238 +530,227 @@ "funzione `%s' chiamata con spazio tra il nome e `(',\n" "o usata come variabile o vettore" -#: awkgram.y:3664 -msgid "division by zero attempted in `/'" -msgstr "divisione per zero tentata in `/'" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "tentativo di dividere per zero" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" -msgstr "divisione per zero tentata in `%%'" +msgstr "tentativo di dividere per zero in `%%'" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s a \"%s\" fallita (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "standard output" -#: builtin.c:124 -msgid "reason unknown" -msgstr "ragione indeterminata" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: argomento non numerico" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argomento %g non accettabile" -#: builtin.c:201 +#: builtin.c:200 #, 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:204 +#: builtin.c:203 #, 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:216 +#: builtin.c:215 #, 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:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: il primo argomento non è una stringa" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: il secondo argomento non è una stringa" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: argomento non numerico" -#: builtin.c:464 +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: l'argomento fornito è un vettore" + +#: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "`length(array)' è un'estensione gawk" -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length: il parametro omesso sarà ritenuto scalare" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: l'argomento omesso sarà ritenuto scalare" - -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length: l'argomento non è una stringa" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: argomento non numerico" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: argomento negativo %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "'count$' va usato per tutti i formati o per nessuno" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "larghezza campo ignorata per lo specificatore `%%%%'" +msgid "field width is ignored for `%%' specifier" +msgstr "" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "precisione ignorata per lo specificatore `%%%%'" +msgid "precision is ignored for `%%' specifier" +msgstr "" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "larghezza e precisione ignorate per lo specificatore `%%%%'" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' non permesso nei 'format' awk" +#: builtin.c:817 +#, fuzzy +msgid "fatal: `$' is not permitted in awk formats" +msgstr "l'operatore `^' non è supportato nel vecchio awk" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "il numero di argomento con `$' deve essere > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" +msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "" -"numero di argomenti (%ld) maggiore del numero totale di argomenti specificati" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "`$' non permesso dopo un punto nel 'format'" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" msgstr "" -"nessun `$' specificato per larghezza o precisione di un campo posizionale" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" -msgstr "`l' non ha senso nei 'format' awk; ignorata" +msgstr "" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`l' non permessa nei 'format' awk POSIX" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" -msgstr "`L' non ha senso nei 'format' awk; ignorata" +msgstr "" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`L' non permessa nei 'format' awk POSIX" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" -msgstr "`h' non ha senso nei 'format' awk; ignorata" +msgstr "" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`h' non permessa nei 'format' awk POSIX" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: valore %g non accettabile per il 'format' `%%%c'" +msgstr "" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" -"lettera ignota di specifica 'format' `%c' ignorato: nessun argomento " -"convertito" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "mancano argomenti per completare il 'format'" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" -msgstr "^ uscito per questo" +msgstr "" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: il designatore di 'format' non ha una lettera di controllo" +msgstr "" #: builtin.c:1349 msgid "too many arguments supplied for format string" -msgstr "troppi argomenti specificati per il 'format'" +msgstr "" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: manca argomento" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argomento non numerico" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chiamata con argomento negativo %g" -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: indice di partenza %g non valido, uso 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: indice di partenza non intero %g: sarà troncato" - -#: builtin.c:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: lunghezza %g non >= 1" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: lunghezza %g non >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" -msgstr "substr: lunghezza non intera %g: sarà truncata" +msgstr "substr: lunghezza non intera %g: sarà troncata" -#: builtin.c:1524 +#: builtin.c:1517 #, 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:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: indice di partenza %g non valido, uso 1" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: indice di partenza non intero %g: sarà troncato" + +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr: stringa di partenza lunga zero" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: indice di partenza %g oltre la fine della stringa" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -646,995 +758,1062 @@ "substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo " "argomento (%lu)" -#: builtin.c:1637 +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "" +"strftime: il valore del 'format' in PROCINFO[\"strftime\"] è di tipo numerico" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: il secondo argomento non è numerico" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: il primo argomento non è una stringa" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: 'format' è una stringa nulla" -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: il secondo argomento non è numerico" - -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: l'argomento non è una stringa" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" -msgstr "" +msgstr "mktime: almeno un valore è fuori dall'intervallo di default" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "la funzione 'system' non è permessa in modo 'sandbox'" + +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system: l'argomento non è una stringa" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "riferimento a variabile non inizializzata `%s'" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "riferimento a variabile non inizializzata `$%d'" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: l'argomento non è una stringa" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: l'argomento non è una stringa" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: il primo argomento non è numerico" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: il secondo argomento non è numerico" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: l'argomento non è numerico" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: l'argomento non è numerico" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: l'argomento non è numerico" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: il terzo argomento non è un vettore" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: il terzo argomento è 0, trattato come 1" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: il primo argomento non è numerico" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: il secondo argomento non è numerico" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2872 +#: builtin.c:2788 #, 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:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: il primo argomento non è numerico" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: il secondo argomento non è numerico" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2910 +#: builtin.c:2825 #, 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:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: il primo argomento non è numerico" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: il secondo argomento non è numerico" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: il primo argomento non è numerico" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: il secondo argomento non è numerico" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: il primo argomento non è numerico" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: il secondo argomento non è numerico" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: l'argomento non è numerico" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valore negativo darà risultati strani" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valore con decimali verrà troncato" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' non è una categoria 'locale' valida" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "tipo nodo sconosciuto %d" -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "superament limiti buffer in 'genflags2str'" +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "codice operativo sconosciuto %d" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:434 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentativo di usare vettore `%s' in un contesto scalare" +msgid "opcode %s not an operator or keyword" +msgstr "codice operativo %s non è un operatore o una parola chiave" + +#: eval.c:488 +msgid "buffer overflow in genflags2str" +msgstr "superamento limiti buffer in 'genflags2str'" -#: eval.c:802 +#: eval.c:698 #, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" msgstr "" -"ciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante " -"l'esecuzione del ciclo" +"\n" +"\t# 'Stack' (Pila) Chiamate Funzione:\n" +"\n" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "`break' all'esterno di un ciclo non è portabile" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "`break' all'esterno di un ciclo non è consentito" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' all'esterno di un ciclo non è portabile" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "`continue' all'esterno di un ciclo non è consentito" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' non può essere chiamato da una regola BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' non può essere chiamato da una regola END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' non può essere chiamato da una regola BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' non può essere chiamato da una regola END" +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' è un'estensione gawk" -#: eval.c:952 -msgid "statement has no effect" -msgstr "istruzione che non fa nulla" +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' è un'estensione gawk" + +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "valore di BINMODE `%s' non valido, considerato come 3" -#: eval.c:1029 eval.c:2011 +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "specificazione invalida `%sFMT' `%s'" + +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" + +#: eval.c:1127 eval.c:1777 #, 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:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "riferimento ad argomento non inizializzato `%s'" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "riferimento a variabile non inizializzata `%s'" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "tentativo di riferimento a un campo da valore non numerico" -#: eval.c:1197 -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:1179 +msgid "attempt to field reference from null string" +msgstr "tentativo di riferimento a un campo da una stringa nulla" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "assegnamento usato nel contesto di un test condizionale" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "tentativo di accedere al campo %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "tentativo di dividere per zero" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "riferimento a campo non inizializzato `$%ld'" + +#: eval.c:1256 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" -#: eval.c:1409 profile.c:661 +#: eval.c:1437 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipo non ammesso (%s) in 'tree_eval'" +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: tipo non previsto `%s'" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "divisione per zero tentata in `/='" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "divisione per zero tentata in `%%='" -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" +#: eval.c:1876 eval.c:2122 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "tentativo di usare vettore `%s' in un contesto scalare" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "funzione `%s' non definita" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "assegnamento usato nel contesto di un test condizionale" + +#: eval.c:1911 +msgid "statement has no effect" +msgstr "istruzione che non fa nulla" -#: eval.c:1983 +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# 'Stack' (Pila) Chiamate Funzione:\n" -"\n" +"ciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante " +"l'esecuzione del ciclo" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- principale --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "tentativo di referenziare campo da valore non numerico" +msgid "function called indirectly through `%s' does not exist" +msgstr "la funzione chiamata indirettamente tramite `%s' non esiste" -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "tentativo to referenziare da stringa nulla" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "funzione `%s' non definita" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "tentativo di accedere al campo %d" +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "`getline' non-diretta indefinita dentro regola '%s'" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "assegnamento non permesso al risultato di una funzione interna" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "errore leggendo file di input `%s': %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' è un'estensione gawk" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "`nextfile' non può essere chiamato da una regola `%s'" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' è un'estensione gawk" +#: eval.c:2661 +#, fuzzy +msgid "`exit' cannot be called in the current context" +msgstr "`next' non può essere chiamato da una regola `%s'" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "valore di BINMODE `%s' non valido, considerato come 3" +msgid "`next' cannot be called from a `%s' rule" +msgstr "`next' non può essere chiamato da una regola `%s'" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "specificazione invalida `%sFMT' `%s'" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Spiacente, non so come interpretare `%s'" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "le estensioni non sono permesse in modo 'sandbox'" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "`extension' è un'estensione gawk" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "estensione: non riesco ad aprire `%s' (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "fatale: estensione: non riesco ad aprire `%s' (%s)\n" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatale: estensione: libreria `%s': non definisce " +"`plugin_is_GPL_compatible' (%s)\n" + +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" -"estensione: biblioteca `%s': non riesco a chiamare funzione `%s' (%s)\n" +"fatale: estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" -#: ext.c:105 +#: ext.c:127 msgid "extension: missing function name" msgstr "estensione: manca nome di funzione" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "estensione: carattere non ammesso `%c' nel nome di funzione `%s'" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "estensione: non riesco a ridefinire funzione `%s'" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "estensione: funzione `%s' già definita" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "estensione: funzione di nome `%s' definita in precedenza" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "estensione: nome funzione interna gawk `%s' non ammesso come nome funzione" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "estensione: funzione di nome `%s' definita in precedenza" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: contatore argomenti negativo per la funzione `%s'" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "funzione `%s' definita per avere al massimo %d argumenti/o" +msgstr "funzione `%s' definita per avere al massimo %d argomenti(o)" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funzione `%s': manca argomento #%d" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funzione `%s': argomento #%d: tentativo di usare scalare come vettore" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funzione `%s': argomento #%d: tentativo di usare vettore come scalare" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Operazione Non Supportata" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "NF impostato a un valore negativo" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: il quarto argomento è un'estensione gawk" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: il quarto argomento non è un vettore" + +#: field.c:969 msgid "split: second argument is not an array" msgstr "split: il secondo argomento non è un vettore" -#: field.c:909 +#: field.c:973 +#, fuzzy +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: field.c:978 +#, fuzzy +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: field.c:981 +#, fuzzy +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk" -#: field.c:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: il secondo argomento non è un vettore" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: il secondo argomento non è un vettore" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: il terzo argomento non può essere nullo" + +#: field.c:1065 +#, fuzzy +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: field.c:1070 +#, fuzzy +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: field.c:1073 +#, fuzzy +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: non si può usare lo stesso vettore come secondo e quarto argomento" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' è un'estensione gawk" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "valore di FIELDWIDTHS non valido, vicino a `%s'" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "la stringa nulla usata come `FS' è un'estensione gawk" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "il vecchio awk non supporta espressioni come valori di `FS'" -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "`FPAT' è un'estensione gawk" + +#: getopt.c:604 getopt.c:633 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opzione '%s' ambigua\n" -#: getopt.c:623 getopt.c:627 +#: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: l'opzione '--%s' non ammette un argomento\n" -#: getopt.c:636 getopt.c:641 +#: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: l'opzione '%c%s' non ammette un argomento\n" -#: getopt.c:684 getopt.c:703 +#: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: l'opzione '--%s' richiede un argomento\n" -#: getopt.c:741 getopt.c:744 +#: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: opzione sconosciuta '--%s'\n" -#: getopt.c:752 getopt.c:755 +#: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: opzione sconosciuta '%c%s'\n" -#: getopt.c:804 getopt.c:807 +#: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: opzione non valida -- '%c'\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: l'opzione richiede un argomento -- '%c'\n" -#: getopt.c:930 getopt.c:946 +#: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: l'opzione '-W %s' è ambigua\n" -#: getopt.c:970 getopt.c:988 +#: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: l'opzione '-W %s' non ammette un argomento\n" -#: getopt.c:1009 getopt.c:1027 +#: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: l'opzione '-W %s' richiede un argomento\n" -#: io.c:322 io.c:352 +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "l'argomento in linea comando `%s' è una directory: saltato" + +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "non riesco ad aprire file `%s' in lettura (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "chiusura di fd %d (`%s') fallita (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipo di albero non valido %s in redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "re-direzione non permessa in modo 'sandbox'" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" -#: io.c:595 +#: io.c:618 #, 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:600 +#: io.c:623 #, 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 " +"nome-file `%s' per la re-direzione `%s' può essere il risultato di una " "espressione logica" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" -#: io.c:717 +#: io.c:752 #, 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:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "non posso re-dirigere da `%s' (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "non posso re-dirigere a `%s' (%s)" -#: io.c:851 +#: io.c:888 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:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "chiusura di `%s' fallita (%s)." -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" msgstr "troppe 'pipe' o file di input aperti" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: il secondo argomento deve essere `a' o `da'" -#: io.c:912 +#: io.c:951 #, 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:917 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "chiusura di una re-direzione mai aperta" -#: io.c:1014 +#: io.c:1053 #, 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:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "nessuna chiusura esplicita richiesta per file `%s'" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "errore scrivendo 'standard output' (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "errore scrivendo 'standard error' (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "scaricamento di 'pipe' `%s' fallita (%s)." -#: io.c:1105 +#: io.c:1144 #, 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:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "scaricamento di file `%s' fallita (%s)." -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "porta locale %s invalida in `/inet'" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "host remoto e informazione di porta (%s, %s) invalidi" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "spiacente, 'client' /inet/raw non ancora pronto" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "solo root può usare `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "spiacente, 'server' /inet/raw non ancora pronto" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" -msgstr "nessuno protocollo (conosciuto) specificato nel filename speciale `%s'" +msgstr "nessuno protocollo (noto) specificato nel filename speciale `%s'" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" -msgstr "nome file speciale `%s' incompleto" +msgstr "nome-file speciale `%s' incompleto" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "va fornito nome di 'host' remoto a `/inet'" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "va fornita porta remota a `/inet'" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "comunicazioni TCP/IP non supportate" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "file `%s' è una 'directory'" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "usa `PROCINFO[\"%s\"]' invece che `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "usa `PROCINFO[...]' invece che `/dev/user'" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "non riesco ad aprire `%s', modo `%s'" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "fallita chiusura di 'pty' principale (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" -#: io.c:1928 +#: io.c:1752 #, 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:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" -#: io.c:1933 +#: io.c:1757 #, 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:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "fallita chiusura di 'pty' secondaria (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, 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:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, 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:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "fallito ripristino di 'stdout' nel processo-padre\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "fallito ripristino di 'stdin' nel processo-padre\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "fallita chiusura di 'pipe' (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" msgstr "`|&' non supportato" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "non riesco ad aprire 'pipe' `%s' (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "file dati `%s' vuoto" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "non riesco ad allocare ulteriore memoria per l'input" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "errore leggendo file di input `%s': %s" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valore multicarattere per `RS' è un'estensione gawk" -#: main.c:306 -msgid "out of memory" -msgstr "memoria esaurita" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "comunicazioni IPv6 non supportate" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "`-m[fr]' opzione irrilevante per gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m uso opzione: `-m[fr] nnn'" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "argomento di `-e/--source' nullo, ignorato" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "argomento di `--source' mancante, comando ignorato" - -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' annulla `--traditional'" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" -#: main.c:530 +#: main.c:557 #, 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:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "`--posix' annulla `--binary" + +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "non posso impostare modalità binaria su 'stdin'(%s)" -#: main.c:574 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "non posso impostare modalità binaria su 'stdout'(%s)" -#: main.c:576 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "non posso impostare modalità binaria su 'stderr'(%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" msgstr "manca del tutto il testo del programma!" -#: main.c:721 +#: main.c:734 #, 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" +msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f file-prog. [--] file ...\n" -#: main.c:723 +#: main.c:736 #, 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:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opzioni POSIX:\t\topzioni lunghe GNU:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "Opzioni POSIX:\t\topzioni lunghe GNU: (standard)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fileprog\t\t--file=fileprog\n" +msgstr "\t-f fileprog\t\t--file=file-prog.\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valore\t\t--assign=var=valore\n" -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valore\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=file]\t--dump-variables[=file]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec[=file]\t--exec[=file]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "Opzioni brevi:\t\topzioni lunghe GNU: (estensioni)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +#, fuzzy +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d [file]\t\t--dump-variables[=file]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=file]\t--profile[=file]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'testo-del-programma'\t--source='testo-del-programma'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E file\t\t\t--exec=file\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=testo-programma\t--source=testo-programma\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +#, fuzzy +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p [file]\t\t--profile[=file]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R file\t\t\t--command=file\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1646,7 +1825,7 @@ "sezione `Reporting Problems and Bugs' nella versione a stampa.\n" "\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1656,7 +1835,7 @@ "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1666,7 +1845,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1685,7 +1864,7 @@ "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1699,7 +1878,7 @@ "Vedi la 'GNU General Public License' per ulteriori dettagli.\n" "\n" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1708,11 +1887,16 @@ "assieme a questo programma; se non è così, vedi http://www.gnu.org/" "licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "valore non noto per specifica campo: %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1721,86 +1905,80 @@ "%s: `%s' argomento di `-v' non in forma `var=valore'\n" "\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' non è un nome di variabile ammesso" -#: main.c:1145 +#: main.c:1200 #, c-format 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:1184 +#: main.c:1204 +#, fuzzy, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "" +"estensione: nome funzione interna gawk `%s' non ammesso come nome funzione" + +#: main.c:1209 +#, fuzzy, c-format +msgid "cannot use function `%s' as variable name" +msgstr "non posso usare nome di funzione `%s' come variabile o vettore" + +#: main.c:1262 msgid "floating point exception" msgstr "eccezione floating point" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "errore fatale: errore interno" -#: main.c:1206 +#: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "errore fatale: errore interno: segfault" -#: main.c:1218 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "errore fatale: errore interno: stack overflow" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" -msgstr "manca 'fd' predefinita %d" +msgstr "manca 'fd' pre-aperta %d" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" -msgstr "non riesco a predefinire /dev/null per 'fd' %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "non riesco a trovare gruppi: %s" +msgstr "non riesco a pre-aprire /dev/null per 'fd' %d" -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" -msgstr "linea progr.:" +msgstr "linea com.:" -#: msg.c:120 -msgid "warning: " -msgstr "attenzione: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "errore: " -#: msg.c:178 -msgid "fatal: " -msgstr "fatale: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "non riesco a convertire stringa a valore in virgola mobile" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "'\\' a fine stringa" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "il vecchio awk non supporta la sequenza di escape '\\%c'" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX non permette escape `\\x'" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" -msgstr "niente cifre esadecimanli nella sequenza di escape `\\x'" +msgstr "niente cifre esadecimali nella sequenza di escape `\\x'" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " @@ -1809,50 +1987,49 @@ "sequenza di escape esadec.\\x%.*s di %d caratteri probabilmente non " "interpretata nel modo previsto" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "sequenza di escape `\\%c' considerata come semplice `%c'" -#: posix/gawkmisc.c:172 -#, 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)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Trovati dati multi-byte invalidi. Può esserci una differenza tra i dati e la " +"codifica locale." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "non riesco ad aprire `%s' in scrittura: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "%s %s `%s': non riesco a ottenere flag 'fd': (fcntl F_GETFD: %s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "errore interno: %s con 'vname' nullo" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# gestito internamente come `delete' [cancellazione]" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "" +"%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl F_SETFD: %s)" -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# questa è una funzione di estensione caricata dinamicamente" +msgid "could not open `%s' for writing: %s" +msgstr "non riesco ad aprire `%s' in scrittura: %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# profilo gawk, creato %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "mando profilo a 'standard error'" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# blocco(hi) BEGIN\n" +"\t# blocco(hi) %s\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" @@ -1861,16 +2038,17 @@ "\t# Regola(e)\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# blocco(hi) END\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "errore interno: %s con 'vname' nullo" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# profilo gawk, creato %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1879,84 +2057,108 @@ "\n" "\t# Funzioni, listate in ordine alfabetico\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "tipo non previsto %s in 'prec_level'" +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: tipo di re-direzione non noto %d" -#: profile.c:1527 +#: re.c:573 +#, fuzzy, c-format +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "intervallo nella forma `[%c-%c]' dipende da 'locale'" + +#: re.c:600 #, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Tipo nodo sconosciuto %s in pp_var" +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"componente di espressione `%.*s' dovrebbe probabilmente essere `[%.*s]'" -#: regcomp.c:132 +#: regcomp.c:131 msgid "Success" msgstr "Successo" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Nessuna corrispondenza" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "Espressione regolare invalida" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" msgstr "Carattere di ordinamento non valido" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "Nome di 'classe di caratteri' non valido" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "'\\' finale" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "Riferimento indietro non valido" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" -msgstr "[ or [^ non chiusa" +msgstr "[ o [^ non chiusa" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" -msgstr "( or \\( non chiusa" +msgstr "( o \\( non chiusa" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "\\{ non chiusa" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Contenuto di \\{\\} non valido" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "Fine di intervallo non valido" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Memoria esaurita" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Espressione regolare precedente invalida" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" -msgstr "Fine di expressione regolare inaspettata" +msgstr "Fine di espressione regolare inaspettata" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "Espressione regolare troppo complessa" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" -msgstr ") or \\) non aperta" +msgstr ") o \\) non aperta" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "Nessuna espressione regolare precedente" + +#~ msgid "could not find groups: %s" +#~ msgstr "non riesco a trovare gruppi: %s" + +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "assegnamento non permesso al risultato di una funzione interna" + +#~ msgid "attempt to use array in a scalar context" +#~ msgstr "tentativo di usare vettore in un contesto scalare" + +#~ msgid "sorted array traversal is a gawk extension" +#~ msgstr "`sorted array traversal' è un'estensione gawk" + +#~ msgid "`PROCINFO[\"sorted_in\"]' value is not recognized" +#~ msgstr "`PROCINFO[\"sorted_in\"]' valore non riconosciuto" + +#~ msgid "out of memory" +#~ msgstr "memoria esaurita" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/ja.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/ja.gmo differ diff -Nru gawk-3.1.8+dfsg/po/ja.po gawk-4.0.1+dfsg/po/ja.po --- gawk-3.1.8+dfsg/po/ja.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ja.po 2012-03-28 20:03:47.000000000 +0000 @@ -1,1647 +1,1801 @@ # Japanese messages for gawk. -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003, 2011 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. # Makoto Hosoya , 2003. +# Yasuaki Taniguchi , 2011. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.4l\n" +"Project-Id-Version: gawk 4.0.0\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2005-06-27 02:37+1000\n" -"Last-Translator: Makoto Hosoya \n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2011-07-17 08:28+0900\n" +"Last-Translator: Yasuaki Taniguchi \n" "Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "%s ã‹ã‚‰" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "スカラー値をé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" -msgstr "´Ø¿ô `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgstr "関数 `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" -msgstr "¥¹¥«¥é¡¼¥Ñ¥é¥á¡¼¥¿ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgstr "スカラー仮引数 `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgid "attempt to use scalar `%s' as an array" +msgstr "スカラー `%s' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "%s ¤«¤é" +msgid "attempt to use array `%s' in a scalar context" +msgstr "スカラーコンテキストã§é…列 `%s' を使用ã™ã‚‹è©¦ã¿ã§ã™" #: array.c:513 -#, fuzzy, c-format +#, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤Í×ÁÇ `%s[\"%s\"]' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„è¦ç´  `%s[\"%.*s\"]' ã¸ã®å‚ç…§ã§ã™" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" -msgstr "ÇÛÎó¤Îź»ú `%s' ¤¬¶õÎó¤Ç¤¹¡£" +msgstr "é…列 `%s' ã®æ·»å­—㌠NULL 文字列ã§ã™" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" -msgstr "delete: ÇÛÎó `%2$s' ¤Ë»Øɸ `%1$s' ¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "delete: é…列 `%2$s' 内ã«ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ `%1$s' ãŒã‚ã‚Šã¾ã›ã‚“" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "スカラー `%s[\"%.*s\"]' ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" -msgstr "%s: ¶õ (null)\n" +msgstr "%s: 空 (null)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" -msgstr "%s: ¶õ (zero)\n" +msgstr "%s: 空 (zero)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: ¥Æ¡¼¥Ö¥ë¥µ¥¤¥º (table_size) = %d, ÇÛÎó¥µ¥¤¥º (array_size) = %d\n" +msgstr "%s: テーブルサイズ (table_size) = %d, é…列サイズ (array_size) = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" -msgstr "%s: ¤Ï¥Ñ¥é¥á¡¼¥¿¤Ç¤¹¡£\n" +msgstr "%s: 仮引数ã§ã™\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" -msgstr "%s: %s ¤Ø¤ÎÇÛÎó»²¾È (array_ref)\n" +msgstr "%s: %s ã¸ã®é…列å‚ç…§ (array_ref) ã§ã™\n" + +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: 引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: 第二引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: 第二引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: 第一引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: 第一引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "asort: 第一引数ã®éƒ¨åˆ†é…列を第二引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "asorti: 第一引数ã®éƒ¨åˆ†é…列を第二引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "asort: 第二引数ã®éƒ¨åˆ†é…列を第一引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "asorti: 第二引数ã®éƒ¨åˆ†é…列を第一引数用ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "`%s' ã¯é–¢æ•°åã¨ã—ã¦ã¯ç„¡åŠ¹ã§ã™" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "ソート比較関数 `%s' ãŒå®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:218 +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" -msgstr "%s ¥Ö¥í¥Ã¥¯¤Ë¤Ï¥¢¥¯¥·¥ç¥óÉô¤¬É¬¿Ü¤Ç¤¹¡£" +msgstr "%s ブロックã«ã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™" -#: awkgram.y:221 +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" -msgstr "³Æ¥ë¡¼¥ë¤Ë¤Ï¥Ñ¥¿¡¼¥ó¤Þ¤¿¤Ï¥¢¥¯¥·¥ç¥óÉô¤¬É¬¿Ü¤Ç¤¹¡£" +msgstr "å„ルールã«ã¯ãƒ‘ターンã¾ãŸã¯ã‚¢ã‚¯ã‚·ãƒ§ãƒ³éƒ¨ãŒå¿…é ˆã§ã™ã€‚" -#: awkgram.y:257 awkgram.y:266 -#, fuzzy +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã¯è¤‡æ•°ã® `BEGIN' ã¾ãŸã¯ `END' ルールをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' ¤ÏÁȹþ¤ß´Ø¿ô¤Ç¤¹¡£ºÆÄêµÁ¤Ç¤­¤Þ¤»¤ó¡£" +msgstr "`%s' ã¯çµ„è¾¼ã¿é–¢æ•°ã§ã™ã€‚å†å®šç¾©ã§ãã¾ã›ã‚“" -#: awkgram.y:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "Àµµ¬É½¸½Äê¿ô `//' ¤Ï C++¥³¥á¥ó¥È¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢°ã¤¤¤Þ¤¹¡£" +msgstr "æ­£è¦è¡¨ç¾å®šæ•° `//' 㯠C++コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€é•ã„ã¾ã™ã€‚" -#: awkgram.y:334 +#: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "Àµµ¬É½¸½Äê¿ô `/%s/' ¤Ï C¥³¥á¥ó¥È¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢°ã¤¤¤Þ¤¹¡£" +msgstr "æ­£è¦è¡¨ç¾å®šæ•° `/%s/' 㯠C コメントã«ä¼¼ã¦ã„ã¾ã™ãŒã€ç•°ãªã‚Šã¾ã™" + +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "switch æ–‡ã®ä¸­ã§é‡è¤‡ã—㟠case 値ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™: %s" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "switch æ–‡ã®ä¸­ã§é‡è¤‡ã—㟠`default' ãŒæ¤œå‡ºã•ã‚Œã¾ã—ãŸ" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "Ì¿Îáʸ¤Ë¤Ï¸ú²Ì¤¬Ìµ¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£" +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "`break' ã¯ãƒ«ãƒ¼ãƒ—ã¾ãŸã¯ switch ã®å¤–ã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "`continue' ã¯ãƒ«ãƒ¼ãƒ—ã®å¤–ã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" + +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "`%s' ¤¬ %s ¤Î¥¢¥¯¥·¥ç¥ó¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£" +msgid "`next' used in %s action" +msgstr "%s アクション内㧠`next' ãŒä½¿ç”¨ã•ã‚Œã¾ã—ãŸ" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "`nextfile' 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "`nextfile' ㌠%s アクション内ã§ä½¿ç”¨ã•ã‚Œã¾ã—ãŸ" + +#: awkgram.y:865 msgid "`return' used outside function context" -msgstr "`return' ¤¬´Ø¿ôÄêµÁʸ¤Î³°¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£" +msgstr "`return' ãŒé–¢æ•°å®šç¾©æ–‡ã®å¤–ã§ä½¿ã‚ã‚Œã¾ã—ãŸ" -#: awkgram.y:534 +#: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" -"BEGIN ¤Þ¤¿¤Ï END ¥ë¡¼¥ëÆâ¤Î°ú¿ô¤Î̵¤¤ `print' ¤Ï `print \"\"' ¤À¤È»×¤ï¤ì¤Þ" -"¤¹¡£" +"BEGIN ã¾ãŸã¯ END ルール内ã®å¼•æ•°ã®ç„¡ã„ `print' 㯠`print \"\"' ã ã¨æ€ã‚ã‚Œã¾ã™" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" -msgstr "`delete array' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "`delete array' 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete(array)' ¤Ï tawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£Â¾¤Î awk ¤Ç¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "switch ʸ¤ÎÃæ¤Ë½ÅÊ£¤·¤¿ case Ãͤ¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "switch ʸ¤ÎÃæ¤Ë `default' ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "`delete(array)' ã¯ç§»æ¤æ€§ã®ç„¡ã„ tawk æ‹¡å¼µã§ã™" -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" -msgstr "¿Ãʳ¬¤ÇÁÐÊý¸þ¥Ñ¥¤¥×¤òÍøÍѤ·¤¿¼°¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "多段階ã§åŒæ–¹å‘パイプを利用ã—ãŸå¼ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" -msgstr "Àµµ¬É½¸½¤¬ÂåÆþ¼°¤Î±¦Êդ˻ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "æ­£è¦è¡¨ç¾ãŒä»£å…¥å¼ã®å³è¾ºã«ä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" -msgstr "`~' ¤ä `!~' ±é»»»Ò¤Îº¸ÊÕ¤ËÀµµ¬É½¸½¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "`~' ã‚„ `!~' 演算å­ã®å·¦è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™" -#: awkgram.y:830 awkgram.y:903 -#, fuzzy +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" -msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã§ã¯ `in' 予約語㯠`for' ã®å¾Œã‚’除ãサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" -msgstr "Èæ³Ó¼°¤Î±¦ÊÕ¤ËÀµµ¬É½¸½¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "比較å¼ã®å³è¾ºã«æ­£è¦è¡¨ç¾ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™ã€‚" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "`%s' ルールã®å†…部ã§ã¯ `getline var' ã¯ç„¡åŠ¹ã§ã™" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "`%s' ルールã®å†…部ã§ã¯ `getline' ã¯ç„¡åŠ¹ã§ã™" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" -msgstr "¥ê¥À¥¤¥ì¥¯¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ `getline' ¤Ï END ¥¢¥¯¥·¥ç¥ó¤Ç¤Ï̤ÄêµÁ¤Ç¤¹¡£" +msgstr "リダイレクトã•ã‚Œã¦ã„ãªã„ `getline' 㯠END アクションã§ã¯æœªå®šç¾©ã§ã™ã€‚" -#: awkgram.y:904 -#, fuzzy +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" -msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã¯å¤šæ¬¡å…ƒé…列をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" -msgstr "³ç¸Ì̵¤·¤Î `length' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "å°æ‹¬å¼§ãŒç„¡ã„ `length' ã¯ç§»æ¤æ€§ãŒã‚ã‚Šã¾ã›ã‚“" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "POSIX ¤Ï³ç¸Ì̵¤·¤Ç¤Î `length' ¤Î»ÈÍѤò¿ä¾©¤·¤Þ¤»¤ó¡£" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "間接関数呼ã³å‡ºã—㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "ÇÛÎó¤Ç¤Ê¤¤¤â¤Î¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "特別ãªå¤‰æ•° `%s' ã¯é–“接関数呼ã³å‡ºã—用ã«ã¯ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" -msgstr "ź»ú¼°¤¬ÉÔÀµ¤Ç¤¹¡£" +msgstr "添字ã®å¼ãŒç„¡åŠ¹ã§ã™" -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "ͽÁÛ³°¤Î²þ¹Ô¤Þ¤¿¤Ïʸ»úÎó¤Î½ªÃ¼¤¬¤¢¤ê¤Þ¤¹¡£" +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "é…列ã§ãªã„ã‚‚ã®ã‚’é…列ã¨ã—ã¦ä½¿ç”¨ã—ã¦ã„ã¾ã™" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "¥³¥Þ¥ó¥É¹Ô¤Î¥×¥í¥°¥é¥àɽµ­¤¬¶õ¤Ç¤¹¡£" +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "警告: " -#: awkgram.y:1430 +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "致命的: " + +#: awkgram.y:2043 +msgid "unexpected newline or end of string" +msgstr "予期ã—ãªã„改行ã¾ãŸã¯æ–‡å­—列終端ã§ã™" + +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" -msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤à¤¿¤á¤Ë³«¤±¤Þ¤»¤ó (%s)¡£" +msgstr "ソースファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)" + +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "原因ä¸æ˜Ž" -#: awkgram.y:1528 +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "ソースファイル `%s' ã¯æ—¢ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include 㯠gawk æ‹¡å¼µã§ã™" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "@include ã®å¾Œã«ç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«åãŒã‚ã‚Šã¾ã™" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "コマンド行ã®ãƒ—ログラム表記ãŒç©ºã§ã™" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" -msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s)¡£" +msgstr "ソースファイル `%s' を読ã¿è¾¼ã‚ã¾ã›ã‚“ (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" -msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤Ï¶õ¤Ç¤¹¡£" +msgstr "ソースファイル `%s' ã¯ç©ºã§ã™" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" -msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬²þ¹Ô¤Ç½ª¤Ã¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "ソースファイルãŒæ”¹è¡Œã§çµ‚ã£ã¦ã„ã¾ã›ã‚“" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" -msgstr "½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤Àµµ¬É½¸½¤¬¥Õ¥¡¥¤¥ëºÇ¸å¤Î `\\' ¤Ç½ª¤Ã¤Æ¤¤¤Þ¤¹¡£" +msgstr "終端ã•ã‚Œã¦ã„ãªã„æ­£è¦è¡¨ç¾ãŒãƒ•ã‚¡ã‚¤ãƒ«æœ€å¾Œã® `\\' ã§çµ‚ã£ã¦ã„ã¾ã™ã€‚" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "%s: %d: tawk ¤ÎÀµµ¬É½¸½½¤¾þ»Ò `/.../%c' ¤Ï gawk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "%s: %d: tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "tawk ¤ÎÀµµ¬É½¸½½¤¾þ»Ò `/.../%c' ¤Ï gawk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "tawk ã®æ­£è¦è¡¨ç¾ä¿®é£¾å­ `/.../%c' 㯠gawk ã§ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" -msgstr "Àµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "æ­£è¦è¡¨ç¾ãŒçµ‚端ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" -msgstr "¥Õ¥¡¥¤¥ë¤ÎÃæ¤ÇÀµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "ファイルã®ä¸­ã§æ­£è¦è¡¨ç¾ãŒçµ‚端ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" -msgstr "`\\ #...' ·Á¼°¤Î¹Ô·Ñ³¤Ï¾¤Î awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "`\\ #...' å½¢å¼ã®è¡Œç¶™ç¶šã¯ç§»æ¤æ€§ãŒã‚ã‚Šã¾ã›ã‚“" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" -msgstr "¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬¹ÔºÇ¸å¤Îʸ»ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒè¡Œæœ€å¾Œã®æ–‡å­—ã«ãªã£ã¦ã„ã¾ã›ã‚“。" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" -msgstr "POSIX ¤Ï±é»»»Ò `**=' ¤òµö²Ä¤·¤Þ¤»¤ó¡£" +msgstr "POSIX ã§ã¯æ¼”ç®—å­ `**=' ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" -msgstr "±é»»»Ò `**=' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `**=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" -msgstr "POSIX ¤Ç¤Ï±é»»»Ò `**' ¤òµö²Ä¤·¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "POSIX ã§ã¯æ¼”ç®—å­ `**' ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" -msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `**' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" -msgstr "±é»»»Ò `^=' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `^=' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" -msgstr "±é»»»Ò `^' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk ã¯æ¼”ç®—å­ `^' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" -msgstr "ʸ»úÎ󤬽ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "文字列ãŒçµ‚端ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" -msgstr "ɽ¸½¤Î char '%c' ¤ÏÉÔÀµ¤Ç¤¹¡£" +msgstr "å¼å†…ã«ç„¡åŠ¹ãªæ–‡å­— '%c' ãŒã‚ã‚Šã¾ã™" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" -msgstr "`%s' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "`%s' 㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" -msgstr "`%s' ¤Ï¥Ù¥ë¸¦µæ½ê¤Ë¤è¤ë³ÈÄ¥¤Ç¤¹¡£" +msgstr "`%s' ã¯ãƒ™ãƒ«ç ”究所ã«ã‚ˆã‚‹æ‹¡å¼µã§ã™" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" -msgstr "POSIX ¤Ï `%s' ¤òµö²Ä¤·¤Þ¤»¤ó¡£" +msgstr "POSIX ã§ã¯ `%s' ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" -msgstr "`%s' ¤Ï¸Å¤¤ awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk 㯠`%s' をサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" -msgstr "`goto' ¤ÏÍ­³²¤Ç¤¹!\n" +msgstr "`goto' ã¯æœ‰å®³ã ã¨è¦‹ãªã•ã‚Œã¦ã„ã¾ã™!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" -msgstr "%d ¤Ï %s ¤Ë»È¤¨¤ë°ú¿ô¤Î¿ô¤È¤·¤Æ¤ÏÉÔÀµ¤Ç¤¹¡£" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: Âè»°°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "%d 㯠%s 用ã®å¼•æ•°ã®æ•°ã¨ã—ã¦ã¯ç„¡åŠ¹ã§ã™" -#: awkgram.y:2472 +#: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s: ʸ»úÎó¥ê¥Æ¥é¥ë¤òÃÖ¤­´¹¤¨ºÇ¸å¤Î°ú¿ô¤Ë»ÈÍѤ¹¤ë¤È¸ú²Ì¤¬¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "%s: 文字列リテラルを置ãæ›ãˆæœ€å¾Œã®å¼•æ•°ã«ä½¿ç”¨ã™ã‚‹ã¨åŠ¹æžœãŒã‚ã‚Šã¾ã›ã‚“" -#: awkgram.y:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" -msgstr "%s Âè»°¥Ñ¥é¥á¡¼¥¿¤Ï²ÄÊÑ¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "%s 第三仮引数ã¯å¯å¤‰ã‚ªãƒ–ジェクトã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: 第三引数㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" -msgstr "close: ÂèÆó°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "close: 第二引数㯠gawk æ‹¡å¼µã§ã™" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -"dcgettext(_\"...\")¤Î»È¤¤Êý¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹: ºÇ½é¤Î¥¢¥ó¥À¡¼¥¹¥³¥¢¤òºï½ü¤·¤Æ¤¯" -"¤À¤µ¤¤¡£" +"dcgettext(_\"...\")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—" +"ã¦ãã ã•ã„" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" -"dcngettext(_\"...\")¤Î»È¤¤Êý¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹: ºÇ½é¤Î¥¢¥ó¥À¡¼¥¹¥³¥¢¤òºï½ü¤·¤Æ" -"¤¯¤À¤µ¤¤¡£" +"dcngettext(_\"...\")ã®ä½¿ç”¨æ³•ãŒé–“é•ã£ã¦ã„ã¾ã™: 先頭ã®ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)を削除ã—" +"ã¦ãã ã•ã„" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "´Ø¿ô `%s': ¥Ñ¥é¥á¡¼¥¿ #%d, `%s' ¤¬¥Ñ¥é¥á¡¼¥¿ #%d ¤È½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "関数 `%s': 仮引数 #%d, `%s' ãŒä»®å¼•æ•° #%d ã¨é‡è¤‡ã—ã¦ã„ã¾ã™" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" -msgstr "´Ø¿ô `%s': ¥Ñ¥é¥á¡¼¥¿ `%s' ¤¬Âç°èÊÑ¿ô¤òʤ¤¤±£¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "関数 `%s': 仮引数 `%s' ãŒå¤§åŸŸå¤‰æ•°ã‚’覆ã„éš ã—ã¦ã„ã¾ã™" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" -msgstr "`%s' ¤ò½ñ¹þ¤ßÍѤ˳«¤±¤Þ¤»¤ó¤Ç¤·¤¿ (%s)¡£" +msgstr "`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—㟠(%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "¥×¥í¥Õ¥¡¥¤¥ë¤òɸ½à¥¨¥é¡¼¤ËÁ÷¤Ã¤Æ¤¤¤Þ¤¹¡£" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "変数リストを標準エラーã«é€ã£ã¦ã„ã¾ã™" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" -msgstr "%s: ÊĤ¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "%s: é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() ¤òÆó²ó¸Æ¤Ó½Ð¤·¤Æ¤¤¤Þ¤¹!" +msgstr "shadow_funcs() を二回呼ã³å‡ºã—ã¦ã„ã¾ã™!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." -msgstr "ʤ¤¤±£¤µ¤ì¤¿ÊÑ¿ô¤¬¤¢¤ê¤Þ¤·¤¿¡£" +msgstr "覆ã„éš ã•ã‚ŒãŸå¤‰æ•°ãŒã‚ã‚Šã¾ã—ãŸ" -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" -msgstr "´Ø¿ô `%s': ´Ø¿ô̾¤Ï¥Ñ¥é¥á¡¼¥¿Ì¾¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "関数 `%s': 関数åを仮引数åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: awkgram.y:3004 -#, fuzzy, c-format +#: awkgram.y:4210 +#, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "´Ø¿ô `%s': ´Ø¿ô̾¤Ï¥Ñ¥é¥á¡¼¥¿Ì¾¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "関数 `%s': 特別ãªå¤‰æ•° `%s' ã¯é–¢æ•°ã®ä»®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" -msgstr "´Ø¿ô̾ `%s' ¤ÏÄêµÁºÑ¤ß¤Ç¤¹¡£" +msgstr "関数å `%s' ã¯å‰ã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" -msgstr "̤ÄêµÁ¤Î´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£" +msgstr "未定義ã®é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "ÄêµÁ¤µ¤ì¤¿´Ø¿ô `%s' ¤Ï°ìÅÙ¤â¸Æ¤Ó½Ð¤µ¤ì¤Þ¤»¤ó¤Ç¤·¤¿¡£" +msgid "function `%s' defined but never called directly" +msgstr "関数 `%s' ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã™ãŒã€ä¸€åº¦ã‚‚直接呼ã³å‡ºã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: awkgram.y:3201 +#: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" -msgstr "¥Ñ¥é¥á¡¼¥¿ #%d ¤ÎÀµµ¬É½¸½Äê¿ô¤Ï¥Ö¡¼¥ëÃͤò½ÐÎϤ·¤Þ¤¹¡£" +msgstr "仮引数 #%d 用ã®æ­£è¦è¡¨ç¾å®šæ•°ã¯çœŸå½å€¤ã‚’出力ã—ã¾ã™" -#: awkgram.y:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -"´Ø¿ô̾¤È `(' ¤Î´Ö¤Ë¥¹¥Ú¡¼¥¹¤òÆþ¤ì¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Æ¤¤¤Þ¤¹¡£\n" -"¤Þ¤¿¤Ï¡¢ÊÑ¿ô¤«ÇÛÎó¤È¤·¤Æ»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£" +"関数å㨠`(' ã®é–“ã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¦ã„ã¾ã™ã€‚\n" +"ã¾ãŸã¯ã€å¤‰æ•°ã‹é…列ã¨ã—ã¦ä½¿ã‚ã‚Œã¦ã„ã¾ã™ã€‚" -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "`/=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "ゼロã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" -msgstr "`%%' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" +msgstr "`%%' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè©¦ã¿ã‚‰ã‚Œã¾ã—ãŸ" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" -msgstr "%s ¤«¤é \"%s\" ¤Ø½ÐÎϤǤ­¤Þ¤»¤ó (%s)¡£" +msgstr "%s ã‹ã‚‰ \"%s\" ã¸å‡ºåŠ›ã§ãã¾ã›ã‚“ (%s)。" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" -msgstr "ɸ½à½ÐÎÏ" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "¸¶°øÉÔÌÀ" +msgstr "標準出力" -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" -msgstr "exp: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "exp: 引数ãŒæ•°å€¤ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" -msgstr "exp: °ú¿ô %g ¤¬µöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£" +msgstr "exp: 引数 %g ãŒç¯„囲外ã§ã™" -#: builtin.c:201 +#: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "fflush: ¥Õ¥é¥Ã¥·¥åÉÔ²Ä: ¥Ñ¥¤¥× `%s' ¤ÏÆɤ߹þ¤ßÀìÍѤǤ¹¡£" +msgstr "" +"fflush: flush ã§ãã¾ã›ã‚“: パイプ `%s' ã¯èª­ã¿è¾¼ã¿ç”¨ã«é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚書ãè¾¼ã¿" +"用ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:204 +#: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "fflush: ¥Õ¥é¥Ã¥·¥åÉÔ²Ä: ¥Õ¥¡¥¤¥ë `%s' ¤ÏÆɤ߹þ¤ßÀìÍѤǤ¹¡£" +msgstr "" +"fflush: flush ã§ãã¾ã›ã‚“: ファイル `%s' ã¯èª­ã¿è¾¼ã¿ç”¨ã«é–‹ã‹ã‚Œã¦ã„ã¾ã™ã€‚書ãè¾¼" +"ã¿ç”¨ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:216 +#: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "" -"fflush: `%s' ¤Ï¥Õ¥¡¥¤¥ë¤«¡¢¥Ñ¥¤¥×¤«¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£" +msgstr "fflush: `%s' ãŒé–‹ã‹ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" -msgstr "index: Âè°ì°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "index: 文字列ã§ã¯ç„¡ã„第一引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" -msgstr "index: ÂèÆó°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "index: 文字列ã§ã¯ç„¡ã„第二引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" -msgstr "int: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "int: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "`delete array' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: é…列引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" +#: builtin.c:496 +msgid "`length(array)' is a gawk extension" +msgstr "`length(array)' 㯠gawk æ‹¡å¼µã§ã™" -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" -msgstr "length: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "length: 文字列ã§ã¯ç„¡ã„引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" -msgstr "log: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "log: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" -msgstr "log: °ú¿ô %g ¤¬Éé¤ÎÃͤǤ¹¡£" +msgstr "log: è² ã®å¼•æ•° %g ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" msgstr "" -"`count$¡Ç¤ÏÁ´¤Æ¤Î½ñ¼°»ØÄê¤ËŬÍѤ¹¤ë¡¢¤Þ¤¿¤ÏÁ´¤Æ¤ËŬÍѤ·¤Ê¤¤¤Î¤É¤Á¤é¤«¤Ç¤·¤«»È" -"¤¨¤Þ¤»¤ó¡£" +"致命的: `count$’ ã¯å…¨ã¦ã®æ›¸å¼ä½¿ç”¨ã™ã‚‹ã€ã¾ãŸã¯å…¨ã¦ã«ä½¿ç”¨ã—ãªã„ã®ã„ãšã‚Œã‹ã§ãªã‘" +"ã‚Œã°ã„ã‘ã¾ã›ã‚“" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" +msgid "field width is ignored for `%%' specifier" +msgstr "`%%' 指定用ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å¹…ã¯ç„¡è¦–ã•ã‚Œã¾ã™" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" +msgid "precision is ignored for `%%' specifier" +msgstr "`%%' 指定用ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å¹…ã¯ç„¡è¦–ã•ã‚Œã¾ã™" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "`%%' 指定用ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å¹…ãŠã‚ˆã³ç²¾åº¦ã¯ç„¡è¦–ã•ã‚Œã¾ã™" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' ¤Ï awk ¤Ç¤Ï»È¤¨¤Þ¤»¤ó¡£" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "致命的: `$' 㯠awk å½¢å¼å†…ã§ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "½ç½ø»ØÄê¤Î `$' ¤Ë»È¤¨¤ë¿ô»ú¤ÏÀµ¤ÎÃͤǤ¹¡£" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "致命的: `$' ã§æŒ‡å®šã™ã‚‹å¼•æ•°ã®ç•ªå·ã¯æ­£ã§ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "½ç½ø»ØÄê %ld ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë°ú¿ô¤Î¿ô¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£" +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "致命的: 引数ã®ç•ªå· %ld ã¯å¼•æ•°ã¨ã—ã¦ä¸Žãˆã‚‰ã‚ŒãŸæ•°ã‚ˆã‚Šå¤§ãã„ã§ã™" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "`$' ¤Ï½ñ¼°»ØÄê¤Î¥Ô¥ê¥ª¥É `.' ¤Î¸å¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "致命的: `$' ã¯æ›¸å¼æŒ‡å®šå†…ã®ãƒ”リオド `.' ã®å¾Œã«ä½¿ç”¨ã§ãã¾ã›ã‚“" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "¥Õ¥£¡¼¥ë¥ÉÉý¡¢¤Þ¤¿¤ÏÀºÅ٤λØÄê»Ò¤Ë `$' ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "致命的: フィールド幅ã€ã¾ãŸã¯ç²¾åº¦ã®æŒ‡å®šå­ã« `$' ãŒä¸Žãˆã‚‰ã‚Œã¦ã„ã¾ã›ã‚“" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" -msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `l' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" +msgstr "awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `l' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `l' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "致命的: POSIX awk 書å¼å†…ã§ã¯ `l' ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" -msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `L' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" +msgstr "awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `L' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™ã€‚" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `L' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "致命的: POSIX awk 書å¼å†…ã§ã¯ `L' ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" -msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `h' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" +msgstr "awk ã®æ›¸å¼æŒ‡å®šã§ã¯ `h' ã¯ç„¡æ„味ã§ã™ã€‚無視ã—ã¾ã™ã€‚" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `h' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "致命的: POSIX awk 書å¼å†…ã§ã¯ `h' ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: %g ¤ÎÃͤ¬½ñ¼° `%%%c' ¤ÎµöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£" +msgstr "[s]printf: 値 %g ã¯æ›¸å¼ `%%%c' ã®ç¯„囲外ã§ã™" #: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" +msgstr "ä¸æ˜Žãªæ›¸å¼æŒ‡å®šæ–‡å­— `%c' を無視ã—ã¦ã„ã¾ã™: 変æ›ã•ã‚Œã‚‹å¼•æ•°ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "½ñ¼°»ØÄꤹ¤ë¤¿¤á¤Î°ú¿ô¤¬Â­¤ê¤Þ¤»¤ó¡£" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "致命的: 書å¼æ–‡å­—列を満ãŸã™å分ãªæ•°ã®å¼•æ•°ãŒã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" -msgstr "^ ¤³¤³¤«¤é­¤ê¤Þ¤»¤ó" +msgstr "^ ã“ã“ã‹ã‚‰è¶³ã‚Šã¾ã›ã‚“" #: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: ½ñ¼°»ØÄê»Ò¤ËÀ©¸æʸ»ú¤¬¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "[s]printf: 書å¼æŒ‡å®šå­ã«åˆ¶å¾¡æ–‡å­—ãŒã‚ã‚Šã¾ã›ã‚“" #: builtin.c:1349 msgid "too many arguments supplied for format string" -msgstr "½ñ¼°»ØÄêʸ»úÎó¤Î°ú¿ô¤¬Â¿²á¤®¤Þ¤¹¡£" +msgstr "書å¼æ–‡å­—列ã«ä¸Žãˆã‚‰ã‚Œã¦ã„る引数ãŒå¤šã™ãŽã¾ã™" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" -msgstr "printf: °ú¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "printf: 引数ãŒã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" -msgstr "sqrt: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: °ú¿ô¤ËÉé¤ÎÃÍ %g ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgstr "sqrt: 数値ã§ã¯ç„¡ã„引数をå—ã‘å–ã‚Šã¾ã—ãŸ" #: builtin.c:1479 #, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬ÉÔÀµ¤Ç¤¹¡£1 ¤ò»È¤¤¤Þ¤¹¡£" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: µ¯ÅÀ»Øɸ %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£" +msgid "sqrt: called with negative argument %g" +msgstr "sqrt: è² ã®å€¤ %g を引数ã«ä½¿ç”¨ã—ã¦å‘¼ã³å‡ºã•ã‚Œã¾ã—ãŸ" -#: builtin.c:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" -msgstr "substr: ʸ»ú¿ô %g ¤¬ 1 °Ê¾å¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "substr: é•·ã• %g ㌠1 以上ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" -msgstr "substr: ʸ»ú¿ô %g ¤¬ 0 °Ê¾å¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "substr: é•·ã• %g ㌠0 以上ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" -msgstr "substr: ʸ»ú¿ô %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£" +msgstr "substr: 文字数 %g ã®å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã¾ã™ã€‚" -#: builtin.c:1524 +#: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "substr: ʸ»ú¿ô %g ¤ÏºÇÂçÃͤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£%g ¤ò»È¤¤¤Þ¤¹¡£" +msgstr "substr: 文字数 %g ã¯æœ€å¤§å€¤ã‚’超ãˆã¦ã„ã¾ã™ã€‚%g を使ã„ã¾ã™ã€‚" + +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: 開始インデックス %g ãŒç„¡åŠ¹ã§ã™ã€‚1を使用ã—ã¾ã™" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: 開始インデックス %g ãŒéžæ•´æ•°ã®ãŸã‚ã€å€¤ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:1536 +#: builtin.c:1559 msgid "substr: source string is zero length" -msgstr "substr: ʸ»úÎó¤ÎŤµ¤¬¥¼¥í¤Ç¤¹¡£" +msgstr "substr: 文字列ã®é•·ã•ãŒã‚¼ãƒ­ã§ã™ã€‚" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" -msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬Ê¸»úÎó¤ÎŤµ¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£" +msgstr "substr: 開始インデックス %g ãŒæ–‡å­—列終端ã®å¾Œã«ã‚ã‚Šã¾ã™" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -"substr: µ¯ÅÀ»Øɸ %2$g ¤«¤é¤Îʸ»ú¿ô %1$g ¤Ïʸ»úÎó¤ÎŤµ %3$lu ¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£" +"substr: 開始インデックス %2$g ã‹ã‚‰ã®é•·ã• %1$g ã¯ç¬¬ä¸€å¼•æ•°ã®é•·ã•ã‚’超ãˆã¦ã„ã¾ã™ " +"(%3$lu)" + +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "strftime: PROCINFO[\"strftime\"] ã®æ›¸å¼ã®å€¤ã¯æ•°å€¤åž‹ã§ã™" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "" -#: builtin.c:1637 +#: builtin.c:1690 msgid "strftime: received non-string first argument" -msgstr "strftime: Âè°ì°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "strftime: éžæ–‡å­—列ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" -msgstr "strftime: ½ñ¼°»ØÄêʸ»úÎ󤬶õ¤Ç¤¹¡£" +msgstr "strftime: 空ã®æ›¸å¼æ–‡å­—列をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" - -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" -msgstr "mktime: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "mktime: éžæ–‡å­—列引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" -msgstr "" +msgstr "mktime: 一ã¤ä»¥ä¸Šã®å€¤ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ç¯„囲を超ãˆã¦ã„ã¾ã™" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "サンドボックスモードã§ã¯ 'system' 関数ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" + +#: builtin.c:1819 msgid "system: received non-string argument" -msgstr "system: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "system: 文字列ã§ã¯ç„¡ã„引数をå—ã‘å–ã‚Šã¾ã—ãŸ" + +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„変数 `%s' ã¸ã®å‚ç…§ã§ã™" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" -msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥£¡¼¥ë¥É `$%d' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„フィールド `$%d' ã¸ã®å‚ç…§ã§ã™" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" -msgstr "tolower: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "tolower: éžæ–‡å­—列引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" -msgstr "toupper: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "toupper: éžæ–‡å­—列引数をå—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" -msgstr "atan2: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "atan2: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" -msgstr "atan2: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "atan2: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" -msgstr "sin: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "sin: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" -msgstr "cos: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "cos: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" -msgstr "srand: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "srand: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" -msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "match: 第三引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: Âè»°°ú¿ô¤¬ 0 ¤Ç¤¹¡£1 ¤òÂå¤ï¤ê¤Ë»ÈÍѤ·¤Þ¤¹¡£" +msgstr "gensub: 第三引数㌠0 ã§ã™ã€‚1 を代ã‚ã‚Šã«ä½¿ç”¨ã—ã¾ã™" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" -msgstr "lshift: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "lshift: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" -msgstr "lshift: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "lshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "lshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "lshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:2872 +#: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "lshift(%lf, %lf): ¥·¥Õ¥ÈÃͤ¬Â礭²á¤®¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "lshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" -msgstr "rshift: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "rshift: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" -msgstr "rshift: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "rshift: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "rshift(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "rshift(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:2910 +#: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "rshift(%lf, %lf): ¥·¥Õ¥ÈÃͤ¬Â礭²á¤®¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "rshift(%lf, %lf): シフト値ãŒå¤§ãéŽãŽã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" -msgstr "and: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "and: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" -msgstr "and: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "and: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "and(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "and(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" -msgstr "or: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "or: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" -msgstr "or: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "or: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "or(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "or(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" -msgstr "xor: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "xor: éžæ•°å€¤ã®ç¬¬ä¸€å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" -msgstr "xor: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "xor: éžæ•°å€¤ã®ç¬¬äºŒå¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "xor(%lf, %lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "xor(%lf, %lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" -msgstr "compl: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£" +msgstr "compl: éžæ•°å€¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã¾ã—ãŸ" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "compl(%lf): è² ã®æ•°å€¤ã‚’使用ã™ã‚‹ã¨ç•°å¸¸ãªçµæžœã«ãªã‚Šã¾ã™" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£" +msgstr "compl(%lf): å°æ•°ç‚¹ä»¥ä¸‹ã¯åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œã¾ã™" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' ¤ÏÉÔÀµ¤Ê¥í¥«¡¼¥ë¡¦¥«¥Æ¥´¥ê¡¼¤Ç¤¹¡£" +msgstr "dcgettext: `%s' ã¯ç„¡åŠ¹ãªãƒ­ã‚±ãƒ¼ãƒ«åŒºåˆ†ã§ã™" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" -msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str ¤¬¥Ð¥Ã¥Õ¥¡ÍÆÎ̤òĶ²á¤·¤Þ¤·¤¿¡£" +msgstr "ä¸æ˜ŽãªãƒŽãƒ¼ãƒ‰åž‹ %d ã§ã™" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:423 eval.c:437 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgid "unknown opcode %d" +msgstr "ä¸æ˜Žãªã‚ªãƒšã‚³ãƒ¼ãƒ‰ %d ã§ã™" -#: eval.c:802 +#: eval.c:434 #, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"for ¥ë¡¼¥×: ¥ë¡¼¥×Ãæ¤ËÇÛÎó `%s' ¤Î¥µ¥¤¥º¤¬ %ld ¤«¤é %ld ¤ËÊѤï¤ê¤Þ¤·¤¿¡£" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `break' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `break' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgid "opcode %s not an operator or keyword" +msgstr "オペコード %s ã¯æ¼”ç®—å­ã¾ãŸã¯äºˆç´„語ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `continue' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£" +#: eval.c:488 +msgid "buffer overflow in genflags2str" +msgstr "genflags2str 内ã§ãƒãƒƒãƒ•ã‚¡ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ" -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `continue' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£" +#: eval.c:698 +#, c-format +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# 呼出関数スタック:\n" +"\n" -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' 㯠gawk æ‹¡å¼µã§ã™" -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' 㯠gawk æ‹¡å¼µã§ã™" -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE 値 `%s' ã¯ç„¡åŠ¹ã§ã™ã€‚代ã‚ã‚Šã« 3 を使用ã—ã¾ã™" -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "誤ã£ãŸ `%sFMT' 指定 `%s' ã§ã™" -#: eval.c:952 -msgid "statement has no effect" -msgstr "Ì¿Îáʸ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "`LINT' ã¸ã®ä»£å…¥ã«å¾“ã„ `--lint' を無効ã«ã—ã¾ã™" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" -msgstr "´Ø¿ô̾ `%s' ¤ÏÊÑ¿ô¤äÇÛÎó¤Ë¤Ï»È¤¨¤Þ¤»¤ó¡£" +msgstr "関数å `%s' ã¯å¤‰æ•°ã¾ãŸã¯é…列ã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" -msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤°ú¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„引数 `%s' ã¸ã®å‚ç…§ã§ã™" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "éžæ•°å€¤ã‚’使用ã—ãŸãƒ•ã‚¤ãƒ¼ãƒ«ãƒ‰å‚ç…§ã®è©¦ã¿ã§ã™" -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenation¡Êʸ»úÎóÏ¢·ë¡Ë: °ìÊý¤Î¼°¤ÎÉûºîÍѤǡ¢¤â¤¦°ìÊý¤ÎŤµ¤¬ÊѤï¤ê¤Þ¤·" -"¤¿!" +#: eval.c:1179 +msgid "attempt to field reference from null string" +msgstr "NULL 文字列を使用ã—ã¦ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®å‚照を試ã¿ã¦ã„ã¾ã™" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "¾ò·ïʸÃæ¤Ç¤ÎÂåÆþ" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "フィールド %ld ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã®è©¦ã¿ã§ã™" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„フィールド `$%ld' ã¸ã®å‚ç…§ã§ã™" -#: eval.c:1409 profile.c:661 +#: eval.c:1256 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tree_eval ¤ÎÃæ¤ËÉÔÀµ¤Ê¥¿¥¤¥× (%s) ¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgid "function `%s' called with more arguments than declared" +msgstr "宣言ã•ã‚Œã¦ã„る数より多ã„引数を使ã£ã¦é–¢æ•° `%s' を呼ã³å‡ºã—ã¾ã—ãŸ" -#: eval.c:1572 +#: eval.c:1437 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: 予期ã—ãªã„åž‹ `%s' ã§ã™" + +#: eval.c:1532 msgid "division by zero attempted in `/='" -msgstr "`/=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" +msgstr "`/=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚ã‚Œã¾ã—ãŸ" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" -msgstr "`%%=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£" +msgstr "`%%=' 内ã§ã‚¼ãƒ­ã«ã‚ˆã‚‹é™¤ç®—ãŒè¡Œã‚ã‚Œã¾ã—ãŸ" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "Àë¸À¤µ¤ì¤Æ¤¤¤ë¿ô¤è¤ê¿¤¤°ú¿ô¤ò»È¤Ã¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "スカラーコンテキスト内ã§é…列 `%s[\"%.*s\"]' ã®ä½¿ç”¨ã®è©¦ã¿ã§ã™" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "´Ø¿ô `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "æ¡ä»¶ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§ä»£å…¥ãŒä½¿ç”¨ã•ã‚Œã¾ã—ãŸ" -#: eval.c:1983 +#: eval.c:1911 +msgid "statement has no effect" +msgstr "æ–‡ã«åŠ¹æžœãŒã‚ã‚Šã¾ã›ã‚“" + +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# ¸Æ½Ð´Ø¿ô¥¹¥¿¥Ã¥¯:\n" -"\n" +"for ループ: ループ実行中ã«é…列 `%s' ã®ã‚µã‚¤ã‚ºãŒ %ld ã‹ã‚‰ %ld ã¸å¤‰æ›´ã•ã‚Œã¾ã—ãŸ" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- ¥á¥¤¥ó --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "¿ôÃͰʳ°¤ÎÃͤò»È¤Ã¤Æ¥Õ¥¤¡¼¥ë¥É¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +msgid "function called indirectly through `%s' does not exist" +msgstr "`%s' を通ã—ã¦é–“接的ã«å‘¼ã³å‡ºã•ã‚ŒãŸé–¢æ•°ãŒå­˜åœ¨ã—ã¾ã›ã‚“" -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "¶õÎó¤ò»È¤Ã¤Æ»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "関数 `%s' ã¯å®šç¾©ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "¥Õ¥£¡¼¥ë¥É %d ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£" +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "`%s' ルールã®å†…å´ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã•ã‚Œã¦ã„ãªã„ `getline' ã¯ç„¡åŠ¹ã§ã™" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "Áȹþ´Ø¿ô¤ÎÌá¤êÃͤËÂåÆþ¤Ï¤Ç¤­¤Þ¤»¤ó¡£" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "入力ファイル `%s' を読ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "`nextfile' 㯠`%s' ルールã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +#: eval.c:2661 +#, fuzzy +msgid "`exit' cannot be called in the current context" +msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" +msgid "`next' cannot be called from a `%s' rule" +msgstr "`next' 㯠`%s' ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "`%sFMT' ¤Î»ØÄê `%s' ¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹¡£" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "申ã—訳ã‚ã‚Šã¾ã›ã‚“㌠`%s' ã‚’ã©ã®ã‚ˆã†ã«è§£é‡ˆã™ã‚‹ã‹åˆ†ã‹ã‚Šã¾ã›ã‚“" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`LINT' ¤Ø¤ÎÂåÆþ¤Ë½¾¤¤ `--lint' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "サンドボックスモード内ã§ã¯æ‹¡å¼µã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" -msgstr "`extension' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "`extension' 㯠gawk æ‹¡å¼µã§ã™" + +#: ext.c:75 +#, c-format +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "致命的: extension: `%s' ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ (%s)\n" -#: ext.c:77 +#: ext.c:84 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"致命的: extension: ライブラリ `%s': `plugin_is_GPL_compatible' ãŒå®šç¾©ã•ã‚Œã¦ã„" +"ã¾ã›ã‚“ (%s)\n" -#: ext.c:85 +#: ext.c:93 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: ¥é¥¤¥Ö¥é¥ê `%s': ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó (%s)¡£\n" +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"致命的: extension: ライブラリ `%s': 関数 `%s' を呼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ " +"(%s)\n" -#: ext.c:105 +#: ext.c:127 msgid "extension: missing function name" -msgstr "extension: ´Ø¿ô̾¤¬¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "extension: 関数åãŒã‚ã‚Šã¾ã›ã‚“" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: ´Ø¿ô̾ `%2$s' ¤ÎÃæ¤ËÉÔÀµ¤Êʸ»ú `%1$c' ¤¬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "extension: 関数å `%2$s' ã®ä¸­ã§ä¸æ­£ãªæ–‡å­— `%1$c' ãŒä½¿ç”¨ã•ã‚Œã¦ã„ã¾ã™" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" -msgstr "extension: ´Ø¿ô `%s' ¤òºÆÄêµÁ¤Ç¤­¤Þ¤»¤ó¡£" +msgstr "extension: 関数 `%s' ã‚’å†å®šç¾©ã§ãã¾ã›ã‚“" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" -msgstr "extension: ´Ø¿ô `%s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "extension: 関数 `%s' ã¯æ—¢ã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: 関数å `%s' ã¯å‰ã«å®šç¾©ã•ã‚Œã¦ã„ã¾ã™" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "extension: ÁȤ߹þ¤ß´Ø¿ô `%s' ¤Ï´Ø¿ô̾¤Ë»È¤¨¤Þ¤»¤ó¡£" +msgstr "extension: gawk ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ `%s' ã¯é–¢æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: ´Ø¿ô̾ `%s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: 関数 `%s' ã®å¼•æ•°ã®æ•°ãŒè² ã§ã™" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "´Ø¿ô `%s' ¤Ë»È¤¨¤ë°ú¿ô¤Î¿ô¤Ï `%d' °Ê²¼¤ÈÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "関数 `%s' ã«ä½¿ãˆã‚‹å¼•æ•°ã®æ•°ã¯ `%d' 以下ã¨å®šç¾©ã•ã‚Œã¦ã„ã¾ã™" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" -msgstr "´Ø¿ô `%s': °ú¿ô #%d ¤¬¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "関数 `%s': 引数 #%d ãŒã‚ã‚Šã¾ã›ã‚“" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "´Ø¿ô `%s': °ú¿ô #%d: ¥¹¥«¥é¡¼¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgstr "関数 `%s': 引数 #%d: スカラーをé…列ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "´Ø¿ô `%s': °ú¿ô #%d: ÇÛÎó¤ò¥¹¥«¥é¡¼¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +msgstr "関数 `%s': 引数 #%d: é…列をスカラーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹è©¦ã¿ã§ã™" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" -msgstr "¤³¤ÎÁàºî¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "ã“ã®æ“作ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" -msgstr "NF ¤¬Éé¤ÎÃͤǤ¹¡£" +msgstr "NF ãŒè² ã®å€¤ã«è¨­å®šã•ã‚Œã¦ã„ã¾ã™" + +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: 第四引数㯠gawk æ‹¡å¼µã§ã™" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: 第四引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: field.c:875 +#: field.c:969 msgid "split: second argument is not an array" -msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "split: 第二引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "split: 第二引数ã¨ç¬¬å››å¼•æ•°ã«åŒã˜é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "split: 第四引数ã«ç¬¬äºŒå¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "split: 第二引数ã«ç¬¬å››å¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" -#: field.c:909 +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" -msgstr "split: Âè»°°ú¿ô¤Ë¶õÎó¤ò»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "split: 第三引数㫠NULL 文字列を使用ã™ã‚‹ã“ã¨ã¯ gawk æ‹¡å¼µã§ã™" + +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: 第四引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: 第二引数ãŒé…列ã§ã¯ã‚ã‚Šã¾ã›ã‚“" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: 第三引数ã¯éž NULL ã§ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "patsplit: 第二引数ã¨ç¬¬å››å¼•æ•°ã«åŒã˜é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "patsplit: 第四引数ã«ç¬¬äºŒå¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" -#: field.c:961 +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "patsplit: 第二引数ã«ç¬¬å››å¼•æ•°ã®éƒ¨åˆ†é…列を使用ã™ã‚‹ã“ã¨ã¯å‡ºæ¥ã¾ã›ã‚“" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "`FIELDWIDTHS' 㯠gawk æ‹¡å¼µã§ã™" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "`%s' ÉÕ¶á¤Î FIELDWIDTHS Ãͤ¬ÉÔÀµ¤Ç¤¹¡£" +msgstr "`%s' 付近㮠FIELDWIDTHS 値ãŒç„¡åŠ¹ã§ã™" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" -msgstr "`FS' ¤Ë¶õÎó¤ò»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "`FS' ã« NULL 文字列を使用ã™ã‚‹ã®ã¯ gawk æ‹¡å¼µã§ã™" -#: field.c:1092 -#, fuzzy +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" -msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk 㯠`FS' ã®å€¤ã¨ã—ã¦æ­£è¦è¡¨ç¾ã‚’サãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤ÏÛ£Ëæ¤Ç¤¹¡£\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "`FPAT' 㯠gawk æ‹¡å¼µã§ã™" -#: getopt.c:623 getopt.c:627 +#: getopt.c:604 getopt.c:633 #, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: オプション '%s' ã¯æ›–昧ã§ã™\n" + +#: getopt.c:679 getopt.c:683 +#, c-format msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `--%s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n" +msgstr "%s: オプション '--%s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n" -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format +#: getopt.c:692 getopt.c:697 +#, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `%c%s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n" +msgstr "%s: オプション '%c%s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n" -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format +#: getopt.c:740 getopt.c:759 +#, c-format msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹¡£\n" +msgstr "%s: オプション '--%s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n" -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format +#: getopt.c:797 getopt.c:800 +#, c-format msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó `--%s'\n" +msgstr "%s: オプション '--%s' ã‚’èªè­˜ã§ãã¾ã›ã‚“\n" -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format +#: getopt.c:808 getopt.c:811 +#, c-format msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó `%c%s'\n" +msgstr "%s: オプション '%c%s' ã‚’èªè­˜ã§ãã¾ã›ã‚“\n" -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format +#: getopt.c:860 getopt.c:863 +#, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: ̵¸ú¤Ê¥ª¥×¥·¥ç¥ó -- %c\n" +msgstr "%s: 無効ãªã‚ªãƒ—ション -- '%c'\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 +#, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: °ú¿ô¤¬É¬Íפʥª¥×¥·¥ç¥ó -- %c\n" +msgstr "%s: オプションã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™ -- '%c'\n" -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format +#: getopt.c:989 getopt.c:1005 +#, c-format msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤ÏÛ£Ëæ¤Ç¤¹¡£\n" +msgstr "%s: オプション '-W %s' ã¯æ›–昧ã§ã™\n" -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format +#: getopt.c:1029 getopt.c:1047 +#, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n" +msgstr "%s: オプション '-W %s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n" -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format +#: getopt.c:1068 getopt.c:1086 +#, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹¡£\n" +msgstr "%s: オプション '-W %s' ã«ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n" + +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "コマンドライン引数 `%s' ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã™: スキップã•ã‚Œã¾ã—ãŸ" -#: io.c:322 io.c:352 +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" -msgstr "¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤à¤¿¤á¤Ë³«¤±¤Þ¤»¤ó (%s)¡£" +msgstr "ファイル `%s' を読ã¿è¾¼ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" -msgstr "fd %d (`%s') ¤òÊĤ¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "fd %d (`%s') ã‚’é–‰ã˜ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "redirect() ¤ÎÃæ¤ÇÉÔÀµ¤Ê¥Ä¥ê¡¼¥¿¥¤¥× %s ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "サンドボックスモード内ã§ã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" -msgstr "`%s' ¥ê¥À¥¤¥ì¥¯¥È¤ÎÌ¿Îá¼°¤Ë¿ôÃͤ·¤«µ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "`%s' リダイレクトã®å‘½ä»¤å¼ã«æ•°å€¤ã—ã‹è¨˜è¿°ã•ã‚Œã¦ã„ã¾ã›ã‚“。" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" -msgstr "`%s' ¥ê¥À¥¤¥ì¥¯¥È¤ÎÌ¿Îá¼°¤¬¶õÎó¤Ç¤¹¡£" +msgstr "`%s' リダイレクトã®å‘½ä»¤å¼ãŒç©ºåˆ—ã§ã™ã€‚" -#: io.c:600 +#: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" -"`%2$s' ¥ê¥À¥¤¥ì¥¯¥È¤ËÏÀÍý±é»»¤Î·ë²Ì¤È»×¤ï¤ì¤ë¥Õ¥¡¥¤¥ë̾ `%1$s' ¤¬»È¤ï¤ì¤Æ¤¤¤Þ" -"¤¹¡£" +"`%2$s' リダイレクトã«è«–ç†æ¼”ç®—ã®çµæžœã¨æ€ã‚れるファイルå `%1$s' ãŒä½¿ã‚ã‚Œã¦ã„ã¾" +"ã™ã€‚" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "¥Õ¥¡¥¤¥ë `%.*s' ¤ÇɬÍװʾå¤Ë `>' ¤È `>>' ¤òÁȹ礻¤Æ¤¤¤Þ¤¹¡£" +msgstr "ファイル `%.*s' ã§å¿…è¦ä»¥ä¸Šã« `>' 㨠`>>' を組åˆã›ã¦ã„ã¾ã™ã€‚" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" -msgstr "½ÐÎÏÍѤ˥ѥ¤¥× `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£" +msgstr "出力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" -msgstr "ÆþÎÏÍѤ˥ѥ¤¥× `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£" +msgstr "入力用ã«ãƒ‘イプ `%s' ã‚’é–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:717 +#: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥Ñ¥¤¥× `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£" +msgstr "入出力用ã®åŒæ–¹å‘パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" -msgstr "`%s' ¤«¤é¥ê¥À¥¤¥ì¥¯¥È¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "`%s' ã‹ã‚‰ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" -msgstr "`%s' ¤Ë¥ê¥À¥¤¥ì¥¯¥È¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "`%s' ã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã§ãã¾ã›ã‚“ (%s)" -#: io.c:851 +#: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" -"³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Î¿ô¤¬¥·¥¹¥Æ¥àÀ©¸Â¤Ë㤷¤Þ¤·¤¿¡£¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤ò¿½Å²½¤·¤Þ" -"¤¹¡£" +"é–‹ã„ã¦ã„るファイルã®æ•°ãŒã‚·ã‚¹ãƒ†ãƒ åˆ¶é™ã«é”ã—ã¾ã—ãŸã€‚ファイル記述å­ã‚’多é‡åŒ–ã—ã¾" +"ã™ã€‚" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." -msgstr "`%s' ¤¬ÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" +msgstr "`%s' ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" -msgstr "³«¤¤¤Æ¤¤¤ë¥Ñ¥¤¥×¤Þ¤¿¤ÏÆþÎÏ¥Õ¥¡¥¤¥ë¤Î¿ô¤¬Â¿²á¤®¤Þ¤¹¡£" +msgstr "é–‹ã„ã¦ã„るパイプã¾ãŸã¯å…¥åŠ›ãƒ•ã‚¡ã‚¤ãƒ«ã®æ•°ãŒå¤šéŽãŽã¾ã™ã€‚" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" -msgstr "close: ÂèÆó°ú¿ô¤Ë»ÈÍѤǤ­¤ë¤Î¤Ï `to' ¤Þ¤¿¤Ï `from' ¤Ç¤¹¡£" +msgstr "close: 第二引数㯠`to' ã¾ãŸã¯ `from' ã§ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“" -#: io.c:912 +#: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "" -"close: `%.*s' ¤Ï¥Õ¥¡¥¤¥ë¡¢¥Ñ¥¤¥×¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Î¤¤¤º¤ì¤Ç¤â¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "close: `%.*s' ã¯é–‹ã„ã¦ã„るファイルã€ãƒ‘イプã€ãƒ—ロセス共有ã§ã¯ã‚ã‚Šã¾ã›ã‚“" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" -msgstr "³«¤¤¤Æ¤Ê¤¤¥ê¥À¥¤¥ì¥¯¥È¤òÊĤ¸¤è¤¦¤È¤·¤Æ¤¤¤Þ¤¹¡£" +msgstr "é–‹ã„ã¦ãªã„リダイレクトを閉ã˜ã‚ˆã†ã¨ã—ã¦ã„ã¾ã™" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -"close: ¥ê¥À¥¤¥ì¥¯¥È `%s' ¤Ï `|&' ¤ò»È¤Ã¤Æ¤¤¤Þ¤»¤ó¡£ÂèÆó°ú¿ô¤Ï̵»ë¤·¤Þ¤¹¡£" +"close: リダイレクト `%s' 㯠`|&' を使用ã—ã¦é–‹ã‹ã‚Œã¦ã„ã¾ã›ã‚“。第二引数ã¯ç„¡è¦–ã•" +"ã‚Œã¾ã—ãŸ" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "¥Ñ¥¤¥× `%2$s' ¤òÊĤ¸¤¿¤È¤­¤Î¾õÂÖ¥³¡¼¥É¤¬¼ºÇÔ (%1$d) ¤Ç¤·¤¿ (%3$s)¡£" +msgstr "パイプ `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "¥Õ¥¡¥¤¥ë `%2$s' ¤òÊĤ¸¤¿¤È¤­¤Î¾õÂÖ¥³¡¼¥É¤¬¼ºÇÔ (%1$d) ¤Ç¤·¤¿ (%3$s)¡£" +msgstr "ファイル `%2$s' ã‚’é–‰ã˜ãŸã¨ãã®çŠ¶æ…‹ã‚³ãƒ¼ãƒ‰ãŒå¤±æ•— (%1$d) ã§ã—㟠(%3$s)。" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" -msgstr "¥½¥±¥Ã¥È `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "ソケット `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" -msgstr "ÊÂ¹Ô¥×¥í¥»¥¹ `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "並行プロセス `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" -msgstr "¥Ñ¥¤¥× `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "パイプ `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" -msgstr "¥Õ¥¡¥¤¥ë `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "ファイル `%s' を明示ã—ã¦é–‰ã˜ã¦ã„ã¾ã›ã‚“。" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" -msgstr "ɸ½à½ÐÎϤؤνñ¹þ¤ß¥¨¥é¡¼ (%s)" +msgstr "標準出力ã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" -msgstr "ɸ½à¥¨¥é¡¼¤Ø¤Î½ñ¹þ¤ß¥¨¥é¡¼ (%s)" +msgstr "標準エラーã¸ã®æ›¸è¾¼ã¿ã‚¨ãƒ©ãƒ¼ (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." -msgstr "¥Ñ¥¤¥× `%s' ¤ò¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "パイプ `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。" -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "`%s' ¤ØÀܳ¤¹¤ë¥Ñ¥¤¥×¤òÊÂ¹Ô¥×¥í¥»¥¹¤«¤é¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "`%s' ã¸æŽ¥ç¶šã™ã‚‹ãƒ‘イプを並行プロセスã‹ã‚‰ãƒ•ãƒ©ãƒƒã‚·ãƒ¥ã§ãã¾ã›ã‚“ (%s)。" -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." -msgstr "¥Õ¥¡¥¤¥ë `%s' ¤ò¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "ファイル `%s' をフラッシュã§ãã¾ã›ã‚“ (%s)。" -#: io.c:1222 -#, fuzzy, c-format +#: io.c:1262 +#, c-format msgid "local port %s invalid in `/inet'" -msgstr "`%s' ¤Î¥í¡¼¥«¥ë¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£" +msgstr "`/inet' 内ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒãƒ¼ãƒˆ %s ãŒç„¡åŠ¹ã§ã™" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "»ÄÇ°¤Ê¤¬¤é¡¢/inet/raw ¥¯¥é¥¤¥¢¥ó¥È¤Î½àÈ÷¤¬¤Ç¤­¤Æ¤¤¤Þ¤»¤ó¡£" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "`/inet/raw' ¤Ï root ¥æ¡¼¥¶¡¼¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "»ÄÇ°¤Ê¤¬¤é¡¢/inet/raw ¥µ¡¼¥Ð¡¼¤Î½àÈ÷¤¬¤Ç¤­¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "リモートã®ãƒ›ã‚¹ãƒˆãŠã‚ˆã³ãƒãƒ¼ãƒˆæƒ…å ± (%s, %s) ãŒç„¡åŠ¹ã§ã™" -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" -"¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë̾ `%s' ¤Ë¡Êǧ¼±¤Ç¤­¤ë¡Ë¥×¥í¥È¥³¥ë¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +"スペシャルファイルå `%s' ã«ï¼ˆèªè­˜ã§ãる)プロトコルãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" -msgstr "¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë̾ `%s' ¤ÏÉÔ´°Á´¤Ç¤¹¡£" +msgstr "スペシャルファイルå `%s' ã¯ä¸å®Œå…¨ã§ã™" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" -msgstr "`/inet' ¤Ë¤Ï¥ê¥â¡¼¥È¥Û¥¹¥È̾¤¬É¬ÍפǤ¹¡£" +msgstr "`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ›ã‚¹ãƒˆåを与ãˆãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" -msgstr "`/inet' ¤Ë¤Ï¥ê¥â¡¼¥È¥Ý¡¼¥ÈÈֹ椬ɬÍפǤ¹¡£" +msgstr "`/inet' ã«ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒãƒ¼ãƒˆç•ªå·ã‚’与ãˆãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" -msgstr "TCP/IP Àܳ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "¥Õ¥¡¥¤¥ë `%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£" +msgstr "TCP/IP 通信ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "`%2$s' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[\"%1$s\"]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "`/dev/user' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[...]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" -msgstr "`%s' (¥â¡¼¥É `%s') ¤ò³«¤±¤Þ¤»¤ó¡£" +msgstr "`%s' をモード `%s' ã§é–‹ã‘ã¾ã›ã‚“" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" -msgstr "¥Þ¥¹¥¿¡¼ pty ¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" +msgstr "マスター pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" -msgstr "»Ò¥×¥í¥»¥¹¤¬É¸½à½ÐÎϤòÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" +msgstr "å­ãƒ—ロセスãŒæ¨™æº–出力を閉ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:1928 +#: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "»Ò¥×¥í¥»¥¹¤¬¥¹¥ì¡¼¥Ö pty ¤òɸ½à½ÐÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" +msgstr "å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" -msgstr "»Ò¥×¥í¥»¥¹¤¬É¸½àÆþÎϤòÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" +msgstr "å­ãƒ—ロセスãŒæ¨™æº–入力を閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。" -#: io.c:1933 +#: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "»Ò¥×¥í¥»¥¹¤¬¥¹¥ì¡¼¥Ö pty ¤òɸ½àÆþÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" +msgstr "å­ãƒ—ロセスãŒã‚¹ãƒ¬ãƒ¼ãƒ– pty を標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" -msgstr "¥¹¥ì¡¼¥Ö pty ¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" +msgstr "スレーブ pty ã‚’é–‰ã˜ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—㟠(%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "»Ò¥×¥í¥»¥¹¤¬¥Ñ¥¤¥×¤òɸ½à½ÐÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" +msgstr "å­ãƒ—ロセスãŒãƒ‘イプを標準出力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "»Ò¥×¥í¥»¥¹¤¬¥Ñ¥¤¥×¤òɸ½àÆþÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£" +msgstr "å­ãƒ—ロセスãŒãƒ‘イプを標準入力ã«ç§»å‹•ã§ãã¾ã›ã‚“ (dup: %s)。" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" -msgstr "¿Æ¥×¥í¥»¥¹¤¬É¸½à½ÐÎϤòÉüµì¤Ç¤­¤Þ¤»¤ó¡£\n" +msgstr "親プロセスãŒæ¨™æº–出力を復旧ã§ãã¾ã›ã‚“。\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" -msgstr "¿Æ¥×¥í¥»¥¹¤¬É¸½àÆþÎϤòÉüµì¤Ç¤­¤Þ¤»¤ó¡£\n" +msgstr "親プロセスãŒæ¨™æº–入力を復旧ã§ãã¾ã›ã‚“。\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" -msgstr "¥Ñ¥¤¥×¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£" +msgstr "パイプを閉ã˜ã‚‰ã‚Œã¾ã›ã‚“ (%s)。" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" -msgstr "`|&' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£" +msgstr "`|&' ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" -msgstr "¥Ñ¥¤¥× `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£" +msgstr "パイプ `%s' ãŒé–‹ã‘ã¾ã›ã‚“ (%s)。" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" -msgstr "`%s' ÍÑ¤Î»Ò¥×¥í¥»¥¹¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó (fork: %s)¡£" +msgstr "`%s' 用ã®å­ãƒ—ロセスを実行ã§ãã¾ã›ã‚“ (fork: %s)。" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" -msgstr "¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë `%s' ¤Ï¶õ¤Ç¤¹¡£" +msgstr "データファイル `%s' ã¯ç©ºã§ã™ã€‚" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" -msgstr "ÆþÎÏÍÑ¥á¥â¥ê¡¼¤ò¤³¤ì°Ê¾å³ÎÊݤǤ­¤Þ¤»¤ó¡£" +msgstr "入力用メモリーをã“れ以上確ä¿ã§ãã¾ã›ã‚“。" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿: %s¡£" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" -msgstr "Ê£¿ô¤Îʸ»ú¤ò `RS' ¤Ë»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£" +msgstr "複数ã®æ–‡å­—ã‚’ `RS' ã«ä½¿ç”¨ã™ã‚‹ã®ã¯ gawk 特有ã®æ‹¡å¼µã§ã™ã€‚" -#: main.c:306 -msgid "out of memory" -msgstr "" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "IPv6 通信ã¯ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" -msgstr "gawk ¤Ç¤Ï¥ª¥×¥·¥ç¥ó `-m[fr]' ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "gawk ã§ã¯ã‚ªãƒ—ション `-m[fr]' ã«åŠ¹æžœã¯ã‚ã‚Šã¾ã›ã‚“。" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m ¥ª¥×¥·¥ç¥ó¤Î»ÈÍÑË¡: `-m[fr] ¿ôÃÍ'" +msgstr "-m オプションã®ä½¿ç”¨æ³•: `-m[fr] 数値'" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "`-e/--source' ã¸ã®ç©ºã®å¼•æ•°ã¯ç„¡è¦–ã•ã‚Œã¾ã—ãŸ" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤Ïǧ¼±¤Ç¤­¤Þ¤»¤ó¡£Ìµ»ë¤·¤Þ¤¹¡£\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "¶õ°ú¿ô¤Î `--source' ¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£" +msgstr "%s: オプション `-W %s' ã¯èªè­˜ã§ãã¾ã›ã‚“。無視ã•ã‚Œã¾ã—ãŸ\n" -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" -msgstr "%s: °ú¿ô¤¬É¬Íפʥª¥×¥·¥ç¥ó -- %c\n" +msgstr "%s: 引数ãŒå¿…è¦ãªã‚ªãƒ—ション -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" -"´Ä¶­ÊÑ¿ô `POSIXLY_CORRECT' ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£¥ª¥×¥·¥ç¥ó `--posix' ¤òÍ­¸ú¤Ë" -"¤·¤Þ¤¹¡£" +"環境変数 `POSIXLY_CORRECT' ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã™ã€‚オプション `--posix' を有効ã«" +"ã—ã¾ã™" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" -msgstr "¥ª¥×¥·¥ç¥ó `--posix' ¤Ï `--traditional' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£" +msgstr "オプション `--posix' 㯠`--traditional' を無効ã«ã—ã¾ã™ã€‚" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" -"¥ª¥×¥·¥ç¥ó `--posix'/`--traditional' ¤Ï `--non-decimal-data' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£" +"オプション `--posix'/`--traditional' 㯠`--non-decimal-data' を無効ã«ã—ã¾ã™ã€‚" -#: main.c:530 +#: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" -"setuid root ¤Ç %s ¤ò¼Â¹Ô¤¹¤ë¤È¡¢¥»¥­¥å¥ê¥Æ¥£¾å¤ÎÌäÂ꤬ȯÀ¸¤¹¤ë¾ì¹ç¤¬¤¢¤ê¤Þ" -"¤¹¡£" +"setuid root 㧠%s を実行ã™ã‚‹ã¨ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å•é¡ŒãŒç™ºç”Ÿã™ã‚‹å ´åˆãŒã‚ã‚Šã¾" +"ã™ã€‚" + +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "`--posix' 㯠`--binary' を上書ãã—ã¾ã™" -#: main.c:571 +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" -msgstr "ɸ½àÆþÎϤò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "標準入力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" -#: main.c:574 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" -msgstr "ɸ½à½ÐÎϤò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "標準出力をãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" -#: main.c:576 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" -msgstr "ɸ½à¥¨¥é¡¼¤ò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£" +msgstr "標準エラーをãƒã‚¤ãƒŠãƒªãƒ¢ãƒ¼ãƒ‰ã«è¨­å®šã§ãã¾ã›ã‚“ (%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" -msgstr "¥×¥í¥°¥é¥àʸ¤¬Á´¤¯¤¢¤ê¤Þ¤»¤ó!" +msgstr "プログラム文ãŒå…¨ãã‚ã‚Šã¾ã›ã‚“!" -#: main.c:721 +#: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" -"»È¤¤Êý: %s [POSIX ¤Þ¤¿¤Ï GNU ·Á¼°¥ª¥×¥·¥ç¥ó] -f ¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë [--] ÆþÎÏ" -"¥Õ¥¡¥¤¥ë ¡Ä\n" +"使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] -f progfile [--] file ...\n" -#: main.c:723 +#: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" -"»È¤¤Êý: %s [POSIX ¤Þ¤¿¤Ï GNU ·Á¼°¥ª¥×¥·¥ç¥ó] [--] %c¥×¥í¥°¥é¥à%c ÆþÎÏ¥Õ¥¡¥¤" -"¥ë ¡Ä\n" +"使用法: %s [POSIX ã¾ãŸã¯ GNU å½¢å¼ã®ã‚ªãƒ—ション] [--] %cprogram%c file ...\n" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX ¥ª¥×¥·¥ç¥ó:\t\tGNU Ĺ·Á¼°¥ª¥×¥·¥ç¥ó\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "POSIX オプション:\t\tGNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (標準)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f ¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë\t\t--file=¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë\n" +msgstr "\t-f progfile\t\t--file=progfile\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "" -"\t-F ¥Õ¥£¡¼¥ë¥É¥»¥Ñ¥ì¡¼¥¿\t\t\t--field-separator=¥Õ¥£¡¼¥ë¥É¥»¥Ñ¥ì¡¼¥¿\n" +msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v ÊÑ¿ô=ÂåÆþÃÍ\t\t--assign=ÊÑ¿ô=ÂåÆþÃÍ\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] ¿ôÃÍ\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=¥Õ¥¡¥¤¥ë]\t--dump-variables[=¥Õ¥¡¥¤¥ë]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=¥Õ¥¡¥¤¥ë\t\t--exec=¥Õ¥¡¥¤¥ë\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" +msgstr "\t-v var=val\t\t--assign=var=val\n" #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "短ã„オプション:\t\tGNU é•·ã„å½¢å¼ã®ã‚ªãƒ—ション: (æ‹¡å¼µ)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[file]\t\t--dump-variables[=file]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=¥Õ¥¡¥¤¥ë]\t--profile[=¥Õ¥¡¥¤¥ë]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'program-text'\t--source='program-text'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E file\t\t\t--exec=file\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=¥×¥í¥°¥é¥àʸ\t--source=¥×¥í¥°¥é¥àʸ\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[file]\t\t--profile[=file]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R file\t\t\t--command=file\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1649,33 +1803,35 @@ "\n" msgstr "" "\n" -"¥Ð¥°¤òÊó¹ð¤¹¤ë¤Ë¤Ï¡¢`gawk.info¡Ê±Ñʸ¡Ë' ¤Î `Bugs' ¥Î¡¼¥É¤ò\n" -"»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ °õºþ¤µ¤ì¤¿¥Þ¥Ë¥å¥¢¥ë¤ÇÂбþ¤¹¤ë¥»¥¯¥·¥ç¥ó\n" -"¤Ï¡¢`Reporting Problems and Bugs' ¤Ç¤¹¡£\n" +"ãƒã‚°ã‚’報告ã™ã‚‹ã«ã¯ã€`gawk.info(英文)' ã® `Bugs' ノードを\n" +"å‚ç…§ã—ã¦ãã ã•ã„。 å°åˆ·ã•ã‚ŒãŸãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§å¯¾å¿œã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³\n" +"ã¯ã€`Reporting Problems and Bugs' ã§ã™ã€‚\n" "\n" +"翻訳ã«é–¢ã™ã‚‹ãƒã‚°ã¯ã«å ±å‘Šã—ã¦ãã ã•" +"ã„。\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -"gawk ¤Ï¡¢¥Ñ¥¿¡¼¥ó¤ò¸¡º÷¡¢¤½¤·¤Æ½èÍý¤¹¤ë¸À¸ì¤Ç¤¹¡£\n" -"¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤Ç¤Ï¡¢É¸½àÆþÎϤòÆɤ߹þ¤ß¡¢É¸½à½ÐÎϤ˽ñ¤­½Ð¤·¤Þ¤¹¡£\n" +"gawk ã¯ã€ãƒ‘ターンを検索をã—ã¦ã€ãれを処ç†ã™ã‚‹è¨€èªžã§ã™ã€‚\n" +"デフォルト設定ã§ã¯ã€æ¨™æº–入力を読ã¿è¾¼ã¿ã€æ¨™æº–出力ã«æ›¸ã出ã—ã¾ã™ã€‚\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -"»ÈÍÑÎã:\n" -"\tgawk '{ sum += $1 }; END { print sum }' ÆþÎÏ¥Õ¥¡¥¤¥ë\n" +"使用例:\n" +"\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 -#, fuzzy, c-format +#: main.c:807 +#, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" @@ -1687,12 +1843,13 @@ msgstr "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" -"ËÜ¥×¥í¥°¥é¥à¤Ï¥Õ¥ê¡¼¡¦¥½¥Õ¥È¥¦¥¨¥¢¤Ç¤¹¡£Free Software Foundation ¸øɽ¤Î\n" -"GNU General Public License¡Ê¥Ð¡¼¥¸¥ç¥ó£²¡¢¤Þ¤¿¤Ï¡¢¤³¤ì°Ê¸å¤Î¥Ð¡¼¥¸¥ç¥ó¡Ë\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 3 of the License, or\n" +"(at your option) any later version.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1700,283 +1857,277 @@ "GNU General Public License for more details.\n" "\n" msgstr "" -"ËÜ¥×¥í¥°¥é¥à¤Ï¡¢ÍøÍѲÁÃͤ¬¤¢¤ë¤³¤È¤ò´üÂÔ¤·¤ÆÇÛÉÛ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢\n" -"¤³¤ì¤Ï¡¢ÆÃÄêÌÜŪ¤Ë»ÈÍѲÄǽ¤Ç¤¢¤ë¤³¤È¡¢µÚ¤Ó¡¢¾¦ÍÑÌÜŪ¤Ë»ÈÍѤǤ­¤ë\n" -"¤³¤È¤ò°Å¼¨¤¹¤ë¤â¤Î¤Ç¤Ï¤Ê¤¯¡¢¤¤¤«¤Ê¤ëÊݾڤâ°ìÀÚ¤¢¤ê¤Þ¤»¤ó¡£\n" -"¾Ü¤·¤¯¤Ï¡¢GNU General Public License ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£\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" -#: main.c:813 -#, fuzzy +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" msgstr "" -"ËÜ¥×¥í¥°¥é¥à¤Ë¤Ï¡¢GNU General Public License ¤¬ÅºÉÕ¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£\n" -"¤â¤·¡¢ËÜ¥×¥í¥°¥é¥à¤È°ì½ï¤Ë GNU General Public License ¤òÆþ¼ê¤·¤Ê¤«¤Ã¤¿\n" -"¾ì¹ç¤Ë¤Ï¡¢\n" -"\tFree Software Foundation, Inc.,\n" -"\t59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" -"¤Ø½ñÌ̤ǤªÃΤ餻¤¯¤À¤µ¤¤¡£\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program. If not, see http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "POSIX »ÅÍͤΠawk ¤Ç¤Ï -Ft ¤Ç FS ¤ò¥¿¥Ö¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó¡£" +msgstr "POSIX awk ã§ã¯ -Ft 㯠FS をタブã«è¨­å®šã—ã¾ã›ã‚“" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "フィールド指定ã«ä¸æ˜Žãªå€¤ãŒã‚ã‚Šã¾ã™: %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" -"%s: ¥ª¥×¥·¥ç¥ó `-v' ¤Î°ú¿ô `%s' ¤¬ `ÊÑ¿ô=ÂåÆþÃÍ' ¤Î·Á¼°¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤»¤ó¡£\n" +"%s: オプション `-v' ã®å¼•æ•° `%s' ㌠`変数=代入値' ã®å½¢å¼ã«ãªã£ã¦ã„ã¾ã›ã‚“。\n" "\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" -msgstr "`%s' ¤ÏÉÔÀµ¤ÊÊÑ¿ô̾¤Ç¤¹¡£" +msgstr "`%s' ã¯ä¸æ­£ãªå¤‰æ•°åã§ã™" -#: main.c:1145 +#: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "`%s' ¤ÏÊÑ¿ô̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£`%s=%s' ¤Î¥Õ¥¡¥¤¥ë¤òõ¤·¤Þ¤¹¡£" +msgstr "`%s' ã¯å¤‰æ•°åã§ã¯ã‚ã‚Šã¾ã›ã‚“。`%s=%s' ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’探ã—ã¾ã™ã€‚" + +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "gawk ã«çµ„ã¿è¾¼ã¿ã® `%s' ã¯å¤‰æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "関数 `%s' ã¯å¤‰æ•°åã¨ã—ã¦ä½¿ç”¨å‡ºæ¥ã¾ã›ã‚“" -#: main.c:1184 +#: main.c:1262 msgid "floating point exception" -msgstr "ÉâÆ°¾®¿ôÅÀÎã³°" +msgstr "浮動å°æ•°ç‚¹ä¾‹å¤–" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" -msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼" +msgstr "致命的エラー: 内部エラー" -#: main.c:1206 -#, fuzzy +#: main.c:1284 msgid "fatal error: internal error: segfault" -msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼" +msgstr "致命的エラー: 内部エラー: セグメンテーションé•å" -#: main.c:1218 -#, fuzzy +#: main.c:1296 msgid "fatal error: internal error: stack overflow" -msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼" +msgstr "致命的エラー: 内部エラー: スタックオーãƒãƒ¼ãƒ•ãƒ­ãƒ¼" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" -msgstr "fd %d ¤¬»öÁ°¤Ë³«¤¤¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "fd %d ãŒäº‹å‰ã«é–‹ã„ã¦ã„ã¾ã›ã‚“。" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" -msgstr "»öÁ°¤Ë fd %d ÍÑ¤Ë /dev/null ¤ò³«¤±¤Þ¤»¤ó¡£" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "¥°¥ë¡¼¥×¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: %s" +msgstr "事å‰ã« fd %d 用㫠/dev/null ã‚’é–‹ã‘ã¾ã›ã‚“。" -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" -msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó:" - -#: msg.c:120 -msgid "warning: " -msgstr "·Ù¹ð: " +msgstr "コマンドライン:" -#: msg.c:142 +#: msg.c:107 msgid "error: " -msgstr "¥¨¥é¡¼: " +msgstr "エラー: " -#: msg.c:178 -msgid "fatal: " -msgstr "Ã×̿Ū: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "ʸ»úÎ󤫤éÉâÆ°¾®¿ô¤ËÊÑ´¹¤Ç¤­¤Þ¤»¤ó¡£" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" -msgstr "ʸ»úÎó¤Î½ª¤ê¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£" +msgstr "文字列ã®çµ‚ã‚Šã«ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒä½¿ã‚ã‚Œã¦ã„ã¾ã™ã€‚" -#: node.c:609 -#, fuzzy, c-format +#: node.c:517 +#, c-format msgid "old awk does not support the `\\%c' escape sequence" -msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£" +msgstr "å¤ã„ awk 㯠`\\%c' エスケープシーケンスをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX ¤Ï `\\x' ¥¨¥¹¥±¡¼¥×¤òµö²Ä¤·¤Þ¤»¤ó¡£" +msgstr "POSIX ã§ã¯ `\\x' エスケープã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" -msgstr "`\\x' ¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤Ë 16 ¿Ê¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£" +msgstr "`\\x' エスケープシーケンスã«å六進数ãŒã‚ã‚Šã¾ã›ã‚“" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" +"å六進エスケープ \\x%.*s (%d 文字) ã¯ãŠãらã予期ã—ãŸã‚ˆã†ã«ã¯è§£é‡ˆã•ã‚Œãªã„ã§" +"ã—ょã†" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹ `\\%c' ¤Ï `%c' ¤ÈƱÅù¤Ë°·¤ï¤ì¤Þ¤¹¡£" +msgstr "エスケープシーケンス `\\%c' 㯠`%c' ã¨åŒç­‰ã«æ‰±ã‚ã‚Œã¾ã™" -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': close-on-exec ¤òÀßÄê¤Ç¤­¤Þ¤»¤ó: (fcntl: %s)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"無効ãªãƒžãƒ«ãƒãƒã‚¤ãƒˆãƒ‡ãƒ¼ã‚¿ãŒæ¤œå‡ºã•ã‚Œã¾ã—ãŸã€‚データã¨ãƒ­ã‚±ãƒ¼ãƒ«ãŒä¸€è‡´ã—ã¦ã„ãªã„よ" +"ã†ã§ã™ã€‚" -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "`%s' ¤ò½ñ¹þ¤ßÍѤ˳«¤±¤Þ¤»¤ó¤Ç¤·¤¿: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "%s %s `%s': fd フラグをå–å¾—ã§ãã¾ã›ã‚“: (fcntl F_GETFD: %s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "ÆâÉô¥¨¥é¡¼: %s ¤Î vname ¤¬Ìµ¸ú¤Ç¤¹¡£" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# ÆâÉô¤Ç¤Ï `delete' ¤È¤·¤Æ°·¤ï¤ì¤Þ¤·¤¿¡£" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s `%s': close-on-exec を設定ã§ãã¾ã›ã‚“: (fcntl F_SETFD: %s)" -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# ¤³¤ì¤ÏưŪ¤Ë¥í¡¼¥É¤µ¤ì¤¿³ÈÄ¥µ¡Ç½¤Ç¤¹¡£" +msgid "could not open `%s' for writing: %s" +msgstr "`%s' を書込ã¿ç”¨ã«é–‹ã‘ã¾ã›ã‚“ã§ã—ãŸ: %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawk ¥×¥í¥Õ¥¡¥¤¥ë¡¢ºîÀ®Æü»þ %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "プロファイルを標準エラーã«é€ã£ã¦ã„ã¾ã™" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# BEGIN ¥Ö¥í¥Ã¥¯\n" +"\t# %s ブロック\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" -"\t# ¥ë¡¼¥ë\n" +"\t# ルール\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END ¥Ö¥í¥Ã¥¯\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "内部エラー: %s ã® vname ãŒç„¡åŠ¹ã§ã™ã€‚" + +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# gawk プロファイルã€ä½œæˆæ—¥æ™‚ %s\n" -#: profile.c:1143 +#: profile.c:1331 #, c-format msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" -"\t# ´Ø¿ô°ìÍ÷¡Ê¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¡Ë\n" +"\t# 関数一覧(アルファベット順)\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "prec_level Ãæ¤Î %s ¤ÏͽÁÛ³°¤Î¥¿¥¤¥×¤Ç¤¹¡£" +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: ä¸æ˜Žãªãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆåž‹ %d ã§ã™" -#: profile.c:1527 +#: re.c:573 #, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£" +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "`[%c-%c]' å½¢å¼ã®ç¯„囲ã¯ãƒ­ã‚±ãƒ¼ãƒ«ä¾å­˜ã§ã™" -#: regcomp.c:132 +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "æ­£è¦è¡¨ç¾ã®è¦ç´  `%.*s' ã¯ãŠãらã `[%.*s]' ã§ã‚ã‚‹ã¹ãã§ã™" + +#: regcomp.c:131 msgid "Success" -msgstr "À®¸ù" +msgstr "æˆåŠŸã§ã™" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" -msgstr "³ºÅö̵¤·" +msgstr "一致ã—ã¾ã›ã‚“" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" -msgstr "̵¸ú¤ÊÀµµ¬É½¸½" +msgstr "無効ãªæ­£è¦è¡¨ç¾ã§ã™" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" -msgstr "̵¸ú¤Ê¾È¹çʸ»ú" +msgstr "無効ãªç…§åˆæ–‡å­—ã§ã™" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" -msgstr "̵¸ú¤Êʸ»ú¥¯¥é¥¹Ì¾" +msgstr "無効ãªæ–‡å­—クラスåã§ã™" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" -msgstr "ºÇ¸å¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹¡£" +msgstr "終端ã®ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" -msgstr "¸åÊý¤Ø¤Î»²¾È¤¬Ìµ¸ú¤Ç¤¹¡£" +msgstr "無効ãªå‰æ–¹å‚ç…§ã§ã™" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" -msgstr "[ ¤Þ¤¿¤Ï [^ ¤¬Âбþ¤·¤Þ¤»¤ó¡£" +msgstr "[ ã¾ãŸã¯ [^ ãŒä¸ä¸€è‡´ã§ã™" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" -msgstr "( ¤Þ¤¿¤Ï \\( ¤¬Âбþ¤·¤Þ¤»¤ó¡£" +msgstr "( ã¾ãŸã¯ \\( ãŒä¸ä¸€è‡´ã§ã™" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" -msgstr "\\{ ¤¬Âбþ¤·¤Þ¤»¤ó¡£" +msgstr "\\{ ãŒä¸ä¸€è‡´ã§ã™" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" -msgstr "\\{\\} ¤ÎÆâÍƤ¬Ìµ¸ú¤Ç¤¹¡£" +msgstr "\\{\\} ã®ä¸­èº«ãŒç„¡åŠ¹ã§ã™" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" -msgstr "ÈÏ°Ï»ØÄê¤Î½ªÃ¼¤¬Ìµ¸ú¤Ç¤¹¡£" +msgstr "無効ãªç¯„囲終了ã§ã™" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" -msgstr "¥á¥â¥ê¡¼¤¬Â­¤ê¤Þ¤»¤ó¡£" +msgstr "メモリを使ã„æžœãŸã—ã¾ã—ãŸ" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" -msgstr "Àè¹Ô¤ÎÀµµ¬É½¸½¤¬Ìµ¸ú¤Ç¤¹¡£" +msgstr "無効ãªå‰æ–¹æ­£è¦è¡¨ç¾ã§ã™" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" -msgstr "Àµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" +msgstr "æ­£è¦è¡¨ç¾ãŒé€”中ã§çµ‚了ã—ã¾ã—ãŸ" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" -msgstr "Àµµ¬É½¸½¤¬Ä¹²á¤®¤Þ¤¹¡£" +msgstr "æ­£è¦è¡¨ç¾ãŒå¤§ãã™ãŽã¾ã™" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" -msgstr ") ¤Þ¤¿¤Ï \\) ¤¬Âбþ¤·¤Þ¤»¤ó¡£" +msgstr ") ã¾ãŸã¯ \\) ãŒä¸ä¸€è‡´ã§ã™" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" -msgstr "¤³¤ì¤è¤êÁ°¤Ë»ÈÍѤ·¤¿Àµµ¬É½¸½¤Ï¤¢¤ê¤Þ¤»¤ó¡£" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó -- %c\n" +msgstr "以å‰ã«æ­£è¦è¡¨ç¾ãŒã‚ã‚Šã¾ã›ã‚“" -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥½¥±¥Ã¥È `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£" +#~ msgid "could not find groups: %s" +#~ msgstr "グループãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“: %s" -#~ msgid "remote port invalid in `%s'" -#~ msgstr "`%s' ¤Î¥ê¥â¡¼¥È¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£" +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "組込関数ã®æˆ»ã‚Šå€¤ã¸ã®ä»£å…¥ã¯è¨±å¯ã•ã‚Œã¦ã„ã¾ã›ã‚“" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/nl.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/nl.gmo differ diff -Nru gawk-3.1.8+dfsg/po/nl.po gawk-4.0.1+dfsg/po/nl.po --- gawk-3.1.8+dfsg/po/nl.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/nl.po 2012-03-28 20:03:47.000000000 +0000 @@ -1,43 +1,56 @@ -# Dutch translations for gawk. -# Copyright (C) 2010 Free Software Foundation, Inc. +# Dutch translations for GNU gawk. +# Copyright (C) 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. -# Pozdrav iz Maribora! # +# Als het schone blinkt. +# +# Benno Schulenberg , 2005, 2007, 2010, 2011, 2012. # Erwin Poeze , 2009. -# Benno Schulenberg , 2005, 2007, 2010. msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.7i\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2010-04-30 17:03+0200\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-01-30 20:40+0100\n" "Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "van %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "scalaire waarde wordt gebruikt als array" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" msgstr "functie '%s' wordt gebruikt als array" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "scalaire parameter '%s' wordt gebruikt als array" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" +msgid "attempt to use scalar `%s' as an array" msgstr "scalair '%s' wordt gebruikt als array" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "van %s" +msgid "attempt to use array `%s' in a scalar context" +msgstr "array '%s' wordt gebruikt in een scalaire context" #: array.c:513 #, c-format @@ -49,515 +62,616 @@ msgid "subscript of array `%s' is null string" msgstr "index van array '%s' is lege string" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: index '%s' niet in array '%s'" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "scalair '%s[\"%.*s\"]' wordt gebruikt als array" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: leeg (nil)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: leeg (nul)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabelgrootte = %d, arraygrootte = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: is een parameter\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array-verwijzing naar %s\n" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: argument is geen array" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: tweede argument is geen array" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: tweede argument is geen array" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: eerste argument is geen array" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: eerste argument is geen array" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: een subarray van het eerste argument kan niet als tweede argument " +"gebruikt worden" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: een subarray van het eerste argument kan niet als tweede argument " +"gebruikt worden" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: een subarray van het tweede argument kan niet als eerste argument " +"gebruikt worden" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: een subarray van het tweede argument kan niet als eerste argument " +"gebruikt worden" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "'%s' is ongeldig als functienaam" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "sorteervergelijkingsfunctie '%s' is niet gedefinieerd" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "%s-blokken horen een actiedeel te hebben" -#: awkgram.y:221 +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "elke regel hoort een patroon of een actiedeel te hebben" -#: awkgram.y:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "oude 'awk' staat meerdere 'BEGIN'- en 'END'-regels niet toe" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "'%s' is een ingebouwde functie en is niet te herdefiniëren" -#: awkgram.y:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "regexp-constante '//' lijkt op C-commentaar, maar is het niet" -#: awkgram.y:334 +#: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-constante '/%s/' lijkt op C-commentaar, maar is het niet" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "opdracht heeft mogelijk geen effect" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "dubbele 'case'-waarde in 'switch'-opdracht: %s" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "dubbele 'default' in 'switch'-opdracht" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "'break' buiten een lus of 'switch'-opdracht is niet toegestaan" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "'continue' buiten een lus is niet toegestaan" + +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "'%s' wordt gebruikt in %s-actie" +msgid "`next' used in %s action" +msgstr "'next' wordt gebruikt in %s-actie" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "'nextfile' is een gawk-uitbreiding" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "'nextfile' wordt gebruikt in %s-actie" + +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "'return' wordt gebruikt buiten functiecontext" -#: awkgram.y:534 +#: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "kale 'print' in BEGIN- of END-regel moet vermoedelijk 'print \"\"' zijn" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "'delete array' is een gawk-uitbreiding" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "'delete(array)' is een niet-overdraagbare 'tawk'-uitbreiding" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "dubbele 'case'-waarde in 'switch'-opdracht: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "dubbele 'default' in 'switch'-opdracht" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "meerfase-tweerichtings-pijplijnen werken niet" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "reguliere expressie rechts van toewijzing" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "reguliere expressie links van operator '~' of '!~'" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "oude 'awk' kent het sleutelwoord 'in' niet, behalve na 'for'" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "reguliere expressie rechts van vergelijking" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "'getline var' is ongeldig binnen een '%s'-regel" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "'getline' is ongeldig binnen een '%s'-regel" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" -msgstr "onherverwezen 'getline' is ongedefinieerd binnen END-actie" +msgstr "niet-omgeleide 'getline' is ongedefinieerd binnen een END-actie" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "oude 'awk' kent geen meerdimensionale arrays" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "aanroep van 'length' zonder haakjes is niet overdraagbaar" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "aanroep van 'length' zonder haakjes wordt door POSIX afgeraden" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "indirecte functieaanroepen zijn een gawk-uitbreiding" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "non-array wordt gebruikt als array" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "" +"kan speciale variabele '%s' niet voor indirecte functieaanroep gebruiken" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "ongeldige index-expressie" -#: awkgram.y:1257 +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "non-array wordt gebruikt als array" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "waarschuwing: " + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "fataal: " + +#: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "onverwacht regeleinde of einde van string" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "lege programmatekst op commandoregel" - -#: awkgram.y:1430 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan bronbestand '%s' niet openen om te lezen (%s)" -#: awkgram.y:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "reden onbekend" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "bronbestand '%s' is reeds ingesloten" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "'@include' is een gawk-uitbreiding" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "lege bestandsnaam na '@include'" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "lege programmatekst op commandoregel" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan bronbestand '%s' niet lezen (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "bronbestand '%s' is leeg" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "bronbestand eindigt niet met een regeleindeteken (LF)" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "onafgesloten reguliere expressie eindigt met '\\' aan bestandseinde" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "%s: %d: regexp-optie '/.../%c' van 'tawk' werkt niet in gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "regexp-optie '/.../%c' van 'tawk' werkt niet in gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "onafgesloten reguliere expressie" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "onafgesloten reguliere expressie aan bestandseinde" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "gebruik van regelvoortzetting '\\ #...' is niet overdraagbaar" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "backslash is niet het laatste teken op de regel" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX staat operator '**=' niet toe" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "oude 'awk' kent de operator '**=' niet" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX staat operator '**' niet toe" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "oude 'awk' kent de operator '**' niet" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "oude 'awk' kent de operator '^=' niet" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "oude 'awk' kent de operator '^' niet" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "onafgesloten string" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "ongeldig teken '%c' in expressie" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "'%s' is een gawk-uitbreiding" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "'%s' is een uitbreiding door Bell Labs" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX staat '%s' niet toe" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "oude 'awk' kent '%s' niet" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "'goto' wordt als schadelijk beschouwd!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d is een ongeldig aantal argumenten voor %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: derde argument is een gawk-uitbreiding" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "%s: een stringwaarde als laatste vervangingsargument heeft geen effect" -#: awkgram.y:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: derde parameter is geen veranderbaar object" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: derde argument is een gawk-uitbreiding" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: tweede argument is een gawk-uitbreiding" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcgettext(_\"...\") is onjuist: verwijder het liggende streepje" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "dcngettext(_\"...\") is onjuist: verwijder het liggende streepje" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "functie '%s': parameter #%d, '%s', dupliceert parameter #%d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "functie '%s': parameter '%s' schaduwt een globale variabele" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kan '%s' niet openen om te schrijven (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "profiel gaat naar standaardfoutuitvoer" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "variabelenlijst gaat naar standaardfoutuitvoer" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: sluiten is mislukt (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() twee keer aangeroepen!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "er waren geschaduwde variabelen." -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "functie '%s': kan functienaam niet als parameternaam gebruiken" -#: awkgram.y:3004 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "functie '%s': kan speciale variabele '%s' niet als functieparameter gebruiken" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "functienaam '%s' is al eerder gedefinieerd" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" -msgstr "functie '%s' aangeroepen maar nergens gedefinieerd" +msgstr "functie '%s' wordt aangeroepen maar is nergens gedefinieerd" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "functie '%s' gedefinieerd maar nergens aangeroepen" +msgid "function `%s' defined but never called directly" +msgstr "functie '%s' is gedefinieerd maar wordt nergens direct aangeroepen" -#: awkgram.y:3201 +#: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "regexp-constante als parameter #%d levert booleanwaarde op" -#: awkgram.y:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "or used as a variable or an array" msgstr "" -"functie '%s' aangeroepen met spatie tussen naam en '(',\n" -"of gebruikt als variabele of array" +"functie '%s' wordt aangeroepen met een spatie tussen naam en '(',\n" +"of wordt gebruikt als variabele of array" -#: awkgram.y:3664 -msgid "division by zero attempted in `/'" -msgstr "deling door nul in '/'" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "deling door nul" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "deling door nul in '%%'" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s naar \"%s\" is mislukt (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "standaarduitvoer" -#: builtin.c:124 -msgid "reason unknown" -msgstr "reden onbekend" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: argument is geen getal" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argument %g ligt buiten toegestane bereik" -#: builtin.c:201 +#: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kan pijp niet leegmaken: '%s' is geopend om te lezen, niet om te " "schrijven" -#: builtin.c:204 +#: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: kan bestand niet leegmaken: '%s' is geopend om te lezen, niet om te " "schrijven" -#: builtin.c:216 +#: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: '%s' is geen open bestand, pijp, of co-proces" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: eerste argument is geen string" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: tweede argument is geen string" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: argument is geen getal" -#: builtin.c:464 +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: argument is een array" + +#: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "'length(array)' is een gawk-uitbreiding" -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length: typeloos parameterargument wordt omgezet naar scalair" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: typeloos argument wordt omgezet naar scalair" - -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length: argument is geen string" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: argument is geen getal" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: argument %g is negatief" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "'count$' hoort in alle opmaken gebruikt te worden, of in geen" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "fataal: 'count$' hoort in alle opmaken gebruikt te worden, of in geen" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "veldbreedte wordt genegeerd voor opmaakaanduiding '%%%%'" +msgid "field width is ignored for `%%' specifier" +msgstr "veldbreedte wordt genegeerd voor opmaakaanduiding '%%'" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "veldprecisie wordt genegeerd voor opmaakaanduiding '%%%%'" +msgid "precision is ignored for `%%' specifier" +msgstr "veldprecisie wordt genegeerd voor opmaakaanduiding '%%'" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "veldbreedte en -precisie worden genegeerd voor opmaakaanduiding '%%%%'" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "veldbreedte en -precisie worden genegeerd voor opmaakaanduiding '%%'" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "'$' is niet toegestaan in awk-opmaak" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "fataal: '$' is niet toegestaan in awk-opmaak" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "het aantal argumenten met '$' moet > 0 zijn" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "fataal: het aantal argumenten met '$' moet > 0 zijn" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "argumentental %ld is groter dan het gegeven aantal argumenten" +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "fataal: argumentental %ld is groter dan het gegeven aantal argumenten" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "'$' is niet toegestaan na een punt in de opmaak" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "fataal: '$' is niet toegestaan na een punt in de opmaak" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "geen '$' opgegeven bij positionele veldbreedte of -precisie" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "fataal: geen '$' opgegeven bij positionele veldbreedte of -precisie" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "'l' is betekenisloos in awk-opmaak; genegeerd" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "'l' is niet toegestaan in POSIX awk-opmaak" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "fataal: 'l' is niet toegestaan in POSIX awk-opmaak" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "'L' is betekenisloos in awk-opmaak; genegeerd" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "'L' is niet toegestaan in POSIX awk-opmaak" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "fataal: 'L' is niet toegestaan in POSIX awk-opmaak" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "'h' is betekenisloos in awk-opmaak; genegeerd" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "'h' is niet toegestaan in POSIX awk-opmaak" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "fataal: 'h' is niet toegestaan in POSIX awk-opmaak" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: waarde %g ligt buiten toegestaan bereik voor opmaak '%%%c'" @@ -568,11 +682,11 @@ msgstr "" "onbekend opmaakteken '%c' wordt genegeerd: geen argument is geconverteerd" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "niet genoeg argumenten voor opmaakstring" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "fataal: niet genoeg argumenten voor opmaakstring" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "niet genoeg ^ voor deze" @@ -584,60 +698,60 @@ msgid "too many arguments supplied for format string" msgstr "te veel argumenten voor opmaakstring" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: geen argumenten" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argument is geen getal" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: argument %g is negatief" -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: startindex %g is ongeldig; 1 wordt gebruikt" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: startindex %g is geen integer; wordt afgekapt" - -#: builtin.c:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: lengte %g is niet >= 1" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: lengte %g is niet >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: lengte %g is geen integer; wordt afgekapt" -#: builtin.c:1524 +#: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" "substr: lengte %g is te groot voor stringindexering; wordt verkort tot %g" -#: builtin.c:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: startindex %g is ongeldig; 1 wordt gebruikt" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "substr: startindex %g is geen integer; wordt afgekapt" + +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr: bronstring heeft lengte nul" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindex %g ligt voorbij het einde van de string" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -645,1000 +759,1066 @@ "substr: lengte %g bij startindex %g is groter dan de lengte van het eerste " "argument (%lu)" -#: builtin.c:1637 +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "strftime: opmaakwaarde in PROCINFO[\"strftime\"] is numeriek" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: tweede argument is geen getal" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "strftime: tweede argument is kleiner dan nul of te groot voor 'time_t'" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: eerste argument is geen string" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: opmaakstring is leeg" -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: tweede argument is geen getal" - -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: argument is geen string" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "mktime: minstens één van waarden valt buiten het standaardbereik" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "'system'-functie is niet toegestaan in sandbox-modus" + +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system: argument is geen string" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "verwijzing naar ongeïnitialiseerde variabele '%s'" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "verwijzing naar ongeïnitialiseerd veld '$%d'" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: argument is geen string" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: argument is geen string" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: eerste argument is geen getal" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: tweede argument is geen getal" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: argument is geen getal" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: argument is geen getal" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: argument is geen getal" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: derde argument is geen array" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: derde argument is 0; wordt beschouwd als 1" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: eerste argument is geen getal" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: tweede argument is geen getal" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): cijfers na de komma worden afgekapt" -#: builtin.c:2872 +#: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: eerste argument is geen getal" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: tweede argument is geen getal" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): cijfers na de komma worden afgekapt" -#: builtin.c:2910 +#: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: eerste argument is geen getal" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: tweede argument is geen getal" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): cijfers na de komma worden afgekapt" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: eerste argument is geen getal" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: tweede argument is geen getal" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: eerste argument is geen getal" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: tweede argument is geen getal" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negatieve waarden geven rare resultaten" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): cijfers na de komma worden afgekapt" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: argument is geen getal" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negatieve waarden geven rare resultaten" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): cijfers na de komma worden afgekapt" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' is geen geldige taalregio-deelcategorie" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "onbekend knooptype %d" -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "bufferoverloop in genflags2str()" +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "onbekende opcode %d" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:434 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "array '%s' wordt gebruikt in een scalaire context" +msgid "opcode %s not an operator or keyword" +msgstr "opcode %s is geen operator noch sleutelwoord" + +#: eval.c:488 +msgid "buffer overflow in genflags2str" +msgstr "bufferoverloop in genflags2str()" -#: eval.c:802 +#: eval.c:698 #, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" msgstr "" -"for: array '%s' veranderde van grootte %ld naar %ld tijdens uitvoer van de " -"lus" +"\n" +"\t# Functieaanroepen-stack:\n" +"\n" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "'break' buiten een lus is niet overdraagbaar" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "'break' buiten een lus is niet toegestaan" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "'continue' buiten een lus is niet overdraagbaar" +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "'IGNORECASE' is een gawk-uitbreiding" -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "'continue' buiten een lus is niet toegestaan" +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "'BINMODE' is een gawk-uitbreiding" -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "'next' kan niet aangeroepen worden in een BEGIN-regel" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "'next' kan niet aangeroepen worden in een END-regel" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "'nextfile' kan niet aangeroepen worden in een BEGIN-regel" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "'nextfile' kan niet aangeroepen worden in een END-regel" +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE-waarde '%s' is ongeldig, wordt behandeld als 3" -#: eval.c:952 -msgid "statement has no effect" -msgstr "opdracht heeft geen effect" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "onjuiste opgave van '%sFMT': '%s'" + +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "'--lint' wordt uitgeschakeld wegens toewijzing aan 'LINT'" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "kan functienaam '%s' niet als variabele of array gebruiken" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "verwijzing naar ongeïnitialiseerd argument '%s'" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "verwijzing naar ongeïnitialiseerde variabele '%s'" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "veldverwijzingspoging via een waarde die geen getal is" -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenation: neveneffecten in de ene expressie hebben de lengte van een " -"andere veranderd!" +#: eval.c:1179 +msgid "attempt to field reference from null string" +msgstr "veldverwijzingspoging via een lege string" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "toewijzing wordt gebruikt in een conditionele context" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "toegangspoging tot veld %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "deling door nul" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "verwijzing naar ongeïnitialiseerd veld '$%ld'" + +#: eval.c:1256 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "functie '%s' aangeroepen met meer argumenten dan gedeclareerd" -#: eval.c:1409 profile.c:661 +#: eval.c:1437 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "ongeldig type (%s) in tree_eval()" +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack(): onverwacht type '%s'" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "deling door nul in '/='" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "deling door nul in '%%='" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "functie '%s' aangeroepen met meer argumenten dan gedeclareerd" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "array '%s[\"%.*s\"]' wordt gebruikt in een scalaire context" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "functie '%s' is niet gedefinieerd" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "toewijzing wordt gebruikt in een conditionele context" -#: eval.c:1983 +#: eval.c:1911 +msgid "statement has no effect" +msgstr "opdracht heeft geen effect" + +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# Functieaanroepen-stack:\n" -"\n" +"for: array '%s' veranderde van grootte %ld naar %ld tijdens uitvoer van de " +"lus" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- hoofd --\n" +msgid "function called indirectly through `%s' does not exist" +msgstr "indirect (via '%s') aangeroepen functie bestaat niet" -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "veldverwijzingspoging via een waarde die geen getal is" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "verwijzingspoging via een lege string" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "functie '%s' is niet gedefinieerd" -#: eval.c:2149 +#: eval.c:2511 #, c-format -msgid "attempt to access field %d" -msgstr "toegangspoging tot veld %d" +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "niet-omgeleide 'getline' is ongeldig binnen een '%s'-regel" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "" -"toewijzing aan het resultaat van een ingebouwde functie is niet toegestaan" +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "fout tijdens lezen van invoerbestand '%s': %s" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "'IGNORECASE' is een gawk-uitbreiding" +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "'nextfile' kan niet aangeroepen worden in een '%s'-regel" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "'BINMODE' is een gawk-uitbreiding" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "'exit' kan niet aangeroepen worden in de huidige context" -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE-waarde '%s' is ongeldig, wordt behandeld als 3" +msgid "`next' cannot be called from a `%s' rule" +msgstr "'next' kan niet aangeroepen worden in een '%s'-regel" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "onjuiste opgave van '%sFMT': '%s'" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Kan '%s' niet interpreteren" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "'--lint' wordt uitgeschakeld wegens toewijzing aan 'LINT'" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "uitbreidingen zijn niet toegestaan in sandbox-modus" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "'extension' is een gawk-uitbreiding" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: kan '%s' niet openen (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "fatale fout: extension: kan '%s' niet openen (%s)\n" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: bibliotheek '%s': kan functie '%s' niet aanroepen (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatale fout: extension: bibliotheek '%s': definieert " +"'plugin_is_GPL_compatible' niet (%s)\n" -#: ext.c:105 +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"fatale fout: extension: bibliotheek '%s': kan functie '%s' niet aanroepen " +"(%s)\n" + +#: ext.c:127 msgid "extension: missing function name" msgstr "extension: ontbrekende functienaam" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ongeldig teken '%c' in functienaam '%s'" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "extension: kan functie '%s' niet herdefiniëren" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: functie '%s' is al gedefinieerd" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: functienaam '%s' is al eerder gedefinieerd" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "extension: kan in gawk ingebouwde '%s' niet als functienaam gebruiken" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: functienaam '%s' is al eerder gedefinieerd" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: negatief aantal argumenten voor functie '%s'" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "" "functie '%s' is gedefinieerd om niet meer dan %d argument(en) te accepteren" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "functie '%s': ontbrekend argument #%d" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "functie '%s': argument #%d: een scalair wordt gebruikt als array" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "functie '%s': argument #%d: een array wordt gebruikt als scalair" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Actie wordt niet ondersteund" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "NF is op een negatieve waarde gezet" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: vierde argument is een gawk-uitbreiding" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: vierde argument is geen array" + +#: field.c:969 msgid "split: second argument is not an array" msgstr "split: tweede argument is geen array" -#: field.c:909 +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: hetzelfde array kan niet zowel als tweede als als vierde argument " +"gebruikt worden" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: een subarray van het tweede argument kan niet als vierde argument " +"gebruikt worden" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: een subarray van het vierde argument kan niet als tweede argument " +"gebruikt worden" + +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "split: lege string als derde argument is een gawk-uitbreiding" -#: field.c:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: vierde argument is geen array" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: tweede argument is geen array" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: derde argument moet niet-nil zijn" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: hetzelfde array kan niet zowel als tweede als als vierde argument " +"gebruikt worden" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: een subarray van het tweede argument kan niet als vierde argument " +"gebruikt worden" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: een subarray van het vierde argument kan niet als tweede argument " +"gebruikt worden" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "'FIELDWIDTHS' is een gawk-uitbreiding" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "ongeldige waarde voor FIELDWIDTHS, nabij '%s'" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "een lege string als 'FS' is een gawk-uitbreiding" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "oude 'awk' staat geen reguliere expressies toe als waarde van 'FS'" -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "'FPAT' is een gawk-uitbreiding" + +#: getopt.c:604 getopt.c:633 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: optie '%s' is niet eenduidig\n" -#: getopt.c:623 getopt.c:627 +#: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: optie '--%s' staat geen argument toe\n" -#: getopt.c:636 getopt.c:641 +#: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: optie '%c%s' staat geen argument toe\n" -#: getopt.c:684 getopt.c:703 +#: getopt.c:740 getopt.c:759 #, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: optie '--%s' vereist een argument\n" -#: getopt.c:741 getopt.c:744 +#: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: onbekende optie '--%s'\n" -#: getopt.c:752 getopt.c:755 +#: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: onbekende optie '%c%s'\n" -#: getopt.c:804 getopt.c:807 +#: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: ongeldige optie -- '%c'\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: optie vereist een argument -- '%c'\n" -#: getopt.c:930 getopt.c:946 +#: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: optie '-W %s' is niet eenduidig\n" -#: getopt.c:970 getopt.c:988 +#: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: optie '-W %s' staat geen argument toe\n" -#: getopt.c:1009 getopt.c:1027 +#: getopt.c:1068 getopt.c:1086 #, c-format msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: optie '-W %s' vereist een argument\n" -#: io.c:322 io.c:352 +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "opdrachtregelargument '%s' is een map -- overgeslagen" + +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan bestand '%s' niet openen om te lezen (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "sluiten van bestandsdescriptor %d ('%s') is mislukt (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "ongeldig boomtype %s in redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "omleiding is niet toegestaan in sandbox-modus" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "expressie in omleiding '%s' heeft alleen een getal als waarde" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "expressie voor omleiding '%s' heeft een lege string als waarde" -#: io.c:600 +#: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "bestandsnaam '%s' voor omleiding '%s' kan het resultaat zijn van een " "logische expressie" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onnodige mix van '>' en '>>' voor bestand '%.*s'" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan pijp '%s' niet openen voor uitvoer (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan pijp '%s' niet openen voor invoer (%s)" -#: io.c:717 +#: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan tweerichtings-pijp '%s' niet openen voor in- en uitvoer (%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan niet omleiden van '%s' (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan niet omleiden naar '%s' (%s)" -#: io.c:851 +#: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "systeemgrens voor aantal open bestanden is bereikt: begonnen met multiplexen" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "sluiten van '%s' is mislukt (%s)" -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" msgstr "te veel pijpen of invoerbestanden geopend" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: tweede argument moet 'to' of 'from' zijn" -#: io.c:912 +#: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: '%.*s' is geen open bestand, pijp, of co-proces" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "sluiten van een nooit-geopende omleiding" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omleiding '%s' is niet geopend met '|&'; tweede argument wordt " "genegeerd" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "afsluitwaarde %d bij mislukte sluiting van pijp '%s' (%s)" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "afsluitwaarde %d bij mislukte sluiting van bestand '%s' (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "geen expliciete sluiting van socket '%s' aangegeven" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "geen expliciete sluiting van co-proces '%s' aangegeven" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "geen expliciete sluiting van pijp '%s' aangegeven" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "geen expliciete sluiting van bestand '%s' aangegeven" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "fout tijdens schrijven van standaarduitvoer (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "fout tijdens schrijven van standaardfoutuitvoer (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "leegmaken van pijp '%s' is mislukt (%s)" -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "leegmaken door co-proces van pijp naar '%s' is mislukt (%s)" -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "leegmaken van bestand '%s' is mislukt (%s)" -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokale poort %s is ongeldig in '/inet'" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "host- en poortinformatie (%s, %s) zijn ongeldig" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "cliënt van '/inet/raw' is nog niet klaar, sorry" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "Alleen root mag '/inet/raw' gebruiken." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "server van '/inet/raw' is nog niet klaar, sorry" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "geen (bekend) protocol aangegeven in speciale bestandsnaam '%s'" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciale bestandsnaam '%s' is onvolledig" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "'/inet' heeft een gindse hostnaam nodig" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "'/inet' heeft een gindse poort nodig" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-communicatie wordt niet ondersteund" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "'%s' is een map" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "gebruik 'PROCINFO[\"%s\"]' in plaats van '%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "gebruik 'PROCINFO[...]' in plaats van '/dev/user'" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kan '%s' niet openen -- modus '%s'" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "kan meester-pty van dochterproces niet sluiten (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "kan standaarduitvoer van dochterproces niet sluiten (%s)" -#: io.c:1928 +#: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" -"kan slaaf-pty niet overzetten naar standaarduitvoer van dochterproces (dup: %" -"s)" +"kan slaaf-pty niet overzetten naar standaarduitvoer van dochterproces (dup: " +"%s)" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "kan standaardinvoer van dochterproces niet sluiten (%s)" -#: io.c:1933 +#: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" -"kan slaaf-pty niet overzetten naar standaardinvoer van dochterproces (dup: %" -"s)" +"kan slaaf-pty niet overzetten naar standaardinvoer van dochterproces (dup: " +"%s)" -#: io.c:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "kan slaaf-pty niet sluiten (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "kan pijp niet overzetten naar standaarduitvoer van dochterproces (dup: %s)" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "kan pijp niet overzetten naar standaardinvoer van dochterproces (dup: %s)" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "kan standaarduitvoer van ouderproces niet herstellen\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "kan standaardinvoer van ouderproces niet herstellen\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "kan pijp niet sluiten (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" msgstr "'|&' wordt niet ondersteund" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan pijp '%s' niet openen (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan voor '%s' geen dochterproces starten (fork: %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "databestand '%s' is leeg" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "kan geen extra invoergeheugen meer toewijzen" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "fout tijdens lezen van invoerbestand '%s': %s" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "een 'RS' van meerdere tekens is een gawk-uitbreiding" -#: main.c:306 -msgid "out of memory" -msgstr "onvoldoende geheugen beschikbaar" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "IPv6-communicatie wordt niet ondersteund" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "optie '-m[fr]' is irrelevant in gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "gebruikswijze van optie -m: '-m[fr] nnn'" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "argument van '-e/--source' is leeg; genegeerd" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: optie '-W %s' is onbekend; genegeerd\n" -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "argument van '--source' is leeg; genegeerd" - -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: optie vereist een argument -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "omgevingsvariabele 'POSIXLY_CORRECT' is gezet: '--posix' ingeschakeld" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "'--posix' overstijgt '--traditional'" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "'--posix'/'--traditional' overstijgen '--non-decimal-data'" -#: main.c:530 +#: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "het uitvoeren van %s als 'setuid root' kan een veiligheidsrisico zijn" -#: main.c:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "'--posix' overstijgt '--binary'" + +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan standaardinvoer niet in binaire modus zetten (%s)" -#: main.c:574 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan standaarduitvoer niet in binaire modus zetten (%s)" -#: main.c:576 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan standaardfoutuitvoer niet in binaire modus zetten (%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" msgstr "helemaal geen programmatekst!" -#: main.c:721 +#: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Gebruik: %s [opties] -f programmabestand [--] bestand...\n" -#: main.c:723 +#: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" " of: %s [opties] [--] %cprogrammatekst%c bestand...\n" "\n" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "\tPOSIX-opties:\t\t\tequivalente GNU-opties:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "\tPOSIX-opties:\t\tEquivalente GNU-opties: (standaard)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f programmabestand\t\t--file=programmabestand\n" +msgstr "\t-f programmabestand\t--file=programmabestand\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F veldscheidingsteken\t\t--field-separator=veldscheidingsteken\n" +msgstr "\t-F veldscheidingsteken\t--field-separator=veldscheidingsteken\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=waarde\t\t\t--assign=var=waarde\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] waarde\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=bestand]\t--dump-variables[=bestand]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=bestand\t\t\t--exec=bestand\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t\t--non-decimal-data\n" +msgstr "" +"\t-v var=waarde\t\t--assign=var=waarde\n" +"\n" #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "\tKorte opties:\t\tEquivalente GNU-opties: (uitbreidingen)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[bestand]\t\t--dump-variables[=bestand]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=bestand]\t\t--profile[=bestand]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'programmatekst'\t--source='programmatekst'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E bestand\t\t--exec=bestand\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=programmatekst\t--source=programmatekst\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fataal]\t\t--lint[=fataal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t\t--use-lc-numeric\n" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[bestand]\t\t--profile[=bestand]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R bestand\t\t\t--command=bestand\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1651,7 +1831,7 @@ "Meld fouten in de vertaling aan .\n" "\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1661,7 +1841,7 @@ "Standaard leest het van standaardinvoer en schrijft naar standaarduitvoer.\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1671,7 +1851,7 @@ "\tgawk '{ som += $1 }; END { print som }' bestand\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1689,7 +1869,7 @@ "uitgegeven door de Free Software Foundation, naar keuze ofwel onder\n" "versie 3 of onder een nieuwere versie van die licentie.\n" -#: main.c:802 +#: main.c:815 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" @@ -1703,7 +1883,7 @@ "Zie de GNU General Public License voor meer details.\n" "\n" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1712,11 +1892,16 @@ "ontvangen te hebben; is dit niet het geval, dan kunt u deze licentie\n" "ook vinden op http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft maakt van FS geen tab in POSIX-awk" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "onbekende waarde voor veldspecificatie: %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1725,86 +1910,79 @@ "%s: argument '%s' van '-v' is niet van de vorm 'var=waarde'\n" "\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "'%s' is geen geldige variabelenaam" -#: main.c:1145 +#: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "'%s' is geen variabelenaam; zoekend naar bestand '%s=%s'" -#: main.c:1184 +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "kan in gawk ingebouwde '%s' niet als variabelenaam gebruiken" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "kan functie '%s' niet als variabelenaam gebruiken" + +#: main.c:1262 msgid "floating point exception" -msgstr "drijvende-komma-berekeningsfout" +msgstr "drijvendekomma-berekeningsfout" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "fatale fout: **interne fout**" -#: main.c:1206 +#: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "fatale fout: **interne fout**: segmentatiefout" -#: main.c:1218 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "fatale fout: **interne fout**: stack is vol" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "geen reeds-geopende bestandsdescriptor %d" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kan /dev/null niet openen voor bestandsdescriptor %d" -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "kan groepen niet vinden: %s" - -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "commandoregel:" -#: msg.c:120 -msgid "warning: " -msgstr "waarschuwing: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "fout: " -#: msg.c:178 -msgid "fatal: " -msgstr "fataal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "kan string niet converteren naar drijvende-komma-getal" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "backslash aan het einde van de string" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "oude 'awk' kent de stuurcodereeks '\\%c' niet" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX staat stuurcode '\\x' niet toe" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "geen hex cijfers in stuurcodereeks '\\x'" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " @@ -1813,50 +1991,50 @@ "hexadecimale stuurcode \\x%.*s van %d tekens wordt waarschijnlijk niet " "afgehandeld zoals u verwacht" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "stuurcodereeks '\\%c' behandeld als normale '%c'" -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s '%s': kan close-on-exec niet activeren: (fcntl: %s)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Ongeldige multibyte-gegevens gevonden.\n" +"Uw gegevens passen vermoedelijk niet bij uw taalregio." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "kan '%s' niet openen om te schrijven: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "" +"%s %s '%s': kan bestandsdescriptorvlaggen niet verkrijgen: (fcntl F_GETFD: " +"%s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "**interne fout**: %s heeft een lege 'vname'" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# wordt intern behandeld als 'delete'" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s '%s': kan 'close-on-exec' niet activeren: (fcntl F_SETFD: %s)" -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# dit is een dynamisch geladen uitbreidingsfunctie" +msgid "could not open `%s' for writing: %s" +msgstr "kan '%s' niet openen om te schrijven: %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawk-profiel, gemaakt op %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "profiel gaat naar standaardfoutuitvoer" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# BEGIN-blok(ken)\n" +"\t# %s-blok(ken)\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" @@ -1865,16 +2043,17 @@ "\t# Regel(s)\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END-blok(ken)\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "**interne fout**: %s heeft een lege 'vname'" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# gawk-profiel, gemaakt op %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1883,87 +2062,209 @@ "\n" "\t# Functies, alfabetisch geordend\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "onverwacht type %s in prec_level()" +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str(): onbekend omleidingstype %d" -#: profile.c:1527 +#: re.c:573 #, c-format -msgid "Unknown node type %s in pp_var" -msgstr "onbekend knooptype %s in pp_var()" +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "" +"de betekenis van een bereik van de vorm '[%c-%c]' is afhankelijk van de " +"taalregio" -#: regcomp.c:132 +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"component '%.*s' van reguliere expressie moet vermoedelijk '[%.*s]' zijn" + +#: regcomp.c:131 msgid "Success" msgstr "Gelukt" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Geen overeenkomsten" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ongeldige reguliere expressie" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" msgstr "Ongeldig samengesteld teken" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "Ongeldige tekenklassenaam" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "Backslash aan het eind" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "Ongeldige terugverwijzing" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Ongepaarde [ of [^" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Ongepaarde ( of \\(" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "Ongepaarde \\{" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ongeldige inhoud van \\{\\}" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "Ongeldig bereikeinde" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Onvoldoende geheugen beschikbaar" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ongeldige voorafgaande reguliere expressie" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Voortijdig einde van reguliere expressie" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "Reguliere expressie is te groot" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Ongepaarde ) of \\)" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "Geen eerdere reguliere expressie" +#~ msgid "could not find groups: %s" +#~ msgstr "kan groepen niet vinden: %s" + +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "" +#~ "toewijzing aan het resultaat van een ingebouwde functie is niet toegestaan" + +#~ msgid "attempt to use array in a scalar context" +#~ msgstr "array wordt gebruikt in een scalaire context" + +#~ msgid "statement may have no effect" +#~ msgstr "opdracht heeft mogelijk geen effect" + +#~ msgid "out of memory" +#~ msgstr "onvoldoende geheugen beschikbaar" + +#~ msgid "attempt to use scalar `%s' as array" +#~ msgstr "scalair '%s' wordt gebruikt als array" + +#~ msgid "attempt to use array `%s' in scalar context" +#~ msgstr "array '%s' wordt gebruikt in een scalaire context" + +#~ msgid "call of `length' without parentheses is deprecated by POSIX" +#~ msgstr "aanroep van 'length' zonder haakjes wordt door POSIX afgeraden" + +#~ msgid "division by zero attempted in `/'" +#~ msgstr "deling door nul in '/'" + +#~ msgid "length: untyped parameter argument will be forced to scalar" +#~ msgstr "length: typeloos parameterargument wordt omgezet naar scalair" + +#~ msgid "length: untyped argument will be forced to scalar" +#~ msgstr "length: typeloos argument wordt omgezet naar scalair" + +#~ msgid "`break' outside a loop is not portable" +#~ msgstr "'break' buiten een lus is niet overdraagbaar" + +#~ msgid "`continue' outside a loop is not portable" +#~ msgstr "'continue' buiten een lus is niet overdraagbaar" + +#~ msgid "`next' cannot be called from a BEGIN rule" +#~ msgstr "'next' kan niet aangeroepen worden in een BEGIN-regel" + +#~ msgid "`nextfile' cannot be called from a BEGIN rule" +#~ msgstr "'nextfile' kan niet aangeroepen worden in een BEGIN-regel" + +#~ msgid "" +#~ "concatenation: side effects in one expression have changed the length of " +#~ "another!" +#~ msgstr "" +#~ "concatenation: neveneffecten in de ene expressie hebben de lengte van een " +#~ "andere veranderd!" + +#~ msgid "illegal type (%s) in tree_eval" +#~ msgstr "ongeldig type (%s) in tree_eval()" + +#~ msgid "\t# -- main --\n" +#~ msgstr "\t# -- hoofd --\n" + +#~ msgid "invalid tree type %s in redirect()" +#~ msgstr "ongeldig boomtype %s in redirect()" + +#~ msgid "/inet/raw client not ready yet, sorry" +#~ msgstr "cliënt van '/inet/raw' is nog niet klaar, sorry" + +#~ msgid "only root may use `/inet/raw'." +#~ msgstr "Alleen root mag '/inet/raw' gebruiken." + +#~ msgid "/inet/raw server not ready yet, sorry" +#~ msgstr "server van '/inet/raw' is nog niet klaar, sorry" + +#~ msgid "file `%s' is a directory" +#~ msgstr "'%s' is een map" + +#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +#~ msgstr "gebruik 'PROCINFO[\"%s\"]' in plaats van '%s'" + +#~ msgid "use `PROCINFO[...]' instead of `/dev/user'" +#~ msgstr "gebruik 'PROCINFO[...]' in plaats van '/dev/user'" + +#~ msgid "\t-m[fr] val\n" +#~ msgstr "\t-m[fr] waarde\n" + +#~ msgid "\t-W compat\t\t--compat\n" +#~ msgstr "\t-W compat\t\t\t--compat\n" + +#~ msgid "\t-W copyleft\t\t--copyleft\n" +#~ msgstr "\t-W copyleft\t\t\t--copyleft\n" + +#~ msgid "\t-W usage\t\t--usage\n" +#~ msgstr "\t-W usage\t\t\t--usage\n" + +#~ msgid "can't convert string to float" +#~ msgstr "kan string niet converteren naar drijvende-komma-getal" + +#~ msgid "# treated internally as `delete'" +#~ msgstr "# wordt intern behandeld als 'delete'" + +#~ msgid "# this is a dynamically loaded extension function" +#~ msgstr "# dit is een dynamisch geladen uitbreidingsfunctie" + +#~ msgid "" +#~ "\t# BEGIN block(s)\n" +#~ "\n" +#~ msgstr "" +#~ "\t# BEGIN-blok(ken)\n" +#~ "\n" + +#~ msgid "unexpected type %s in prec_level" +#~ msgstr "onverwacht type %s in prec_level()" + +#~ msgid "Unknown node type %s in pp_var" +#~ msgstr "onbekend knooptype %s in pp_var()" + #~ msgid "can't open two way socket `%s' for input/output (%s)" #~ msgstr "kan tweerichtings-socket '%s' niet openen voor in- en uitvoer (%s)" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/pl.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/pl.gmo differ diff -Nru gawk-3.1.8+dfsg/po/pl.po gawk-4.0.1+dfsg/po/pl.po --- gawk-3.1.8+dfsg/po/pl.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/pl.po 2012-03-28 20:03:47.000000000 +0000 @@ -1,414 +1,533 @@ # Polish translations for GNU AWK package. -# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. # -# Wojciech Polak , 2003, 2004, 2005, 2007, 2008, 2009. +# Wojciech Polak , 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012. # additional help by Sergey Poznyakoff , 2003. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.7\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2009-12-19 17:46+0100\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-02-04 19:17+0100\n" "Last-Translator: Wojciech Polak \n" "Language-Team: Polish \n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "od %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "próba użycia wartoÅ›ci skalarnej jako tablicy" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" msgstr "próba użycia funkcji `%s' jako tablicy" -#: array.c:115 +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "próba użycia parametru `%s' skalaru jako tablicy" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" +msgid "attempt to use scalar `%s' as an array" msgstr "próba użycia skalaru `%s' jako tablicy" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "od %s" +msgid "attempt to use array `%s' in a scalar context" +msgstr "próba użycia tablicy `%s' w kontekÅ›cie skalaru" #: array.c:513 -#, fuzzy, c-format +#, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "odwoÅ‚anie do niezainicjowanego elementu `%s[\"%s\"]'" +msgstr "odwoÅ‚anie do niezainicjowanego elementu `%s[\"%.*s\"]'" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" msgstr "indeks tablicy `%s' jest zerowym Å‚aÅ„cuchem" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indeks `%s' nie jest w tablicy `%s'" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "próba użycia skalaru `%s[\"%.*s\"]' jako tablicy" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: pusty (null)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: pusty (zero)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: jest parametrem\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref do %s\n" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: argument nie jest tablicÄ…" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: drugi argument nie jest tablicÄ…" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: drugi argument nie jest tablicÄ…" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: pierwszy argument nie jest tablicÄ…" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: pierwszy argument nie jest tablicÄ…" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: nie można użyć podtablicy pierwszego argumentu dla drugiego argumentu" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: nie można użyć podtablicy pierwszego argumentu dla drugiego argumentu" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: nie można użyć podtablicy drugiego argumentu dla pierwszego argumentu" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: nie można użyć podtablicy drugiego argumentu dla pierwszego argumentu" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "nieprawidÅ‚owa nazwa funkcji `%s'" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "funkcja porównujÄ…ca w sortowaniu `%s' nie zostaÅ‚a zdefiniowna" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "%s bloków musi posiadać część dotyczÄ…cÄ… akcji" -#: awkgram.y:221 +#: awkgram.y:252 msgid "each rule must have a pattern or an action part" msgstr "każda reguÅ‚a musi posiadać wzorzec lub część dotyczÄ…cÄ… akcji" -#: awkgram.y:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "stary awk nie wspiera wielokrotnych reguÅ‚ `BEGIN' lub `END'" -#: awkgram.y:285 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "" "`%s' jest funkcjÄ… wbudowanÄ…, wiÄ™c nie może zostać ponownie zdefiniowana" -#: awkgram.y:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "" "staÅ‚e wyrażenie regularne `//' wyglÄ…da jak komentarz C++, ale nim nie jest" -#: awkgram.y:334 +#: awkgram.y:436 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "" "staÅ‚e wyrażenie regularne `/%s/' wyglÄ…da jak komentarz C, ale nim nie jest" -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "instrukcja może nie mieć żadnego efektu" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "powielone wartoÅ›ci case w ciele switch: %s" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "wykryto powielony `default' w ciele switch" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "instrukcja `break' poza pÄ™tlÄ… lub switch'em jest niedozwolona" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "instrukcja `continue' poza pÄ™tlÄ… jest niedozwolona" + +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "`%s' użyty w akcji %s" +msgid "`next' used in %s action" +msgstr "`next' użyty w akcji %s" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' jest rozszerzeniem gawk" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "`nextfile' użyty w akcji %s" + +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "`return' użyty poza kontekstem funkcji" -#: awkgram.y:534 +#: awkgram.y:925 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "zwykÅ‚y `print' w reguÅ‚ach BEGIN lub END powinien prawdopodobnie być jako " "`print \"\"'" -#: awkgram.y:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete tablica' jest rozszerzeniem gawk" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(tablica)' jest nieprzenoÅ›nym rozszerzeniem tawk" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "powielone wartoÅ›ci case w ciele switch: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "wykryto powielony `default' w ciele switch" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "wieloetapowe dwukierunkowe linie potokowe nie dziaÅ‚ajÄ…" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "wyrażanie regularne po prawej stronie przypisania" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "wyrażenie regularne po lewej stronie operatora `~' lub `!~'" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "" "stary awk nie wspiera sÅ‚owa kluczowego `in', z wyjÄ…tkiem po sÅ‚owie `for'" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "wyrażenie regularne po prawej stronie porównania" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "nieprawidÅ‚owy `getline var' wewnÄ…trz reguÅ‚y `%s'" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "nieprawidÅ‚owy `getline' wewnÄ…trz reguÅ‚y `%s'" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" msgstr "" "komenda `getline' bez przekierowania nie jest zdefiniowana wewnÄ…trz akcji END" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "stary awk nie wspiera wielowymiarowych tablic" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "wywoÅ‚anie `length' bez nawiasów jest nieprzenoÅ›ne" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "wywoÅ‚anie `length' bez podania nawiasów jest niezalecane przez POSIX" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "poÅ›rednie wywoÅ‚ania funkcji sÄ… rozszerzeniem gawk" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "użycie nie-tablicy jako tablicy" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "" +"nie można użyć specjalnej zmiennej `%s' do poÅ›redniego wywoÅ‚ania funkcji" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "nieprawidÅ‚owe wyrażenie indeksowe" -#: awkgram.y:1257 +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "użycie nie-tablicy jako tablicy" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "ostrzeżenie: " + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "fatalny bÅ‚Ä…d: " + +#: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "niespodziewany znak nowego wiersza lub koÅ„ca Å‚aÅ„cucha" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "pusty tekst programu w linii poleceÅ„" - -#: awkgram.y:1430 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "nie można otworzyć pliku źródÅ‚owego `%s' do czytania (%s)" -#: awkgram.y:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "nieznany powód" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "plik źródÅ‚owy `%s' jest już zaÅ‚Ä…czony" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include jest rozszerzeniem gawk" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "pusta nazwa pliku po @include" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "pusty tekst programu w linii poleceÅ„" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "nie można otworzyć pliku źródÅ‚owego `%s' (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "plik źródÅ‚owy `%s' jest pusty" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "plik źródÅ‚owy nie posiada na koÅ„cu znaku nowego wiersza" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "" "niezakoÅ„czone prawidÅ‚owo wyrażenie regularne koÅ„czy siÄ™ znakiem `\\' na " "koÅ„cu pliku" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: modyfikator wyrażenia regularnego `/.../%c' tawk nie dziaÅ‚a w gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "modyfikator wyrażenia regularnego `/.../%c' tawk nie dziaÅ‚a w gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "niezakoÅ„czone wyrażenie regularne" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "niezakoÅ„czone wyrażenie regularne na koÅ„cu pliku" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "użycie `\\ #...' kontynuacji linii nie jest przenoÅ›ne" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "backslash nie jest ostatnim znakiem w wierszu" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX nie zezwala na operator `**='" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "stary awk nie wspiera operatora `**='" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX nie zezwala na operator `**'" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "stary awk nie wspiera operatora `**'" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "operator `^=' nie jest wspierany w starym awk" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "operator `^' nie jest wspierany w starym awk" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "niezakoÅ„czony Å‚aÅ„cuch" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "nieprawidÅ‚owy znak '%c' w wyrażeniu" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' jest rozszerzeniem gawk" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' jest rozszerzeniem Bell Labs" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX nie zezwala na `%s'" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' nie jest wspierany w starym awk" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "`goto' uważane za szkodliwe!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d jest nieprawidÅ‚owe jako liczba argumentów dla %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: trzeci argument jest rozszerzeniem gawk" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: literaÅ‚ Å‚aÅ„cuchowy jako ostatni argument podstawienia nie ma żadnego " "efektu" -#: awkgram.y:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s trzeci parametr nie jest zmiennym obiektem" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: trzeci argument jest rozszerzeniem gawk" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: drugi argument jest rozszerzeniem gawk" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawidÅ‚owe użycie dcgettext(_\"...\"): usuÅ„ znak podkreÅ›lenia" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "nieprawidÅ‚owe użycie dcngettext(_\"...\"): usuÅ„ znak podkreÅ›lenia" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funkcja `%s': parametr #%d, `%s', powiela parametr #%d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funkcja `%s': parametr `%s' zasÅ‚ania globalnÄ… zmiennÄ…" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "nie można otworzyć `%s' do zapisu (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "wysyÅ‚anie profilu na standardowe wyjÅ›cie diagnostyczne" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "wysyÅ‚anie listy zmiennych na standardowe wyjÅ›cie diagnostyczne" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: zamkniÄ™cie nie powiodÅ‚o siÄ™ (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() wywoÅ‚ana podwójnie!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "wystÄ…piÅ‚y przykryte zmienne." -#: awkgram.y:3001 +#: awkgram.y:4206 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funkcja `%s': nie można użyć nazwy funkcji jako nazwy parametru" -#: awkgram.y:3004 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funkcja `%s': nie można użyć specjalnej zmiennej `%s' jako parametru funkcji" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "nazwa funkcji `%s' zostaÅ‚a zdefiniowana poprzednio" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funkcja `%s' zostaÅ‚a wywoÅ‚ana, ale nigdy nie zostaÅ‚a zdefiniowana" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "funkcja `%s' zostaÅ‚a zdefiniowana, ale nigdy nie zostaÅ‚a wywoÅ‚ana" +msgid "function `%s' defined but never called directly" +msgstr "" +"funkcja `%s' zostaÅ‚a zdefiniowana, ale nigdy nie zostaÅ‚a wywoÅ‚ana " +"bezpoÅ›rednio" -#: awkgram.y:3201 +#: awkgram.y:4435 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "staÅ‚e wyrażenie regularne dla parametru #%d daje wartość logicznÄ…" -#: awkgram.y:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -418,158 +537,149 @@ "`(',\n" "lub użyta jako zmienna lub jako tablica" -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "próba dzielenia przez zero w `/='" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "próba dzielenia przez zero" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "próba dzielenia przez zero w `%%'" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s do \"%s\" nie powiódÅ‚ siÄ™ (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "standardowe wyjÅ›cie" -#: builtin.c:124 -msgid "reason unknown" -msgstr "nieznany powód" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: otrzymano argument nie bÄ™dÄ…cy liczbÄ…" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argument %g jest poza zasiÄ™giem" -#: builtin.c:201 +#: builtin.c:200 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: nie można opróżnić: potok `%s' otwarty do czytania, a nie do zapisu" -#: builtin.c:204 +#: builtin.c:203 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: nie można opróżnić: plik `%s' otwarty do czytania, a nie do zapisu" -#: builtin.c:216 +#: builtin.c:215 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' nie jest ani otwartym plikiem, ani potokiem, ani procesem" -#: builtin.c:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: otrzymano drugi argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:464 +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: otrzymano argument, który jest tablicÄ…" + +#: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "`length(tablica)' jest rozszerzeniem gawk" -#: builtin.c:471 -#, fuzzy -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length: argument bez okreÅ›lonego typu zostanie uznany za skalar" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: argument bez okreÅ›lonego typu zostanie uznany za skalar" - -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: otrzymano ujemny argument %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "należy użyć `count$' we wszystkich formatach lub nic" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "fatal: należy użyć `count$' we wszystkich formatach lub nic" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "szerokość pola jest ignorowana dla specyfikatora `%%%%'" +msgid "field width is ignored for `%%' specifier" +msgstr "szerokość pola jest ignorowana dla specyfikatora `%%'" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "precyzja jest ignorowana dla specyfikatora `%%%%'" +msgid "precision is ignored for `%%' specifier" +msgstr "precyzja jest ignorowana dla specyfikatora `%%'" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "szerokość pola i precyzja sÄ… ignorowane dla specyfikatora `%%%%'" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "szerokość pola i precyzja sÄ… ignorowane dla specyfikatora `%%'" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' jest niedozwolony w formatach awk" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "fatal: `$' jest niedozwolony w formatach awk" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "argument count z `$' musi być > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "fatal: argument count z `$' musi być > 0" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "argument count %ld wiÄ™kszy niż caÅ‚kowita suma argumentów dostarczonych" +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "" +"fatal: argument count %ld wiÄ™kszy niż caÅ‚kowita suma argumentów dostarczonych" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "`$' jest niedozwolony po kropce w formacie" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "fatal: `$' jest niedozwolony po kropce w formacie" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "brak `$' dla pozycyjnej szerokoÅ›ci pola lub precyzji" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "fatal: brak `$' dla pozycyjnej szerokoÅ›ci pola lub precyzji" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' jest bezsensowny w formatach awk; zignorowany" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`l' jest niedozwolony w formatach POSIX awk" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "fatal: `l' jest niedozwolony w formatach POSIX awk" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' jest bezsensowny w formatach awk; zignorowany" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`L' jest niedozwolony w formatach POSIX awk" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "fatal: `L' jest niedozwolony w formatach POSIX awk" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' jest bezsensowny w formatach awk; zignorowany" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`h' jest niedozwolony w formatach POSIX awk" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "fatal: `h' jest niedozwolony w formatach POSIX awk" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: wartość %g jest poza zasiÄ™giem dla formatu `%%%c'" @@ -581,12 +691,13 @@ "pominiÄ™cie nieznanego formatu specyfikatora znaku `%c': nie skonwertowano " "argumentu" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" msgstr "" -"brak wystarczajÄ…cej liczby argumentów, aby zaspokoić Å‚aÅ„cuch formatujÄ…cy" +"fatal: brak wystarczajÄ…cej liczby argumentów, aby zaspokoić Å‚aÅ„cuch " +"formatujÄ…cy" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "zabrakÅ‚o ^" @@ -598,61 +709,61 @@ msgid "too many arguments supplied for format string" msgstr "zbyt dużo podanych argumentów w Å‚aÅ„cuchu formatujÄ…cym" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: brak argumentów" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: wywoÅ‚ana z ujemnym argumentem %g" -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: poczÄ…tkowy indeks %g jest nieprawidÅ‚owy, nastÄ…pi użycie 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "" -"substr: poczÄ…tkowy indeks %g, który nie jest liczbÄ… caÅ‚kowitÄ…, zostanie " -"obciÄ™ty" - -#: builtin.c:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: dÅ‚ugość %g nie jest >= 1" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: dÅ‚ugość %g nie jest >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: dÅ‚ugość %g, która nie jest liczbÄ… caÅ‚kowitÄ…, zostanie obciÄ™ta" -#: builtin.c:1524 +#: builtin.c:1517 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: dÅ‚ugość %g zbyt duża dla indeksu Å‚aÅ„cucha, obcinanie do %g" -#: builtin.c:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: poczÄ…tkowy indeks %g jest nieprawidÅ‚owy, nastÄ…pi użycie 1" + +#: builtin.c:1534 +#, c-format +msgid "substr: non-integer start index %g will be truncated" +msgstr "" +"substr: poczÄ…tkowy indeks %g, który nie jest liczbÄ… caÅ‚kowitÄ…, zostanie " +"obciÄ™ty" + +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr: Å‚aÅ„cuch źródÅ‚owy ma zerowÄ… dÅ‚ugość" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: poczÄ…tkowy indeks %g leży poza koÅ„cem Å‚aÅ„cucha" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -660,1013 +771,1075 @@ "substr: dÅ‚ugość %g zaczynajÄ…c od %g przekracza dÅ‚ugość pierwszego argumentu " "(%lu)" -#: builtin.c:1637 +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "" +"strftime: wartość formatu w PROCINFO[\"strftime\"] posiada typ numeryczny" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: otrzymano drugi argument, który nie jest liczbÄ…" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "strftime: drugi argument mniejszy od 0 lub zbyt duży dla time_t" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: otrzymano pierwszy argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: otrzymano pusty Å‚aÅ„cuch formatujÄ…cy" -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: otrzymano drugi argument, który nie jest liczbÄ…" - -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" -msgstr "" +msgstr "mktime: przynajmniej jedna z wartoÅ›ci jest poza domyÅ›lnym zakresem" -#: builtin.c:1783 +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "funkcja 'system' nie jest dozwolona w trybie piaskownicy" + +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "odwoÅ‚anie do niezainicjowanej zmiennej `%s'" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "odwoÅ‚anie do niezainicjowanego pola `$%d'" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: otrzymano argument, który nie jest Å‚aÅ„cuchem" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: otrzymano drugi argument, który nie jest liczbÄ…" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: otrzymano trzeci argument, który nie jest tablicÄ…" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: trzeci argument 0 potraktowany jako 1" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: otrzymano drugi argument, który nie jest liczbÄ…" -#: builtin.c:2868 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:2872 +#: builtin.c:2788 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): zbyt duża wartość przesuniÄ™cia spowoduje dziwne wyniki" -#: builtin.c:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: otrzymano drugi argument, który nie jest liczbÄ…" -#: builtin.c:2906 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:2910 +#: builtin.c:2825 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): zbyt duża wartość przesuniÄ™cia spowoduje dziwne wyniki" -#: builtin.c:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: otrzymano drugi argument, który nie jest liczbÄ…" -#: builtin.c:2944 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: otrzymano drugi argument, który nie jest liczbÄ…" -#: builtin.c:2980 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: otrzymano pierwszy argument, który nie jest liczbÄ…" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: otrzymano drugi argument, który nie jest liczbÄ…" -#: builtin.c:3016 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: otrzymano argument, który nie jest liczbÄ…" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): ujemne wartoÅ›ci spowodujÄ… dziwne wyniki" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): uÅ‚amkowe wartoÅ›ci zostanÄ… obciÄ™te" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' nie jest prawidÅ‚owÄ… kategoriÄ… lokalizacji" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "nieznany typ wÄ™zÅ‚a %d" -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "przepeÅ‚nienie bufora w genflags2str" +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "nieznany opcode %d" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:434 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "próba użycia tablicy `%s' w kontekÅ›cie skalaru" +msgid "opcode %s not an operator or keyword" +msgstr "opcode %s nie jest operatorem ani sÅ‚owem kluczowym" -#: eval.c:802 +#: eval.c:488 +msgid "buffer overflow in genflags2str" +msgstr "przepeÅ‚nienie bufora w genflags2str" + +#: eval.c:698 #, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" msgstr "" -"pÄ™tla for: tablica `%s' zmieniÅ‚a rozmiar z %ld do %ld podczas wykonywania " -"pÄ™tli" +"\n" +"\t# Stos WywoÅ‚awczy Funkcji:\n" +"\n" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "instrukcja `break' poza pÄ™tlÄ… jest nieprzenoÅ›na" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "instrukcja `break' poza pÄ™tlÄ… jest niedozwolona" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "instrukcja `continue' poza pÄ™tlÄ… jest nieprzenoÅ›na" +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' jest rozszerzeniem gawk" -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "instrukcja `continue' poza pÄ™tlÄ… jest niedozwolona" +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' jest rozszerzeniem gawk" -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "instrukcja `next' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "instrukcja `next' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "instrukcja `nextfile' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "instrukcja `nextfile' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y END" +#: eval.c:812 +#, c-format +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "wartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3" -#: eval.c:952 -msgid "statement has no effect" -msgstr "instrukcja nie ma żadnego efektu" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "zÅ‚a specyfikacja `%sFMT' `%s'" -#: eval.c:1029 eval.c:2011 +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "wyÅ‚Ä…czenie `--lint' z powodu przypisania do `LINT'" + +#: eval.c:1127 eval.c:1777 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "nie można użyć nazwy funkcji `%s' jako zmiennej lub tablicy" -#: eval.c:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "odwoÅ‚anie do niezainicjowanego argumentu `%s'" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "odwoÅ‚anie do niezainicjowanej zmiennej `%s'" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "próba odwoÅ‚ania do pola poprzez nienumerycznÄ… wartość" -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"konkatenacja: skutki uboczne w jednym wyrażeniu spowodowaÅ‚y zmianÄ™ dÅ‚ugoÅ›ci " -"innego wyrażenia!" +#: eval.c:1179 +msgid "attempt to field reference from null string" +msgstr "próba odwoÅ‚ania z zerowego Å‚aÅ„cucha" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "przypisanie użyte w kontekÅ›cie warunkowym" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "próba dostÄ™pu do pola %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "próba dzielenia przez zero" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "odwoÅ‚anie do niezainicjowanego pola `$%ld'" + +#: eval.c:1256 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "" +"funkcja `%s' zostaÅ‚a wywoÅ‚ana z wiÄ™kszÄ… iloÅ›ciÄ… argumentów niż zostaÅ‚o to " +"zadeklarowane" -#: eval.c:1409 profile.c:661 +#: eval.c:1437 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "nieprawidÅ‚owy typ (%s) w tree_eval" +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: niespodziewany typ `%s'" -#: eval.c:1572 +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "próba dzielenia przez zero w `/='" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "próba dzielenia przez zero w `%%='" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "próba użycia tablicy `%s[\"%.*s\"]' w kontekÅ›cie skalaru" + +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "przypisanie użyte w kontekÅ›cie warunkowym" + +#: eval.c:1911 +msgid "statement has no effect" +msgstr "instrukcja nie ma żadnego efektu" + +#: eval.c:2343 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"funkcja `%s' zostaÅ‚a wywoÅ‚ana z wiÄ™kszÄ… iloÅ›ciÄ… argumentów niż zostaÅ‚o to " -"zadeklarowane" +"pÄ™tla for: tablica `%s' zmieniÅ‚a rozmiar z %ld do %ld podczas wykonywania " +"pÄ™tli" -#: eval.c:1916 +#: eval.c:2458 +#, c-format +msgid "function called indirectly through `%s' does not exist" +msgstr "poÅ›rednio wywoÅ‚ana funkcja poprzez `%s' nie istnieje" + +#: eval.c:2470 #, c-format msgid "function `%s' not defined" msgstr "funkcja `%s' nie zostaÅ‚a zdefiniowana" -#: eval.c:1983 +#: eval.c:2511 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "non-redirected `getline' invalid inside `%s' rule" msgstr "" -"\n" -"\t# Stos WywoÅ‚awczy Funkcji:\n" -"\n" +"komenda `getline' bez przekierowania jest nieprawidÅ‚owa wewnÄ…trz reguÅ‚y `%s'" -#: eval.c:1986 +#: eval.c:2600 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- główne --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "próba odwoÅ‚ania do pola poprzez nienumerycznÄ… wartość" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "próba odwoÅ‚ania z zerowego Å‚aÅ„cucha" +msgid "error reading input file `%s': %s" +msgstr "bÅ‚Ä…d podczas czytania z pliku `%s': %s" -#: eval.c:2149 +#: eval.c:2614 #, c-format -msgid "attempt to access field %d" -msgstr "próba dostÄ™pu do pola %d" +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "instrukcja `nextfile' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y `%s'" -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "przypisanie do wyniku wbudowanej funkcji nie jest dozwolone" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "instrukcja `exit' nie może być wywoÅ‚ana w tym kontekÅ›cie" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' jest rozszerzeniem gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' jest rozszerzeniem gawk" - -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "wartość BINMODE `%s' jest nieprawidÅ‚owa, przyjÄ™to jÄ… jako 3" +msgid "`next' cannot be called from a `%s' rule" +msgstr "instrukcja `next' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y `%s'" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "zÅ‚a specyfikacja `%sFMT' `%s'" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Niestety nie wiem jak zinterpretować `%s'" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "wyÅ‚Ä…czenie `--lint' z powodu przypisania do `LINT'" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "rozszerzenia nie sÄ… dozwolone w trybie piaskownicy" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "`extension' jest rozszerzeniem gawk" -#: ext.c:77 +#: ext.c:75 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "rozszerzenie: nie można otworzyć `%s' (%s)\n" +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "fatal: rozszerzenie: nie można otworzyć `%s' (%s)\n" -#: ext.c:85 +#: ext.c:84 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "rozszerzenie: biblioteka `%s': nie można wywoÅ‚ać funkcji `%s' (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"fatal: rozszerzenie: biblioteka `%s': nie definiuje " +"`plugin_is_GPL_compatible' (%s)\n" -#: ext.c:105 +#: ext.c:93 +#, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"fatal: rozszerzenie: biblioteka `%s': nie można wywoÅ‚ać funkcji `%s' (%s)\n" + +#: ext.c:127 msgid "extension: missing function name" msgstr "rozszerzenie: brakujÄ…ca nazwa funkcji" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "rozszerzenie: nieprawidÅ‚owy znak `%c' w nazwie funkcji `%s'" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "rozszerzenie: nie można zredefiniować funkcji `%s'" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "rozserzenie: funkcja `%s' zostaÅ‚a już zdefiniowana" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "rozserzenie: nazwa funkcji `%s' zostaÅ‚a zdefiniowana wczeÅ›niej" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "rozszerzenie: nie można użyć wbudowanej w gawk `%s' jako nazwy funkcji" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "rozserzenie: nazwa funkcji `%s' zostaÅ‚a zdefiniowana wczeÅ›niej" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: ujemny licznik argumentów dla funkcji `%s'" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funkcja `%s' zdefiniowana aby pobrać nie wiÄ™cej niż %d argument(ów)" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funkcja `%s': brakuje #%d argumentu" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funkcja `%s': argument #%d: próba użycia skalaru jako tablicy" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funkcja `%s': argument #%d: próba użycia tablicy jako skalaru" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Operacja nie jest wspierana" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "NF ustawiony na wartość ujemnÄ…" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: czwarty argument jest rozszerzeniem gawk" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: czwarty argument nie jest tablicÄ…" + +#: field.c:969 msgid "split: second argument is not an array" msgstr "split: drugi argument nie jest tablicÄ…" -#: field.c:909 +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: nie można użyć tej samej tablicy dla drugiego i czwartego argumentu" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: nie można użyć podtablicy drugiego argumentu dla czwartego argumentu" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: nie można użyć podtablicy czwartego argumentu dla drugiego argumentu" + +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "split: zerowy Å‚aÅ„cuch dla trzeciego argumentu jest rozszerzeniem gawk" -#: field.c:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: czwarty argument nie jest tablicÄ…" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: drugi argument nie jest tablicÄ…" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: trzeci argument nie może być pusty" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: nie można użyć tej samej tablicy dla drugiego i czwartego argumentu" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: nie można użyć podtablicy drugiego argumentu dla czwartego " +"argumentu" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: nie można użyć podtablicy czwartego argumentu dla drugiego " +"argumentu" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' jest rozszerzeniem gawk" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "nieprawidÅ‚owa wartość FIELDWIDTHS, w pobliżu `%s'" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "zerowy Å‚aÅ„cuch dla `FS' jest rozszerzeniem gawk" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "stary awk nie wspiera wyrażeÅ„ regularnych jako wartoÅ›ci `FS'" -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "`FPAT' jest rozszerzeniem gawk" + +#: getopt.c:604 getopt.c:633 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opcja '%s' jest niejednoznaczna\n" -#: getopt.c:623 getopt.c:627 +#: getopt.c:679 getopt.c:683 #, c-format msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "%s: opcja '--%s' nie może mieć argumentów\n" -#: getopt.c:636 getopt.c:641 +#: getopt.c:692 getopt.c:697 #, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "%s: opcja '%c%s' nie może mieć argumentów\n" -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format +#: getopt.c:740 getopt.c:759 +#, c-format msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: opcja '%s' wymaga argumentu\n" +msgstr "%s: opcja '--%s' wymaga argumentu\n" -#: getopt.c:741 getopt.c:744 +#: getopt.c:797 getopt.c:800 #, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: nieznana opcja '--%s'\n" -#: getopt.c:752 getopt.c:755 +#: getopt.c:808 getopt.c:811 #, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: nieznana opcja '%c%s'\n" -#: getopt.c:804 getopt.c:807 +#: getopt.c:860 getopt.c:863 #, c-format msgid "%s: invalid option -- '%c'\n" msgstr "%s: bÅ‚Ä™dna opcja -- '%c'\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 #, c-format msgid "%s: option requires an argument -- '%c'\n" msgstr "%s: opcja wymaga argumentu -- '%c'\n" -#: getopt.c:930 getopt.c:946 +#: getopt.c:989 getopt.c:1005 #, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: opcja '-W %s' jest niejednoznaczna\n" -#: getopt.c:970 getopt.c:988 +#: getopt.c:1029 getopt.c:1047 #, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: opcja '-W %s' nie może mieć argumentów\n" -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format +#: getopt.c:1068 getopt.c:1086 +#, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: opcja '%s' wymaga argumentu\n" +msgstr "%s: opcja '-W %s' wymaga argumentu\n" + +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "argument linii poleceÅ„ `%s' jest katalogiem: pominiÄ™to" -#: io.c:322 io.c:352 +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "nie można otworzyć pliku `%s' do czytania (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "zamkniÄ™cie fd %d (`%s') nie powiodÅ‚o siÄ™ (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "nieprawidÅ‚owy typ drzewa %s w funkcji redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "przekierowanie nie jest dozwolone w trybie piaskownicy" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "wyrażenie w przekierowaniu `%s' ma tylko wartość numerycznÄ…" -#: io.c:595 +#: io.c:618 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "wyrażenie dla przekierowania `%s' ma zerowÄ… wartość Å‚aÅ„cucha" -#: io.c:600 +#: io.c:623 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nazwa pliku `%s' dla przekierowania `%s' może być rezultatem logicznego " "wyrażenia" -#: io.c:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "niepotrzebne mieszanie `>' i `>>' dla pliku `%.*s'" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "nie można otworzyć potoku `%s' jako wyjÅ›cia (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "nie można otworzyć potoku `%s' jako wejÅ›cia (%s)" -#: io.c:717 +#: io.c:752 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" "nie można otworzyć dwukierunkowego potoku `%s' jako wejÅ›cia/wyjÅ›cia (%s)" -#: io.c:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "nie można przekierować z `%s' (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "nie można przekierować do `%s' (%s)" -#: io.c:851 +#: io.c:888 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "osiÄ…gniÄ™to systemowy limit otwartych plików: rozpoczÄ™cie multipleksowania " "deskryptorów plików" -#: io.c:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "zamkniÄ™cie `%s' nie powiodÅ‚o siÄ™ (%s)." -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" msgstr "zbyt dużo otwartych potoków lub plików wejÅ›ciowych" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: drugim argumentem musi być `to' lub `from'" -#: io.c:912 +#: io.c:951 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" "close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesem" -#: io.c:917 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "zamkniÄ™cie przekierowania, które nigdy nie zostaÅ‚o otwarte" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: przekierowanie `%s' nie zostaÅ‚o otwarte z `|&', drugi argument " "zignorowany" -#: io.c:1030 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania potoku `%s' (%s)" -#: io.c:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "status awarii (%d) podczas zamykania pliku `%s' (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "brak jawnego zamkniÄ™cia gniazdka `%s'" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "brak jawnego zamkniÄ™cia procesu pomocniczego `%s'" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "brak jawnego zamkniÄ™cia potoku `%s'" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "brak jawnego zamkniÄ™cia pliku `%s'" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "bÅ‚Ä…d podczas zapisu na standardowe wyjÅ›cie (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "bÅ‚Ä…d podczas zapisu na standardowe wyjÅ›cie diagnostyczne (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "opróżnienie potoku `%s' nie powiodÅ‚o siÄ™ (%s)." -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" "opróżnienie potoku do `%s' przez proces pomocniczy nie powiodÅ‚o siÄ™ (%s)." -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "opróżnienie pliku `%s' nie powiodÅ‚o siÄ™ (%s)." -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "nieprawidÅ‚owy lokalny port %s w `/inet'" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "informacje o zdalnym hoÅ›cie i porcie sÄ… nieprawidÅ‚owe (%s, %s)" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "klient /inet/raw nie jest jeszcze gotowy, przykro mi" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "tylko superużytkownik (root) może użyć `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "serwer /inet/raw nie jest jeszcze gotowy, przykro mi" - -#: io.c:1409 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nie dostarczono (znanego) protokoÅ‚u w specjalnym pliku `%s'" -#: io.c:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "specjalna nazwa pliku `%s' jest niekompletna" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "należy dostarczyć nazwÄ™ zdalnego hosta do `/inet'" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "należy dostarczyć numer zdalnego portu do `/inet'" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "Komunikacja TCP/IP nie jest wspierana" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "plik `%s' jest katalogiem" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "użyj `PROCINFO[\"%s\"]' zamiast `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "użyj `PROCINFO[...]' zamiast `/dev/user'" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "nie można otworzyć `%s', tryb `%s'" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "zamkniÄ™cie nadrzÄ™dnego pty nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "" "zamkniÄ™cie standardowego wyjÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1928 +#: io.c:1752 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" "przesuniÄ™cie podlegÅ‚ego pty na standardowe wyjÅ›cie w procesie potomnym nie " "powiodÅ‚o siÄ™ (dup: %s)" -#: io.c:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "" "zamkniÄ™cie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™ (%s)" -#: io.c:1933 +#: io.c:1757 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" "przesuniÄ™cie podlegÅ‚ego pty na standardowe wejÅ›cie w procesie potomnym nie " "powiodÅ‚o siÄ™ (dup: %s)" -#: io.c:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "zamkniÄ™cie podlegÅ‚ego pty nie powiodÅ‚o siÄ™ (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" "przesuniÄ™cie potoku na standardowe wyjÅ›cie w procesie potomnym nie powiodÅ‚o " "siÄ™ (dup: %s)" -#: io.c:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" "przesuniÄ™cie potoku na standardowe wejÅ›cie w procesie potomnym nie powiodÅ‚o " "siÄ™ (dup: %s)" -#: io.c:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "" "odzyskanie standardowego wyjÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "" "odzyskanie standardowego wejÅ›cia w procesie potomnym nie powiodÅ‚o siÄ™\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "zamkniÄ™cie potoku nie powiodÅ‚o siÄ™ (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" msgstr "`|&' nie jest wspierany" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "nie można otworzyć potoku `%s' (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "nie można utworzyć procesu potomnego dla `%s' (fork: %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "plik danych `%s' jest pusty" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "nie można zarezerwować wiÄ™cej pamiÄ™ci wejÅ›ciowej" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "bÅ‚Ä…d podczas czytania z pliku `%s': %s" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "wieloznakowa wartość `RS' jest rozszerzeniem gawk" -#: main.c:306 -msgid "out of memory" -msgstr "brak pamiÄ™ci" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "Komunikacja IPv6 nie jest wspierana" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "nieistotna opcja `-m[fr]' w gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "użycie opcji -m: `-m[fr] nnn'" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "pusty argument dla opcji `-e/--source' zostaÅ‚ zignorowany" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opcja `-W %s' nierozpoznana i zignorowana\n" -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "pusty argument dla opcji `--source' zostaÅ‚ zignorowany" - -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opcja musi mieć argument -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "" "zmienna Å›rodowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' zostaÅ‚ wÅ‚Ä…czony" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "opcja `--posix' zostanie użyta nad `--traditional'" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' użyte nad opcjÄ… `--non-decimal-data'" -#: main.c:530 +#: main.c:557 #, c-format msgid "running %s setuid root may be a security problem" msgstr "" "uruchamianie %s setuid root może być problemem pod wzglÄ™dem bezpieczeÅ„stwa" -#: main.c:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "opcja `--posix' zostanie użyta nad `--binary'" + +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "nie można ustawić trybu binarnego na standardowym wejÅ›ciu (%s)" -#: main.c:574 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "nie można ustawić trybu binarnego na standardowym wyjÅ›ciu (%s)" -#: main.c:576 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "nie można ustawić trybu binarnego na wyjÅ›ciu diagnostycznym (%s)" -#: main.c:617 +#: main.c:657 msgid "no program text at all!" msgstr "brak tekstu programu!" -#: main.c:721 +#: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" "Użycie: %s [styl opcji POSIX lub GNU] -f plik_z_programem [--] plik ...\n" -#: main.c:723 +#: main.c:736 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Użycie: %s [styl opcji POSIX lub GNU] [--] %cprogram%c plik ...\n" -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opcje POSIX:\t\tDÅ‚ugie opcje GNU:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "Opcje POSIX:\t\tDÅ‚ugie opcje GNU (standard):\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f program\t\t--file=program\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:731 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v zmienna=wartość\t--assign=zmienna=wartość\n" -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] wartość\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=plik]\t--dump-variables[=plik]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=plik\t\t--exec=plik\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "Krótkie opcje:\t\tDÅ‚ugie opcje GNU: (rozszerzenia)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[plik]\t\t--dump-variables[=plik]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=plik]\t--profile[=plik]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'tekst-programu'\t--source='tekst-programu'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E plik\t\t\t--exec=plik\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=tekst-programu\t--source=tekst-programu\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[plik]\t\t--profile[=plik]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R plik\t\t\t--command=plik\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1679,7 +1852,7 @@ "dokumentacji.\n" "\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1689,7 +1862,7 @@ "Program domyÅ›lnie czyta standardowe wejÅ›cie i zapisuje standardowe wyjÅ›cie.\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1699,7 +1872,7 @@ "\tgawk '{ suma += $1 }; END { print suma }' plik\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1718,7 +1891,7 @@ "tej Licencji lub którejÅ› z późniejszych wersji.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1733,7 +1906,7 @@ "PowszechnÄ… LicencjÄ™ PublicznÄ… GNU.\n" "\n" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1742,11 +1915,16 @@ "Powszechnej Licencji Publicznej GNU (GNU General Public License);\n" "jeÅ›li zaÅ› nie - odwiedź stronÄ™ http://www.gnu.org/licenses/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft nie ustawia FS na znak tabulatora w POSIX awk" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "nieznana wartość dla specyfikacji pola: %d\n" + +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1755,86 +1933,79 @@ "%s: argument `%s' dla `-v' nie jest zgodny ze skÅ‚adniÄ… `zmienna=wartość'\n" "\n" -#: main.c:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' nie jest dozwolonÄ… nazwÄ… zmiennej" -#: main.c:1145 +#: main.c:1200 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' nie jest nazwÄ… zmiennej, szukanie pliku `%s=%s'" -#: main.c:1184 +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "nie można użyć wbudowanej w gawk `%s' jako nazwy zmiennej" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "nie można użyć funkcji `%s' jako nazwy zmiennej" + +#: main.c:1262 msgid "floating point exception" msgstr "wyjÄ…tek zmiennopozycyjny" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "fatalny bÅ‚Ä…d: wewnÄ™trzny bÅ‚Ä…d" -#: main.c:1206 +#: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "fatalny bÅ‚Ä…d: wewnÄ™trzny bÅ‚Ä…d: bÅ‚Ä…d segmentacji" -#: main.c:1218 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "fatalny bÅ‚Ä…d: wewnÄ™trzny bÅ‚Ä…d: przepeÅ‚nienie stosu" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "brak już otwartego fd %d" -#: main.c:1275 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "nie można otworzyć zawczasu /dev/null dla fd %d" -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "nie można znaleźć grup: %s" - -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "linia poleceÅ„:" -#: msg.c:120 -msgid "warning: " -msgstr "ostrzeżenie: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "bÅ‚Ä…d: " -#: msg.c:178 -msgid "fatal: " -msgstr "fatalny bÅ‚Ä…d: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "nie można zamienić Å‚aÅ„cucha do liczby zmiennopozycyjnej" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "backslash na koÅ„cu Å‚aÅ„cucha" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "stary awk nie wspiera sekwencji ucieczki `\\%c'" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX nie zezwala na sekwencjÄ™ ucieczki `\\x'" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "brak liczb szesnastkowych w sekwencji ucieczki `\\x'" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " @@ -1843,68 +2014,67 @@ "szesnastkowa sekwencja ucieczki \\x%.*s %d znaków prawdopodobnie nie zostaÅ‚a " "zinterpretowana jak tego oczekujesz" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "sekwencja ucieczki `\\%c' potraktowana jako zwykÅ‚e `%c'" -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': nie można ustawić close-on-exec: (fcntl: %s)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Wykryto nieprawidÅ‚owe dane. Możliwe jest niedopasowanie pomiÄ™dzy Twoimi " +"danymi a ustawieniami regionalnymi." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "nie można otworzyć `%s' do zapisu: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "%s %s `%s': nie można uzyskać flag fd: (fcntl F_GETFD: %s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "wewnÄ™trzny bÅ‚Ä…d: %s z zerowym vname" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# potraktowany wewnÄ™trznie jako `delete'" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s `%s': nie można ustawić close-on-exec: (fcntl F_SETFD: %s)" -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# to jest dynamicznie Å‚adowana funkcja rozszerzenie" +msgid "could not open `%s' for writing: %s" +msgstr "nie można otworzyć `%s' do zapisu: %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# profil programu gawk, utworzony %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "wysyÅ‚anie profilu na standardowe wyjÅ›cie diagnostyczne" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# blok(i) BEGIN\n" +"\t# %s blok(i)\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" "\n" msgstr "" -"\t# ReguÅ‚y\n" +"\t# ReguÅ‚a(i)\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# blok(i) END\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "wewnÄ™trzny bÅ‚Ä…d: %s z zerowym vname" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# profil programu gawk, utworzony %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1913,88 +2083,207 @@ "\n" "\t# Funkcje, spis alfabetyczny\n" -#: profile.c:1405 +#: profile.c:1370 +#, c-format +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: nieznany typ przekierowania %d" + +#: re.c:573 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "niespodziewany typ %s w prec_level" +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "zasiÄ™g formy `[%c-%c]' jest zależny od lokalizacji" -#: profile.c:1527 +#: re.c:600 #, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Nieznany typ wÄ™zÅ‚a %s w pp_var" +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "komponent regexp `%.*s' powinien być prawdopodobnie `[%.*s]'" -#: regcomp.c:132 +#: regcomp.c:131 msgid "Success" msgstr "Sukces" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Brak dopasowania" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "NieprawidÅ‚owe wyrażenie regularne" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" msgstr "NieprawidÅ‚owy znak porównania" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "NieprawidÅ‚owa nazwa klasy znaku" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "KoÅ„cowy znak backslash" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "NieprawidÅ‚owe odwoÅ‚anie wsteczne" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Niedopasowany znak [ lub [^" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Niedopasowany znak ( lub \\(" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "Niedopasowany znak \\{" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "NieprawidÅ‚owa zawartość \\{\\}" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "NieprawidÅ‚owy koniec zakresu" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Pamięć wyczerpana" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "NieprawidÅ‚owe poprzedzajÄ…ce wyrażenie regularne" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" msgstr "Przedwczesny koniec wyrażenia regularnego" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "Wyrażenie regularne jest zbyt duże" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Niedopasowany znak ) lub \\)" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "Brak poprzedniego wyrażenia regularnego" +#~ msgid "could not find groups: %s" +#~ msgstr "nie można znaleźć grup: %s" + +#~ msgid "assignment is not allowed to result of builtin function" +#~ msgstr "przypisanie do wyniku wbudowanej funkcji nie jest dozwolone" + +#~ msgid "attempt to use array in a scalar context" +#~ msgstr "próba użycia tablicy w kontekÅ›cie skalaru" + +#~ msgid "statement may have no effect" +#~ msgstr "instrukcja może nie mieć żadnego efektu" + +#~ msgid "out of memory" +#~ msgstr "brak pamiÄ™ci" + +#~ msgid "attempt to use scalar `%s' as array" +#~ msgstr "próba użycia skalaru `%s' jako tablicy" + +#~ msgid "attempt to use array `%s' in scalar context" +#~ msgstr "próba użycia tablicy `%s' w kontekÅ›cie skalaru" + +#~ msgid "call of `length' without parentheses is deprecated by POSIX" +#~ msgstr "" +#~ "wywoÅ‚anie `length' bez podania nawiasów jest niezalecane przez POSIX" + +#~ msgid "division by zero attempted in `/'" +#~ msgstr "próba dzielenia przez zero w `/'" + +#~ msgid "length: untyped parameter argument will be forced to scalar" +#~ msgstr "length: argument bez okreÅ›lonego typu zostanie uznany za skalar" + +#~ msgid "length: untyped argument will be forced to scalar" +#~ msgstr "length: argument bez okreÅ›lonego typu zostanie uznany za skalar" + +#~ msgid "`break' outside a loop is not portable" +#~ msgstr "instrukcja `break' poza pÄ™tlÄ… jest nieprzenoÅ›na" + +#~ msgid "`continue' outside a loop is not portable" +#~ msgstr "instrukcja `continue' poza pÄ™tlÄ… jest nieprzenoÅ›na" + +#~ msgid "`next' cannot be called from a BEGIN rule" +#~ msgstr "instrukcja `next' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y BEGIN" + +#~ msgid "`nextfile' cannot be called from a BEGIN rule" +#~ msgstr "instrukcja `nextfile' nie może być wywoÅ‚ana z wnÄ™trza reguÅ‚y BEGIN" + +#~ msgid "" +#~ "concatenation: side effects in one expression have changed the length of " +#~ "another!" +#~ msgstr "" +#~ "konkatenacja: skutki uboczne w jednym wyrażeniu spowodowaÅ‚y zmianÄ™ " +#~ "dÅ‚ugoÅ›ci innego wyrażenia!" + +#~ msgid "illegal type (%s) in tree_eval" +#~ msgstr "nieprawidÅ‚owy typ (%s) w tree_eval" + +#~ msgid "\t# -- main --\n" +#~ msgstr "\t# -- główne --\n" + +#~ msgid "invalid tree type %s in redirect()" +#~ msgstr "nieprawidÅ‚owy typ drzewa %s w funkcji redirect()" + +#~ msgid "/inet/raw client not ready yet, sorry" +#~ msgstr "klient /inet/raw nie jest jeszcze gotowy, przykro mi" + +#~ msgid "only root may use `/inet/raw'." +#~ msgstr "tylko superużytkownik (root) może użyć `/inet/raw'." + +#~ msgid "/inet/raw server not ready yet, sorry" +#~ msgstr "serwer /inet/raw nie jest jeszcze gotowy, przykro mi" + +#~ msgid "file `%s' is a directory" +#~ msgstr "plik `%s' jest katalogiem" + +#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +#~ msgstr "użyj `PROCINFO[\"%s\"]' zamiast `%s'" + +#~ msgid "use `PROCINFO[...]' instead of `/dev/user'" +#~ msgstr "użyj `PROCINFO[...]' zamiast `/dev/user'" + +#~ msgid "\t-m[fr] val\n" +#~ msgstr "\t-m[fr] wartość\n" + +#~ msgid "\t-W compat\t\t--compat\n" +#~ msgstr "\t-W compat\t\t--compat\n" + +#~ msgid "\t-W copyleft\t\t--copyleft\n" +#~ msgstr "\t-W copyleft\t\t--copyleft\n" + +#~ msgid "\t-W usage\t\t--usage\n" +#~ msgstr "\t-W usage\t\t--usage\n" + +#~ msgid "can't convert string to float" +#~ msgstr "nie można zamienić Å‚aÅ„cucha do liczby zmiennopozycyjnej" + +#~ msgid "# treated internally as `delete'" +#~ msgstr "# potraktowany wewnÄ™trznie jako `delete'" + +#~ msgid "# this is a dynamically loaded extension function" +#~ msgstr "# to jest dynamicznie Å‚adowana funkcja rozszerzenie" + +#~ msgid "" +#~ "\t# BEGIN block(s)\n" +#~ "\n" +#~ msgstr "" +#~ "\t# blok(i) BEGIN\n" +#~ "\n" + +#~ msgid "unexpected type %s in prec_level" +#~ msgstr "niespodziewany typ %s w prec_level" + +#~ msgid "Unknown node type %s in pp_var" +#~ msgstr "Nieznany typ wÄ™zÅ‚a %s w pp_var" + #~ msgid "can't open two way socket `%s' for input/output (%s)" #~ msgstr "" #~ "nie można otworzyć dwukierunkowego gniazda `%s' jako wejÅ›cia/wyjÅ›cia (%s)" @@ -2002,9 +2291,6 @@ #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: niewÅ‚aÅ›ciwa opcja -- %c\n" -#~ msgid "remote port invalid in `%s'" -#~ msgstr "nieprawidÅ‚owy zdalny port w `%s'" - #~ msgid "function %s called\n" #~ msgstr "wywoÅ‚ano funkcjÄ™ %s\n" @@ -2014,12 +2300,6 @@ #~ msgid "delete: illegal use of variable `%s' as array" #~ msgstr "delete: nieprawidÅ‚owe użycie zmiennej `%s' jako tablicy" -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: pierwszy argument nie jest tablicÄ…" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: drugi argument nie jest tablicÄ…" - #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/pt_BR.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/pt_BR.gmo differ diff -Nru gawk-3.1.8+dfsg/po/pt_BR.po gawk-4.0.1+dfsg/po/pt_BR.po --- gawk-3.1.8+dfsg/po/pt_BR.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/pt_BR.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2001 +0,0 @@ -# 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.2g\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2003-06-26 16:18+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:112 -#, fuzzy, c-format -msgid "attempt to use function `%s' as an array" -msgstr "tentativa de usar escalar `%s' como vetor" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "tentativa de usar parâmetro escalar `%s' como vetor" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "tentativa de usar escalar `%s' como vetor" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "de %s" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "referência a elemento não inicializado `%s[\"%s\"]'" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "índice do vetor `%s' é uma string nula" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: índice `%s' não está no vetor `%s'" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: vazio (nulo)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: vazio (zero)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: table_size = %d, array_size = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: é parâmetro\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: array_ref para %s\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "blocos %s devem ter uma parte de ação" - -#: awkgram.y:221 -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:257 awkgram.y:266 -#, fuzzy -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "o velho awk não suporta o operador `**'" - -#: awkgram.y:285 -#, 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:331 -#, fuzzy -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "constante de expr. reg. `/%s/' parece um comentário C, mas não é" - -#: awkgram.y:334 -#, 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:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "declaração pode não ter efeito" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "`%s' usado em ação %s" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' é uma extensão do gawk" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "`return' usado fora do contexto de função" - -#: awkgram.y:534 -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:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' é uma extensão do gawk" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete(array)' é uma extensão não-portável do tawk" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "valores de case duplicados no corpo do switch: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "Detectado `default' duplicado no corpo do switch" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "pipelines bidirecionais de múltiplos estágios não funcionam" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "expressão regular à direita de atribuição" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "expressão regular à esquerda de operador `~' ou `!~'" - -#: awkgram.y:830 awkgram.y:903 -#, fuzzy -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "o velho awk não suporta o operador `**'" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "expressão regular à direita de comparação" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "`getline' não-redirecionado não é definido dentro da ação END" - -#: awkgram.y:904 -#, fuzzy -msgid "old awk does not support multidimensional arrays" -msgstr "o velho awk não suporta o operador `**'" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "chamada a `length' sem parênteses não é portável" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "chamada a `length' sem parênteses é obsoleta de acordo com POSIX" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "uso de não-vetor como vetor" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "expressão de índice inválida" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "fim de linha ou de string inesperado" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "texto de programa vazio na linha de comando" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "impossível abrir arquivo-fonte `%s' para leitura (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "impossível ler arquivo-fonte `%s' (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "arquivo-fonte `%s' está vazio" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "arquivo-fonte não termina em fim-de-linha" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "expressão regular inacabada termina com `\\' ao fim do arquivo" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "expressão regular inacabada" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "expressão regular inacabada no fim do arquivo" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "uso da continuação de linha `\\ #...' não é portável" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "`\\' não é o último caracter da linha" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX não permite o operador `**='" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "o velho awk não suporta o operador `**='" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX não permite o operador `**'" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "o velho awk não suporta o operador `**'" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "o velho awk não suporta o operador `^='" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "o velho awk não suporta o operador `^'" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "string inacabada" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "caracter inválido '%c' em expressão" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' é uma extensão do gawk" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' é uma extensão da Bell Labs" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX não permite `%s'" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' não é suportado no velho awk" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "`goto' é considerado danoso!\n" - -#: awkgram.y:2437 -#, 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:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: terceiro argumento é uma extensão do gawk" - -#: awkgram.y:2472 -#, 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:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "terceiro parâmetro %s não é um objeto modificável" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: segundo argumento é uma extensão do gawk" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "uso de dcgettext(_\"...\") é incorreto: remova o `_' precedente" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "uso de dcngettext(_\"...\") é incorreto: remova o `_' precedente" - -#: awkgram.y:2602 -#, 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:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "função `%s': parâmetro `%s' encobre variável global" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "impossível abrir `%s' para escrita (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "enviando perfil para saída de erros" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: `close' falhou (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() chamada duas vezes!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "houve variáveis encobertas." - -#: awkgram.y:3001 -#, 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:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "nome de função `%s' definido anteriormente" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "função `%s' chamada mas nunca definida" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "função `%s' definida mas nunca chamada" - -#: awkgram.y:3201 -#, 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:3245 -#, fuzzy, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"função `%s' chamada com espaço entre o nome e o `(',\n" -"%s" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "tentativa de divisão por zero em `/='" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "tentativa de divisão por zero em `%%'" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s para \"%s\" falhou (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "saída padrão" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "motivo desconhecido" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: recebeu argumento não-numérico" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: argumento %g está fora da faixa" - -#: builtin.c:201 -#, 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:204 -#, 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:216 -#, 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:310 -msgid "index: received non-string first argument" -msgstr "index: recebeu primeiro argumento não-string" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: recebeu segundo argumento não-string" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: recebeu argumento não-numérico" - -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "`delete array' é uma extensão do gawk" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: recebeu argumento não-string" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: recebeu argumento não-numérico" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: recebeu argumento negativo %g" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "deve usar `count$' em todos os formatos ou nenhum" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' não é permitido em formatos awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "nº de argumentos com `$' deve ser > 0" - -#: builtin.c:853 -#, 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:855 -msgid "`$' not permitted after period in format" -msgstr "`$' não é permitido depois de ponto no formato" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "nenhum `$' fornecido para tamanho ou precisão de campo posicional" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "`l' não faz sentido em formatos awk; ignorado" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`l' não é permitido em formatos POSIX awk" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "`L' não faz sentido em formatos awk; ignorado" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`L' não é permitido em formatos POSIX awk" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "`h' não faz sentido em formatos awk; ignorado" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`h' não é permitido em formatos POSIX awk" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: valor %g fora da faixa para formato `%%%c'" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "argumentos insuficientes para a string de formato" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ acabou para este aqui" - -#: builtin.c:1346 -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:1349 -msgid "too many arguments supplied for format string" -msgstr "excesso de argumentos para a string de formato" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: nenhum argumento" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: recebeu argumento não-numérico" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: chamada com argumento negativo %g" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: posição inicial %g é inválida, usando 1" - -#: builtin.c:1484 -#, 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:1510 -#, fuzzy, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: comprimento %g é <= 0" - -#: builtin.c:1512 -#, fuzzy, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: comprimento %g é <= 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr: comprimento %g não-inteiro será truncado" - -#: builtin.c:1524 -#, 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:1536 -msgid "substr: source string is zero length" -msgstr "substr: string origem tem comprimento zero" - -#: builtin.c:1552 -#, 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:1560 -#, 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:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: recebeu primeiro argumento não-string" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: recebeu string de formato vazia" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: recebeu segundo argumento não-numérico" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: recebeu argumento não-string" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: recebeu argumento não-string" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "referência a campo não inicializado `$%d'" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: recebeu argumento não-string" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: recebeu argumento não-string" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: recebeu primeiro argumento não-numérico" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: recebeu segundo argumento não-numérico" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: recebeu argumento não-numérico" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: recebeu argumento não-numérico" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: recebeu argumento não-numérico" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: terceiro argumento não é um vetor" - -#: builtin.c:2744 -#, fuzzy -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: 3º argumento 0 tratado como 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: recebeu primeiro argumento não-numérico" - -#: builtin.c:2862 -#, fuzzy -msgid "lshift: received non-numeric second argument" -msgstr "strftime: recebeu segundo argumento não-numérico" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): valores negativos darão resultados estranhos" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): valores fracionários serão truncados" - -#: builtin.c:2872 -#, 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:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: recebeu primeiro argumento não-numérico" - -#: builtin.c:2900 -#, fuzzy -msgid "rshift: received non-numeric second argument" -msgstr "strftime: recebeu segundo argumento não-numérico" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): valores negativos darão resultados estranhos" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): valores fracionários serão truncados" - -#: builtin.c:2910 -#, 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:2936 -msgid "and: received non-numeric first argument" -msgstr "and: recebeu primeiro argumento não-numérico" - -#: builtin.c:2938 -#, fuzzy -msgid "and: received non-numeric second argument" -msgstr "atan2: recebeu segundo argumento não-numérico" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): valores negativos darão resultados estranhos" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): valores fracionários serão truncados" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: recebeu primeiro argumento não-numérico" - -#: builtin.c:2974 -#, fuzzy -msgid "or: received non-numeric second argument" -msgstr "atan2: recebeu segundo argumento não-numérico" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): valores negativos darão resultados estranhos" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): valores fracionários serão truncados" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: recebeu primeiro argumento não-numérico" - -#: builtin.c:3010 -#, fuzzy -msgid "xor: received non-numeric second argument" -msgstr "atan2: recebeu segundo argumento não-numérico" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): valores negativos darão resultados estranhos" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): valores fracionários serão truncados" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: recebeu primeiro argumento não-numérico" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): valores negativos darão resultados estranhos" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): valores fracionários serão truncados" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' não é uma categoria de \"locale\" válida" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "tipo de nodo desconhecido %d" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "estouro de buffer em genflags2str" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentativa de usar vetor `%s' em um contexto escalar" - -#: eval.c:802 -#, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"loop for: vetor `%s' mudou de tamanho de %ld para %ld durante a execução" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "`break' fora de um loop não é portável" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "`break' fora de um loop não é permitido" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' fora de um loop não é portável" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "`continue' fora de um loop não é permitido" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' não pode ser chamado de uma regra BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' não pode ser chamado de uma regra END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' não pode ser chamado de uma regra BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' não pode ser chamado de uma regra END" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "declaração não tem efeito" - -#: eval.c:1029 eval.c:2011 -#, 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:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referência a argumento não inicializado `%s'" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referência a variável não inicializada `%s'" - -#: eval.c:1197 -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:1301 -msgid "assignment used in conditional context" -msgstr "atribuição usada em contexto condicional" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "tentativa de divisão por zero" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipo ilegal (%s) em tree_eval" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "tentativa de divisão por zero em `/='" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "tentativa de divisão por zero em `%%='" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "função `%s' chamada com mais argumentos que os declarados" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "função `%s' não definida" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Pilha de Chamadas de Função:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -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:2143 -msgid "attempt to reference from null string" -msgstr "tentativa de referência a partir de string nula" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "tentativa de acessar campo %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "atribuição não pode resultar de funções intrínsecas" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' é uma extensão do gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' é uma extensão do gawk" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "especificação `%sFMT' inválida `%s'" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "desativando `--lint' devido a atribuição a `LINT'" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "`extension' é uma extensão do gawk" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: impossível abrir `%s' (%s)\n" - -#: ext.c:85 -#, 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:105 -msgid "extension: missing function name" -msgstr "" - -#: ext.c:110 -#, fuzzy, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: biblioteca `%s': impossível chamar função `%s' (%s)\n" - -#: ext.c:116 -#, fuzzy, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: impossível abrir `%s' (%s)\n" - -#: ext.c:120 -#, fuzzy, c-format -msgid "extension: function `%s' already defined" -msgstr "função `%s' não definida" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" - -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "nome de função `%s' definido anteriormente" - -#: ext.c:204 -#, fuzzy, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "função `%s' definida mas nunca chamada" - -#: ext.c:207 -#, fuzzy, c-format -msgid "function `%s': missing argument #%d" -msgstr "função `%s' não definida" - -#: ext.c:217 -#, fuzzy, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "tentativa de usar escalar `%s' como vetor" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Operação Não Suportada" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "valor negativo atribuído a NF" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: segundo argumento não é um vetor" - -#: field.c:909 -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:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' é uma extensão do gawk" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "string nula para `FS' é uma extensão do gawk" - -#: field.c:1092 -#, fuzzy -msgid "old awk does not support regexps as value of `FS'" -msgstr "o velho awk não suporta o operador `**'" - -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: opção `%s' é ambígua\n" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: opção `--%s' não aceita argumento\n" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, 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:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: opção `%s' requer argumento\n" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: opção não reconhecida `--%s'\n" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: opção não reconhecida `%c%s'\n" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opção inválida -- %c\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: opção requer argumento -- %c\n" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: opção `-W %s' é ambígua\n" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: opção `-W %s' não aceita argumento\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: opção `%s' requer argumento\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "impossível abrir arquivo `%s' para leitura (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "fechamento do descritor %d (`%s') falhou (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipo de árvore %s inválido em redirect()" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "expressão no redirecionamento `%s' só tem valor numérico" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "expressão para o redirecionamento `%s' tem valor string nulo" - -#: io.c:600 -#, 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:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "mistura desnecessária de `>' e `>>' para arquivo `%.*s'" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "impossível abrir pipe `%s' para saída (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "impossível abrir pipe `%s' para entrada (%s)" - -#: io.c:717 -#, 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:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "impossível redirecionar de `%s' (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "impossível redirecionar para `%s' (%s)" - -#: io.c:851 -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:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "fechamento de `%s' falhou (%s)" - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "excesso de pipes ou arquivos de entrada abertos" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: segundo argumento deve ser `to' ou `from'" - -#: io.c:912 -#, 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:917 -msgid "close of redirection that was never opened" -msgstr "fechamento de redirecionamento que nunca foi aberto" - -#: io.c:1014 -#, 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:1030 -#, 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:1033 -#, 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:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "fechamento explícito do socket `%s' não fornecido" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "fechamento explícito do co-processo `%s' não fornecido" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "fechamento explícito do pipe `%s' não fornecido" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "fechamento explícito do arquivo `%s' não fornecido" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "erro ao escrever na saída padrão (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "erro ao escrever na saída padrão de erros (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "descarga de pipe de `%s' falhou (%s)." - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "descarga de co-processo de pipe para `%s' falhou (%s)." - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "descarga de arquivo de `%s' falhou (%s)." - -#: io.c:1222 -#, fuzzy, c-format -msgid "local port %s invalid in `/inet'" -msgstr "porta local inválida em `%s'" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "infelizmente, o cliente de /inet/raw não está concluído" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "apenas root pode usar `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "infelizmente, o servidor de /inet/raw não está concluído" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "" -"nenhum protocolo (conhecido) fornecido em nome de arquivo especial `%s'" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "nome de arquivo especial `%s' está incompleto" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "deve ser fornecido um nome de host remoto para `/inet'" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "deve ser fornecida uma porta remota para `/inet'" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "comunicação TCP/IP não é suportada" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "arquivo `%s' é um diretório" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "use `PROCINFO[\"%s\"]' em vez de `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "use `PROCINFO[...]' em vez de `/dev/user'" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "impossível abrir `%s', modo `%s'" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "falha ao fechar pty mestre (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "falha ao fechar stdout em filho (%s)" - -#: io.c:1928 -#, 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:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "falha ao fechar stdin em filho (%s)" - -#: io.c:1933 -#, 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:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "falha ao fechar pty escrava (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, 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:2032 io.c:2085 -#, 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:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "falha ao restaurar stdout em processo pai\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "falha ao restaurar stdin em processo pai\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "falha ao fechar pipe (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&' não suportado" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "impossível abrir pipe `%s' (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "impossível criar processo filho para `%s' (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "arquivo de dados `%s' vazio" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "impossível alocar mais memória de entrada" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "erro ao ler arquivo de entrada `%s': %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "valor de múltiplos caracteres para `RS' é uma extensão do gawk" - -#: main.c:306 -msgid "out of memory" -msgstr "" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "opção `-m[fr] é irrelevante no gawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "uso da opção -m: `-m[fr] nnn'" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: opção `-W %s' não reconhecida, ignorada\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "argumento vazio para --source ignorado" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: opção requer argumento -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "variável de ambiente `POSIXLY_CORRECT' ativada: ligando `--posix'" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' sobrepõe `--traditional'" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--posix'/`--traditional' sobrepõe `--non-decimal-data'" - -#: main.c:530 -#, 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:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "impossível ativar modo binário em stdin (%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "impossível ativar modo binário em stdout (%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "impossível ativar modo binário em stderr (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "nenhum texto de programa" - -#: main.c:721 -#, 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:723 -#, 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:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opções POSIX: \t\tOpções longas GNU:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f arqprog \t\t--file=arqprog\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=val\t\t--assign=var=val\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] val\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=arq] \t--dump-variables[=arq]\n" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W profile[=arq] \t--profile[=arq]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=arq] \t--profile[=arq]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=program-text\t--source=program-text\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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:770 -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:774 -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:794 -#, fuzzy, 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 3 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:802 -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:813 -#, fuzzy -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\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:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft não faz FS ser tab no awk POSIX" - -#: main.c:1122 -#, 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:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "`%s' não é um nome legal de variável" - -#: main.c:1145 -#, 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:1184 -msgid "floating point exception" -msgstr "exceção de ponto flutuante" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "erro fatal: erro interno" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "erro fatal: erro interno" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "erro fatal: erro interno" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "nenhum descritor pré-aberto %d" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "impossível pré-abrir /dev/null para descritor %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "impossível achar grupos: %s" - -#: msg.c:54 -#, c-format -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:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "impossível converter string para float" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "barra invertida (\\) no fim da string" - -#: node.c:609 -#, fuzzy, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "o velho awk não suporta o operador `**'" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX não permite escapes do tipo `\\x'" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "nenhum dígito hexa em seqüência de escape `\\x'" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, 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 "%s %s `%s': impossível ativar fechar-ao-executar: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "impossível abrir `%s' para escrita: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "erro interno: %s com vname nulo" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# tratado internamente como `delete'" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# perfil gawk, criado %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# bloco(s) BEGIN\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Regra(s)\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# bloco(s) END\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Funções, listadas alfabeticamente\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "tipo inesperado %s em prec_level" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "tipo de nodo desconhecido %d" - -#: regcomp.c:132 -msgid "Success" -msgstr "Sucesso" - -#: regcomp.c:135 -msgid "No match" -msgstr "Sem combinação" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Expressão regular inválida" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Caracter de combinação inválido" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "Nome de classe de caracter inválido" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "contra-barra (\\) finalizando" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Referência anterior inválida" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "[ ou [^ não emparelhado" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "( ou \\( não emparelhado" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "\\{ não emparelhado" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Conteúdo inválido de \\{\\}" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Fim de faixa inválido" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Memória esgotada" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Expressão regular anterior inválida" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Fim prematuro da expressão regular" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "Expressão regular grande demais" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr ") ou \\) desemparelhado" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Nenhuma expressão regular anterior" - -#~ msgid "or used as a variable or an array" -#~ msgstr "ou usado como uma variável ou vetor" - -#~ msgid "substr: length %g is < 0" -#~ msgstr "substr: comprimento %g é < 0" - -#~ msgid "function %s called\n" -#~ msgstr "função %s chamada\n" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "campo %d em FIELDWIDTHS deve ser > 0" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opção ilegal -- %c\n" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "impossível abrir socket bidirecional `%s' para entrada/saída (%s)" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "porta remota inválida em `%s'" - -#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -#~ msgstr "" -#~ "busca por exp. reg. falhou, memória insuficiente para testar string \"%.*s" -#~ "%s\"" - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: uso ilegal da variável `%s' como vetor" - -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: primeiro argumento não é um vetor" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: segundo argumento não é um vetor" - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "erro interno: Node_var_array com vname nulo" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/ro.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/ro.gmo differ diff -Nru gawk-3.1.8+dfsg/po/ro.po gawk-4.0.1+dfsg/po/ro.po --- gawk-3.1.8+dfsg/po/ro.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/ro.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2070 +0,0 @@ -# Mesajele în limba românã pentru pachetul gawk -# Copyright (C) 2003 Free Software Foundation, Inc. -# Eugen Hoanca , 2003. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.31\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2003-09-15 17:48+0300\n" -"Last-Translator: Eugen Hoanca \n" -"Language-Team: Romanian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: array.c:112 -#, fuzzy, c-format -msgid "attempt to use function `%s' as an array" -msgstr "încercare de folosire a funcþiei `%s' ca array" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "încercare de utilizare a parametrului scalar `%s' drept array" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "încercare de a utiliza scalarul `%s' ca array" - -#: array.c:156 -#, fuzzy, c-format -msgid "from %s" -msgstr "%s (din %s)" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "referinþã la elementul neiniþializat `%s[\"%s\"]'" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "înscrierea array-ului `%s' este ºir null" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: indexul `%s' nu este în array-ul `%s'" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: vid (null)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: vid (zero)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: table_size = %d, array_size = %d\n" - -#: array.c:830 -#, fuzzy, c-format -msgid "%s: is parameter\n" -msgstr "%s: este parametru!\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: array_ref cãtre %s\n" - -#: awkgram.y:218 -#, fuzzy, c-format -msgid "%s blocks must have an action part" -msgstr "Blocurile de END trebuie sã aibã un fragment de acþiune" - -#: awkgram.y:221 -#, fuzzy -msgid "each rule must have a pattern or an action part" -msgstr "Blocurile de END trebuie sã aibã un fragment de acþiune" - -#: awkgram.y:257 awkgram.y:266 -#, fuzzy -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "vechiul awk nu supoortã operatorul `**'" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' este funcþie internã, nu poate fi redefinitã" - -#: awkgram.y:331 -#, fuzzy -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "constanta regexp `/%s/' aratã ca un comentariu C, dar nu este" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "constanta regexp `/%s/' aratã ca un comentariu C, dar nu este" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "declaraþia poate sã nu aibã nici un efect" - -#: awkgram.y:458 awkgram.y:482 -#, fuzzy, c-format -msgid "`%s' used in %s action" -msgstr "`next' folosit în acþiune BEGIN sau END" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' este extensie gawk" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "`return' folosit în afara contextului funcþiei" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"`print' simplu din regulile BEGIN sau END ar trebui sã fie probabil `print " -"\"\"'" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' este extensie gawk" - -#: awkgram.y:572 awkgram.y:580 -#, fuzzy -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete array' este extensie gawk" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "legãturile(pipelines) bidirecþionale multistage nu vor funcþiona" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "expresie regularã în dreapta atribuirii" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "expresie regularã în stânga operatorului `~' sau `!~'" - -#: awkgram.y:830 awkgram.y:903 -#, fuzzy -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "vechiul awk nu supoortã operatorul `**'" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "expresie regularã în dreapta comparaþiei" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "`getline' nedefinitã ºi neredirectatã înãuntrul unei acþiuni END" - -#: awkgram.y:904 -#, fuzzy -msgid "old awk does not support multidimensional arrays" -msgstr "vechiul awk nu supoortã operatorul `**'" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "apelarea lui `legth' fãrã paranteze nu este portabilã" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "apelarea lui `length' fãrã paranteze nu mai este folositã în POSIX" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "expresie subscript invalidã" - -#: awkgram.y:1257 -#, fuzzy -msgid "unexpected newline or end of string" -msgstr "linie nouã neaºteptatã" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "text program vid în linia de comandã" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "nu se poate deschide fiºierul sursã `%s' pentru citire (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "nu se poate citi fiºierul sursã `%s' (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "fiºierul sursã `%s' este vid" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "fiºierul sursã nu se terminã în linie nouã" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "regexp-ul neterminat se terminã cu `\\'` la sfârºitul fiºierului" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "regexp neterminat" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "regexp neterminat la sfârºitul fiºierului" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "folosirea continuãrii liniei `\\ #...' nu este portabilã" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "backslash nu este ultimul caracter din linie" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX nu permite operatorul `**='" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "vechiul awk nu suportã operatorul `**='" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX nu permite operatorul `**'" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "vechiul awk nu supoortã operatorul `**'" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "operatorul `^=' nu este suportat în vechiul awk" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "operator `^' nu este suportat în vechiul awk" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "ºir de caractere neterminat" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "caracter invalid `%c' în expresie" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' este extensie gawk" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' este extensie Bell Labs" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX nu permite `%s'" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' nu este suportat în vechiul awk" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "`goto' este considerat periculos!\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d este invalid ca numãr de argumente pentru %s" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: al treilea argument este extensie gawk" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: ºirul de caractere literal ca ultim argument al înlocuitorului nu are " -"nici un efect" - -#: awkgram.y:2475 -#, fuzzy, c-format -msgid "%s third parameter is not a changeable object" -msgstr "al treilea parametru al sub nu este un obiect modificabil" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: al doilea argument este extensie gawk" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"folosirea lui dcgettext(_\"...\") este incorectã: eliminaþi liniuþa_jos de " -"la început" - -#: awkgram.y:2530 -#, fuzzy -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"folosirea lui dcgettext(_\"...\") este incorectã: eliminaþi liniuþa_jos de " -"la început" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "funcþia `%s': parametrul #%d, `%s', parametrul duplicat #%d" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "" -"funcþia `%s': parametrul `%s' nu mai þine cont de(shadows) variabila globalã" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "nu s-a putut deschide `%s' pentru scriere (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "se trimite profilul la dipsozitivul de eroare standard" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: închidere eºuatã (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() apelatã de douã ori!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "" - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru" - -#: awkgram.y:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "numele funcþiei `%s' a mai fost definit înainte" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "funcþia `%s' este apelatã dar niciodatã definitã" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "funcþia `%s' este definitã dar niciodatã apelatã" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"regexp constant pentru parametrul #%d solicitã(yields) valoare booleanã" - -#: awkgram.y:3245 -#, fuzzy, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"funcþia `%s' apelatã cu un spaþiu între nume ºi `(',\n" -"%s" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "s-a încercat împãrþire la zero în `/='" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "s-a încercat împãrþire la zero în `%%'" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s cãtre \"%s\" eºuatã (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "ieºire(output) standard" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "motiv necunoscut" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: s-a primit argument nenumeric" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: argumentul %g este în afara domeniului" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "" -"fflush: nu s-a putut face flush: legãtura(pipe) `%s' a fost deschisã pentru " -"citire, nu scriere" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "" -"fflush: nu s-a putut face flush: fiºierul `%s' a fost deschis pentru citire, " -"nu scriere" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: `%s' nu este fiºier deschis, legãturã(pipe) sau co-proces" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "index: s-a primit un prim argument non-ºir de caractere" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: s-a primit un al doilea argument non-ºir de caractere" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: s-a primit argument nenumeric" - -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "`delete array' este extensie gawk" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "legth: s-a primit argument non-string" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: s-a primit argument nenumeric" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: s-a primit argument %g negativ" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' nu este permis în formatele awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "numãrul de arg cu `%' trebuie sã fie > 0" - -#: builtin.c:853 -#, fuzzy, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "" -"numãrul de arg %d este mai mare decât numãrul total de argumente furnizate" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "`$' nu este permis în format dupã punct" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "" -"nu s-a furnizat nici un `$' pentru câmpul poziþional lungime sau precisie" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "`l' nu are sens în formatele awk; ignorat" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`l' nu este permis în formatele awk POSIX" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "`L' nu are sens în formatele awk; ignorat" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`L' nu este permis în formatele POSIX awk" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "`h' nu are sens în formatele awl; ignorat" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`h' nu este permis în formatele POSIX awk" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "" -"nu existã destule argumente pentru satisfacerea formatului ºirului de " -"caractere" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ insuficient pentru aceasta" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: specificatorul de format nu are literã de control" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "prea multe argumente furnizate pentru formatul ºirului de caractere" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: nici un argument" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: s-a primit argument nenumeric" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: apelat cu argumentul negativ %g" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: indexul de start %g este invalid, se foloseºte -1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: indexul de start ne-întreg(integer) %g va fi trunchiat" - -#: builtin.c:1510 -#, fuzzy, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: lungimea %g este <= 0" - -#: builtin.c:1512 -#, fuzzy, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: lungimea %g este <= 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr lungimea ne-întregului(integer) %g va fi trunchiatã" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: ºirul de caractere sursã are lungime zero" - -#: builtin.c:1552 -#, fuzzy, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: indexul de start %d este fostul sfârºit de ºir de caractere" - -#: builtin.c:1560 -#, fuzzy, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"substr: lungimea %d la indexul de start %d depãºeºte lungimea primului " -"argument (%d)" - -#: builtin.c:1637 -#, fuzzy -msgid "strftime: received non-string first argument" -msgstr "strftime: s-a primit primul argument non ºir de caractere" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: s-a primit ºir de caractere în format vid" - -#: builtin.c:1652 -#, fuzzy -msgid "strftime: received non-numeric second argument" -msgstr "strftime: s-a primit un al doilea argument nenumeric" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: s-a primit argument non ºir de caractere" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -#, fuzzy -msgid "system: received non-string argument" -msgstr "system: s-a primit argument non ºir de caractere" - -#: builtin.c:1904 eval.c:2157 -#, fuzzy, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "referinþã la variabila neiniþializatã `%s'" - -#: builtin.c:2009 -#, fuzzy -msgid "tolower: received non-string argument" -msgstr "tolower: s-a primit argument non-ºir de caractere" - -#: builtin.c:2039 -#, fuzzy -msgid "toupper: received non-string argument" -msgstr "toupper: s-a primit argument non-ºir de caractere" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: s-a primit un prim argument nenumeric" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: s-a primit un al doilea argument nenumeric" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: s-a primit un argument nenumeric" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: s-a primit un argument nenumeric" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: s-a primit un argument nenumeric" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: al treilea argument nu este un array" - -#: builtin.c:2744 -#, fuzzy -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: al 3-lea argument care este 0 va fi considerat 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: s-a primit un prim argument nenumeric" - -#: builtin.c:2862 -#, fuzzy -msgid "lshift: received non-numeric second argument" -msgstr "atan2: s-a primit un al doilea argument nenumeric" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): valorile negative vor furniza rezultate ciudate" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): valorile fracþionale vor fi trunchiate" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"lshift(%lf, %lf): valorile schimbate prea mult vor da rezultate ciudate" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: s-a primit un prim argument nenumeric" - -#: builtin.c:2900 -#, fuzzy -msgid "rshift: received non-numeric second argument" -msgstr "atan2: s-a primit un al doilea argument nenumeric" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): valorile negative vor da rezultate ciudate" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): valorile fracþionale vor fi trunchiate" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "" -"rshift(%lf, %lf): valorile schimbate prea mult vor da rezultate ciudate" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: s-a primit un prim argument nenumeric" - -#: builtin.c:2938 -#, fuzzy -msgid "and: received non-numeric second argument" -msgstr "atan2: s-a primit un al doilea argument nenumeric" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): valorile negative vor da rezultate ciudate" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): valorile fracþionale vor fi trunchiate" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: s-a primit un prim argument nenumeric" - -#: builtin.c:2974 -#, fuzzy -msgid "or: received non-numeric second argument" -msgstr "atan2: s-a primit un al doilea argument nenumeric" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): valorile negative for da rezultate ciudate" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): valorile fracþionale vor fi trunchiate" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: s-a primit un prim argument nenumeric" - -#: builtin.c:3010 -#, fuzzy -msgid "xor: received non-numeric second argument" -msgstr "atan2: s-a primit un al doilea argument nenumeric" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): valorile negative vor da rezultate ciudate" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): valorile fracþionale vor fi trunchiate" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: s-a primit argument nenumeric" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): valorile negative vor da rezultate ciudate" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): valorile fracþionale vor fi trunchiate" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' nu este o categorie localã validã" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "tip nod %d necunoscut" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "depãºire(overflow) de buffer în genflags2str" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "încercare de a utiliza array-ul `%s' într-un context scalar" - -#: eval.c:802 -#, fuzzy, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"for loop: array-ul `%s' ºi-a schimbat mãrimea din %d în %d în timpul " -"execuþiei buclei" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "`break' în afara buclei nu este portabil" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "`break' în afara buclei nu este permis" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' în afara buclei nu este portabil" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "`continue' în afara buclei nu este permis" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' nu poate fi apelat dintr-o regulã BEGIN" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' nu poate fi apelat dintr-o regulã END" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' nu poate fi apelat dintr-o regulã BEGIN" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' nu poate fi apelat dintr-o regulã END" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "declaraþia nu are nici un efect" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "nu se poate folosi numele funcþiei `%s' ca variabilã sau array" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referinþã la argumentul neiniþializat `%s'" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referinþã la variabila neiniþializatã `%s'" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenation: efectele secundare dintr-o expresie au schimbat lungimea " -"alteia!" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "atribuire folositã în context condiþional" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "s-a încercat împãrþire la zero" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tip ilegal (%s) în tree_eval" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "s-a încercat împãrþire la zero în `/='" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "s-a încercat împãrþire la zero în `%%='" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "" -"funcþia `%s' a fost apelatã cu mai multe argumente decât cele declarate" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "funcþia `%s' nu este definitã" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Stiva de Apelare a Funcþiei:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- principal(main) --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "încercare de referinþã la câmp din valoare nenumericã" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "încercare de referinþã din ºir de caractere vid(null)" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "încercare de accesare a câmpului %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "atribuirea nu este permisã rezultatului funcþiei interne" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' este extensie gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' este extensie gawk" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "`%sFMT' specificaþie `%s' invalidã" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "se dezactiveazã `--lint' din cauza atribuirii lui `LINT'" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "`extension' este o extensie gawk" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: nu s-a putut deschide `%s' (%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: biblioteca `%s': nu pot apela funcþia `%s' (%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "" - -#: ext.c:110 -#, fuzzy, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: biblioteca `%s': nu pot apela funcþia `%s' (%s)\n" - -#: ext.c:116 -#, fuzzy, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: nu s-a putut deschide `%s' (%s)\n" - -#: ext.c:120 -#, fuzzy, c-format -msgid "extension: function `%s' already defined" -msgstr "funcþia `%s' nu este definitã" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" - -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "numele funcþiei `%s' a mai fost definit înainte" - -#: ext.c:204 -#, fuzzy, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "funcþia `%s' este definitã dar niciodatã apelatã" - -#: ext.c:207 -#, fuzzy, c-format -msgid "function `%s': missing argument #%d" -msgstr "funcþia `%s' nu este definitã" - -#: ext.c:217 -#, fuzzy, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "încercare de a utiliza scalarul `%s' ca array" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Operaþie NeSuportatã" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF setat la valoare negativã" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: al doilea argument nu este un array" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: ºirul nul pentru al treilea arg este o extensie gawk" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' este extensie gawk" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "ºirul de caractere null pentru `FS' este extensie gawk" - -#: field.c:1092 -#, fuzzy -msgid "old awk does not support regexps as value of `FS'" -msgstr "vechiul awk nu supoortã operatorul `**'" - -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: opþiunea `%s' este ambiguã\n" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: opþiunea `--%s' nu permite parametri\n" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: opþiunea `%c%s' nu permite parametri\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: opþiunea `%s' necesitã un parametru\n" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: opþiune necunoscutã `--%s'\n" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: opþiune necunoscutã `%c%s'\n" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: opþiune invalidã -- %c\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: opþiunea necesitã un parametru -- %c\n" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: opþiunea `-W %s' este ambiguã\n" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: opþiunea `-W %s' nu permite parametri\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: opþiunea `%s' necesitã un parametru\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "nu s-a putu deschide `%s' pentru citire (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "închiderea lui fd %d (`%s') eºuatã (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tip arbore(tree) invalid %s în redirect()" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "expresia din redirectarea `%s' are doar valoare numericã" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "expresia din redirectarea `%s' are valoar de ºir null" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"numele de fiºier `%s' pentru redirectarea `%s' poate fi rezultatul unei " -"expresii logice" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "amestecare nenecesarã a `>' ºi `>>' pentru fiºierul `%.*s'" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "nu se poate deschide legãtura(pipe) `%s' pentru output (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "nu se poate deschide legãtura(pipe) `%s' pentru input (%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "" -"nu se poate deschide legãtura(pipe) bidirecþionalã `%s' pentru input/output " -"(%s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "nu se poate redirecta din `%s' (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "nu se poate redirecta cãtre `%s' (%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"s-a atins limita sistemului pentru fiºiere deschise: se începe muliplexarea " -"desciptorilor de fiºier" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "închiderea `%s' eºuatã (%s)." - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "prea multe legãturi(pipe) sau fiºiere de intrare(input) deschise" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: al doilea argument trebuie sã fie `to' sau `from'" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "" -"close: `%.*s' nu este un fiºier deschis, o legãturã(pipe) sau un coproces" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "închiderea unei redirectãri care n-a fost deschisã niciodatã" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: redirectarea `%s' nu a fost deschisã cu `|&', al doilea argument " -"ignorat" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "stare de avarie (%d) în legãtura(pipe) închisã în `%s' (%s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "stare de avarie (%d) în fiºierul închis în `%s' (%s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "nu s-a furnizat închiderea explicitã a socketului `%s'" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "nu s-a furnizat închiderea explicitã a coprocesului `%s' " - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "nu s-a furnizat închiderea explicitã a legãturii(pipe) `%s'" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "nu s-a furnizat închiderea explicitã a fiºierului `%s'" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "eroare în scrierea la ieºirea(output) standard (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "eroare în scrierea la dispozitivul standard de eroare (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "flush-ul legãturii(pipe) `%s' eºuat (%s)." - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "flush-ul legãturii(pipe) coprocesului la `%s' eºuat (%s)." - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "flush-ul de fiºier al `%s' eºuat (%s)." - -#: io.c:1222 -#, fuzzy, c-format -msgid "local port %s invalid in `/inet'" -msgstr "port local invalid în `%s'" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "clientul /inet/raw nu este pregãtit încã, scuze" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "doar root-ul poate folosi `/inet/raw'." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "serverul /inet/raw nu este pregãtit încã, scuze" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "nici un protocol (cunoscut) furnizat în numele de fiºier special `%s'" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "numele special de fiºier `%s' nu este complet" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "trebuie furnizat un nume de host remote pentru `/inet'" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "trebuie furnizat un port remote pentru `/inet'" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "Comunicaþiile TCP/IP nu sunt suportate" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "fiºierul `%s' este director" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "folosiþi `PROCINFO[\"%s\"]' în loc de `%s'" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "folosiþi `PROCINFO[...]' în loc de `/dev/user'" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "nu s-a putut deschide `%s', modul `%s'" - -#: io.c:1923 -#, fuzzy, c-format -msgid "close of master pty failed (%s)" -msgstr "închiderea legãturii(pipe) a eºuat (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "închiderea stdout în copil(child) a eºuat (%s)" - -#: io.c:1928 -#, fuzzy, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "mutarea legãturii(pipe) la stdout în copil(child) a eºuat (dup: %s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "închiderea stdin în copil(child) a eºuat (%s)" - -#: io.c:1933 -#, fuzzy, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "mutarea legãturii(pipe) la stdin în copil(child) a eºuat (dup: %s)" - -#: io.c:1935 io.c:1954 -#, fuzzy, c-format -msgid "close of slave pty failed (%s)" -msgstr "închiderea legãturii(pipe) a eºuat (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "mutarea legãturii(pipe) la stdout în copil(child) a eºuat (dup: %s)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "mutarea legãturii(pipe) la stdin în copil(child) a eºuat (dup: %s)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "refacerea stdout în procesul pãrinte a eºuat\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "refacerea stdin în procesul pãrinte a eºuat\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "închiderea legãturii(pipe) a eºuat (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&' nesuportat" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "nu s-a putut deschide legãtura(pipe) `%s' (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "nu s-a putu crea proces copil(child) pentru `%s' (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "fiºierul de date `%s' este vid" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "eroare în citirea fiºierului de intrare(input) `%s': %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "valoarea multicaracter a `RS' este extensie gawk" - -#: main.c:306 -msgid "out of memory" -msgstr "memorie plinã" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "`-m[fr]' opþiune irelevantã în gawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "folosirea opþiunii -m : `-m[fr] nnn'" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: opþiunea `-W %s' nu e recunoscutã, ignoratã\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "argument vid pentru `--source' ignorat" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: opþiunea necesitã un parametru -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "" -"este setatã variabila de mediu `POSIXLY_CORRECT': se activeazã `--posix'" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' suprascrie `--traditional'" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--posix'/`--traditional' suprascrie `--non-decimal-data'" - -#: main.c:530 -#, fuzzy, c-format -msgid "running %s setuid root may be a security problem" -msgstr "dacã se ruleazã %s setuid root poate apãrea o problemã de securitate" - -#: main.c:571 -#, fuzzy, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "nu se poate seta modul pe stdin (%s)" - -#: main.c:574 -#, fuzzy, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "nu se poate seta modul pe stdout (%s)" - -#: main.c:576 -#, fuzzy, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "nu se poate seta modul pe stderr (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "nu existã nici un text de program!" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"Folosire: %s [opþiuni stil POSIX sau GNU] -f fiºierprogram [--] fiºier ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Folosire: %s [opþiuni stil POSIX sau GNU] [--] %cprogram%c fiºier ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "opþiuni POSIX:\t\topþiuni lungi GNU:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fiºierprogram\t\t--file=fiºierprogram\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=val\t\t--assign=var=val\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] val\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=fiºier]\t--dump-variables[=fiºier]\n" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W profile[=fiºier]\t--profile[=fiºier]\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=fiºier]\t--profile[=fiºier]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=program-text\t--source=program-text\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -#, 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 "secþiunea `Reporting Problems and Bugs' în versiunea tipãritã.\n" - -#: main.c:770 -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:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" - -#: main.c:794 -#, fuzzy, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Copyright (C) 1989, 1991-%d Free Software Foundation.\n" -"\n" -"Acest program este software liber; poate fi redistribuit ºi/sau modificat\n" -"sub termenii Licenþei Publice Generale GNU publicatã de \n" -"Free Software Foundation; fie versiunea 2 a Licenþei, fie\n" -"(la latitudinea dumneavoastrã) orice versiune ulterioarã.\n" -"\n" - -#: main.c:802 -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 "" -"Acest program este distribuit în speranþa cã va fi folositor,\n" -"dar FÃRà NICI O GARANÞIE; chiar fãrã presupusa garanþie a\n" -"VANDABILITÃÞII sau MODIFICÃRII ÎNTR-UN SCOP PRIVAT. Cititi\n" -"Licenþa Publicã Generalã GNU pentru mai multe detalii.\n" -"\n" -"\n" - -#: main.c:813 -#, fuzzy -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"Ar fi trebuit sã primiþi o copie a Licenþei Publice Generale GNU\n" -"împreunã cu acest program; dacã nu, scrieþi la Free Software\n" -"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft nu seteazã FS în tab în POSIX awk" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "" - -#: main.c:1184 -msgid "floating point exception" -msgstr "excepþie virgulã mobilã" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "eroare fatalã: eroare internã" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "eroare fatalã: eroare internã" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "eroare fatalã: eroare internã" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "nici un fd predeschis %d" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "nu s-a putut predeschide /dev/null pentru fd %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "nu am putut gãsi grupurile: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "linie cmd:" - -#: msg.c:120 -msgid "warning: " -msgstr "avertisment: " - -#: msg.c:142 -msgid "error: " -msgstr "eroare: " - -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "nu se poate converti ºir de caractere în float" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "backslash la sfârºitul ºirului de caractere" - -#: node.c:609 -#, fuzzy, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "vechiul awk nu supoortã operatorul `**'" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX nu permite escape-uri `\\x'" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "nu existã digiþi hexa în secvenþa de escape `\\x'" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "secvenþa de escape `\\%c' tratatã ca `%c' simplu" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': nu s-a putut seta close-on-exec: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "nu am putut deschide `%s' pentru scriere: %s" - -#: profile.c:457 -#, fuzzy, c-format -msgid "internal error: %s with null vname" -msgstr "eroare internã: Node_var cu vname null" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# profil gawk, creat %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# bloc(uri) BEGIN\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Regulã(i)\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# bloc(uri) END\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Funcþii, listate alfabetic\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "tip %s neaºteptat în prec_level" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "tip nod %d necunoscut" - -#: regcomp.c:132 -msgid "Success" -msgstr "Succes" - -#: regcomp.c:135 -msgid "No match" -msgstr "Nici o potrivire" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Expresie regularã invalidã" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Caracter de comparare invalid" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "nume clasã caracter invalid" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Backslash final" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "referinþã anterioarã(back) invalidã" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "[ sau [^ fãrã reciprocã" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "( sau \\( fãrã reciprocã" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "{ fãrã reciprocã" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Conþinut invalid al \\{\\}" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Sfârºit de domeniu invalid" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Memorie plinã" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Expresie regularã anterioarã invalidã" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Sfârºit prematur de expresie regularã" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "Expresie regularã prea mare" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr ") or \\) fãrã reciprocã" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Nu existã expresii regulare anterioare" - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: folosire ilegalã a variabilei `%s' ca array" - -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: primul argument nu este un array" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: al doilea argument nu este un array" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opþiune ilegalã -- %c\n" - -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" -#~ msgstr "" -#~ "\n" -#~ "Pentru a raporta bug-urile, citiþi nodul `Bugs' în `gawk.info', " -#~ "reprezentând\n" - -#~ msgid "invalid syntax in name `%s' for variable assignment" -#~ msgstr "sintaxã invalidã în numele `%s' pentru atribuire de variabilã" - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "eroare internã: Node_var_array cu vname null" - -#~ msgid "or used in other expression context" -#~ msgstr "sau folositã în alt context al expresiei" - -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "`%s' este o funcþie, atribuirea nu este permisã" - -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "Blocurile de BEGIN trebuie sa aibã un fragment de acþiune" - -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "`nextfile' folosit în acþiune BEGIN sau END" - -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "" -#~ "`getline' nedefinit ºi neredirectat înãuntrul unei acþiuni BEGIN sau END" - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x nu este în tokentab\n" - -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "al treilea parametru al gsub nu este obiect modificabil" - -#~ msgid "Unfinished \\ escape" -#~ msgstr "\\ escape neterminat" - -#~ msgid "unfinished repeat count" -#~ msgstr "numãrãtoare repetatã neterminatã" - -#~ msgid "malformed repeat count" -#~ msgstr "numãrãtoare repetatã malformatã" - -#~ msgid "Unbalanced [" -#~ msgstr "[ fãrã reciproc" - -#~ msgid "Unbalanced (" -#~ msgstr "( fãrã reciproc" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Nu s-au specificat biþi pentru sintaxa regexp" - -#~ msgid "Unbalanced )" -#~ msgstr ") fãrã reciproc" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "câmpul %d din FIELDWIDTHS trebuie sã fie > 0" - -#~ msgid "function %s called\n" -#~ msgstr "funcþia %s a fost apelatã\n" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "" -#~ "nu se poate deschide socketul bidirecþional `%s' pentru input/output (%s)" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "port remote invalid în `%s'" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "eroare internã: fiºierul `%s', linia %d\n" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/rw.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/rw.gmo differ diff -Nru gawk-3.1.8+dfsg/po/rw.po gawk-4.0.1+dfsg/po/rw.po --- gawk-3.1.8+dfsg/po/rw.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/rw.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2116 +0,0 @@ -# Kinyarwanda translations for gawk package. -# Copyright (C) 2005 Free Software Foundation, Inc. -# This file is distributed under the same license as the gawk package. -# Steve Murphy , 2005. -# Steve performed initial rough translation from compendium built from translations provided by the following translators: -# Philibert Ndandali , 2005. -# Viateur MUGENZI , 2005. -# Noëlla Mupole , 2005. -# Carole Karema , 2005. -# JEAN BAPTISTE NGENDAHAYO , 2005. -# Augustin KIBERWA , 2005. -# Donatien NSENGIYUMVA , 2005. -# Antoine Bigirimana , 2005. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.4\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2005-04-04 10:55-0700\n" -"Last-Translator: Steven Michael Murphy \n" -"Language-Team: Kinyarwanda \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: array.c:112 -#, fuzzy, c-format -msgid "attempt to use function `%s' as an array" -msgstr "Kuri Gukoresha Umumaro Nka Imbonerahamwe" - -#: array.c:115 -#, fuzzy, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "Kuri Gukoresha Nka Imbonerahamwe" - -#: array.c:118 -#, fuzzy, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "Kuri Gukoresha Nka Imbonerahamwe" - -#: array.c:156 -#, fuzzy, c-format -msgid "from %s" -msgstr "Kuva:" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "Indango Kuri Itatangijwe Ikigize:" - -#: array.c:519 -#, fuzzy, c-format -msgid "subscript of array `%s' is null string" -msgstr "Inyandiko nyesi Bya Imbonerahamwe ni NTAGIHARI Ikurikiranyanyuguti" - -#: array.c:623 -#, fuzzy, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "Gusiba Umubarendanga OYA in Imbonerahamwe" - -#: array.c:792 -#, fuzzy, c-format -msgid "%s: empty (null)\n" -msgstr "%s:ubusa NTAGIHARI" - -#: array.c:797 -#, fuzzy, c-format -msgid "%s: empty (zero)\n" -msgstr "%s:ubusa Zeru" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "" - -#: array.c:830 -#, fuzzy, c-format -msgid "%s: is parameter\n" -msgstr "%s:ni" - -#: array.c:835 -#, fuzzy, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s:Kuri" - -#: awkgram.y:218 -#, fuzzy, c-format -msgid "%s blocks must have an action part" -msgstr "%sIgikorwa" - -#: awkgram.y:221 -#, fuzzy -msgid "each rule must have a pattern or an action part" -msgstr "a Ishusho Cyangwa Igikorwa" - -#: awkgram.y:257 awkgram.y:266 -#, fuzzy -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: awkgram.y:285 -#, fuzzy, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s'ni a in Umumaro" - -#: awkgram.y:331 -#, fuzzy -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "nka a C Icyo wongeraho ni OYA" - -#: awkgram.y:334 -#, fuzzy, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "nka a C Icyo wongeraho ni OYA" - -#: awkgram.y:361 awkgram.y:656 -#, fuzzy -msgid "statement may have no effect" -msgstr "Inyandiko Gicurasi Oya INGARUKA" - -#: awkgram.y:458 awkgram.y:482 -#, fuzzy, c-format -msgid "`%s' used in %s action" -msgstr "`%s'in Igikorwa" - -#: awkgram.y:473 awkgram.y:477 -#, fuzzy -msgid "`nextfile' is a gawk extension" -msgstr "`ni a Umugereka" - -#: awkgram.y:492 -#, fuzzy -msgid "`return' used outside function context" -msgstr "`Hanze Umumaro Imvugiro" - -#: awkgram.y:534 -#, fuzzy -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "Byuzuye in Cyangwa Gucapa" - -#: awkgram.y:550 awkgram.y:558 -#, fuzzy -msgid "`delete array' is a gawk extension" -msgstr "`Gusiba ni a Umugereka" - -#: awkgram.y:572 awkgram.y:580 -#, fuzzy -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`Gusiba Imbonerahamwe ni a Umugereka" - -#: awkgram.y:624 -#, fuzzy, c-format -msgid "duplicate case values in switch body: %s" -msgstr "Gusubiramo Uduciro in Hindura Umubiri" - -#: awkgram.y:634 -#, fuzzy -msgid "Duplicate `default' detected in switch body" -msgstr "in Hindura Umubiri" - -#: awkgram.y:723 -#, fuzzy -msgid "multistage two-way pipelines don't work" -msgstr "Akazi" - -#: awkgram.y:814 -#, fuzzy -msgid "regular expression on right of assignment" -msgstr "Ibisanzwe imvugo ku Iburyo: Bya Igenera" - -#: awkgram.y:824 -#, fuzzy -msgid "regular expression on left of `~' or `!~' operator" -msgstr "Ibisanzwe imvugo ku Ibumoso: Bya Cyangwa Mukoresha" - -#: awkgram.y:830 awkgram.y:903 -#, fuzzy -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: awkgram.y:836 -#, fuzzy -msgid "regular expression on right of comparison" -msgstr "Ibisanzwe imvugo ku Iburyo: Bya" - -#: awkgram.y:893 -#, fuzzy -msgid "non-redirected `getline' undefined inside END action" -msgstr "kidasobanuye Mo Imbere Igikorwa" - -#: awkgram.y:904 -#, fuzzy -msgid "old awk does not support multidimensional arrays" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: awkgram.y:950 -#, fuzzy -msgid "call of `length' without parentheses is not portable" -msgstr "Bya ni OYA" - -#: awkgram.y:955 -#, fuzzy -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "Bya ni Bitemewe. ku" - -#: awkgram.y:1009 -#, fuzzy -msgid "use of non-array as array" -msgstr "Gukoresha Bya Imbonerahamwe Nka Imbonerahamwe" - -#: awkgram.y:1012 -#, fuzzy -msgid "invalid subscript expression" -msgstr "Sibyo Inyandiko nyesi imvugo" - -#: awkgram.y:1257 -#, fuzzy -msgid "unexpected newline or end of string" -msgstr "Cyangwa Impera Bya Ikurikiranyanyuguti" - -#: awkgram.y:1374 -#, fuzzy -msgid "empty program text on command line" -msgstr "ubusa Porogaramu Umwandiko ku Komandi: Umurongo" - -#: awkgram.y:1430 -#, fuzzy, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "Gufungura Inkomoko IDOSIYE kugirango" - -#: awkgram.y:1528 -#, fuzzy, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "Gusoma" - -#: awkgram.y:1536 -#, fuzzy, c-format -msgid "source file `%s' is empty" -msgstr "Inkomoko IDOSIYE ni ubusa" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -#, fuzzy -msgid "source file does not end in newline" -msgstr "Inkomoko IDOSIYE OYA Impera in" - -#: awkgram.y:1790 -#, fuzzy -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "Na: ku Impera Bya IDOSIYE" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "" - -#: awkgram.y:1828 -#, fuzzy -msgid "unterminated regexp at end of file" -msgstr "ku Impera Bya IDOSIYE" - -#: awkgram.y:1897 -#, fuzzy -msgid "use of `\\ #...' line continuation is not portable" -msgstr "Gukoresha Bya Umurongo ni OYA" - -#: awkgram.y:1910 -#, fuzzy -msgid "backslash not last character on line" -msgstr "OYA Iheruka Inyuguti ku Umurongo" - -#: awkgram.y:1955 -#, fuzzy -msgid "POSIX does not allow operator `**='" -msgstr "OYA Kwemerera Mukoresha" - -#: awkgram.y:1957 -#, fuzzy -msgid "old awk does not support operator `**='" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: awkgram.y:1966 -#, fuzzy -msgid "POSIX does not allow operator `**'" -msgstr "OYA Kwemerera Mukoresha" - -#: awkgram.y:1968 -#, fuzzy -msgid "old awk does not support operator `**'" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: awkgram.y:1999 -#, fuzzy -msgid "operator `^=' is not supported in old awk" -msgstr "Mukoresha ni OYA in ki/ bishaje" - -#: awkgram.y:2007 -#, fuzzy -msgid "operator `^' is not supported in old awk" -msgstr "Mukoresha ni OYA in ki/ bishaje" - -#: awkgram.y:2091 awkgram.y:2106 -#, fuzzy -msgid "unterminated string" -msgstr "Ikurikiranyanyuguti" - -#: awkgram.y:2291 -#, fuzzy, c-format -msgid "invalid char '%c' in expression" -msgstr "Sibyo INYUGUTI in imvugo" - -#: awkgram.y:2339 -#, fuzzy, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s'ni a Umugereka" - -#: awkgram.y:2342 -#, fuzzy, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s'ni a Umugereka" - -#: awkgram.y:2345 -#, fuzzy, c-format -msgid "POSIX does not allow `%s'" -msgstr "OYA Kwemerera" - -#: awkgram.y:2349 -#, fuzzy, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s'ni OYA in ki/ bishaje" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "" - -#: awkgram.y:2437 -#, fuzzy, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%dni Sibyo Nka Umubare Bya ingingo kugirango" - -#: awkgram.y:2456 awkgram.y:2459 -#, fuzzy -msgid "match: third argument is a gawk extension" -msgstr "BIHUYE ni a Umugereka" - -#: awkgram.y:2472 -#, fuzzy, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s:Ikurikiranyanyuguti Nka Iheruka Bya GUSIMBURANYA Oya INGARUKA" - -#: awkgram.y:2475 -#, fuzzy, c-format -msgid "%s third parameter is not a changeable object" -msgstr "%sni OYA a Igikoresho" - -#: awkgram.y:2502 awkgram.y:2505 -#, fuzzy -msgid "close: second argument is a gawk extension" -msgstr "Gufunga ISEGONDA ni a Umugereka" - -#: awkgram.y:2515 -#, fuzzy -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "Gukoresha Bya ni Gukuraho... Nyobora" - -#: awkgram.y:2530 -#, fuzzy -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "Gukoresha Bya ni Gukuraho... Nyobora" - -#: awkgram.y:2602 -#, fuzzy, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "Umumaro" - -#: awkgram.y:2635 -#, fuzzy, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "Umumaro IMPINDURAGACIRO" - -#: awkgram.y:2747 -#, fuzzy, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "OYA Gufungura kugirango" - -#: awkgram.y:2748 profile.c:96 -#, fuzzy -msgid "sending profile to standard error" -msgstr "Ibijyana Kuri Bisanzwe Ikosa" - -#: awkgram.y:2780 -#, fuzzy, c-format -msgid "%s: close failed (%s)" -msgstr "%s:Gufunga Byanze" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "" - -#: awkgram.y:2928 -#, fuzzy -msgid "there were shadowed variables." -msgstr "Bihawe igicucu Ibihinduka" - -#: awkgram.y:3001 -#, fuzzy, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "Umumaro Gukoresha Umumaro Izina: Nka Izina:" - -#: awkgram.y:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "Umumaro Gukoresha Umumaro Izina: Nka Izina:" - -#: awkgram.y:3014 -#, fuzzy, c-format -msgid "function name `%s' previously defined" -msgstr "Umumaro Izina:" - -#: awkgram.y:3165 awkgram.y:3171 -#, fuzzy, c-format -msgid "function `%s' called but never defined" -msgstr "Umumaro Nta narimwe" - -#: awkgram.y:3174 -#, fuzzy, c-format -msgid "function `%s' defined but never called" -msgstr "Umumaro Nta narimwe" - -#: awkgram.y:3201 -#, fuzzy, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "kugirango Icyungo Agaciro" - -#: awkgram.y:3245 -#, fuzzy, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"Umumaro Na: Umwanya hagati Izina: Na Cyangwa Nka a IMPINDURAGACIRO Cyangwa " -"Imbonerahamwe" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "ku Zeru in" - -#: awkgram.y:3669 eval.c:1394 -#, fuzzy, c-format -msgid "division by zero attempted in `%%'" -msgstr "ku Zeru in" - -#: builtin.c:122 -#, fuzzy, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%sKuri Byanze" - -#: builtin.c:123 -#, fuzzy -msgid "standard output" -msgstr "Bisanzwe Ibisohoka" - -#: builtin.c:124 -#, fuzzy -msgid "reason unknown" -msgstr "Kitazwi" - -#: builtin.c:137 -#, fuzzy -msgid "exp: received non-numeric argument" -msgstr "EXP BYAKIRIWE Bikurikije umubare" - -#: builtin.c:143 -#, fuzzy, c-format -msgid "exp: argument %g is out of range" -msgstr "EXP ni Inyuma Bya Urutonde" - -#: builtin.c:201 -#, fuzzy, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "kugirango OYA" - -#: builtin.c:204 -#, fuzzy, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "IDOSIYE kugirango OYA" - -#: builtin.c:216 -#, fuzzy, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "ni OYA Gufungura IDOSIYE Cyangwa" - -#: builtin.c:310 -#, fuzzy -msgid "index: received non-string first argument" -msgstr "Umubarendanga BYAKIRIWE Ikurikiranyanyuguti Itangira" - -#: builtin.c:312 -#, fuzzy -msgid "index: received non-string second argument" -msgstr "Umubarendanga BYAKIRIWE Ikurikiranyanyuguti ISEGONDA" - -#: builtin.c:434 -#, fuzzy -msgid "int: received non-numeric argument" -msgstr "INT BYAKIRIWE Bikurikije umubare" - -#: builtin.c:464 -#, fuzzy -msgid "`length(array)' is a gawk extension" -msgstr "`Gusiba ni a Umugereka" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -#, fuzzy -msgid "length: received non-string argument" -msgstr "Uburebure BYAKIRIWE Ikurikiranyanyuguti" - -#: builtin.c:515 -#, fuzzy -msgid "log: received non-numeric argument" -msgstr "LOG BYAKIRIWE Bikurikije umubare" - -#: builtin.c:518 -#, fuzzy, c-format -msgid "log: received negative argument %g" -msgstr "LOG BYAKIRIWE" - -#: builtin.c:726 builtin.c:729 -#, fuzzy -msgid "must use `count$' on all formats or none" -msgstr "Gukoresha IBARA ku Byose Imiterere Cyangwa Ntacyo" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -#, fuzzy -msgid "`$' is not permitted in awk formats" -msgstr "`$'ni OYA in Imiterere" - -#: builtin.c:851 -#, fuzzy -msgid "arg count with `$' must be > 0" -msgstr "IBARA Na: 0" - -#: builtin.c:853 -#, fuzzy, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "IBARA Biruta Igiteranyo Umubare Bya ingingo" - -#: builtin.c:855 -#, fuzzy -msgid "`$' not permitted after period in format" -msgstr "`$'OYA Nyuma Igihe in Imiterere" - -#: builtin.c:868 -#, fuzzy -msgid "no `$' supplied for positional field width or precision" -msgstr "Oya kugirango Umwanya Ubugari Cyangwa" - -#: builtin.c:938 -#, fuzzy -msgid "`l' is meaningless in awk formats; ignored" -msgstr "`ni in Imiterere" - -#: builtin.c:942 -#, fuzzy -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`ni OYA in Imiterere" - -#: builtin.c:953 -#, fuzzy -msgid "`L' is meaningless in awk formats; ignored" -msgstr "`ni in Imiterere" - -#: builtin.c:957 -#, fuzzy -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`ni OYA in Imiterere" - -#: builtin.c:968 -#, fuzzy -msgid "`h' is meaningless in awk formats; ignored" -msgstr "`ni in Imiterere" - -#: builtin.c:972 -#, fuzzy -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`ni OYA in Imiterere" - -#: builtin.c:1252 -#, fuzzy, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[S Agaciro ni Inyuma Bya Urutonde kugirango Imiterere" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -#, fuzzy -msgid "not enough arguments to satisfy format string" -msgstr "OYA ingingo Kuri Imiterere Ikurikiranyanyuguti" - -#: builtin.c:1340 -#, fuzzy -msgid "^ ran out for this one" -msgstr "^Inyuma kugirango iyi" - -#: builtin.c:1346 -#, fuzzy -msgid "[s]printf: format specifier does not have control letter" -msgstr "[S Imiterere OYA Igenzura Ibaruwa..." - -#: builtin.c:1349 -#, fuzzy -msgid "too many arguments supplied for format string" -msgstr "ingingo kugirango Imiterere Ikurikiranyanyuguti" - -#: builtin.c:1424 builtin.c:1427 -#, fuzzy -msgid "printf: no arguments" -msgstr "Oya ingingo" - -#: builtin.c:1451 -#, fuzzy -msgid "sqrt: received non-numeric argument" -msgstr "SQRT BYAKIRIWE Bikurikije umubare" - -#: builtin.c:1455 -#, fuzzy, c-format -msgid "sqrt: called with negative argument %g" -msgstr "SQRT Na:" - -#: builtin.c:1479 -#, fuzzy, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "Gutangira Umubarendanga ni Sibyo ikoresha 1." - -#: builtin.c:1484 -#, fuzzy, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "Umubare wuzuye Gutangira Umubarendanga" - -#: builtin.c:1510 -#, fuzzy, c-format -msgid "substr: length %g is not >= 1" -msgstr "Uburebure ni OYA 1." - -#: builtin.c:1512 -#, fuzzy, c-format -msgid "substr: length %g is not >= 0" -msgstr "Uburebure ni OYA 0" - -#: builtin.c:1519 -#, fuzzy, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "Umubare wuzuye Uburebure" - -#: builtin.c:1524 -#, fuzzy, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "Uburebure kugirango Ikurikiranyanyuguti gushyiraho umugereka Kuri" - -#: builtin.c:1536 -#, fuzzy -msgid "substr: source string is zero length" -msgstr "Inkomoko Ikurikiranyanyuguti ni Zeru Uburebure" - -#: builtin.c:1552 -#, fuzzy, c-format -msgid "substr: start index %g is past end of string" -msgstr "Gutangira Umubarendanga ni Impera Bya Ikurikiranyanyuguti" - -#: builtin.c:1560 -#, fuzzy, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "Uburebure ku Gutangira Umubarendanga Uburebure Bya Itangira" - -#: builtin.c:1637 -#, fuzzy -msgid "strftime: received non-string first argument" -msgstr "BYAKIRIWE Ikurikiranyanyuguti Itangira" - -#: builtin.c:1643 -#, fuzzy -msgid "strftime: received empty format string" -msgstr "BYAKIRIWE ubusa Imiterere Ikurikiranyanyuguti" - -#: builtin.c:1652 -#, fuzzy -msgid "strftime: received non-numeric second argument" -msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:1729 -#, fuzzy -msgid "mktime: received non-string argument" -msgstr "BYAKIRIWE Ikurikiranyanyuguti" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -#, fuzzy -msgid "system: received non-string argument" -msgstr "Sisitemu BYAKIRIWE Ikurikiranyanyuguti" - -#: builtin.c:1904 eval.c:2157 -#, fuzzy, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "Indango Kuri Itatangijwe Umwanya" - -#: builtin.c:2009 -#, fuzzy -msgid "tolower: received non-string argument" -msgstr "BYAKIRIWE Ikurikiranyanyuguti" - -#: builtin.c:2039 -#, fuzzy -msgid "toupper: received non-string argument" -msgstr "BYAKIRIWE Ikurikiranyanyuguti" - -#: builtin.c:2072 -#, fuzzy -msgid "atan2: received non-numeric first argument" -msgstr "ATAN2 BYAKIRIWE Bikurikije umubare Itangira" - -#: builtin.c:2074 -#, fuzzy -msgid "atan2: received non-numeric second argument" -msgstr "ATAN2 BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:2093 -#, fuzzy -msgid "sin: received non-numeric argument" -msgstr "SIN BYAKIRIWE Bikurikije umubare" - -#: builtin.c:2109 -#, fuzzy -msgid "cos: received non-numeric argument" -msgstr "COS BYAKIRIWE Bikurikije umubare" - -#: builtin.c:2162 -#, fuzzy -msgid "srand: received non-numeric argument" -msgstr "BYAKIRIWE Bikurikije umubare" - -#: builtin.c:2197 -#, fuzzy -msgid "match: third argument is not an array" -msgstr "BIHUYE ni OYA Imbonerahamwe" - -#: builtin.c:2744 -#, fuzzy -msgid "gensub: third argument of 0 treated as 1" -msgstr "Bya 0 Nka 1." - -#: builtin.c:2860 -#, fuzzy -msgid "lshift: received non-numeric first argument" -msgstr "BYAKIRIWE Bikurikije umubare Itangira" - -#: builtin.c:2862 -#, fuzzy -msgid "lshift: received non-numeric second argument" -msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:2868 -#, fuzzy, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "Uduciro Ibisubizo ku" - -#: builtin.c:2870 -#, fuzzy, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "Uduciro" - -#: builtin.c:2872 -#, fuzzy, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "Binini Gusunika Agaciro Ibisubizo ku" - -#: builtin.c:2898 -#, fuzzy -msgid "rshift: received non-numeric first argument" -msgstr "BYAKIRIWE Bikurikije umubare Itangira" - -#: builtin.c:2900 -#, fuzzy -msgid "rshift: received non-numeric second argument" -msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:2906 -#, fuzzy, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "Uduciro Ibisubizo ku" - -#: builtin.c:2908 -#, fuzzy, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "Uduciro" - -#: builtin.c:2910 -#, fuzzy, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "Binini Gusunika Agaciro Ibisubizo ku" - -#: builtin.c:2936 -#, fuzzy -msgid "and: received non-numeric first argument" -msgstr "Na BYAKIRIWE Bikurikije umubare Itangira" - -#: builtin.c:2938 -#, fuzzy -msgid "and: received non-numeric second argument" -msgstr "Na BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:2944 -#, fuzzy, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "Na Uduciro Ibisubizo ku" - -#: builtin.c:2946 -#, fuzzy, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "Na Uduciro" - -#: builtin.c:2972 -#, fuzzy -msgid "or: received non-numeric first argument" -msgstr "Cyangwa BYAKIRIWE Bikurikije umubare Itangira" - -#: builtin.c:2974 -#, fuzzy -msgid "or: received non-numeric second argument" -msgstr "Cyangwa BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:2980 -#, fuzzy, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "Cyangwa Uduciro Ibisubizo ku" - -#: builtin.c:2982 -#, fuzzy, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "Cyangwa Uduciro" - -#: builtin.c:3008 -#, fuzzy -msgid "xor: received non-numeric first argument" -msgstr "BYAKIRIWE Bikurikije umubare Itangira" - -#: builtin.c:3010 -#, fuzzy -msgid "xor: received non-numeric second argument" -msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA" - -#: builtin.c:3016 -#, fuzzy, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "Uduciro Ibisubizo ku" - -#: builtin.c:3018 -#, fuzzy, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "Uduciro" - -#: builtin.c:3042 -#, fuzzy -msgid "compl: received non-numeric argument" -msgstr "BYAKIRIWE Bikurikije umubare" - -#: builtin.c:3048 -#, fuzzy, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "Agaciro Ibisubizo ku" - -#: builtin.c:3050 -#, fuzzy, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "Agaciro" - -#: builtin.c:3223 -#, fuzzy, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "ni OYA a Byemewe Umwanya Icyiciro" - -#: eval.c:372 -#, fuzzy, c-format -msgid "unknown nodetype %d" -msgstr "Kitazwi" - -#: eval.c:422 -#, fuzzy -msgid "buffer overflow in genflags2str" -msgstr "Byarenze urugero in" - -#: eval.c:454 eval.c:460 profile.c:785 -#, fuzzy, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "Kuri Gukoresha Imbonerahamwe in a Imvugiro" - -#: eval.c:802 -#, fuzzy, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "kugirango Imbonerahamwe Byahinduwe Ingano Bivuye Kuri" - -#: eval.c:823 -#, fuzzy -msgid "`break' outside a loop is not portable" -msgstr "`Hanze a ni OYA" - -#: eval.c:827 -#, fuzzy -msgid "`break' outside a loop is not allowed" -msgstr "`Hanze a ni OYA" - -#: eval.c:844 -#, fuzzy -msgid "`continue' outside a loop is not portable" -msgstr "`Hanze a ni OYA" - -#: eval.c:848 -#, fuzzy -msgid "`continue' outside a loop is not allowed" -msgstr "`Hanze a ni OYA" - -#: eval.c:882 -#, fuzzy -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`Bivuye a" - -#: eval.c:884 -#, fuzzy -msgid "`next' cannot be called from an END rule" -msgstr "`Bivuye" - -#: eval.c:893 -#, fuzzy -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`Bivuye a" - -#: eval.c:895 -#, fuzzy -msgid "`nextfile' cannot be called from an END rule" -msgstr "`Bivuye" - -#: eval.c:952 -#, fuzzy -msgid "statement has no effect" -msgstr "Inyandiko Oya INGARUKA" - -#: eval.c:1029 eval.c:2011 -#, fuzzy, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "Gukoresha Umumaro Izina: Nka IMPINDURAGACIRO Cyangwa Imbonerahamwe" - -#: eval.c:1036 eval.c:1042 -#, fuzzy, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "Indango Kuri Itatangijwe" - -#: eval.c:1051 eval.c:2020 -#, fuzzy, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "Indango Kuri Itatangijwe IMPINDURAGACIRO" - -#: eval.c:1197 -#, fuzzy -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "Ingaruka in imvugo Byahinduwe i Uburebure Bya" - -#: eval.c:1301 -#, fuzzy -msgid "assignment used in conditional context" -msgstr "Igenera in Imvugiro" - -#: eval.c:1379 -#, fuzzy -msgid "division by zero attempted" -msgstr "ku Zeru" - -#: eval.c:1409 profile.c:661 -#, fuzzy, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "Ubwoko in" - -#: eval.c:1572 -#, fuzzy -msgid "division by zero attempted in `/='" -msgstr "ku Zeru in" - -#: eval.c:1594 -#, fuzzy, c-format -msgid "division by zero attempted in `%%='" -msgstr "ku Zeru in" - -#: eval.c:1871 -#, fuzzy, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "Umumaro Na: Birenzeho ingingo" - -#: eval.c:1916 -#, fuzzy, c-format -msgid "function `%s' not defined" -msgstr "Umumaro OYA" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "" - -#: eval.c:2141 -#, fuzzy -msgid "attempt to field reference from non-numeric value" -msgstr "Kuri Umwanya Indango Bivuye Bikurikije umubare Agaciro" - -#: eval.c:2143 -#, fuzzy -msgid "attempt to reference from null string" -msgstr "Kuri Indango Bivuye NTAGIHARI Ikurikiranyanyuguti" - -#: eval.c:2149 -#, fuzzy, c-format -msgid "attempt to access field %d" -msgstr "Kuri Umwanya" - -#: eval.c:2170 eval.c:2177 profile.c:840 -#, fuzzy -msgid "assignment is not allowed to result of builtin function" -msgstr "Igenera ni OYA Kuri Igisubizo Bya Umumaro" - -#: eval.c:2241 -#, fuzzy -msgid "`IGNORECASE' is a gawk extension" -msgstr "`ni a Umugereka" - -#: eval.c:2270 -#, fuzzy -msgid "`BINMODE' is a gawk extension" -msgstr "`ni a Umugereka" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "" - -#: eval.c:2496 -#, fuzzy -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "Bidakora Kuri Igenera Kuri" - -#: ext.c:62 ext.c:67 -#, fuzzy -msgid "`extension' is a gawk extension" -msgstr "`ni a Umugereka" - -#: ext.c:77 -#, fuzzy, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "Umugereka Gufungura" - -#: ext.c:85 -#, fuzzy, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "Umugereka Isomero Umumaro" - -#: ext.c:105 -#, fuzzy -msgid "extension: missing function name" -msgstr "Umugereka Ibuze Umumaro Izina:" - -#: ext.c:110 -#, fuzzy, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "Umugereka Inyuguti in Umumaro Izina:" - -#: ext.c:116 -#, fuzzy, c-format -msgid "extension: can't redefine function `%s'" -msgstr "Umugereka Umumaro" - -#: ext.c:120 -#, fuzzy, c-format -msgid "extension: function `%s' already defined" -msgstr "Umugereka Umumaro" - -#: ext.c:125 -#, fuzzy, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "Umugereka Gukoresha in Nka Umumaro Izina:" - -#: ext.c:127 -#, fuzzy, c-format -msgid "extension: function name `%s' previously defined" -msgstr "Umugereka Umumaro Izina:" - -#: ext.c:204 -#, fuzzy, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "Umumaro Kuri Oya Birenzeho S" - -#: ext.c:207 -#, fuzzy, c-format -msgid "function `%s': missing argument #%d" -msgstr "Umumaro Ibuze" - -#: ext.c:217 -#, fuzzy, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "Umumaro Kuri Gukoresha Nka Imbonerahamwe" - -#: ext.c:221 -#, fuzzy, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "Umumaro Kuri Gukoresha Imbonerahamwe Nka a" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "" - -#: field.c:330 -#, fuzzy -msgid "NF set to negative value" -msgstr "Gushyiraho Kuri Agaciro" - -#: field.c:875 -#, fuzzy -msgid "split: second argument is not an array" -msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe" - -#: field.c:909 -#, fuzzy -msgid "split: null string for third arg is a gawk extension" -msgstr "Gutandukanya NTAGIHARI Ikurikiranyanyuguti kugirango ni a Umugereka" - -#: field.c:961 -#, fuzzy -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`ni a Umugereka" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "" - -#: field.c:1088 -#, fuzzy -msgid "null string for `FS' is a gawk extension" -msgstr "NTAGIHARI Ikurikiranyanyuguti kugirango ni a Umugereka" - -#: field.c:1092 -#, fuzzy -msgid "old awk does not support regexps as value of `FS'" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s:Ihitamo ni" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s:Ihitamo Kwemerera" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s:Ihitamo Kwemerera" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s:Ihitamo" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s:Ihitamo" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s:Ihitamo" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s:Sibyo Ihitamo" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s:Ihitamo" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s:Ihitamo ni" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s:Ihitamo Kwemerera" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s:Ihitamo" - -#: io.c:322 io.c:352 -#, fuzzy, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "Gufungura IDOSIYE kugirango" - -#: io.c:443 -#, fuzzy, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "Gufunga Bya Byanze" - -#: io.c:583 -#, fuzzy, c-format -msgid "invalid tree type %s in redirect()" -msgstr "Sibyo Ubwoko in" - -#: io.c:589 -#, fuzzy, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "imvugo in Bikurikije umubare Agaciro" - -#: io.c:595 -#, fuzzy, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "imvugo kugirango NTAGIHARI Ikurikiranyanyuguti Agaciro" - -#: io.c:600 -#, fuzzy, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"Izina ry'idosiye: kugirango Gicurasi Igisubizo Bya Bijyanye n'inyurabwenge " -"imvugo" - -#: io.c:638 -#, fuzzy, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "Bya Na kugirango IDOSIYE" - -#: io.c:685 -#, fuzzy, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "Gufungura kugirango Ibisohoka" - -#: io.c:694 -#, fuzzy, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "Gufungura kugirango Iyinjiza" - -#: io.c:717 -#, fuzzy, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "Gufungura kugirango Iyinjiza Ibisohoka" - -#: io.c:795 -#, fuzzy, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "Bivuye" - -#: io.c:798 -#, fuzzy, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "Kuri" - -#: io.c:851 -#, fuzzy -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "Sisitemu kugirango Gufungura Idosiye Kuri IDOSIYE" - -#: io.c:867 -#, fuzzy, c-format -msgid "close of `%s' failed (%s)." -msgstr "Gufunga Bya Byanze" - -#: io.c:875 -#, fuzzy -msgid "too many pipes or input files open" -msgstr "Cyangwa Iyinjiza Idosiye Gufungura" - -#: io.c:898 -#, fuzzy -msgid "close: second argument must be `to' or `from'" -msgstr "Gufunga ISEGONDA Cyangwa" - -#: io.c:912 -#, fuzzy, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "Gufunga." - -#: io.c:917 -#, fuzzy -msgid "close of redirection that was never opened" -msgstr "Gufunga Bya Nta narimwe" - -#: io.c:1014 -#, fuzzy, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "Gufunga OYA Na: ISEGONDA" - -#: io.c:1030 -#, fuzzy, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "Imimerere ku Gufunga Bya" - -#: io.c:1033 -#, fuzzy, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "Imimerere ku IDOSIYE Gufunga Bya" - -#: io.c:1053 -#, fuzzy, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "Oya Gufunga Bya" - -#: io.c:1056 -#, fuzzy, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "Oya Gufunga Bya" - -#: io.c:1059 -#, fuzzy, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "Oya Gufunga Bya" - -#: io.c:1062 -#, fuzzy, c-format -msgid "no explicit close of file `%s' provided" -msgstr "Oya Gufunga Bya IDOSIYE" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, fuzzy, c-format -msgid "error writing standard output (%s)" -msgstr "Ikosa Bisanzwe Ibisohoka" - -#: io.c:1094 io.c:1150 -#, fuzzy, c-format -msgid "error writing standard error (%s)" -msgstr "Ikosa Bisanzwe Ikosa" - -#: io.c:1102 -#, fuzzy, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "Bya Byanze" - -#: io.c:1105 -#, fuzzy, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "Bya Kuri Byanze" - -#: io.c:1108 -#, fuzzy, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "IDOSIYE Bya Byanze" - -#: io.c:1222 -#, fuzzy, c-format -msgid "local port %s invalid in `/inet'" -msgstr "Umuyoboro Sibyo in" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "" - -#: io.c:1274 -#, fuzzy -msgid "/inet/raw client not ready yet, sorry" -msgstr "/Umukiriya OYA Cyiteguye" - -#: io.c:1277 io.c:1313 -#, fuzzy -msgid "only root may use `/inet/raw'." -msgstr "Imizi Gicurasi Gukoresha" - -#: io.c:1311 -#, fuzzy -msgid "/inet/raw server not ready yet, sorry" -msgstr "/Seriveri OYA Cyiteguye" - -#: io.c:1409 -#, fuzzy, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "Oya Porotokole in Bidasanzwe Izina ry'idosiye:" - -#: io.c:1423 -#, fuzzy, c-format -msgid "special file name `%s' is incomplete" -msgstr "Bidasanzwe IDOSIYE Izina: ni" - -#: io.c:1438 -#, fuzzy -msgid "must supply a remote hostname to `/inet'" -msgstr "a Izina ry'inturo: Kuri" - -#: io.c:1456 -#, fuzzy -msgid "must supply a remote port to `/inet'" -msgstr "a Umuyoboro Kuri" - -#: io.c:1502 -#, fuzzy -msgid "TCP/IP communications are not supported" -msgstr "OYA" - -#: io.c:1511 -#, fuzzy, c-format -msgid "file `%s' is a directory" -msgstr "IDOSIYE ni a bushyinguro" - -#: io.c:1572 -#, fuzzy, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "Gukoresha Bya" - -#: io.c:1610 -#, fuzzy -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "Gukoresha Bya" - -#: io.c:1675 io.c:1872 -#, fuzzy, c-format -msgid "could not open `%s', mode `%s'" -msgstr "OYA Gufungura Ubwoko" - -#: io.c:1923 -#, fuzzy, c-format -msgid "close of master pty failed (%s)" -msgstr "Gufunga Bya Mugenga Byanze" - -#: io.c:1925 io.c:2077 io.c:2228 -#, fuzzy, c-format -msgid "close of stdout in child failed (%s)" -msgstr "Gufunga Bya in Byanze" - -#: io.c:1928 -#, fuzzy, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "Kuri in Byanze" - -#: io.c:1930 io.c:2082 -#, fuzzy, c-format -msgid "close of stdin in child failed (%s)" -msgstr "Gufunga Bya in Byanze" - -#: io.c:1933 -#, fuzzy, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "Kuri in Byanze" - -#: io.c:1935 io.c:1954 -#, fuzzy, c-format -msgid "close of slave pty failed (%s)" -msgstr "Gufunga Bya Byanze" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, fuzzy, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "Kuri in Byanze" - -#: io.c:2032 io.c:2085 -#, fuzzy, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "Kuri in Byanze" - -#: io.c:2049 io.c:2222 -#, fuzzy -msgid "restoring stdout in parent process failed\n" -msgstr "in" - -#: io.c:2054 -#, fuzzy -msgid "restoring stdin in parent process failed\n" -msgstr "in" - -#: io.c:2088 io.c:2233 io.c:2244 -#, fuzzy, c-format -msgid "close of pipe failed (%s)" -msgstr "Gufunga Bya Byanze" - -#: io.c:2133 -#, fuzzy -msgid "`|&' not supported" -msgstr "`|&'OYA" - -#: io.c:2199 -#, fuzzy, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "Gufungura" - -#: io.c:2240 -#, fuzzy, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "Kurema kugirango" - -#: io.c:2622 -#, fuzzy, c-format -msgid "data file `%s' is empty" -msgstr "Ibyatanzwe IDOSIYE ni ubusa" - -#: io.c:2663 io.c:2671 -#, fuzzy -msgid "could not allocate more input memory" -msgstr "OYA Birenzeho Iyinjiza Ububiko" - -#: io.c:3039 io.c:3112 -#, fuzzy, c-format -msgid "error reading input file `%s': %s" -msgstr "Ikosa Iyinjiza IDOSIYE" - -#: io.c:3237 -#, fuzzy -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "Agaciro Bya ni a Umugereka" - -#: main.c:306 -msgid "out of memory" -msgstr "" - -#: main.c:374 -#, fuzzy -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "`-M Ihitamo in" - -#: main.c:376 -#, fuzzy -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-M Ihitamo Ikoresha: M" - -#: main.c:393 -#, fuzzy, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s:Ihitamo" - -#: main.c:434 -#, fuzzy -msgid "empty argument to `--source' ignored" -msgstr "ubusa Kuri" - -#: main.c:488 -#, fuzzy, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s:Ihitamo" - -#: main.c:509 -#, fuzzy -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "IMPINDURAGACIRO Gushyiraho ku" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "" - -#: main.c:526 -#, fuzzy -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--NYACUMI" - -#: main.c:530 -#, fuzzy, c-format -msgid "running %s setuid root may be a security problem" -msgstr "Imizi Gicurasi a Umutekano" - -#: main.c:571 -#, fuzzy, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "Gushyiraho Nyabibiri Ubwoko ku" - -#: main.c:574 -#, fuzzy, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "Gushyiraho Nyabibiri Ubwoko ku" - -#: main.c:576 -#, fuzzy, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "Gushyiraho Nyabibiri Ubwoko ku" - -#: main.c:617 -#, fuzzy -msgid "no program text at all!" -msgstr "Oya Porogaramu Umwandiko ku Byose" - -#: main.c:721 -#, fuzzy, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "Cyangwa IMISUSIRE Amahitamo F IDOSIYE" - -#: main.c:723 -#, fuzzy, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "Cyangwa IMISUSIRE Amahitamo IDOSIYE" - -#: main.c:728 -#, fuzzy -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Amahitamo Amahitamo" - -#: main.c:729 -#, fuzzy -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "-F IDOSIYE" - -#: main.c:730 -#, fuzzy -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "-Umwanya Mutandukanya" - -#: main.c:731 -#, fuzzy -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "-v VAR Kugenera... VAR" - -#: main.c:732 -#, fuzzy -msgid "\t-m[fr] val\n" -msgstr "-M" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "" - -#: main.c:737 -#, fuzzy -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "-Ibihinduka IDOSIYE Ibihinduka IDOSIYE" - -#: main.c:738 -#, fuzzy -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "-Ibijyana IDOSIYE Ibijyana IDOSIYE" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "" - -#: main.c:743 -#, fuzzy -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "-NYACUMI NYACUMI" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "" - -#: main.c:750 -#, fuzzy -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "-Ibijyana IDOSIYE Ibijyana IDOSIYE" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "" - -#: main.c:753 -#, fuzzy -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "-Inkomoko Porogaramu Inkomoko Porogaramu" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -#, 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 "Icyegeranyo in Na in i Byacapwe Verisiyo" - -#: main.c:770 -#, fuzzy -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"ni a Ishusho Na Inonosora Ururimi Mburabuzi Bisanzwe Iyinjiza Na Bisanzwe " -"Ibisohoka" - -#: main.c:774 -#, fuzzy -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "Igiteranyo Gucapa Igiteranyo Gucapa" - -#: main.c:794 -#, fuzzy, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"C Porogaramu ni Kigenga Na Cyangwa i Bya i Nka Verisiyo 3. Bya i ku Ihitamo " -"Verisiyo" - -#: main.c:802 -#, fuzzy -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 "" -"Porogaramu ni in i ATARIIGIHARWE i Cyangwa A kugirango Birenzeho Birambuye" - -#: main.c:813 -#, fuzzy -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"BYAKIRIWE a Gukoporora Bya i Na: iyi Porogaramu NIBA OYA Kwandika Kuri i" - -#: main.c:848 -#, fuzzy -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-OYA Gushyiraho Kuri Isunika in" - -#: main.c:1122 -#, fuzzy, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "%s:`%s'Kuri OYA in VAR" - -#: main.c:1142 -#, fuzzy, c-format -msgid "`%s' is not a legal variable name" -msgstr "`%s'ni OYA a By'amategeko IMPINDURAGACIRO Izina:" - -#: main.c:1145 -#, fuzzy, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "`%s'ni OYA a IMPINDURAGACIRO Izina: kugirango IDOSIYE" - -#: main.c:1184 -#, fuzzy -msgid "floating point exception" -msgstr "Bihindagurika Akadomo Irengayobora(-)" - -#: main.c:1191 -#, fuzzy -msgid "fatal error: internal error" -msgstr "Ikosa By'imbere Ikosa" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "Ikosa By'imbere Ikosa" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "Ikosa By'imbere Ikosa" - -#: main.c:1268 -#, fuzzy, c-format -msgid "no pre-opened fd %d" -msgstr "Oya Byahawe imiterere mbere" - -#: main.c:1275 -#, fuzzy, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "OYA Byahawe imiterere mbere Gufungura NTAGIHARI kugirango" - -#: main.c:1298 main.c:1307 -#, fuzzy, c-format -msgid "could not find groups: %s" -msgstr "OYA Gushaka Amatsinda" - -#: msg.c:54 -#, fuzzy, c-format -msgid "cmd. line:" -msgstr "Cmd+." - -#: msg.c:120 -#, fuzzy -msgid "warning: " -msgstr "Iburira!" - -# starmath/source\smres.src:RID_ERR_IDENT.text -#: msg.c:142 -#, fuzzy -msgid "error: " -msgstr "IKOSA" - -#: msg.c:178 -msgid "fatal: " -msgstr "" - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -#, fuzzy -msgid "can't convert string to float" -msgstr "GUHINDURA Ikurikiranyanyuguti Kuri Kureremba" - -#: node.c:465 -#, fuzzy -msgid "backslash at end of string" -msgstr "ku Impera Bya Ikurikiranyanyuguti" - -#: node.c:609 -#, fuzzy, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "ki/ bishaje OYA Gushigikira Mukoresha" - -#: node.c:660 -#, fuzzy -msgid "POSIX does not allow `\\x' escapes" -msgstr "OYA Kwemerera" - -#: node.c:666 -#, fuzzy -msgid "no hex digits in `\\x' escape sequence" -msgstr "Oya in" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, fuzzy, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "Nka Byuzuye" - -#: posix/gawkmisc.c:172 -#, fuzzy, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s%s`%s':OYA Gushyiraho Gufunga ku" - -#: profile.c:94 -#, fuzzy, c-format -msgid "could not open `%s' for writing: %s" -msgstr "OYA Gufungura kugirango" - -#: profile.c:457 -#, fuzzy, c-format -msgid "internal error: %s with null vname" -msgstr "By'imbere Ikosa Na: NTAGIHARI" - -#: profile.c:521 -#, fuzzy -msgid "# treated internally as `delete'" -msgstr "#Nka" - -#: profile.c:1073 -#, fuzzy, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "#iyi ni a Umugereka Umumaro" - -#: profile.c:1104 -#, fuzzy, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "#Ibijyana Byaremwe" - -#: profile.c:1107 -#, fuzzy, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "#Funga S" - -#: profile.c:1117 -#, fuzzy, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "#S" - -#: profile.c:1123 -#, fuzzy, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "#Funga S" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" - -#: profile.c:1405 -#, fuzzy, c-format -msgid "unexpected type %s in prec_level" -msgstr "Ubwoko in" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Kitazwi" - -#: regcomp.c:132 -msgid "Success" -msgstr "Ibyatunganye" - -#: regcomp.c:135 -#, fuzzy -msgid "No match" -msgstr "BIHUYE" - -#: regcomp.c:138 -#, fuzzy -msgid "Invalid regular expression" -msgstr "Ibisanzwe imvugo" - -#: regcomp.c:141 -#, fuzzy -msgid "Invalid collation character" -msgstr "Inyuguti" - -#: regcomp.c:144 -#, fuzzy -msgid "Invalid character class name" -msgstr "Inyuguti ishuri Izina:" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "" - -#: regcomp.c:150 -#, fuzzy -msgid "Invalid back reference" -msgstr "Inyuma Indango" - -#: regcomp.c:153 -#, fuzzy -msgid "Unmatched [ or [^" -msgstr "Cyangwa" - -#: regcomp.c:156 -#, fuzzy -msgid "Unmatched ( or \\(" -msgstr "Cyangwa" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "" - -#: regcomp.c:162 -#, fuzzy -msgid "Invalid content of \\{\\}" -msgstr "Ibikubiyemo Bya" - -#: regcomp.c:165 -#, fuzzy -msgid "Invalid range end" -msgstr "Urutonde Impera" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "" - -#: regcomp.c:171 -#, fuzzy -msgid "Invalid preceding regular expression" -msgstr "Ibisanzwe imvugo" - -#: regcomp.c:174 -#, fuzzy -msgid "Premature end of regular expression" -msgstr "Impera Bya Ibisanzwe imvugo" - -#: regcomp.c:177 -#, fuzzy -msgid "Regular expression too big" -msgstr "imvugo" - -#: regcomp.c:180 -#, fuzzy -msgid "Unmatched ) or \\)" -msgstr "Cyangwa" - -#: regcomp.c:699 -#, fuzzy -msgid "No previous regular expression" -msgstr "Ibanjirije Ibisanzwe imvugo" - -#, fuzzy -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "Gufungura kugirango Iyinjiza Ibisohoka" - -#, fuzzy -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s:Ihitamo" - -#, fuzzy -#~ msgid "remote port invalid in `%s'" -#~ msgstr "Umuyoboro Sibyo in" - -#, fuzzy -#~ msgid "function %s called\n" -#~ msgstr "Umumaro" - -#, fuzzy -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "Umwanya in 0" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/sv.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/sv.gmo differ diff -Nru gawk-3.1.8+dfsg/po/sv.po gawk-4.0.1+dfsg/po/sv.po --- gawk-3.1.8+dfsg/po/sv.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/sv.po 2012-03-28 20:03:47.000000000 +0000 @@ -1,407 +1,532 @@ # Swedish translation of gawk -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright © 2003, 2011, 2012 Free Software Foundation, Inc. # This file is distributed under the same license as the gawk package. # Martin Sjögren , 2001-2002. # Christer Andersson , 2007. +# Göran Uddeborg , 2011, 2012. # +# $Revision: 1.7 $ msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.6\n" +"Project-Id-Version: gawk 4.0.0h\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2008-01-16 05:30+0100\n" -"Last-Translator: Christer Andersson \n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" +"PO-Revision-Date: 2012-01-30 12:07+0100\n" +"Last-Translator: Göran Uddeborg \n" "Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:112 +#: array.c:140 +#, c-format +msgid "from %s" +msgstr "från %s" + +#: array.c:248 +msgid "attempt to use a scalar value as array" +msgstr "försök att använda ett skalärt värde som vektor" + +#: array.c:251 #, c-format msgid "attempt to use function `%s' as an array" msgstr "försök att använda funktionen \"%s\" som vektor" -#: array.c:115 +#: array.c:254 #, 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" -#: array.c:118 +#: array.c:257 #, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "försök att använda skalären \"%s\" som vektor" +msgid "attempt to use scalar `%s' as an array" +msgstr "försök att använda skalären \"%s\" som en vektor" -#: array.c:156 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format -msgid "from %s" -msgstr "från %s" +msgid "attempt to use array `%s' in a scalar context" +msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" #: array.c:513 -#, fuzzy, c-format +#, c-format msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "referens till ickeinitierat element \"%s[\"%s\"]\"" +msgstr "referens till oinitierat element \"%s[\"%.*s\"]\"" #: array.c:519 #, c-format msgid "subscript of array `%s' is null string" msgstr "index i vektorn \"%s\" är en tom sträng" -#: array.c:623 +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" -#: array.c:792 +#: array.c:734 eval.c:1865 +#, c-format +msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" +msgstr "försök att använda skalären \"%s[\"%.*s\"]\" som en vektor" + +#: array.c:910 #, c-format msgid "%s: empty (null)\n" msgstr "%s: tom (null)\n" -#: array.c:797 +#: array.c:915 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (noll)\n" -#: array.c:801 +#: array.c:919 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabellstorlek = %d, vektorstorlek = %d\n" -#: array.c:830 +#: array.c:954 #, c-format msgid "%s: is parameter\n" msgstr "%s: är en parameter\n" -#: array.c:835 +#: array.c:958 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: vektorreferens till %s\n" -#: awkgram.y:218 +#: array.c:963 +msgid "adump: argument not an array" +msgstr "adump: argumentet är inte en vektor" + +#: array.c:1086 +msgid "asort: second argument not an array" +msgstr "asort: andra argumentet är inte en vektor" + +#: array.c:1087 +msgid "asorti: second argument not an array" +msgstr "asorti: andra argumentet är inte en vektor" + +#: array.c:1094 +msgid "asort: first argument not an array" +msgstr "asort: första argumentet är inte en vektor" + +#: array.c:1095 +msgid "asorti: first argument not an array" +msgstr "asorti: första argumentet är inte en vektor" + +#: array.c:1102 +msgid "asort: cannot use a subarray of first arg for second arg" +msgstr "" +"asort: det går inte att använda en delvektor av första argumentet som andra " +"argument" + +#: array.c:1103 +msgid "asorti: cannot use a subarray of first arg for second arg" +msgstr "" +"asorti: det går inte att använda en delvektor av första argumentet som andra " +"argument" + +#: array.c:1108 +msgid "asort: cannot use a subarray of second arg for first arg" +msgstr "" +"asort: det går inte att använda en delvektor av andra argumentet som första " +"argument" + +#: array.c:1109 +msgid "asorti: cannot use a subarray of second arg for first arg" +msgstr "" +"asorti: det går inte att använda en delvektor av andra argumentet som första " +"argument" + +#: array.c:1655 +#, c-format +msgid "`%s' is invalid as a function name" +msgstr "\"%s\" är ogiltigt som ett funktionsnamn" + +#: array.c:1659 +#, c-format +msgid "sort comparison function `%s' is not defined" +msgstr "jämförelsefunktionen \"%s\" för sortering är inte definierad" + +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "%s-block måste ha en åtgärdsdel" -#: awkgram.y:221 +#: awkgram.y:252 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:257 awkgram.y:266 +#: awkgram.y:323 awkgram.y:334 msgid "old awk does not support multiple `BEGIN' or `END' rules" msgstr "gamla awk stöder inte flera \"BEGIN\"- eller \"END\"-regler" -#: awkgram.y:285 +#: awkgram.y:371 #, 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:331 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "regexp-konstanten \"//\" ser ut som en C++-kommentar men är inte det" -#: awkgram.y:334 +#: awkgram.y:436 #, 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:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "kommandot kanske inte har någon effekt" +#: awkgram.y:528 +#, c-format +msgid "duplicate case values in switch body: %s" +msgstr "upprepade case-värden i switch-sats: %s" + +#: awkgram.y:549 +msgid "duplicate `default' detected in switch body" +msgstr "flera \"default\" upptäcktes i switch-sats" + +#: awkgram.y:809 +msgid "`break' is not allowed outside a loop or switch" +msgstr "\"break\" är inte tillåtet utanför en slinga eller switch" + +#: awkgram.y:818 +msgid "`continue' is not allowed outside a loop" +msgstr "\"continue\" är inte tillåtet utanför en slinga" -#: awkgram.y:458 awkgram.y:482 +#: awkgram.y:828 #, c-format -msgid "`%s' used in %s action" -msgstr "\"%s\" använd i %s-åtgärden" +msgid "`next' used in %s action" +msgstr "\"next\" använt i %s-åtgärd" -#: awkgram.y:473 awkgram.y:477 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "\"nextfile\" är en gawk-utökning" -#: awkgram.y:492 +#: awkgram.y:841 +#, c-format +msgid "`nextfile' used in %s action" +msgstr "\"nextfile\" använt i %s-åtgärd" + +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "\"return\" använd utanför funktion" -#: awkgram.y:534 +#: awkgram.y:925 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:550 awkgram.y:558 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "\"delete array\" är en gawk-utökning" -#: awkgram.y:572 awkgram.y:580 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "\"delete(array)\" är en icke portabel tawk-utökning" -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "upprepade case-värden i switch-sats: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "Flera \"default\"-fall upptäcktes i switch-sats" - -#: awkgram.y:723 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "flerstegs dubbelriktade rör fungerar inte" -#: awkgram.y:814 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "reguljärt uttryck i högerledet av en tilldelning" -#: awkgram.y:824 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "reguljärt uttryck på vänster sida om en \"~\"- eller \"!~\"-operator" -#: awkgram.y:830 awkgram.y:903 +#: awkgram.y:1265 awkgram.y:1419 msgid "old awk does not support the keyword `in' except after `for'" msgstr "gamla awk stöder inte operatorn \"**\"" -#: awkgram.y:836 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "reguljärt uttryck i högerledet av en jämförelse" -#: awkgram.y:893 +#: awkgram.y:1394 +#, c-format +msgid "`getline var' invalid inside `%s' rule" +msgstr "\"getline var\" är ogiltigt inuti \"%s\"-regel" + +#: awkgram.y:1397 eval.c:2504 +#, c-format +msgid "`getline' invalid inside `%s' rule" +msgstr "\"getline är ogiltigt inuti \"%s\"-regel" + +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" msgstr "icke omdirigerad \"getline\" odefinierad inuti END-åtgärd" -#: awkgram.y:904 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "gamla awk stöder inte flerdimensionella vektorer" -#: awkgram.y:950 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "anrop av \"length\" utan parenteser är inte portabelt" -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "anrop av \"length\" utan parenteser är föråldrat enligt POSIX" +#: awkgram.y:1580 +msgid "indirect function calls are a gawk extension" +msgstr "indirekta funktionsanrop är en gawk-utökning" -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "icke-vektor används som vektor" +#: awkgram.y:1593 +#, c-format +msgid "can not use special variable `%s' for indirect function call" +msgstr "" +"det går inte att använda specialvariabeln \"%s\" för indirekta fuktionsanrop" -#: awkgram.y:1012 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "ogiltig indexuttryck" -#: awkgram.y:1257 +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "icke-vektor används som vektor" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 +msgid "warning: " +msgstr "varning: " + +#: awkgram.y:1993 msg.c:130 +msgid "fatal: " +msgstr "ödesdigert: " + +#: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "oväntat nyradstecken eller slut på strängen" -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "tom programtext på kommandoraden" - -#: awkgram.y:1430 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, 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:1528 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 +msgid "reason unknown" +msgstr "okänd anledning" + +#: awkgram.y:2317 +#, c-format +msgid "already included source file `%s'" +msgstr "inkluderade redan källfilen \"%s\"" + +#: awkgram.y:2343 +msgid "@include is a gawk extension" +msgstr "@include är en gawk-utökning" + +#: awkgram.y:2349 +msgid "empty filename after @include" +msgstr "tomt filnamn efter @include" + +#: awkgram.y:2494 +msgid "empty program text on command line" +msgstr "tom programtext på kommandoraden" + +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan inte läsa källfilen \"%s\" (%s)" -#: awkgram.y:1536 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "källfilen \"%s\" är tom" -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "källfilen slutar inte med en ny rad" -#: awkgram.y:1790 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "oavslutat reguljärt uttryck slutar med \"\\\" i slutet av filen" -#: awkgram.y:1814 +#: awkgram.y:2924 #, c-format msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "%s: %d: tawk-modifierare för reguljära uttryck \"/.../%c\" fungerar inte i " "gawk" -#: awkgram.y:1818 +#: awkgram.y:2928 #, c-format msgid "tawk regex modifier `/.../%c' doesn't work in gawk" msgstr "" "tawk-modifierare för reguljära uttryck \"/.../%c\" fungerar inte i gawk" -#: awkgram.y:1825 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "oavslutat reguljärt uttryck" -#: awkgram.y:1828 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "oavslutat reguljärt uttryck i slutet av filen" -#: awkgram.y:1897 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt" -#: awkgram.y:1910 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "sista tecknet på raden är inte ett omvänt snedstreck" -#: awkgram.y:1955 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillåter inte operatorn \"**=\"" -#: awkgram.y:1957 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "gamla awk stöder inte operatorn \"**=\"" -#: awkgram.y:1966 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillåter inte operatorn \"**\"" -#: awkgram.y:1968 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "gamla awk stöder inte operatorn \"**\"" -#: awkgram.y:1999 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "operatorn \"^=\" stöds inte i gamla awk" -#: awkgram.y:2007 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "operatorn \"^\" stöds inte i gamla awk" -#: awkgram.y:2091 awkgram.y:2106 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "oavslutad sträng" -#: awkgram.y:2291 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "ogiltigt tecken \"%c\" i uttryck" -#: awkgram.y:2339 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "\"%s\" är en gawk-utökning" -#: awkgram.y:2342 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "\"%s\" är en Bell Labs-utökning" -#: awkgram.y:2345 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillåter inte \"%s\"" -#: awkgram.y:2349 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "\"%s\" stöds inte i gamla awk" -#: awkgram.y:2375 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "\"goto\" anses skadlig!\n" -#: awkgram.y:2437 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d är ett ogiltigt antal argument för %s" -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: tredje argumentet är en gawk-utökning" - -#: awkgram.y:2472 +#: awkgram.y:3654 #, 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:2475 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "%s: tredje argumentet är inte ett ändringsbart objekt" -#: awkgram.y:2502 awkgram.y:2505 +#: awkgram.y:3732 awkgram.y:3735 +msgid "match: third argument is a gawk extension" +msgstr "match: tredje argumentet är en gawk-utökning" + +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: andra argumentet är en gawk-utökning" -#: awkgram.y:2515 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" -#: awkgram.y:2530 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "användandet av dcngettext(_\"...\") är felaktigt: ta bort det inledande " "understrykningstecknet" -#: awkgram.y:2602 +#: awkgram.y:3911 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktionen \"%s\": parameter %d, \"%s\", är samma som parameter %d" -#: awkgram.y:2635 +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel" -#: awkgram.y:2747 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunde inte öppna \"%s\" för skrivning (%s)" -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "skickar profilen till standard fel" +#: awkgram.y:4112 +msgid "sending variable list to standard error" +msgstr "skickar variabellista till standard fel" -#: awkgram.y:2780 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: misslyckades att stänga (%s)" -#: awkgram.y:2901 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() anropad två gånger!" -#: awkgram.y:2928 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "det fanns överskuggade variabler." -#: awkgram.y:3001 +#: awkgram.y:4206 #, 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:3004 -#, fuzzy, c-format +#: awkgram.y:4210 +#, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn" +msgstr "" +"funktionen \"%s\": det går inte att använda specialvariabeln \"%s\" som en " +"funktionsparameter" -#: awkgram.y:3014 +#: awkgram.y:4226 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" -#: awkgram.y:3165 awkgram.y:3171 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen \"%s\" anropad men aldrig definierad" -#: awkgram.y:3174 +#: awkgram.y:4403 #, c-format -msgid "function `%s' defined but never called" -msgstr "funktionen \"%s\" definierad men aldrig anropad" +msgid "function `%s' defined but never called directly" +msgstr "funktionen \"%s\" definierad men aldrig anropad direkt" -#: awkgram.y:3201 +#: awkgram.y:4435 #, 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:3245 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -410,157 +535,150 @@ "funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n" "eller använd som variabel eller vektor" -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "försökte dividera med noll i \"/=\"" +#: awkgram.y:4791 eval.c:2056 +msgid "division by zero attempted" +msgstr "försökte dividera med noll" -#: awkgram.y:3669 eval.c:1394 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "försökte dividera med noll i \"%%\"" -#: builtin.c:122 +#: builtin.c:120 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s till \"%s\" misslyckades (%s)" -#: builtin.c:123 +#: builtin.c:121 msgid "standard output" msgstr "standard ut" -#: builtin.c:124 -msgid "reason unknown" -msgstr "okänd anledning" - -#: builtin.c:137 +#: builtin.c:135 msgid "exp: received non-numeric argument" msgstr "exp: fick ett ickenumeriskt argument" -#: builtin.c:143 +#: builtin.c:141 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentet %g är inte inom tillåten gräns" -#: builtin.c:201 +#: builtin.c:200 #, 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:204 +#: builtin.c:203 #, 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:216 +#: builtin.c:215 #, 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:310 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: första argumentet är inte en sträng" -#: builtin.c:312 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: andra argumentet är inte en sträng" -#: builtin.c:434 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: fick ett ickenumeriskt argument" -#: builtin.c:464 +#: builtin.c:493 +msgid "length: received array argument" +msgstr "length: fick ett vektorargument" + +#: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "\"length(array)\" är en gawk-utökning" -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length: fick ett argument som inte är en sträng" -#: builtin.c:515 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: fick ett ickenumeriskt argument" -#: builtin.c:518 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: fick ett negativt argumentet %g" -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "måste använda \"count$\" på alla eller inga format" +#: builtin.c:694 builtin.c:699 +msgid "fatal: must use `count$' on all formats or none" +msgstr "ödesdigert: måste använda \"count$\" på alla eller inga format" -#: builtin.c:790 +#: builtin.c:762 #, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" +msgid "field width is ignored for `%%' specifier" +msgstr "fältbredd ignoreras för \"%%\"-specificerare" -#: builtin.c:792 +#: builtin.c:764 #, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" +msgid "precision is ignored for `%%' specifier" +msgstr "precision ignoreras för \"%%\"-specificerare" -#: builtin.c:794 +#: builtin.c:766 #, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" +msgid "field width and precision are ignored for `%%' specifier" +msgstr "fältbredd och precision ignoreras för \"%%\"-specificerare" -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "\"$\" tillåts inte i awk-format" +#: builtin.c:817 +msgid "fatal: `$' is not permitted in awk formats" +msgstr "ödesdigert: \"$\" tillåts inte i awk-format" -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "argumentantalet med \"$\" måste vara > 0" +#: builtin.c:826 +msgid "fatal: arg count with `$' must be > 0" +msgstr "ödesdigert: argumentantalet med \"$\" måste vara > 0" -#: builtin.c:853 +#: builtin.c:830 #, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "argumentantalet %ld är större än antalet givna argument" +msgid "fatal: arg count %ld greater than total number of supplied arguments" +msgstr "ödesdigert: argumentantalet %ld är större än antalet givna argument" -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "\"$\" tillåts inte efter en punkt i formatet" +#: builtin.c:834 +msgid "fatal: `$' not permitted after period in format" +msgstr "ödesdigert: \"$\" tillåts inte efter en punkt i formatet" -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "inget \"$\" bifogat för positionsangiven fältbredd eller precision" +#: builtin.c:850 +msgid "fatal: no `$' supplied for positional field width or precision" +msgstr "" +"ödesdigert: inget \"$\" bifogat för positionsangiven fältbredd eller " +"precision" -#: builtin.c:938 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "\"l\" är meningslös i awk-format, ignorerad" -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "\"l\" tillåts inte i POSIX awk-format" +#: builtin.c:925 +msgid "fatal: `l' is not permitted in POSIX awk formats" +msgstr "ödesdigert: \"l\" tillåts inte i POSIX awk-format" -#: builtin.c:953 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "\"L\" är meningslös i awk-format, ignorerad" -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "\"L\" tillåts inte i POSIX awk-format" +#: builtin.c:942 +msgid "fatal: `L' is not permitted in POSIX awk formats" +msgstr "ödesdigert: \"L\" tillåts inte i POSIX awk-format" -#: builtin.c:968 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "\"h\" är meningslös i awk-format, ignorerad" -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "\"h\" tillåts inte i POSIX awk-format" +#: builtin.c:959 +msgid "fatal: `h' is not permitted in POSIX awk formats" +msgstr "ödesdigert: \"h\" tillåts inte i POSIX awk-format" -#: builtin.c:1252 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: värdet %g är utanför \"%%%c\"-formatets giltiga intervall" @@ -569,12 +687,13 @@ #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" msgstr "" +"ignorerar okänt formatspecifikationstecken \"%c\": inget argument konverterat" -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "för få argument för formatsträngen" +#: builtin.c:1337 +msgid "fatal: not enough arguments to satisfy format string" +msgstr "ödesdigert: för få argument för formatsträngen" -#: builtin.c:1340 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "^ tog slut här" @@ -586,59 +705,59 @@ msgid "too many arguments supplied for format string" msgstr "för många argument för formatsträngen" -#: builtin.c:1424 builtin.c:1427 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: inga argument" -#: builtin.c:1451 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fick ickenumeriskt argument" -#: builtin.c:1455 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: anropad med negativt argument %g" -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: startindex %g är ogiltigt, använder 1" - -#: builtin.c:1484 -#, 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:1510 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: längden %g är inte >= 1" -#: builtin.c:1512 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: längden %g är inte >= 0" -#: builtin.c:1519 +#: builtin.c:1512 #, 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:1524 +#: builtin.c:1517 #, 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:1536 +#: builtin.c:1529 +#, c-format +msgid "substr: start index %g is invalid, using 1" +msgstr "substr: startindex %g är ogiltigt, använder 1" + +#: builtin.c:1534 +#, 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:1559 msgid "substr: source string is zero length" msgstr "substr: källsträngen är tom" -#: builtin.c:1552 +#: builtin.c:1575 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindex %g är bortom strängens slut" -#: builtin.c:1560 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -646,992 +765,1056 @@ "substr: längden %g vid startindex %g överskrider det första argumentets " "längd (%lu)" -#: builtin.c:1637 +#: builtin.c:1657 +msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" +msgstr "strftime: formatvärde i PROCINFO[\"strftime\"] har numerisk typ" + +#: builtin.c:1680 +msgid "strftime: received non-numeric second argument" +msgstr "strftime: fick ett ickenumeriskt andra argument" + +#: builtin.c:1683 +msgid "strftime: second argument less than 0 or too big for time_t" +msgstr "strftime: andra argimentet mindre än 0 eller för stort för time_t" + +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: fick ett första argument som inte är en sträng" -#: builtin.c:1643 +#: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: fick en tom formatsträng" -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: fick ett ickenumeriskt andra argument" - -#: builtin.c:1729 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: fick ett argument som inte är en sträng" -#: builtin.c:1746 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" -msgstr "" +msgstr "mktime: åtminstone ett av värdena är utanför standardintervallet" + +#: builtin.c:1814 +msgid "'system' function not allowed in sandbox mode" +msgstr "funktionen \"system\" är inte tillåten i sandlådeläge" -#: builtin.c:1783 +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system: fick ett argument som inte är en sträng" -#: builtin.c:1904 eval.c:2157 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referens till icke initierad variabel \"%s\"" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "referens till icke initierat fält \"$%d\"" -#: builtin.c:2009 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: fick ett argument som inte är en sträng" -#: builtin.c:2039 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: fick ett argument som inte är en sträng" -#: builtin.c:2072 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: fick ett ickenumeriskt första argument" -#: builtin.c:2074 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: fick ett ickenumeriskt andra argument" -#: builtin.c:2093 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: fick ett ickenumeriskt argument" -#: builtin.c:2109 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: fick ett ickenumeriskt argument" -#: builtin.c:2162 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: fick ett ickenumeriskt argument" -#: builtin.c:2197 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: tredje argumentet är inte en vektor" -#: builtin.c:2744 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: nollan i tredje argumentet behandlad som en etta" -#: builtin.c:2860 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: fick ett ickenumeriskt första argument" -#: builtin.c:2862 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: fick ett ickenumeriskt andra argument" -#: builtin.c:2868 +#: builtin.c:2784 #, 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:2870 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2872 +#: builtin.c:2788 #, 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:2898 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: fick ett ickenumeriskt första argument" -#: builtin.c:2900 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: fick ett ickenumeriskt andra argument" -#: builtin.c:2906 +#: builtin.c:2821 #, 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:2908 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2910 +#: builtin.c:2825 #, 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:2936 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: fick ett ickenumeriskt första argument" -#: builtin.c:2938 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: fick ett ickenumeriskt andra argument" -#: builtin.c:2944 +#: builtin.c:2858 #, 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:2946 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2972 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: fick ett ickenumeriskt första argument" -#: builtin.c:2974 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: fick ett ickenumeriskt andra argument" -#: builtin.c:2980 +#: builtin.c:2893 #, 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:2982 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:3008 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: fick ett ickenumeriskt första argument" -#: builtin.c:3010 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: fick ett ickenumeriskt andra argument" -#: builtin.c:3016 +#: builtin.c:2931 #, 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:3018 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:3042 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: fick ett ickenumeriskt argument" -#: builtin.c:3048 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:3050 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): flyttalsvärden kommer trunkeras" -#: builtin.c:3223 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" är inte en giltig lokalkategori" -#: eval.c:372 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "okänd nodtyp %d" -#: eval.c:422 +#: eval.c:423 eval.c:437 +#, c-format +msgid "unknown opcode %d" +msgstr "okänd op-kod %d" + +#: eval.c:434 +#, c-format +msgid "opcode %s not an operator or keyword" +msgstr "op-kod %s är inte en operator eller ett nyckelord" + +#: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "buffertöverflöd i genflags2str" -#: eval.c:454 eval.c:460 profile.c:785 +#: eval.c:698 #, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktionsanropsstack:\n" +"\n" -#: eval.c:802 +#: eval.c:725 +msgid "`IGNORECASE' is a gawk extension" +msgstr "\"IGNORECASE\" är en gawk-utökning" + +#: eval.c:754 +msgid "`BINMODE' is a gawk extension" +msgstr "\"BINMODE\" är en gawk-utökning" + +#: eval.c:812 #, 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" +msgid "BINMODE value `%s' is invalid, treated as 3" +msgstr "BINMODE-värde \"%s\" är ogiltigt, behandlas som 3" -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "\"break\" utanför en slinga är inte portabelt" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "\"break\" utanför en slinga är inte tillåtet" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "\"continue\" utanför en slinga är inte portabelt" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "\"continue\" utanför en slinga är inte tillåtet" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "\"next\" kan inte anropas från en BEGIN-regel" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "\"next\" kan inte anropas från en END-regel" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "\"nextfile\" kan inte anropas från en BEGIN-regel" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "\"nextfile\" kan inte anropas från en END-regel" +#: eval.c:902 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" -#: eval.c:952 -msgid "statement has no effect" -msgstr "kommandot har ingen effekt" +#: eval.c:980 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" -#: eval.c:1029 eval.c:2011 +#: eval.c:1127 eval.c:1777 #, 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:1036 eval.c:1042 +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referens till icke initierat argument \"%s\"" -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referens till icke initierad variabel \"%s\"" +#: eval.c:1177 +msgid "attempt to field reference from non-numeric value" +msgstr "försök att fältreferera från ickenumeriskt värde" -#: eval.c:1197 -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:1179 +msgid "attempt to field reference from null string" +msgstr "försök till fältreferens från en tom sträng" -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "tilldelning använt i jämförelsesammanhang" +#: eval.c:1185 +#, c-format +msgid "attempt to access field %ld" +msgstr "försök att komma åt fält nummer %ld" -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "försökte dividera med noll" +#: eval.c:1194 +#, c-format +msgid "reference to uninitialized field `$%ld'" +msgstr "referens till icke initierat fält \"$%ld\"" -#: eval.c:1409 profile.c:661 +#: eval.c:1256 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "otillåten typ (%s) i tree_eval" +msgid "function `%s' called with more arguments than declared" +msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" -#: eval.c:1572 +#: eval.c:1437 +#, c-format +msgid "unwind_stack: unexpected type `%s'" +msgstr "unwind_stack: oväntad typ \"%s\"" + +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "försökte dividera med noll i \"/=\"" -#: eval.c:1594 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "försökte dividera med noll i \"%%=\"" -#: eval.c:1871 +#: eval.c:1876 eval.c:2122 #, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "försök att använda vektorn \"%s[\"%.*s\"]\" i skalärsammanhang" -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "funktionen \"%s\" är inte definierad" +#: eval.c:1907 +msgid "assignment used in conditional context" +msgstr "tilldelning använt i jämförelsesammanhang" -#: eval.c:1983 +#: eval.c:1911 +msgid "statement has no effect" +msgstr "kommandot har ingen effekt" + +#: eval.c:2343 #, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -"\n" -"\t# Funktionsanropsstack:\n" -"\n" +"forslinga: vektorn \"%s\" ändrade storlek från %ld till %ld under " +"slingexekvering" -#: eval.c:1986 +#: eval.c:2458 #, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" +msgid "function called indirectly through `%s' does not exist" +msgstr "funktionen anropad indirekt genom \"%s\" finns inte" -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "försök att fältreferera från ickenumeriskt värde" +#: eval.c:2470 +#, c-format +msgid "function `%s' not defined" +msgstr "funktionen \"%s\" är inte definierad" -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "försök att referera från tom sträng" +#: eval.c:2511 +#, c-format +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "icke omdirigerad \"getline\" odefinierad inuti \"%s\"-regel" -#: eval.c:2149 +#: eval.c:2600 #, c-format -msgid "attempt to access field %d" -msgstr "försök att komma åt fält nummer %d" +msgid "error reading input file `%s': %s" +msgstr "fel vid läsning av indatafilen \"%s\": %s" -#: eval.c:2170 eval.c:2177 profile.c:840 -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:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "\"nextfile\" kan inte anropas från en \"%s\"-regel" -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "\"IGNORECASE\" är en gawk-utökning" +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "\"exit\" kan inte anropas i det aktuella sammanhanget" -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "\"BINMODE\" är en gawk-utökning" - -#: eval.c:2328 +#: eval.c:2700 #, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" +msgid "`next' cannot be called from a `%s' rule" +msgstr "\"next\" kan inte anropas från en \"%s\"-regel" -#: eval.c:2418 +#: eval.c:2766 #, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" +msgid "Sorry, don't know how to interpret `%s'" +msgstr "Tyvärr, vet inte hur \"%s\" skall tolkas" -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" +#: ext.c:54 +msgid "extensions are not allowed in sandbox mode" +msgstr "utökningar är inte tillåtna i sandlådeläge" -#: ext.c:62 ext.c:67 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "\"extension\" är en gawk-utökning" -#: ext.c:77 +#: ext.c:75 +#, c-format +msgid "fatal: extension: cannot open `%s' (%s)\n" +msgstr "ödesdigert: extension: kan inte öppna \"%s\" (%s)\n" + +#: ext.c:84 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: kan inte öppna \"%s\" (%s)\n" +msgid "" +"fatal: extension: library `%s': does not define " +"`plugin_is_GPL_compatible' (%s)\n" +msgstr "" +"ödesdigert: extension: biblioteket \"%s\": definierar inte " +"\"plugin_is_GPL_compatible\" (%s)\n" -#: ext.c:85 +#: ext.c:93 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: bibliotek \"%s\": kan inte anropa funktionen \"%s\" (%s)\n" +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "" +"ödesdigert: extension: bibliotek \"%s\": kan inte anropa funktionen \"%s" +"\" (%s)\n" -#: ext.c:105 +#: ext.c:127 msgid "extension: missing function name" msgstr "extension: saknar funktionsnamn" -#: ext.c:110 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "extension: ogiltigt tecken \"%c\" i funktionsnamnet \"%s\"" -#: ext.c:116 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" -msgstr "extension: kan inte definiera om funktionen \"%s\"" +msgstr "extension: det går inte att definiera om funktionen \"%s\"" -#: ext.c:120 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "extension: funktionen \"%s\" är redan definierad" -#: ext.c:125 +#: ext.c:150 +#, c-format +msgid "extension: function name `%s' previously defined" +msgstr "extension: funktionsnamnet \"%s\" är definierat sedan tidigare" + +#: ext.c:152 #, c-format msgid "extension: can't use gawk built-in `%s' as function name" msgstr "" "extension: kan inte använda gawks inbyggda \"%s\" som ett funktionsnamn" -#: ext.c:127 +#: ext.c:156 #, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: funktionsnamnet \"%s\" är definierat sedan tidigare" +msgid "make_builtin: negative argument count for function `%s'" +msgstr "make_builtin: negativt argumentantal för funktionen \"%s\"" -#: ext.c:204 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funktionen \"%s\" definierades för att ta maximalt %d argument" -#: ext.c:207 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funktionen \"%s\": argument %d saknas" -#: ext.c:217 +#: ext.c:279 #, c-format msgid "function `%s': argument #%d: attempt to use scalar as an array" msgstr "funktionen \"%s\": argument %d: försök att använda skalär som vektor" -#: ext.c:221 +#: ext.c:283 #, c-format msgid "function `%s': argument #%d: attempt to use array as a scalar" msgstr "funktionen \"%s\": argument %d: försök att använda vektor som skalär" -#: ext.c:246 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Operationen stöds inte" -#: field.c:330 +#: field.c:328 msgid "NF set to negative value" msgstr "NF satt till ett negativt värde" -#: field.c:875 +#: field.c:951 field.c:958 field.c:962 +msgid "split: fourth argument is a gawk extension" +msgstr "split: fjärde argumentet är en gawk-utökning" + +#: field.c:955 +msgid "split: fourth argument is not an array" +msgstr "split: fjärde argumentet är inte en vektor" + +#: field.c:969 msgid "split: second argument is not an array" msgstr "split: andra argumentet är inte en vektor" -#: field.c:909 +#: field.c:973 +msgid "split: cannot use the same array for second and fourth args" +msgstr "" +"split: det går inte att använda samma vektor som andra och fjärde argument" + +#: field.c:978 +msgid "split: cannot use a subarray of second arg for fourth arg" +msgstr "" +"split: det går inte att använda en delvektor av andra argumentet som fjärde " +"argument" + +#: field.c:981 +msgid "split: cannot use a subarray of fourth arg for second arg" +msgstr "" +"split: det går inte att använda en delvektor av fjärde argumentet som andra " +"argument" + +#: field.c:1010 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:961 +#: field.c:1050 +msgid "patsplit: fourth argument is not an array" +msgstr "patsplit: fjärde argumentet är inte en vektor" + +#: field.c:1055 +msgid "patsplit: second argument is not an array" +msgstr "patsplit: andra argumentet är inte en vektor" + +#: field.c:1061 +msgid "patsplit: third argument must be non-null" +msgstr "patsplit: tredje argumentet får inte vara tomt" + +#: field.c:1065 +msgid "patsplit: cannot use the same array for second and fourth args" +msgstr "" +"patsplit: det går inte att använda samma vektor som andra och fjärde argument" + +#: field.c:1070 +msgid "patsplit: cannot use a subarray of second arg for fourth arg" +msgstr "" +"patsplit: det går inte att använda en delvektor av andra argumentet som " +"fjärde argument" + +#: field.c:1073 +msgid "patsplit: cannot use a subarray of fourth arg for second arg" +msgstr "" +"patsplit: det går inte att använda en delvektor av fjärde argumentet som " +"andra argument" + +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "\"FIELDWIDTHS\" är en gawk-utökning" -#: field.c:991 field.c:1005 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "ogiltigt FIELDWITHS-värde i närheten av \"%s\"" -#: field.c:1088 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "tom sträng som \"FS\" är en gawk-utökning" -#: field.c:1092 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "gamla awk stöder inte reguljära uttryck som värden på \"FS\"" -#: getopt.c:574 getopt.c:590 +#: field.c:1369 +msgid "`FPAT' is a gawk extension" +msgstr "\"FPAT\" är en gawk-utökning" + +#: getopt.c:604 getopt.c:633 #, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: flaggan \"%s\" är tvetydig\n" -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format +#: getopt.c:679 getopt.c:683 +#, c-format msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: flaggan \"--%s\" tillåter inte argument\n" +msgstr "%s: flaggan \"--%s\" tillåter inte något argument\n" -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format +#: getopt.c:692 getopt.c:697 +#, c-format msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: flaggan \"%c%s\" tillåter inte argument\n" +msgstr "%s: flaggan \"%c%s\" tillåter inte något argument\n" -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format +#: getopt.c:740 getopt.c:759 +#, c-format msgid "%s: option '--%s' requires an argument\n" msgstr "%s: flaggan \"%s\" kräver ett argument\n" -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format +#: getopt.c:797 getopt.c:800 +#, c-format msgid "%s: unrecognized option '--%s'\n" msgstr "%s: okänd flagga \"--%s\"\n" -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format +#: getopt.c:808 getopt.c:811 +#, c-format msgid "%s: unrecognized option '%c%s'\n" msgstr "%s: okänd flagga \"%c%s\"\n" -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format +#: getopt.c:860 getopt.c:863 +#, c-format msgid "%s: invalid option -- '%c'\n" -msgstr "%s: ogiltig flagga -- %c\n" +msgstr "%s: ogiltig flagga -- \"%c\"\n" -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format +#: getopt.c:916 getopt.c:933 getopt.c:1143 getopt.c:1161 +#, c-format msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: flaggan kräver ett argument -- %c\n" +msgstr "%s: flaggan kräver ett argument -- \"%c\"\n" -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format +#: getopt.c:989 getopt.c:1005 +#, c-format msgid "%s: option '-W %s' is ambiguous\n" msgstr "%s: flaggan \"-W %s\" är tvetydig\n" -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format +#: getopt.c:1029 getopt.c:1047 +#, c-format msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "%s: flaggan \"-W %s\" tillåter inte något argument\n" -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format +#: getopt.c:1068 getopt.c:1086 +#, c-format msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: flaggan \"%s\" kräver ett argument\n" +msgstr "%s: flaggan \"-W %s\" kräver ett argument\n" -#: io.c:322 io.c:352 +#: io.c:280 +#, c-format +msgid "command line argument `%s' is a directory: skipped" +msgstr "kommandoradsargumentet \"%s\" är en katalog: hoppas över" + +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan inte öppna filen \"%s\" för läsning (%s)" -#: io.c:443 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "stängning av fd %d (\"%s\") misslyckades (%s)" -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "ogiltig trädtyp %s i redirect()" +#: io.c:578 +msgid "redirection not allowed in sandbox mode" +msgstr "omdirigering är inte tillåten i sandlådeläge" -#: io.c:589 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "uttrycket i \"%s\"-omdirigering har bara numeriskt värde" -#: io.c:595 +#: io.c:618 #, 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:600 +#: io.c:623 #, 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:638 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\"" -#: io.c:685 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan inte öppna röret \"%s\" för utmatning (%s)" -#: io.c:694 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan inte öppna röret \"%s\" för inmatning (%s)" -#: io.c:717 +#: io.c:752 #, 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:795 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan inte dirigera om från \"%s\" (%s)" -#: io.c:798 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan inte dirigera om till \"%s\" (%s)" -#: io.c:851 +#: io.c:888 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:867 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "stängning av \"%s\" misslyckades (%s)" -#: io.c:875 +#: io.c:912 msgid "too many pipes or input files open" msgstr "för många rör eller indatafiler öppna" -#: io.c:898 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: andra argumentet måste vara \"to\" eller \"from\"" -#: io.c:912 +#: io.c:951 #, 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:917 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "stängning av omdirigering som aldrig öppnades" -#: io.c:1014 +#: io.c:1053 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen \"%s\" öppnades inte med \"|&\", andra argumentet " "ignorerat" -#: io.c:1030 +#: io.c:1069 #, 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:1033 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "felstatus (%d) från filstängning av \"%s\" (%s)" -#: io.c:1053 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen" -#: io.c:1056 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen explicit stängning av koprocessen \"%s\" tillhandahållen" -#: io.c:1059 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen" -#: io.c:1062 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen explicit stängning av filen \"%s\" tillhandahållen" -#: io.c:1090 io.c:1145 main.c:781 main.c:823 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "fel vid skrivning till standard ut (%s)" -#: io.c:1094 io.c:1150 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "fel vid skrivning till standard fel (%s)" -#: io.c:1102 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "rörspolning av \"%s\" misslyckades (%s)" -#: io.c:1105 +#: io.c:1144 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "koprocesspolning av röret till \"%s\" misslyckades (%s)" -#: io.c:1108 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filspolning av \"%s\" misslyckades (%s)" -#: io.c:1222 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "lokal port %s ogiltig i \"/inet\"" -#: io.c:1239 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "ogiltig information (%s, %s) för fjärrvärd och fjärrport" -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw-klient är tyvärr inte klar än" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "bara root kan använda \"/inet/raw\"." - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw-server inte redo än, ledsen" - -#: io.c:1409 +#: io.c:1431 #, 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:1423 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "speciellt filnamn \"%s\" är ofullständigt" -#: io.c:1438 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\"" -#: io.c:1456 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "måste tillhandahålla en fjärrport till \"/inet\"" -#: io.c:1502 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation stöds inte" -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "filen \"%s\" är en katalog" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "använd \"PROCINFO[\"%s\"]\" istället för \"%s\"" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "använd \"PROCINFO[...]\" istället för \"dev/user\"" - -#: io.c:1675 io.c:1872 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunde inte öppna \"%s\", läge \"%s\"" -#: io.c:1923 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "stängning av huvudpty misslyckades (%s)" -#: io.c:1925 io.c:2077 io.c:2228 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "stängning av standard ut i barnet misslyckades (%s)" -#: io.c:1928 +#: io.c:1752 #, 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:1930 io.c:2082 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "stängning av standard in i barnet misslyckades (%s)" -#: io.c:1933 +#: io.c:1757 #, 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:1935 io.c:1954 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "stängning av slavpty misslyckades (%s)" -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, 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:2032 io.c:2085 +#: io.c:1865 io.c:1925 #, 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:2049 io.c:2222 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "återställande av standard ut i förälderprocessen misslyckades\n" -#: io.c:2054 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "återställande av standard in i förälderprocessen misslyckades\n" -#: io.c:2088 io.c:2233 io.c:2244 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "stängning av röret misslyckades (%s)" -#: io.c:2133 +#: io.c:1973 msgid "`|&' not supported" msgstr "\"|&\" stöds inte" -#: io.c:2199 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan inte öppna röret \"%s\" (%s)" -#: io.c:2240 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan inte skapa barnprocess för \"%s\" (fork: %s)" -#: io.c:2622 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "datafilen \"%s\" är tom" -#: io.c:2663 io.c:2671 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "kunde inte allokera mer indataminne" -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "fel vid läsning av indatafilen \"%s\": %s" - -#: io.c:3237 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning" -#: main.c:306 -msgid "out of memory" -msgstr "slut på minne" +#: io.c:3232 +msgid "IPv6 communication is not supported" +msgstr "IPv6-kommunikation stöds inte" -#: main.c:374 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "\"-m[fr]\"-flaggan är irrelevant i gawk" -#: main.c:376 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m-flaggans användning: \"-m[fr] nnn\"" -#: main.c:393 +#: main.c:391 +msgid "empty argument to `-e/--source' ignored" +msgstr "tomt argument till \"-e/--source\" ignorerat" + +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: flaggan \"-W %s\" okänd, ignorerad\n" -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "tomt argument till \"--source\" ignorerat" - -#: main.c:488 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan kräver ett argument -- %c\n" -#: main.c:509 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\"" -#: main.c:515 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "\"--posix\" åsidosätter \"--traditional\"" -#: main.c:526 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\"" -#: main.c:530 +#: main.c:557 #, 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:571 +#: main.c:562 +msgid "`--posix' overrides `--binary'" +msgstr "\"--posix\" åsidosätter \"--binary\"" + +#: main.c:613 #, 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:574 +#: main.c:616 #, 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:576 +#: main.c:618 #, 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:617 +#: main.c:657 msgid "no program text at all!" msgstr "ingen programtext alls!" -#: main.c:721 +#: main.c:734 #, 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:723 +#: main.c:736 #, 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:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX-flaggor:\t\tGNU långa flaggor:\n" +#: main.c:741 +msgid "POSIX options:\t\tGNU long options: (standard)\n" +msgstr "POSIX-flaggor:\t\tGNU långa flaggor: (standard)\n" -#: main.c:729 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" -#: main.c:730 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:731 +#: main.c:744 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:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] värde\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=fil\t\t--exec=fil\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - #: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" +msgid "Short options:\t\tGNU long options: (extensions)\n" +msgstr "Korta flaggor:\t\tGNU långa flaggor: (utökningar)\n" + +#: main.c:746 +msgid "\t-b\t\t\t--characters-as-bytes\n" +msgstr "\t-b\t\t\t--characters-as-bytes\n" + +#: main.c:747 +msgid "\t-c\t\t\t--traditional\n" +msgstr "\t-c\t\t\t--traditional\n" #: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" +msgid "\t-C\t\t\t--copyright\n" +msgstr "\t-C\t\t\t--copyright\n" + +#: main.c:749 +msgid "\t-d[file]\t\t--dump-variables[=file]\n" +msgstr "\t-d[fil]\t\t\t--dump-variables[=fil]\n" #: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=fil]\t--profile[=fil]\n" +msgid "\t-e 'program-text'\t--source='program-text'\n" +msgstr "\t-e 'programtext'\t--source='programtext'\n" #: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" +msgid "\t-E file\t\t\t--exec=file\n" +msgstr "\t-E fil\t\t\t--exec=fil\n" #: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" +msgid "\t-g\t\t\t--gen-pot\n" +msgstr "\t-g\t\t\t--gen-pot\n" #: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=programtext\t--source=programtext\n" +msgid "\t-h\t\t\t--help\n" +msgstr "\t-h\t\t\t--help\n" #: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" +msgid "\t-L [fatal]\t\t--lint[=fatal]\n" +msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" #: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" +msgid "\t-n\t\t\t--non-decimal-data\n" +msgstr "\t-n\t\t\t--non-decimal-data\n" #: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" +msgid "\t-N\t\t\t--use-lc-numeric\n" +msgstr "\t-N\t\t\t--use-lc-numeric\n" #: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" +msgid "\t-O\t\t\t--optimize\n" +msgstr "\t-O\t\t\t--optimize\n" + +#: main.c:758 +msgid "\t-p[file]\t\t--profile[=file]\n" +msgstr "\t-p[fil]\t\t\t--profile[=fil]\n" + +#: main.c:759 +msgid "\t-P\t\t\t--posix\n" +msgstr "\t-P\t\t\t--posix\n" + +#: main.c:760 +msgid "\t-r\t\t\t--re-interval\n" +msgstr "\t-r\t\t\t--re-interval\n" + +#: main.c:762 +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-R file\t\t\t--command=file\n" + +#: main.c:763 +msgid "\t-S\t\t\t--sandbox\n" +msgstr "\t-S\t\t\t--sandbox\n" + +#: main.c:764 +msgid "\t-t\t\t\t--lint-old\n" +msgstr "\t-t\t\t\t--lint-old\n" + +#: main.c:765 +msgid "\t-V\t\t\t--version\n" +msgstr "\t-V\t\t\t--version\n" + +#: main.c:767 +msgid "\t-W nostalgia\t\t--nostalgia\n" +msgstr "\t-W nostalgia\t\t--nostalgia\n" + +#: main.c:770 +msgid "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t--parsedebug\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:766 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1639,13 +1822,13 @@ "\n" msgstr "" "\n" -"För att rapportera buggar, se noden \"Bugs\" i \"gawk.info\",\n" -"vilket är sektionen \"Reporting Problems and Bugs\" i den utskrivna\n" +"För att rapportera fel, se noden \"Bugs\" i \"gawk.info\",\n" +"vilket är avsnittet \"Reporting Problems and Bugs\" i den utskrivna\n" "versionen.\n" -"Rapportera synpunkter på översättningen till .\n" +"Rapportera synpunkter på översättningen till .\n" "\n" -#: main.c:770 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1655,7 +1838,7 @@ "Normalt läser det från standard in och skriver till standard ut.\n" "\n" -#: main.c:774 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1663,9 +1846,9 @@ msgstr "" "Exempel:\n" "\tgawk '{ sum += $1 }; END { print sum }' fil\n" -"\tgawk -F: '{print $1 }' /etc/passwd\n" +"\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:794 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1684,7 +1867,7 @@ "någon senare version.\n" "\n" -#: main.c:802 +#: main.c:815 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" @@ -1698,7 +1881,7 @@ "General Public License för ytterligare information.\n" "\n" -#: main.c:813 +#: main.c:821 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program. If not, see http://www.gnu.org/licenses/.\n" @@ -1706,149 +1889,145 @@ "Du bör ha fått en kopia av GNU General Public License tillsammans\n" "med detta program. Om inte, se http//www.gnu.org/liceences/.\n" -#: main.c:848 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sätter inte FS till tab i POSIX-awk" -#: main.c:1122 +#: main.c:1090 +#, c-format +msgid "unknown value for field spec: %d\n" +msgstr "okänt värde till fältspecifikation: %d\n" + +#: main.c:1171 #, c-format 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:1142 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "\"%s\" är inte ett giltigt variabelnamn" -#: main.c:1145 +#: main.c:1200 #, 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:1184 +#: main.c:1204 +#, c-format +msgid "cannot use gawk builtin `%s' as variable name" +msgstr "kan inte använda gawks inbyggda \"%s\" som ett funktionsnamn" + +#: main.c:1209 +#, c-format +msgid "cannot use function `%s' as variable name" +msgstr "kan inte använda funktionen \"%s\" som variabelnamn" + +#: main.c:1262 msgid "floating point exception" msgstr "flyttalsundantag" -#: main.c:1191 +#: main.c:1269 msgid "fatal error: internal error" msgstr "ödesdigert fel: internt fel" -#: main.c:1206 -#, fuzzy +#: main.c:1284 msgid "fatal error: internal error: segfault" -msgstr "ödesdigert fel: internt fel" +msgstr "ödesdigert fel: internt fel: segmenteringsfel" -#: main.c:1218 -#, fuzzy +#: main.c:1296 msgid "fatal error: internal error: stack overflow" -msgstr "ödesdigert fel: internt fel" +msgstr "ödesdigert fel: internt fel: stackspill" -#: main.c:1268 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "ingen föröppnad fd %d" -#: main.c:1275 +#: main.c:1353 #, 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:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "kunde inte hitta grupper: %s" - -#: msg.c:54 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "kommandorad:" -#: msg.c:120 -msgid "warning: " -msgstr "varning: " - -#: msg.c:142 +#: msg.c:107 msgid "error: " msgstr "fel: " -#: msg.c:178 -msgid "fatal: " -msgstr "ödesdigert: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "kan inte konvertera en sträng till flyttal" - -#: node.c:465 +#: node.c:406 msgid "backslash at end of string" msgstr "omvänt snedstreck i slutet av strängen" -#: node.c:609 +#: node.c:517 #, c-format msgid "old awk does not support the `\\%c' escape sequence" msgstr "gamla awk stöder inte kontrollsekvensen \"\\%c\"" -#: node.c:660 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX tillåter inte \"\\x\"-kontrollsekvenser" -#: node.c:666 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "inga hexadecimala siffror i \"\\x\"-kontrollsekvenser" -#: node.c:688 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " "expect" msgstr "" +"hexkod \\x%.*s med %d tecken tolkas förmodligen inte på det sätt du " +"förväntar dig" -#: node.c:703 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "kontrollsekvensen \"\\%c\" behandlad som bara \"%c\"" -#: posix/gawkmisc.c:172 -#, 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)" +#: node.c:750 +msgid "" +"Invalid multibyte data detected. There may be a mismatch between your data " +"and your locale." +msgstr "" +"Ogiltig multibytedata upptäckt. Dina data och din lokal stämmer kanske inte " +"överens." -#: profile.c:94 +#: posix/gawkmisc.c:176 #, c-format -msgid "could not open `%s' for writing: %s" -msgstr "kunde inte öppna \"%s\" för skrivning: %s" +msgid "%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)" +msgstr "%s %s \"%s\": kunde inte hämta fb-flaggor: (fcntl F_GETFD: %s)" -#: profile.c:457 +#: posix/gawkmisc.c:188 #, c-format -msgid "internal error: %s with null vname" -msgstr "internt fel: %s med null vname" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# behandlad internt som \"delete\"" +msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" +msgstr "%s %s \"%s\": kunde inte sätta stäng-vid-exec (fcntl F_SETFD: %s)" -#: profile.c:1073 +#: profile.c:83 #, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# detta är en dynamiskt inläst utökningsfunktion" +msgid "could not open `%s' for writing: %s" +msgstr "kunde inte öppna \"%s\" för skrivning: %s" -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawkprofil, skapad %s\n" +#: profile.c:85 +msgid "sending profile to standard error" +msgstr "skickar profilen till standard fel" -#: profile.c:1107 +#: profile.c:203 #, c-format msgid "" -"\t# BEGIN block(s)\n" +"\t# %s block(s)\n" "\n" msgstr "" -"\t# BEGIN-block\n" +"\t# %s-block\n" "\n" -#: profile.c:1117 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" @@ -1857,16 +2036,17 @@ "\t# Regel/regler\n" "\n" -#: profile.c:1123 +#: profile.c:279 #, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END-block\n" -"\n" +msgid "internal error: %s with null vname" +msgstr "internt fel: %s med null vname" -#: profile.c:1143 +#: profile.c:952 +#, c-format +msgid "\t# gawk profile, created %s\n" +msgstr "\t# gawkprofil, skapad %s\n" + +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1875,178 +2055,93 @@ "\n" "\t# Funktioner, listade alfabetiskt\n" -#: profile.c:1405 +#: profile.c:1370 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "oväntad typ %s i prec_level" +msgid "redir2str: unknown redirection type %d" +msgstr "redir2str: okänd omdirigeringstyp %d" -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "okänd nodtyp %d" +#: re.c:573 +#, c-format +msgid "range of the form `[%c-%c]' is locale dependent" +msgstr "intervall på formen \"[%c-%c]\" är lokalberoende" + +#: re.c:600 +#, c-format +msgid "regexp component `%.*s' should probably be `[%.*s]'" +msgstr "" +"komponenten \"%.*s\" i reguljäruttryck skall förmodligen vara \"[%.*s]\"" -#: regcomp.c:132 +#: regcomp.c:131 msgid "Success" msgstr "Lyckades" -#: regcomp.c:135 +#: regcomp.c:134 msgid "No match" msgstr "Misslyckades" -#: regcomp.c:138 +#: regcomp.c:137 msgid "Invalid regular expression" msgstr "Ogiltigt reguljärt uttryck" -#: regcomp.c:141 +#: regcomp.c:140 msgid "Invalid collation character" msgstr "Ogiltigt kollationeringstecken" -#: regcomp.c:144 +#: regcomp.c:143 msgid "Invalid character class name" msgstr "Ogiltigt teckenklassnamn" -#: regcomp.c:147 +#: regcomp.c:146 msgid "Trailing backslash" msgstr "Eftersläpande omvänt snedstreck" -#: regcomp.c:150 +#: regcomp.c:149 msgid "Invalid back reference" msgstr "Ogiltig bakåtrerefens" -#: regcomp.c:153 +#: regcomp.c:152 msgid "Unmatched [ or [^" msgstr "Obalanserad [ eller [^" -#: regcomp.c:156 +#: regcomp.c:155 msgid "Unmatched ( or \\(" msgstr "Obalanserad ( eller \\(" -#: regcomp.c:159 +#: regcomp.c:158 msgid "Unmatched \\{" msgstr "Obalanserad \\{" -#: regcomp.c:162 +#: regcomp.c:161 msgid "Invalid content of \\{\\}" msgstr "Ogiltigt innehåll i \\{\\}" -#: regcomp.c:165 +#: regcomp.c:164 msgid "Invalid range end" msgstr "Ogiltigt omfångsslut" -#: regcomp.c:168 +#: regcomp.c:167 msgid "Memory exhausted" msgstr "Minnet slut" -#: regcomp.c:171 +#: regcomp.c:170 msgid "Invalid preceding regular expression" msgstr "Ogiltigt föregående reguljärt uttryck" -#: regcomp.c:174 +#: regcomp.c:173 msgid "Premature end of regular expression" msgstr "För tidigt slut på reguljärt uttryck" -#: regcomp.c:177 +#: regcomp.c:176 msgid "Regular expression too big" msgstr "Reguljärt uttryck för stort" -#: regcomp.c:180 +#: regcomp.c:179 msgid "Unmatched ) or \\)" msgstr "Obalanserad ) eller \\)" -#: regcomp.c:699 +#: regcomp.c:700 msgid "No previous regular expression" msgstr "Inget föregående reguljärt uttryck" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: otillåten flagga -- %c\n" - -#~ 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)" - -#~ msgid "delete: illegal use of variable `%s' as array" -#~ msgstr "delete: otillåten användning av variabeln \"%s\" som vektor" - -#~ msgid "asort: first argument is not an array" -#~ msgstr "asort: första argumentet är inte en vektor" - -#~ msgid "asort: second argument is not an array" -#~ msgstr "asort: andra argumentet är inte en vektor" - -#~ msgid "or used as a variable or an array" -#~ msgstr "eller använd som variabel eller vektor" - -#~ msgid "substr: length %g is < 0" -#~ msgstr "substr: längden %g är < 0" - -#~ msgid "function %s called\n" -#~ msgstr "funktionen %s anropad\n" - -#~ msgid "field %d in FIELDWIDTHS, must be > 0" -#~ msgstr "fält %d i FIELDWIDTHS måste vara > 0" - -#~ msgid "remote port invalid in `%s'" -#~ msgstr "fjärrporten ogiltig i \"%s\"" - -#~ msgid "internal error: Node_var_array with null vname" -#~ msgstr "internt fel: Node_var_vektor med null vname" - -#~ 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\"" - -#~ 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 "invalid syntax in name `%s' for variable assignment" -#~ msgstr "ogiltig syntax i namnet \"%s\" för variabeltilldelning" - -#~ msgid "or used in other expression context" -#~ msgstr "eller använt i andra uttryckssammanhang" - -#~ msgid "`%s' is a function, assignment is not allowed" -#~ msgstr "\"%s\" är en funktion, tilldelning är inte tillåtet" - -#~ msgid "BEGIN blocks must have an action part" -#~ msgstr "BEGIN-block måste ha en åtgärdsdel" - -#~ msgid "`nextfile' used in BEGIN or END action" -#~ msgstr "\"nextfile\" använd i BEGIN- eller END-åtgärd" - -#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" -#~ msgstr "" -#~ "icke omdirigerad \"getline\" odefinierade inuti BEGIN- eller END-åtgärd" - -#~ msgid "fptr %x not in tokentab\n" -#~ msgstr "fptr %x är inte i tokentab\n" - -#~ msgid "gsub third parameter is not a changeable object" -#~ msgstr "gsub: tredje argumentet är inte ett ändringsbart objekt" - -#~ msgid "Unfinished \\ escape" -#~ msgstr "Oavslutad \\-kontrollsekvens" - -#~ msgid "unfinished repeat count" -#~ msgstr "oavslutat upprepningsantal" - -#~ msgid "malformed repeat count" -#~ msgstr "felaktigt utformat upprepningsantal" - -#~ msgid "Unbalanced [" -#~ msgstr "Obalanserad [" - -#~ msgid "Unbalanced (" -#~ msgstr "Obalanserad (" - -#~ msgid "No regexp syntax bits specified" -#~ msgstr "Inga syntaxbitar för reguljära uttryck angivna" - -#~ msgid "Unbalanced )" -#~ msgstr "Obalanserad )" - -#~ msgid "internal error: file `%s', line %d\n" -#~ msgstr "internt fel: filen \"%s\", rad %d\n" +#~ msgid "could not find groups: %s" +#~ msgstr "kunde inte hitta grupper: %s" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/tr.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/tr.gmo differ diff -Nru gawk-3.1.8+dfsg/po/tr.po gawk-4.0.1+dfsg/po/tr.po --- gawk-3.1.8+dfsg/po/tr.po 2010-05-06 17:57:37.000000000 +0000 +++ gawk-4.0.1+dfsg/po/tr.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,1967 +0,0 @@ -# Turkish translations for GNU awk messages -# Copyright (C) 2007 Free Software Foundation, Inc. -# -# Nilgün Belma Bugüner , 2001, ..., 2007. -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.5f\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2007-05-19 19:32+0300\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 1.11.4\n" - -#: array.c:112 -#, c-format -msgid "attempt to use function `%s' as an array" -msgstr "`%s' iÅŸlevi dizi olarak kullanılmaya çalışılıyor" - -#: array.c:115 -#, 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" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "%s'den" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "ilklendirilmemiÅŸ öğeye ( %s[\"%s\"] ) baÅŸvuru yapılıyor" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "dizinin indisi `%s' bir null dizge" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: `%s' indeksi `%s' dizisinde deÄŸil" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: boÅŸ (null)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: boÅŸ (sıfır)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: tablo_uzunluÄŸu = %d, dizi_indisi = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: parametredir\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: %s için dizi baÅŸvurusu\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "%s blokları bir eylem bölümü içermeli" - -#: awkgram.y:221 -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:257 awkgram.y:266 -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "eski awk çok sayıda `BEGIN' veya `END' kuralını desteklemiyor" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' bir yerleÅŸik iÅŸlevdir, yeniden atanamaz" - -#: awkgram.y:331 -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "düzenli ifade sabiti `//' bir C++ açıklaması gibi görünüyor ama deÄŸil" - -#: awkgram.y:334 -#, 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:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "deyim bir etkiye sahip olmayabilir" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "`%s' %s eyleminde kullanılmış" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' bir gawk uzantısıdır" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "`return' iÅŸlev baÄŸlamının dışında kullanılmış" - -#: awkgram.y:534 -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:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' bir gawk uzantısıdır" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "`delete array' uyarlanabilir olmayan bir gawk uzantısıdır" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "switch içinde yinelenmiÅŸ case deÄŸerleri var: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "switch içinde yinelenmiÅŸ `default' saptandı" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "çok katlı iki yönlü veriyolları çalışmaz" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "düzenli ifade atamanın sağında" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "düzenli ifade `~' ya da `!~' iÅŸlemiminin solunda" - -#: awkgram.y:830 awkgram.y:903 -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "eski awk `for'dan sonra gelmeyen `in' anahtar sözcüğünü desteklemiyor" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "düzenli ifade karşılaÅŸtırmanın sağında" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "END eyleminin içinde yönlendirme yapmayan `getline' tanımsız" - -#: awkgram.y:904 -msgid "old awk does not support multidimensional arrays" -msgstr "eski awk çok boyutlu dizileri desteklemiyor" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "parantezsiz `length' çaÄŸrısı taşınabilir deÄŸil" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "parantezsiz `length' çaÄŸrısı POSIX'e uygun deÄŸil" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "dizi olmayan deÄŸiÅŸken dizi olarak kullanılmış" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "indis ifadesi geçersiz" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "beklenmeyen satırsonu ya da dizge sonu" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "komut satırında boÅŸ program metni" - -#: awkgram.y:1430 -#, 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:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "kaynak dosyası `%s' okunamıyor (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "kaynak dosyası `%s' boÅŸ" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "kaynak dosyasının sonunda satırsonu eksik" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "sonlandırılmamış düzenli ifade dosya sonunda `\\' ile bitiyor" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "%s: %d: tawk regex deÄŸiÅŸtirici `/.../%c' gawk'ta çalışmaz" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "tawk regex deÄŸiÅŸtirici `/.../%c' gawk'ta çalışmaz" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "sonlandırılmamış düzenli ifade" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "dosya sonunda sonlandırılmamış düzenli ifade" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "`\\ #...' satır uzatma kullanımı taşınabilir deÄŸil" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "tersbölü satırdaki son karakter deÄŸil" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "`**=' iÅŸlemimi POSIX uyumlu deÄŸil" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "`**=' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "`**' iÅŸlemimi POSIX uyumlu deÄŸil" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "`**' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "`^=' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "`^' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "sonlandırılmamış dizge" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "ifade içinde '%c' karakteri geçersiz" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' bir gawk uzantısıdır" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' bir Bell Laboratuarları uzantısıdır" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "`%s' POSIX uyumlu deÄŸil" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' eski awk tarafından desteklemiyor" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "`goto' zararlı sayılır!\n" - -#: awkgram.y:2437 -#, 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:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: üçüncü argüman bir gawk uzantısı" - -#: awkgram.y:2472 -#, 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:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "üçüncü %s parametresi deÄŸiÅŸtirilebilir bir nesne deÄŸil" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: ikinci argüman bir gawk uzantısı" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "dcgettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "dcngettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "`%s' iÅŸlevi: %d. parametre, `%s', %d. parametrenin tekrarı" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "`%s' iÅŸlevi: parametre, `%s'global deÄŸiÅŸkeni gölgeliyor" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "`%s' yazmak için açılamadı (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "profil standart hataya gönderiliyor" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: kapatma baÅŸarısız (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() iki kere çaÄŸrıldı!" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "gölgeli deÄŸiÅŸkenler vardı." - -#: awkgram.y:3001 -#, 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:3004 -#, fuzzy, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "iÅŸlev `%s': iÅŸlev ismi parametre ismi olarak kullanılamaz" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "iÅŸlev ismi `%s' önceden atanmış" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "`%s' iÅŸlevi çaÄŸrıldı ama hiç atanmamış" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "`%s' iÅŸlevi atanmış ama hiç çaÄŸrılmadı" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "%d numaralı argüman bir düzenli ifade sabiti" - -#: awkgram.y:3245 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"`%s' iÅŸlevi `(' ile isim arasında boÅŸlukla çaÄŸrılmış,\n" -"ya da bir deÄŸiÅŸken veya bir dizi olarak kullanılmış" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "`/='de sıfırla bölme hatası" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "`%%'de sıfırla bölme hatası" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s \"%s\"ya yazılamadı (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "standart çıktı" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "sebebi bilinmiyor" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: sayısal olmayan argüman alındı" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: %g kapsamdışı" - -#: builtin.c:201 -#, 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:204 -#, 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:216 -#, 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:310 -msgid "index: received non-string first argument" -msgstr "index: ilk argüman dizge olmayan türde alındı" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: ikinci argüman dizge olmayan türde alındı" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: sayısal olmayan argüman alındı" - -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "`length(array)' bir gawk uzantısıdır" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: dizge olmayan argüman alındı" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: sayısal olmayan argüman alındı" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: negatif argüman %g alındı" - -#: builtin.c:726 builtin.c:729 -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:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "`$' awk biçemlerde kullanılmaz" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "`$' ile birlikte verilen argüman sayısı > 0 olmalıdır" - -#: builtin.c:853 -#, c-format -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:855 -msgid "`$' not permitted after period in format" -msgstr "`$' biçem içinde noktadan sonra kullanılmaz" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "konumsal alan geniÅŸliÄŸi ya da duyarlığı için `$' kullanılmamış" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "`l' awk biçemlerde anlamsız; yoksayıldı" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "`l' POSIX awk biçemlerde kullanılmaz" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "`L' awk biçemlerde anlamsız; yoksayıldı" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "`L' POSIX awk biçemlerde kullanılmaz" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "`h' awk biçemlerde anlamsız; yoksayıldı" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "`h' POSIX awk biçemlerde kullanılmaz" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: %g deÄŸeri `%%%c' biçimi için kapsamdışı" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "biçem dizgesini oluÅŸturacak yeterli argüman yok" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "bir bunun için ^ tükendi" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: biçem belirteci denetim karakteri içermiyor" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "biçem dizgesi için çok fazla argüman saÄŸlanmış" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: argüman yok" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: sayısal olmayan argüman alındı" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: negatif argüman %g ile çaÄŸrıldı" - -#: builtin.c:1479 -#, 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:1484 -#, 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:1510 -#, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: uzunluk %g >= 1 deÄŸil" - -#: builtin.c:1512 -#, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: uzunluk %g => 0 deÄŸil" - -#: builtin.c:1519 -#, 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:1524 -#, 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:1536 -msgid "substr: source string is zero length" -msgstr "substr: kaynak dizge sıfır uzunlukta" - -#: builtin.c:1552 -#, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: baÅŸlangıç indisi %g dizgenin sonundan sonra" - -#: builtin.c:1560 -#, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"substr: uzunluk %g, %g baÅŸlangıç indisinde ilk argümanın uzunluÄŸunu (%lu) " -"aÅŸar" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: ilk argüman dizge olmayan türde alındı" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: boÅŸ biçem dizgesi alındı" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: ikinci argüman sayısal olmayan türde alındı" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: dizge olmayan argüman alındı" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: dizge olmayan argüman alındı" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "ilklendirilmemiÅŸ `$%d' alanına baÅŸvuru" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: dizge olmayan argüman alındı" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: dizge olmayan argüman alındı" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: ilk argüman sayısal olmayan türde alındı" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: ikinci argüman sayısal olmayan türde alındı" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: sayısal olmayan argüman alındı" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: sayısal olmayan argüman alındı" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: sayısal olmayan argüman alındı" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: üçüncü argüman bir dizi deÄŸil" - -#: builtin.c:2744 -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: 0 olan 3. argüman 1 kabul edildi" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: ilk argüman sayısal olmayan türde alındı" - -#: builtin.c:2862 -msgid "lshift: received non-numeric second argument" -msgstr "lshift: ikinci argüman sayısal deÄŸil" - -#: builtin.c:2868 -#, 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:2870 -#, 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:2872 -#, 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:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: ilk argüman sayısal olmayan türde alındı" - -#: builtin.c:2900 -msgid "rshift: received non-numeric second argument" -msgstr "rshift: ikinci argüman sayısal deÄŸil" - -#: builtin.c:2906 -#, 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:2908 -#, 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:2910 -#, 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:2936 -msgid "and: received non-numeric first argument" -msgstr "and: ilk argüman sayısal olmayan türde alındı" - -#: builtin.c:2938 -msgid "and: received non-numeric second argument" -msgstr "and: ikinci argüman sayısal deÄŸil" - -#: builtin.c:2944 -#, 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:2946 -#, 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:2972 -msgid "or: received non-numeric first argument" -msgstr "or: ilk argüman sayısal olmayan türde alındı" - -#: builtin.c:2974 -msgid "or: received non-numeric second argument" -msgstr "or: ikinci argüman sayısal deÄŸil" - -#: builtin.c:2980 -#, 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:2982 -#, 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:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: ilk argüman sayısal olmayan türde alındı" - -#: builtin.c:3010 -msgid "xor: received non-numeric second argument" -msgstr "xor: ikinci argüman sayısal deÄŸil" - -#: builtin.c:3016 -#, 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:3018 -#, 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:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: sayısal olmayan argüman alındı" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): negatif deÄŸerler tuhaf sonuçlar verecek" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: `%s' geçerli bir yerel kategori deÄŸil" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "%d. düğümtürü bilinmiyor" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str içinde tampon taÅŸtı" - -#: eval.c:454 eval.c:460 profile.c:785 -#, 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:802 -#, 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:823 -msgid "`break' outside a loop is not portable" -msgstr "döngü dışında `break' kullanımı taşınabilir deÄŸil" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "döngü dışında `break' kullanımı yasak" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "döngü dışında `continue' kullanımı taşınabilir deÄŸil" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "döngü dışında `continue' kullanımı yasak" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' bir BEGIN kuralından çaÄŸrılamaz" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "`next' bir END kuralından çaÄŸrılamaz" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' bir BEGIN kuralından çaÄŸrılamaz" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' bir END kuralından çaÄŸrılamaz" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "deyim etkisiz" - -#: eval.c:1029 eval.c:2011 -#, 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:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "baÅŸlangıç deÄŸeri olmayan `%s' argümanına baÅŸvuru" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "öndeÄŸer ataması yapılmamış `%s' deÄŸiÅŸkenine baÅŸvuru" - -#: eval.c:1197 -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:1301 -msgid "assignment used in conditional context" -msgstr "koÅŸul baÄŸlamında atama yapılmış" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "sıfırla bölme hatası" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tree_eval içinde kuraldışı tür (%s)" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "`/='de sıfırla bölme hatası" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "`%%='de sıfırla bölme hatası" - -#: eval.c:1871 -#, 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:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "`%s' iÅŸlevi tanımsız" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Ä°ÅŸlev ÇaÄŸrı Yığını:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "sayısal olmayan deÄŸerden alan baÅŸvurusu" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "null dizgeden alan baÅŸvurusu" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "%d. alana eriÅŸilmeye çalışılıyor" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "deÄŸiÅŸken ismine yerleÅŸik iÅŸlevin sonucu atanamaz" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' bir gawk uzantısıdır" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' bir gawk uzantısıdır" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "`%sFMT' özelliÄŸi `%s' hatalı" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`LINT' atamasından dolayı `--lint' kapatılıyor" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "`extension' bir gawk uzantısıdır" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: `%s' açılamıyor (%s)\n" - -#: ext.c:85 -#, 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:105 -msgid "extension: missing function name" -msgstr "extension: iÅŸlev ismi eksik" - -#: ext.c:110 -#, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: `%2$s' iÅŸlevindeki `%1$c' karakteri kuraldışı" - -#: ext.c:116 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: `%s' iÅŸlevi yeniden tanımlanamaz" - -#: ext.c:120 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: `%s' iÅŸlevi zaten tanımlı" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "extension: bir gawk yerleÅŸiÄŸi olan `%s' iÅŸlev ismi olamaz" - -#: ext.c:127 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: iÅŸlev ismi `%s' evvelce tanımlanmış" - -#: ext.c:204 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "`%s' iÅŸlevi en çok `%d' argüman alabilecek ÅŸekilde tanımlı" - -#: ext.c:207 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "`%s' iÅŸlevi: %d. argüman eksik" - -#: ext.c:217 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "" -"`%s' iÅŸlevi: %d. argüman: tek deÄŸerli deÄŸiÅŸken bir dizi olarak kullanılmaya " -"çalışılıyor" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "" -"`%s' iÅŸlevi: %d. argüman: dizi tek deÄŸerli bir deÄŸiÅŸken olarak kullanılmaya " -"çalışılıyor" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Ä°ÅŸlem Desteklenmiyor" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF negatif deÄŸere ayarlı" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: ikinci argüman bir dizi deÄŸil" - -#: field.c:909 -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:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' bir gawk uzantısıdır" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "`%s' yanında FIELDWIDTHS deÄŸeri geçersiz" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "`FS' için null dizge bir gawk uzantısıdır" - -#: field.c:1092 -msgid "old awk does not support regexps as value of `FS'" -msgstr "eski awk düzenli ifadeleri `FS' deÄŸeriyle desteklemiyor" - -#: getopt.c:574 getopt.c:590 -#, fuzzy, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: `%s' seçeneÄŸi belirsiz\n" - -#: getopt.c:623 getopt.c:627 -#, fuzzy, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: `--%s' seçeneÄŸi argümansız kullanılır\n" - -#: getopt.c:636 getopt.c:641 -#, fuzzy, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: seçenek `%c%s' argümansız kullanılır\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: `%s' seçeneÄŸi bir argümanla kullanılır\n" - -#: getopt.c:741 getopt.c:744 -#, fuzzy, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: `--%s' seçeneÄŸi bilinmiyor\n" - -#: getopt.c:752 getopt.c:755 -#, fuzzy, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: `%c%s' seçeneÄŸi bilinmiyor\n" - -#: getopt.c:804 getopt.c:807 -#, fuzzy, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: geçersiz seçenek -- %c\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, fuzzy, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" - -#: getopt.c:930 getopt.c:946 -#, fuzzy, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: `-W %s' seçeneÄŸi belirsiz\n" - -#: getopt.c:970 getopt.c:988 -#, fuzzy, c-format -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" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: `%s' seçeneÄŸi bir argümanla kullanılır\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "`%s' okumak için açılamıyor (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "dosya tanımlayıcı %d (`%s') baÅŸarısız (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "redirect() içindeki aÄŸaç türü %s geçersiz" - -#: io.c:589 -#, 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:595 -#, 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:600 -#, 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:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "`%.*s' dosyası için `>' ve `>>' karışımı gereksiz" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "`%s' veriyolu çıktı için açılamadı (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "`%s' veriyolu girdi için açılamadı (%s)" - -#: io.c:717 -#, 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:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "`%s'den yönlendirilemiyor (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "`%s'e yönlendirilemiyor (%s)" - -#: io.c:851 -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:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "`%s' kapatılamadı (%s)." - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "çok fazla veriyolu ya da dosya açık" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: ikinci argüman `to' ya da `from' olmalı" - -#: io.c:912 -#, 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:917 -msgid "close of redirection that was never opened" -msgstr "hiç açılmamış bir yönlendirmenin kapatılması" - -#: io.c:1014 -#, 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:1030 -#, 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:1033 -#, 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:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "`%s' soketinin açıkça kapatılması istenmedi" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "`%s' alt-iÅŸleminin açıkça kapatılması istenmedi" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "`%s' veriyolunun açıkça kapatılması istenmedi" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "`%s' dosyasının açıkça kapatılması istenmedi" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "standart çıktıya yazarken hata (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "standart hataya yazarken hata (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "`%s'in veriyolu ile veri aktarımı baÅŸarısız (%s)." - -#: io.c:1105 -#, 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:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "`%s'in dosya ile veri aktarımı baÅŸarısız (%s)." - -#: io.c:1222 -#, c-format -msgid "local port %s invalid in `/inet'" -msgstr "yerel port `%s' `/inet' için geçersiz" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "uzak konak ve port bilgisi (%s, %s) geçersiz" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw istemci henüz hazır deÄŸil" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "`/inet/raw' sadece root tarafından kullanılabilir" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw sunucu henüz hazır deÄŸil" - -#: io.c:1409 -#, 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:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "özel dosya ismi `%s' tamamlanmamış" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "`/inet' e bir karşı makina ismi saÄŸlanmalı" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "`/inet' e bir karşı port saÄŸlanmalı" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP haberleÅŸmesi desteklenmiyor" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "`%s' dosya deÄŸil dizin" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "`PROCINFO[\"%s\"]' kullanın (`%s' yerine)" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "`/dev/user' yerine `PROCINFO[...]' kullanın" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "`%s', `%s' kipinde açılamadı" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "ana pty kapatılamadı (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "ast süreçte stdÇ kapatılamadı (%s)" - -#: io.c:1928 -#, 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:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "ast süreçte stdG kapatılamadı (%s)" - -#: io.c:1933 -#, 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:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "yardımcı pty kapatılamadı (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, 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:2032 io.c:2085 -#, 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:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "üst süreçte stdÇ eski durumuna getirilemedi\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "üst süreçte stdG eski durumuna getirilemedi\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "veriyolu kapatılamadı (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "`|&' desteklenmiyor" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "`%s' veriyolu açılamıyor (%s)" - -#: io.c:2240 -#, 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:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "veri dosyası `%s' boÅŸ" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "daha fazla girdi belleÄŸi ayrılamadı" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "`%s' girdi dosyası okunurken hata: %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "`RS' çoklu karakter deÄŸeri bir gawk uzantısıdır" - -#: main.c:306 -msgid "out of memory" -msgstr "" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "`-m[fr]' seçeneÄŸi gawk'da böyle kullanılmaz" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m seçeneÄŸinin kullanımı: `-m[fr] nnn'" - -#: main.c:393 -#, 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:434 -msgid "empty argument to `--source' ignored" -msgstr "`--source' seçeneÄŸi için boÅŸ argüman yoksayıldı" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "ortam deÄŸiÅŸkeni `POSIXLY_CORRECT' var: `--posix' kullanılıyor" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' seçeneÄŸi `--traditional' seçeneÄŸini etkisiz kılar" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "" -"`--posix'/`--traditional' seçenekleri `--non-decimal-data' seçeneÄŸini " -"etkisiz kılar" - -#: main.c:530 -#, 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:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "standart girdi ikilik kipe ayarlanamaz (%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "standart çıktı ikilik kipe ayarlanamaz (%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "standart hata ikilik kipe ayarlanamaz (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "program metni hiç yok!" - -#: main.c:721 -#, 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:723 -#, 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:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX seçenekleri: GNU uzun seçenekleri:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr " -f progDosyası --file=progDosyası\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr " -F ayraç --field-separator=ayraç\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr " -v var=deÄŸer --assign=var=deÄŸer\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr " -m[fr] deÄŸer\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr " -W compat --compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr " -W copyleft --copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr " -W copyright --copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr " -W dump-variables[=dosya] --dump-variables[=dosya]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr " -W exec=dosya --exec=dosya\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr " -W gen-po --gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr " -W help --help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr " -W lint[=ölümcül] --lint[=ölümcül]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr " -W lint-old --lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr " -W non-decimal-data --non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr " -W nostalgia --nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr " -W parsedebug --parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr " -W profile[=dosya] --profile[=dosya]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr " -W posix --posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr " -W re-interval --re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr " -W source=program-metni --source=program-metni\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr " -W traditional --traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr " -W usage --usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr " -W version --version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"Hataları raporlarken, `gawk.info' içindeki `Reporting Problems and Bugs'\n" -"kısmının `Bugs' baÅŸlıklı bölümünden gerekli bilgileri alabilirsiniz.\n" -"\n" -"Çeviri hatalarını adresine bildiriniz.\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"gawk bir dizge kalıplarını tarama ve iÅŸleme dilidir.\n" -"Öntanımlı olarak standart girdiyi okur ve standart çıktıya yazar.\n" -"\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -"Örnekler:\n" -"\tgawk '{ sum += $1 }; END { print sum }' dosya\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, fuzzy, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Telif hakkı (C) 1989, 1991-%d Free Software Foundation.\n" -"\n" -"Bu program bir serbest yazılımdır. Bu yazılımı Free Software Foundation\n" -"tarafından yayınlanmış olan GNU Genel Kamu Lisansının 2. ya da daha sonraki\n" -"bir sürümünün koÅŸulları altında kopyalayabilir, dağıtabilir ve/veya\n" -"üzerinde deÄŸiÅŸiklik yapabilirsiniz.\n" -"\n" - -#: main.c:802 -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 "" -"Bu program kullanışlı olabileceÄŸi umularak dağıtılmaktadır. Ancak,\n" -"hiçbir GARANTÄ°SÄ° YOKTUR; hatta SATILABÄ°LÄ°RLİĞİ veya HERHANGÄ° BÄ°R\n" -"AMACA UYGUNLUÄžU için bile garanti verilmez. Daha ayrıntılı bilgi\n" -"edinmek için GNU Genel Kamu Lisansına bakınız.\n" -"\n" - -#: main.c:813 -#, fuzzy -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"GNU Genel Kamu Lisansının bir kopyasını bu programla birlikte almış\n" -"olacaksınız; yoksa Free Software Foundation, Inc., 51 Franklin Street,\n" -"Fifth Floor, Boston, MA 02110-1301, USA adresinden isteyebilirsiniz.\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "POSIX awk -Ft ile dosya sistemini belirlemez" - -#: main.c:1122 -#, 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:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "`%s' kurala uygun bir deÄŸiÅŸken ismi deÄŸil" - -#: main.c:1145 -#, c-format -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:1184 -msgid "floating point exception" -msgstr "Gerçel sayı istisnası" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "ölümcül iç hata" - -#: main.c:1206 -#, fuzzy -msgid "fatal error: internal error: segfault" -msgstr "ölümcül iç hata" - -#: main.c:1218 -#, fuzzy -msgid "fatal error: internal error: stack overflow" -msgstr "ölümcül iç hata" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "ön açılışlı bir %d dosya tanımlayıcısı yok" - -#: main.c:1275 -#, 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:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "gruplar bulunamadı: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "komut satırı:" - -#: msg.c:120 -msgid "warning: " -msgstr "uyarı: " - -#: msg.c:142 -msgid "error: " -msgstr "hata: " - -#: msg.c:178 -msgid "fatal: " -msgstr "ölümcül: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "dizge gerçel sayıya dönüştürülemiyor" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "dizge sonunda tersbölü" - -#: node.c:609 -#, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "eski awk `\\%c' önceleme dizilimini desteklemiyor" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX `\\x' öncelemelerine izin vermez" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "`\\x' önceleme dizgesinde onaltılık rakamlar yok" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "`\\%c' önceleme dizgesi `%c' olarak kullanıldı" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': close-on-exec belirlenemedi: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "`%s' yazmak için açılamadı: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "iç hata: null vname'li %s" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# dahili olarak `delete' varsayıldı" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# bu özdevimli olarak yüklenmiÅŸ bir ek iÅŸlevdir" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawk profili, oluÅŸturuldu: %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# BEGIN blokları\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Kurallar\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END blokları\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Ä°ÅŸlevler, alfabetik sırayla\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "prec_level'da anlaşılamayan tür %s" - -#: profile.c:1527 -#, fuzzy, c-format -msgid "Unknown node type %s in pp_var" -msgstr "%d. düğümtürü bilinmiyor" - -#: regcomp.c:132 -msgid "Success" -msgstr "BaÅŸarılı" - -#: regcomp.c:135 -msgid "No match" -msgstr "EÅŸleÅŸmez" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Düzenli ifade geçersiz" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "KarşılaÅŸtırma karakteri geçersiz" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "Karakter sınıf ismi geçersiz" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Ä°zleyen tersbölü" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Geriye baÅŸvuru geçersiz" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "[ ya da [^ eÅŸleÅŸmiyor" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "( ya da \\( eÅŸleÅŸmiyor" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "\\{ eÅŸleÅŸmiyor" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "\\{\\} içeriÄŸi geçersiz" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Kapsam sonu geçersiz" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Bellek tükendi" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "düzenli ifade önceliÄŸi geçersiz" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Düzenli ifade sonu eksik kalmış" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "Düzenli ifade çok büyük" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr ") ya da \\) eÅŸleÅŸmiyor" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Daha önce düzenli ifade yok" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: kuraldışı seçenek -- %c\n" - -#~ 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)" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/vi.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/vi.gmo differ diff -Nru gawk-3.1.8+dfsg/po/vi.po gawk-4.0.1+dfsg/po/vi.po --- gawk-3.1.8+dfsg/po/vi.po 2010-05-06 17:57:38.000000000 +0000 +++ gawk-4.0.1+dfsg/po/vi.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,2028 +0,0 @@ -# Vietnamese translation for Gawk. -# Copyright © 2010 Free Software Foundation, Inc. -# This file is distributed under the same license as the gawk package. -# Clytie Siddall , 2005-2010. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.7i\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2010-05-03 18:32+0930\n" -"Last-Translator: Clytie Siddall \n" -"Language-Team: Vietnamese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: LocFactoryEditor 1.8\n" - -#: array.c:112 -#, c-format -msgid "attempt to use function `%s' as an array" -msgstr "cố gắng dùng hàm « %s » nhÆ° mảng" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "cố gắng dùng tham số vô hÆ°á»›ng « %s » nhÆ° là mảng" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "cố dùng Ä‘iá»u cô hÆ°á»›ng « %s » là mảng" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "từ %s" - -#: array.c:513 -#, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "tham chiếu đến phần tá»­ chÆ°a sở khởi « %s[\"%.*s\"] »" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "chữ in dÆ°á»›i mảng « %s » là chuá»—i rá»—ng" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "delete: (xoá) số mÅ© « %s » không phải nằm trong mảng « %s »" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: rá»—ng (vô giá trị)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: rá»—ng (số không)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: cỡ_bảng = %d, cỡ_mảng = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: là tham số\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: « array_ref » (mảng tham chiếu) đến « %s »\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "Má»i khối %s phải có má»™t phần kiểu hành Ä‘á»™ng" - -#: awkgram.y:221 -msgid "each rule must have a pattern or an action part" -msgstr "Má»i quy tắc phải có má»™t mẫu hay phần kiểu hành Ä‘á»™ng" - -#: awkgram.y:257 awkgram.y:266 -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "" -"awk cÅ© không há»— trợ nhiá»u quy tắc kiểu « BEGIN » (bắt đầu) hay « END » (kết " -"thúc)" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "« %s » là má»™t hàm có sẵn nên nó không thể được định nghÄ©a lái." - -#: awkgram.y:331 -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "" -"hằng biểu thức chính quy « // » hình nhÆ° má»™t chú thích C, nhÆ°ng mà không phải" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "" -"hằng biểu thức chính quy « /%s/ » hình nhÆ° má»™t chú thích C, nhÆ°ng mà không " -"phải" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "câu có lẽ sẽ không có tác dụng" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "« %s » được dùng trong hành Ä‘á»™ng %s" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "« nextfile » (tập tin kế tiếp) là má»™t phần mở rá»™ng gawk" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "« return » (trở vá») được dùng ở ngoại ngữ cảnh hàm" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"« print » (in) chuẩn trong quy tắc « BEGIN » (bắt đầu) hay « END » (kết thúc) " -"rất có thể nên là « print\"\" »" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "« delete array » (xoá mảng) là má»™t phần mở rá»™ng gawk" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "« delete array » (xoá mảng) là phần mở rá»™ng gawk không thể mang theo" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "gặp giá trị case trùng trong thân chuyển đổi (switch body): %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "" -"Phát hiện « default » (mặc định) trong thân chuyển đổi (switch body): %s" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "Ä‘Æ°á»ng ống dẫn hai chiếu Ä‘a giai Ä‘oạn không phải hoạt Ä‘á»™ng được" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "biểu thức chính quy nằm bên phải Ä‘iá»u gán" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "biểu thức chính quy nằm bên trái toán tá»­ « ~ » hay « !~ »" - -#: awkgram.y:830 awkgram.y:903 -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "awk cÅ© không há»— trợ từ khoá « in », trừ khi nằm sau « for »" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "biểu thức chính quy nằm bên phải sá»± so sánh" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "" -"trong hành Ä‘á»™ng « END » (kết thúc) có « getline » (lấy dòng) không được chuyển " -"hÆ°á»›ng lại và chÆ°a được xác định." - -#: awkgram.y:904 -msgid "old awk does not support multidimensional arrays" -msgstr "awk cÅ© không há»— trợ mảng Ä‘a chiá»u" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "không thể mang lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "POSIX phản đối lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "việc dùng Ä‘iá»u khác mảng nhÆ° là mảng" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "biểu thức in thấp không hợp lệ" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "gặp dòng má»›i bất ngá» hay kết thúc của chuá»—i" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "gặp Ä‘oạn chữ chÆ°Æ¡ng trình rá»—ng nằm trên dòng lệnh" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "không thể mở tập tin nguồn « %s » để Ä‘á»c (%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "tập tin nguồn « %s » là rá»—ng" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "tập tin nguồn không kết thúc vá»›i dòng má»›i" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "" -"biểu thức chính quy chÆ°a được chấm dứt kết thúc vá»›i « \\ » tại kết thúc của " -"tập tin" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" -"%s: %d: bá»™ sá»­a đổi biểu thức chính quy tawk « /.../%c » không hoạt Ä‘á»™ng được " -"trong gawk" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "" -"bá»™ sá»­a đổi biểu thức chính quy tawk « /.../%c » không hoạt Ä‘á»™ng được trong " -"gawk" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "biểu thức chính quy chÆ°a được chấm dứt" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "biểu thức chính quy chÆ°a được chấm dứt nằm tại kết thúc của tập tin" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "không thể mang khả năng dùng « \\#... » để tiếp tục dòng" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "xuyệc ngược không phải là ký tá»± cuối cùng nằm trên dòng" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX không cho phép toán tá»­ « **= »" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "awk cÅ© không há»— trợ toán tá»­ « **= »" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX không cho phép toán tá»­ « ** »" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "awk cÅ© không há»— trợ toán tá»­ « ** »" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "awk cÅ© không há»— trợ toán tá»­ « ^= »" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "awk cÅ© không há»— trợ toán tá»­ « ^ »" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "chuá»—i không được chấm dứt" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "biểu thức má»™t ký tá»± không hợp lệ « %c » nằm trong biểu thức" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "« %s » là má»™t phần mở rá»™ng gawk" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "« %s » là má»™t phần mở rá»™ng của Bell Labs (Phòng thí nghiệm Bell)" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX không cho phép « %s »" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "awk cÅ© không há»— trợ « %s »" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "« goto » được xem là gây tai hại\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "« %d » không hợp lệ nhÆ° là số đối số cho « %s »" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: (khá»›p) đối số thứ ba là phần mở rá»™ng gawk" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: khi đối số cuối cùng của sá»± thay thế, hằng mã nguồn chuá»—i không có tác " -"dụng" - -#: awkgram.y:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "tham số thứ ba %s không phải là má»™t đối tượng có thể thay đổi" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: (đóng) đối số thứ hai là phần mở rá»™ng gawk" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bá» gạch dÆ°á»›i nằm trÆ°á»›c" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bá» gạch dÆ°á»›i nằm trÆ°á»›c" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "hàm « %s »: tham số « #%d », « %s », nhân đôi tham số « #%d »" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "hàm « %s »: tham số « %s » che biến toàn cục" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "không mở được « %s » để ghi (%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "Ä‘ang gởi hồ sÆ¡ cho thiết bị lá»—i chuẩn" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: lá»—i đóng (%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() (hàm bóng) được gá»i hai lần !" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "có biến bị bóng." - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "hàm « %s »: không thể dùng tên hàm nhÆ° là tên tham số" - -#: awkgram.y:3004 -#, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "hàm « %s »: không thể dùng biến đặc biệt « %s » nhÆ° là tham số hàm" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "tên hàm « %s » được xác định trÆ°á»›c" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "hàm « %s » được gá»i nhÆ°ng mà chÆ°a xác định" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "hàm « %s » được xác định nhÆ°ng mà chÆ°a được gá»i" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "hằng biểu thức chính quy cho tham số « #%d » làm giá trị luận lý (bun)" - -#: awkgram.y:3245 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"hàm « %s » được gá»i vá»›i dấu cách nằm giữa tên và « ( »\n" -"hoặc được dùng nhÆ° là biến hay mảng" - -#: awkgram.y:3664 -msgid "division by zero attempted in `/'" -msgstr "thá»­ chia cho không trong « / »" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "thá»­ chia cho không trong « %% »" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s tá»›i « %s » bị lá»—i (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "thiết bị xuất chuẩn" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "không biết sao" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: đã nhận đối số không phải thuá»™c số" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: đối số « %g » ở ngoại phạm vị" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "" -"fflush: không thể xoá sạch: ống dẫn « %s » được mở để Ä‘á»c, không phải để ghi" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "" -"fflush: không thể xoá sạch: tập tin « %s » được mở để Ä‘á»c, không phải để ghi" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: « %s » không phải là tập tin đã mở, ống dẫn hay đồng tiến trình" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "index: (chỉ mục) đã nhận đối số thứ nhất không phải là chuá»—i" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: (chỉ mục) đã nhận đối số thứ hai không phải là chuá»—i" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: (số nguyên?) đã nhận đối số không phải thuá»™c số" - -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "« length(array) » (Ä‘á»™ dài mảng) là má»™t phần mở rá»™ng gawk" - -#: builtin.c:471 -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "" -"length: (chiá»u dài) tham số không có loại thì bị ép buá»™c thành vô hÆ°á»›ng" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: (chiá»u dài) đối số không có loại thì bị ép buá»™c thành vô hÆ°á»›ng" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: (chiá»u dài) đã nhận đối số không phải chuá»—i" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: (bản ghi) đã nhận đối số không phải thuá»™c số" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: (bản ghi) đã nhận đối số âm « %g »" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "phải dùng « count$ » vá»›i má»i dạng thức hay không dùng cả" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "chiá»u rá»™ng trÆ°á»ng bị bá» qua đối vá»›i toán tá»­ « %%%% »" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "Ä‘á»™ chính xác bị bá» qua đối vá»›i toán tá»­ « %%%% »" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "chiá»u rá»™ng trÆ°á»ng và Ä‘á»™ chính xác bị bá» qua đối vá»›i toán tá»­ « %%%% »" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "không cho phép « $ » trong định dạng awk" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "số đếm đối số vá»›i « $ » phải là >0" - -#: builtin.c:853 -#, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "số đếm đối số %ld lá»›n hÆ¡n tổng số đối số được cung cấp" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "không cho phép « $ » nằm sau dấu chấm trong định dạng" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "" -"chÆ°a cung cấp « $ » cho Ä‘á»™ rá»™ng trÆ°á»ng thuá»™c vị trí hay cho Ä‘á»™ chính xác" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "chữ « l » không có nghÄ©a trong định dạng awk nên bị bá» qua" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "không cho phép chữ « l » nằm trong định dạng awk POSIX" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "chữ « L » không có nghÄ©a trong định dạng awk nên bị bá» qua" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "không cho phép chữ « L » nằm trong định dạng awk POSIX" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "chữ « h » không có nghÄ©a trong định dạng awk nên bị bá» qua" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "không cho phép chữ « h » nằm trong định dạng awk POSIX" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: giá trị %g ở ngoại phạm vị cho dạng thức « %%%c »" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "" -"Ä‘ang bá» qua ký tá»± ghi rõ định dạng không rõ « %c »: không có đối số được " -"chuyển đổi" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "chÆ°a có đủ đối số để đáp ứng chuá»—i định dạng" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "bị hết « ^ » cho Ä‘iá»u này" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: Ä‘iá»u ghi rõ định dạng không có chữ Ä‘iá»u khiển" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "quá nhiá»u đối số được cung cấp cho chuá»—i định dạng" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: không có đối số" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: (căn bậc hai) đã nhận đối số không phải thuá»™c số" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: (chuá»—i phụ) số chỉ mục đầu « %g » không hợp lệ nên dùng 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "" -"substr: (chuá»—i phụ) số chỉ mục đầu không phải số nguyên « %g » sẽ bị cắt ngắn" - -#: builtin.c:1510 -#, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: (chuá»—i phụ) Ä‘á»™ dài %g không phải ≥1" - -#: builtin.c:1512 -#, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: (chuá»—i phụ) Ä‘á»™ dài %g không phải ≥0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr: (chuá»—i phụ) sẽ cắt xén Ä‘á»™ dài không phải số nguyên « %g »" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "substr: Ä‘á»™ dài %g quá lá»›n để chỉ mục chuá»—i nên xén ngắn thành %g" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: (chuá»—i con) chuá»—i nguồn có Ä‘á»™ dài số không" - -#: builtin.c:1552 -#, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: (chuá»—i phụ) số chỉ mục đầu %g nằm sau kết thúc của chuá»—i" - -#: builtin.c:1560 -#, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "" -"substr: (chuá»—i phụ) Ä‘á»™ dài %g tại số chỉ mục đầu %g vượt quá Ä‘á»™ dài của đối " -"số đầu (%lu)" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: đã nhận đối số thứ nhất khác chuá»—i" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: đã nhận chuá»—i định dạng rá»—ng" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: đã nhận đối số khác chuá»—i" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "mktime: ít nhất má»™t của những giá trị nằm ở ngoại phạm vi mặc định" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: (hệ thống) đã nhận đối số khác chuá»—i" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "gặp tham chiếu đến trÆ°á»ng chÆ°a được sở khởi « $%d »" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: (đến thấp hÆ¡n) đã nhận đối số khác chuá»—i" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: (đến cao hÆ¡n) đã nhận đối số khác chuá»—i" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: đã nhận đối số thứ nhất khác thuá»™c số" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: đã nhận đối số không phải thuá»™c số" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: đã nhận đối số không phải thuá»™c số" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: đã nhận đối số không phải thuá»™c số" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: (khá»›p) đối số thứ ba không phải là mảng" - -#: builtin.c:2744 -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: đối số thứ ba 0 được xá»­ lý nhÆ° 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: đã nhận đối số đầu không phải thuá»™c số" - -#: builtin.c:2862 -msgid "lshift: received non-numeric second argument" -msgstr "lshift: (dịch bên trái) đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "lshift(%lf, %lf): giá trị dịch quá lá»›n sẽ gây ra kết quả lạ" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: đã nhận đối số thứ nhất khác thuá»™c số" - -#: builtin.c:2900 -msgid "rshift: received non-numeric second argument" -msgstr "rshift: (dịch bên phải) đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "rshift(%lf, %lf): giá trị dịch quá lá»›n sẽ gây ra kết quả lạ" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: (và) đã nhận đối số đầu không phải thuá»™c số" - -#: builtin.c:2938 -msgid "and: received non-numeric second argument" -msgstr "and: (và) đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): (và) giá trị âm sẽ gây ra kết quả lạ" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): (và) giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: (hoặc) đã nhận đối số đầu không phải thuá»™c số" - -#: builtin.c:2974 -msgid "or: received non-numeric second argument" -msgstr "or: (hoặc) đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): (hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: (không hoặc) đã nhận đối số thứ nhất khác thuá»™c số" - -#: builtin.c:3010 -msgid "xor: received non-numeric second argument" -msgstr "xor: đã nhận đối số thứ hai khác thuá»™c số" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): (không hoặc) giá trị âm sẽ gây ra kết quả lạ" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): (không hoặc) giá trị thuá»™c phân số sẽ bị xén ngắn" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: (biên dịch) đã nhận đối số khác thuá»™c số" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): (biên dịch) giá trị thuá»™c phân số se bị xén ngắn" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: « %s » không phải là má»™t phân loại miá»n địa phÆ°Æ¡ng hợp lệ" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "không biết kiểu nút %d" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "tràn bá»™ đệm trong « genflags2str » (tạo ra cỠđến chuá»—i)" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "cố gắng dùng mảng « %s » trong má»™t ngữ cảnh vô hÆ°á»›ng" - -#: eval.c:802 -#, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "" -"cho loop: (cho vòng lặp) mảng « %s » đã thay đổi kích thÆ°á»›c từ %ld đến %ld " -"trong khi thá»±c hiện vòng lặp" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "không thể mang khả năng « break » (ngắt) nằm ở ngoại vòng lặp" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "không cho phép « break » (ngắt) nằm ở ngoại vòng lặp" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "không thể mang khả năng « continue » (tiếp tục) nằm ở ngoại vòng lặp" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "không cho phép « continue » (tiếp tục) nằm ở ngoại vòng lặp" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « BEGIN » (bắt đầu)" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « END » kết thúc)" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "" -"không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « BEGIN » (bắt đầu)" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "" -"không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « END » kết thúc)" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "câu không có tác dụng" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "không thể dùng tên hàm « %s » nhÆ° là biến hay mảng" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "gặp tham chiếu đến đối số chÆ°a được sở khởi « %s »" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "gặp tham chiếu đến biến chÆ°a được sở khởi « %s »" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenation: (nối chuá»—i) hiệu ứng khác trong má»™t biểu thức nào đó đã thay " -"đổi Ä‘á»™ dài của má»™t biểu thức khác !" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "Ä‘iá»u gán được dùng trong ngữ cảnh Ä‘iá»u kiện" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "cố gắng chia cho số không" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "không cho phép kiểu (%s) trong « tree_eval » (Æ°á»›c lượng cây)" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "cố gắng chia cho số không trong « /= »" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "cố gắng chia cho số không trong « %%= »" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "hàm « %s » được gá»i vá»›i số đối số hÆ¡n số được tuyên bố" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "chÆ°a xác định hàm « %s »" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Äống gá»i hàm:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "" -"\t# -- main --\n" -"(chính)\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "cố gắng tham chiếu trÆ°á»ng từ giá trị khác thuá»™c số" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "cố tham chiếu từ chuá»—i vô giá trị" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "cố gắng truy cập trÆ°á»ng %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "không cho phép gán cho kết quả của hàm « builtin » (có sẵn)" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "« IGNORECASE » (bá» qua chữ hoa/thÆ°á»ng) là phần mở rá»™ng gawk" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "« BINMODE » (chế Ä‘á»™ nhị phân) là phần mở rá»™ng gawk" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "Giá trị BINMODE (chế Ä‘á»™ nhị phân) « %s » không hợp lệ nên thấy là 3" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "đặc tả « %sFMT » sai « %s »" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "Ä‘ang tắt « --lint » do việc gán cho « LINT »" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "« extension » là má»™t phần mở rá»™ng gawk" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: (phần mở rá»™ng) không thể mở « %s » (%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "" -"extension: (phần mở rá»™ng) thÆ° viện « %s »: không thể gá»i hàm « %s » (%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "extension: (phần mở rá»™ng) tên hàm còn thiếu" - -#: ext.c:110 -#, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: (phần mở rá»™ng) gặp ký tá»± cấm « %c » nằm trong tên hàm « %s »" - -#: ext.c:116 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: (phần mở rá»™ng) không thể xác định lại hàm « %s »" - -#: ext.c:120 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: (phần mở rá»™ng) hàm « %s » đã được xác định" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "" -"extension: (phần mở rá»™ng) không thể dùng Ä‘iá»u có sẵn của gawk « %s » nhÆ° là " -"tên hàm" - -#: ext.c:127 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "tên hàm « %s » đã được xác định trÆ°á»›c" - -#: ext.c:204 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "hàm « %s » được xác định để chấp nhấn %d đối số tối Ä‘a" - -#: ext.c:207 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "hàm « %s » còn thiếu đối số thứ %d" - -#: ext.c:217 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "hàm « %s »: đối số thứ %d: cố gắng dùng Ä‘iá»u vô hÆ°á»›ng nhÆ° là mảng" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "hàm « %s »: đối số thứ %d: cố gắng dùng mảng nhÆ° là Ä‘iá»u vô hÆ°á»›ng" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "Thao tác không được há»— trợ" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "« NF » được đặt thành giá trị âm" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: (chia tách) đối số thứ hai không phải là mảng" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "" -"split: (chia tách) chuá»—i vô giá trị cho đối số thứ ba là phần mở rá»™ng gawk" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "« FIELDWIDTHS » (Ä‘á»™ rá»™ng trÆ°á»ng) là phần mở rá»™ng gawk" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "giá trị FIELDWIDTHS (Ä‘á»™ rá»™ng trÆ°á»ng) không hợp lệ, gần « %s »" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "chuá»—i vô giá trị cho « FS » là phần mở rá»™ng gawk" - -#: field.c:1092 -msgid "old awk does not support regexps as value of `FS'" -msgstr "awk cÅ© không há»— trợ biểu thức chính quy làm giá trị của « FS »" - -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: tùy chá»n « %s » vẫn mÆ¡ hồ\n" - -#: getopt.c:623 getopt.c:627 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: tùy chá»n « --%s » không cho phép đối số\n" - -#: getopt.c:636 getopt.c:641 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: tùy chá»n « %c%s » không cho phép đối số\n" - -#: getopt.c:684 getopt.c:703 -#, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: tùy chá»n « --%s » yêu cầu má»™t đối số\n" - -#: getopt.c:741 getopt.c:744 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: không nhận ra tùy chá»n « --%s »\n" - -#: getopt.c:752 getopt.c:755 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: không nhận ra tùy chá»n « %c%s »\n" - -#: getopt.c:804 getopt.c:807 -#, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: tùy chá»n không hợp lệ -- « %c »\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: tùy chá»n yêu cầu má»™t đối số -- « %c »\n" - -#: getopt.c:930 getopt.c:946 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: tùy chá»n « -W %s » vẫn mÆ¡ hồ\n" - -#: getopt.c:970 getopt.c:988 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: tùy chá»n « -W %s » không cho phép đối số\n" - -#: getopt.c:1009 getopt.c:1027 -#, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: tùy chá»n « -W %s » yêu cầu má»™t đối số\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "không mở được tập tin « %s » để Ä‘á»c (%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "lá»—i đóng fd %d (« %s ») (%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "kiểu cây không hợp lệ « %s » trong « redirect() »" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "biểu thức trong Ä‘iá»u chuyển hÆ°á»›ng « %s » chỉ có giá trị thuá»™c số" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "biểu thức cho Ä‘iá»u chuyển hÆ°á»›ng « %s » có giá trị chuá»—i vô giá trị" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"tên tập tin « %s » cho Ä‘iá»u chuyển hÆ°á»›ng « %s » có lẽ là kết quả của biểu thức " -"luận lý" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "không cần hợp « > » và « >> » cho tập tin « %.*s »" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "không thể mở ống dẫn « %s » để xuất (%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "không thể mở ống dẫn « %s » để nhập (%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "không thể mở ống dẫn hai chiá»u « %s » để nhập/xuất (%s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "không thể chuyển hÆ°á»›ng từ « %s » (%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "không thể chuyển hÆ°á»›ng đến « %s » (%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"đã tá»›i giá»›i hạn hệ thống vá» tập tin được mở nên bắt đầu phối hợp nhiá»u dòng " -"Ä‘iá»u mô tả tập tin" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "lá»—i đóng « %s » (%s)" - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "quá nhiá»u ống dẫn hay tập tin nhập được mở" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: (đóng) đối số thứ hai phải là « to » (đến) hay « from » (từ)" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "" -"close: (đóng) « %.*s » không phải là tập tin được mở, ống dẫn hay tiến trình " -"vá»›i nhau" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "việc đóng Ä‘iá»u chuyển hÆ°á»›ng chÆ°a mở" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: (đóng) Ä‘iá»u chuyển hÆ°á»›ng « %s » không được mở bởi « |& » nên đối số thứ " -"hai bị bá» qua" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "trạng thái thất bại (%d) khi đóng ống dẫn « %s » (%s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "trạng thái thất bại (%d) khi đóng tập tin « %s » (%s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "không có việc đóng dứt khoát ổ cắm « %s » được cung cấp" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "không có việc đóng dứt khoát đồng tiến trình « %s » được cung cấp" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "không có việc đóng dứt khoát ống dẫn « %s » được cung cấp" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "không có việc đóng dứt khoát tập tin « %s » được cung cấp" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "gặp lá»—i khi ghi thiết bị xụất chuẩn (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "gặp lá»—i khi ghi thiết bị lá»—i chuẩn (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "lá»—i xoá sạch ống dẫn « %s » (%s)" - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "lá»—i xoá sạch ống dẫn đồng tiến trình đến « %s » (%s)" - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "lá»—i xoá sạch tập tin « %s » (%s)" - -#: io.c:1222 -#, c-format -msgid "local port %s invalid in `/inet'" -msgstr "cổng cục bá»™ %s không hợp lệ trong « /inet »" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "thông tin vá» máy/cổng ở xa (%s, %s) không phải hợp lệ" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "tiếc là ứng dụng khách chÆ°a sẵn sàng" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "chỉ ngÆ°á»i chủ (root) có thể dùng thôi" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "tiếc là trình phục vụ chÆ°a sẵn sàng" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "" -"trong tên tập tin đặc biệt « %s » không cung cấp giao thức (đã biết) nào" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "tên tập tin đặc biệt « %s » chÆ°a xong" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "phải cung cấp má»™t tên máy từ xa cho " - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "phải cung cấp má»™t cổng từ xa cho " - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "truyá»n thông TCP/IP không được há»— trợ" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "tập tin « %s » là thÆ° mục" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "hãy dùng « PROCINFO[\"%s\"] » (thông tin tiến trình) thay cho « %s »" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "hãy dùng « PROCINFO[...] » (thông tin tiến trình) thay cho " - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "không mở được « %s », chế Ä‘á»™ « %s »" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "lá»—i đóng pty (tài sản?) chính (%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "lá»—i đóng thiết bị xuất chuẩn trong tiến trình con (%s)" - -#: io.c:1928 -#, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "" -"lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị xuất chuẩn trong Ä‘iá»u con " -"(nhân đôi: %s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "lá»—i đóng thiết bị nhập chuẩn trong tiến trình con (%s)" - -#: io.c:1933 -#, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "" -"lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị nhập chuẩn trong Ä‘iá»u con " -"(nhân đôi: %s)" - -#: io.c:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "lá»—i đóng pty (tài sản?) phụ (%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "" -"lá»—i di chuyển ống dẫn đến thiết bị xuất chuẩn trong tiến trình con (dup: %s) " -"(nhân đôi)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "" -"lá»—i di chuyển ống dẫn đến thiết bị nhập chuẩn trong tiến trình con (dup: %s) " -"(nhân đôi)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "lá»—i phục hồi thiết bị xuất chuẩn trong tiến trình mẹ\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "lá»—i phục hồi thiết bị nhập chuẩn trong tiến trình mẹ\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "lá»—i đóng ống dẫn (%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "« |& » không được há»— trợ" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "không thể mở ống dẫn « %s » (%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "không thể tạo tiến trình con cho « %s » (fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "tập tin dữ liệu « %s » là rá»—ng" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "không thể cấp phát bá»™ nhá»› nhập thêm nữa" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "gặp lá»—i khi Ä‘á»c tập tin nhập « %s »: %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "giá trị Ä‘a ký tá»± của « RS » là phần mở rá»™ng gawk" - -#: main.c:306 -msgid "out of memory" -msgstr "không đủ bá»™ nhá»›" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "tùy chá»n « -m[fr] » không thích Ä‘ang trong gawk" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "cách sá»­ dụng tùy chá»n « -m »: « -m[fr] nnn »" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: tùy chá»n « -W %s » không được nhận diện nên bị bá» qua\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "đối số rá»—ng tá»›i « --source » (nguồn) bị bá» qua" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: tùy chá»n cần đến đối số « -- %c »\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "" -"biến môi trÆ°á»ng « POSIXLY_CORRECT » (đúng kiểu POSIX) đã được đặt; Ä‘ang bật " -"tùy chá»n « --posix »" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "tùy chá»n « --posix » có quyá»n cao hÆ¡n « --traditional » (truyá»n thống)" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "" -"« --posix »/« --traditional » (truyá»n thống) có quyá»n cao hÆ¡n « --non-decimal-" -"data » (dữ liệu khác thập phân)" - -#: main.c:530 -#, c-format -msgid "running %s setuid root may be a security problem" -msgstr "việc chạy %s vá»›i tÆ° cách « setuid root » có thể rủi rá» bảo mật" - -#: main.c:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "không thể đặt chế Ä‘á»™ nhị phân trên thiết bị nhập chuẩn (%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "không thể đặt chế Ä‘á»™ nhị phân trên thiết bị xuất chuẩn (%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "không thể đặt chế Ä‘á»™ nhị phân trên thiết bị lá»—i chuẩn (%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "không có Ä‘oạn chữ chÆ°Æ¡ng trình nào cả !" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] -f tập_tin_chÆ°Æ¡ng_trình [--] " -"tập_tin ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] [--] %cchÆ°Æ¡ng_trình%c " -"tập_tin ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "tùy chá»n POSIX:\t\ttùy chá»n dài GNU:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f tập_tin_chÆ°Æ¡ng_trình\t\t--file=tập_tin_chÆ°Æ¡ng_trình\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=Ä‘iá»u phân cách trÆ°á»ng\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "" -"\t-v var=giá trị\t\t--assign=biến=giá_trị\n" -"(assign: gán)\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] giá_trị\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\ttối Æ°u hoá\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\ttÆ°Æ¡ng thích\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\ttác quyá»n ngược\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\ttác quyá»n\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "" -"\t-W dump-variables[=tập_tin]\t--dump-variables[=tập_tin]\n" -"(đổ các biến)\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=tập_tin\t\t--exec=tập_tin\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "" -"\t-W gen-po\t\t--gen-po\n" -"(gen là viết tắt cho generate: tạo ra)\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\ttrợ giúp\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "" -"\t-W lint[=fatal]\t\t--lint[=fatal]\n" -"(fatal: nghiêm trá»ng)\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "" -"\t-W lint-old\t\t--lint-old\n" -"(old: cÅ©)\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "" -"\t-W non-decimal-data\t--non-decimal-data\n" -"(dữ liệu khác thập phân)\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "" -"\t-W nostalgia\t\t--nostalgia\n" -"(ná»—i luyến tiếc quá khứ)\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "" -"\t-W parsedebug\t\t--parsedebug\n" -"(parse: phân tích\n" -"debug: gỡ lá»—i)\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "" -"\t-W profile[=tập_tin]\t--profile[=tập_tin]\n" -"(profile: hồ sÆ¡)\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "" -"\t-W re-interval\t\t--re-interval\n" -"(re-[Ä‘á»™ng từ]: [làm] lại\n" -"interval: thá»i gian giữa hai lúc)\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "" -"\t-W source=program-text\t--source=program-text\n" -"(source: nguồn\n" -"program-text: Ä‘oạn chữ của chÆ°Æ¡ng trình)\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\ttruyá»n thống\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\tcách sá»­ dụng\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\tphiên bản\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"Äể thông báo lá»—i, xem nút « Bugs » (lá»—i) trong tập tin\n" -"thông tin « gawk.info » mà nằm trong phần\n" -"« Reporting Problems and Bugs » (thông báo vấn Ä‘á» và lá»—i)\n" -"trong bản in.\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"gawk là ngôn ngữ quét và xá»­ lý mẫu.\n" -"Mặc định là nó Ä‘á»c thiết bị nhập chuẩn và ghi ra thiết bị xuất chuẩn.\n" -"\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -"Thí dụ :\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"Tác quyá»n © năm 1989, 1991-%d của Tổ chức Phần má»m Tá»± do.\n" -"\n" -"ChÆ°Æ¡ng trình này là phần má»m tá»± do; bạn có thể phát hành lại nó và/hoặc sá»­a " -"đổi nó vá»›i Ä‘iá»u kiện của Giấy Phép Công Cá»™ng GNU nhÆ° được xuất bản bởi Tổ " -"Chức Phần Má»m Tá»± Do; hoặc phiên bản 3 của Giấy Phép này, hoặc (tùy chá»n) bất " -"kỳ phiên bản sau nào.\n" -"\n" - -#: main.c:802 -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 "" -"Chúng tôi phân phối chÆ°Æ¡ng trình này vì mong muốn nó hữu ích,\n" -"nhÆ°ng mà KHÔNG BẢO ÄẢM GÃŒ CẢ, không ngay cả ngụ ý bảo đảm\n" -"KHẢ NÄ‚NG BÃN hoặc KHẢ NÄ‚NG LÀM VIỆC DỨT KHOÃT.\n" -"Hãy xem Bản Quyá»n Công Chung GNU (GPL) để tìm chi tiết.\n" -"\n" - -#: main.c:813 -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"Bện nên đã nhận má»™t bản sao của Giấy Phép Công Cá»™ng GNU\n" -"cùng vá»›i chÆ°Æ¡ng trình này. Không thì xem địa chỉ « http://www.gnu.org/" -"licenses/ ».\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "-Ft không đặt FS (hệ thống tập tin?) là tab trong awk POSIX" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" -"%s: đối số « %s » đối vá»›i « -v » không phải có dạng « biến=giá_trị »\n" -"\n" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "« %s » không phải là tên biến hợp lệ" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "« %s » không phải là tên biến; Ä‘ang tìm tập tin « %s=%s »" - -#: main.c:1184 -msgid "floating point exception" -msgstr "ngoại lệ Ä‘iểm phù Ä‘á»™ng" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™" - -#: main.c:1206 -msgid "fatal error: internal error: segfault" -msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™ : lá»—i chia ra từng Ä‘oạn" - -#: main.c:1218 -msgid "fatal error: internal error: stack overflow" -msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™ : tràn đống" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "không có fd (chỉ thị tập tin?) %d đã mở trÆ°á»›c" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "không thể mở sẵn « /dev/null » cho fd %d" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "không tìm thấy nhóm: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "dòng lệnh:" - -#: msg.c:120 -msgid "warning: " -msgstr "cảnh báo : " - -#: msg.c:142 -msgid "error: " -msgstr "lá»—i: " - -#: msg.c:178 -msgid "fatal: " -msgstr "nghiêm trá»ng: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "không thể chuyển đổi chuá»—i sang Ä‘iá»u lÆ¡ lá»­ng" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "gặp xuyệc ngoặc tại kết thúc của chuá»—i" - -#: node.c:609 -#, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "awk cÅ© không há»— trợ dãy thoát « \\%c »" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX không cho phép Ä‘iá»u thoát « \\x »" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "không có số thập lúc nằm trong dây thoát « \\x »" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" -"dây thoát thập lục \\x%.*s chứa %d ký tá»± mà rất có thể không phải được Ä‘á»c " -"bằng cách dá»± định" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "dây thoát « \\%c » được xá»­ lý nhÆ° là « %c » chuẩn" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "" -"%s %s « %s »: không thể đặt « close-on-exec » (đóng má»™t khi thá»±c hiện) (fcntl: " -"%s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "không thể mở « %s » để ghi: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "lá»—i ná»™i bá»™: %s vá»›i vname (tên biến?) vô giá trị" - -#: profile.c:521 -msgid "# treated internally as `delete'" -msgstr "# được xá»­ lý ná»™i bá»™ là « delete » (xoá)" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# đây là má»™t hàm mở rá»™ng được nạp Ä‘á»™ng" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# hồ sÆ¡ gawk, được tạo %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# khối BEGIN (bắt đầu)\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# Quy tắc\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# khối END (cuối)\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# Danh sách các hàm theo thứ tá»± abc\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "gặp kiểu bất ngỠ« %s » trong « prec_level » (cấp nằm trÆ°á»›c?)" - -#: profile.c:1527 -#, c-format -msgid "Unknown node type %s in pp_var" -msgstr "Không rõ loại nút %s trong pp_var" - -#: regcomp.c:132 -msgid "Success" -msgstr "Thành công" - -#: regcomp.c:135 -msgid "No match" -msgstr "Không khá»›p" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "Biểu thức chính quy không hợp lệ" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "Ký tá»± đối chiếu không hợp lệ" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "Tên hạng ký tá»± không hợp lệ" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "Gặp xuyệc ngược nằm theo" - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "Tham chiếu trở lại không hợp lệ" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "ChÆ°a khá»›p « [ » hay « [^ »" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "ChÆ°a khá»›p « ( » hay « \\( »" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "ChÆ°a khá»›p « \\{ »" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "Ná»™i dụng « \\{\\} » không hợp lệ" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "Kết thúc phạm vị không hợp lệ" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "Hết bá»™ nhá»› rồi" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "Biểu thức chính quy nằm trÆ°á»›c không hợp lệ" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "Kết thúc quá sá»›m của biểu thức chính quy" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "Biểu thức chính quy quá lá»›n" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr "ChÆ°a khá»›p « ) » hay « \\) »" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "Không có biểu thức chính quy nằm trÆ°á»›c" Binary files /tmp/xriLalekxP/gawk-3.1.8+dfsg/po/zh_CN.gmo and /tmp/J_op9P0LWP/gawk-4.0.1+dfsg/po/zh_CN.gmo differ diff -Nru gawk-3.1.8+dfsg/po/zh_CN.po gawk-4.0.1+dfsg/po/zh_CN.po --- gawk-3.1.8+dfsg/po/zh_CN.po 2010-05-06 17:57:38.000000000 +0000 +++ gawk-4.0.1+dfsg/po/zh_CN.po 1970-01-01 00:00:00.000000000 +0000 @@ -1,1935 +0,0 @@ -# Chinese translations for gawk package -# gawk 软件包的简体中文翻译. -# Copyright (C) 2007 Free Software Foundation, Inc. -# This file is distributed under the same license as the gawk package. -# LI Daobing , 2007, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: gawk 3.1.6c\n" -"Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2010-05-06 20:57+0300\n" -"PO-Revision-Date: 2009-06-09 21:51+0800\n" -"Last-Translator: LI Daobing \n" -"Language-Team: Chinese (simplified) \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: array.c:112 -#, c-format -msgid "attempt to use function `%s' as an array" -msgstr "试图把函数“%sâ€å½“数组使用" - -#: array.c:115 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "试图把标é‡å‚数“%sâ€å½“数组使用" - -#: array.c:118 -#, c-format -msgid "attempt to use scalar `%s' as array" -msgstr "试图把标é‡â€œ%sâ€å½“数组使用" - -#: array.c:156 -#, c-format -msgid "from %s" -msgstr "从 %s" - -#: array.c:513 -#, fuzzy, c-format -msgid "reference to uninitialized element `%s[\"%.*s\"]'" -msgstr "引用未åˆå§‹åŒ–的元素“%s[\"%s\"]â€" - -#: array.c:519 -#, c-format -msgid "subscript of array `%s' is null string" -msgstr "数组“%sâ€çš„下标是空字符串" - -#: array.c:623 -#, c-format -msgid "delete: index `%s' not in array `%s'" -msgstr "删除: 索引“%sâ€ä¸åœ¨æ•°ç»„“%sâ€ä¸­" - -#: array.c:792 -#, c-format -msgid "%s: empty (null)\n" -msgstr "%s: 空(null)\n" - -#: array.c:797 -#, c-format -msgid "%s: empty (zero)\n" -msgstr "%s: 空(zero)\n" - -#: array.c:801 -#, c-format -msgid "%s: table_size = %d, array_size = %d\n" -msgstr "%s: è¡¨æ ¼å¤§å° = %d, æ•°ç»„å¤§å° = %d\n" - -#: array.c:830 -#, c-format -msgid "%s: is parameter\n" -msgstr "%s: 是å‚æ•°\n" - -#: array.c:835 -#, c-format -msgid "%s: array_ref to %s\n" -msgstr "%s: 数组引用到 %s\n" - -#: awkgram.y:218 -#, c-format -msgid "%s blocks must have an action part" -msgstr "%s å—必须有一个行为部分" - -#: awkgram.y:221 -msgid "each rule must have a pattern or an action part" -msgstr "æ¯ä¸ªè§„则必须有一个模å¼æˆ–行为部分" - -#: awkgram.y:257 awkgram.y:266 -msgid "old awk does not support multiple `BEGIN' or `END' rules" -msgstr "è€çš„ awk ä¸æ”¯æŒå¤šä¸ªâ€œBEGINâ€æˆ–“ENDâ€è§„则" - -#: awkgram.y:285 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "“%sâ€æ˜¯å†…置函数,ä¸èƒ½è¢«é‡å®šä¹‰" - -#: awkgram.y:331 -msgid "regexp constant `//' looks like a C++ comment, but is not" -msgstr "正则表达å¼å¸¸é‡â€œ//â€çœ‹èµ·æ¥åƒ C++ 注释,但其实ä¸æ˜¯" - -#: awkgram.y:334 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "正则表达å¼å¸¸é‡â€œ/%s/â€çœ‹èµ·æ¥åƒ C 注释,但其实ä¸æ˜¯" - -#: awkgram.y:361 awkgram.y:656 -msgid "statement may have no effect" -msgstr "表达å¼å¯èƒ½æ— ä»»ä½•æ•ˆæžœ" - -#: awkgram.y:458 awkgram.y:482 -#, c-format -msgid "`%s' used in %s action" -msgstr "“%sâ€è¢«ç”¨äºŽ %s 行为" - -#: awkgram.y:473 awkgram.y:477 -msgid "`nextfile' is a gawk extension" -msgstr "“nextfileâ€æ˜¯ gawk 扩展" - -#: awkgram.y:492 -msgid "`return' used outside function context" -msgstr "“returnâ€åœ¨å‡½æ•°å¤–使用" - -#: awkgram.y:534 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "在 BEGIN 或 END 规则中,“printâ€ä¹Ÿè®¸åº”该写åšâ€œprint \"\"â€" - -#: awkgram.y:550 awkgram.y:558 -msgid "`delete array' is a gawk extension" -msgstr "“delete arrayâ€æ˜¯ gawk 扩展" - -#: awkgram.y:572 awkgram.y:580 -msgid "`delete(array)' is a non-portable tawk extension" -msgstr "“delete(array)â€æ˜¯ä¸å¯ç§»æ¤çš„ tawk 扩展" - -#: awkgram.y:624 -#, c-format -msgid "duplicate case values in switch body: %s" -msgstr "switch 中有é‡å¤çš„ case 值: %s" - -#: awkgram.y:634 -msgid "Duplicate `default' detected in switch body" -msgstr "switch 中有é‡å¤çš„“defaultâ€" - -#: awkgram.y:723 -msgid "multistage two-way pipelines don't work" -msgstr "多阶åŒå‘管é“无法工作" - -#: awkgram.y:814 -msgid "regular expression on right of assignment" -msgstr "正则表达å¼åœ¨èµ‹å€¼ç®—符的å³è¾¹" - -#: awkgram.y:824 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "正则表达å¼åœ¨â€œ~â€æˆ–“!~â€ç®—符的左边" - -#: awkgram.y:830 awkgram.y:903 -msgid "old awk does not support the keyword `in' except after `for'" -msgstr "è€ awk åªæ”¯æŒå…³é”®è¯â€œinâ€åœ¨â€œforâ€çš„åŽé¢" - -#: awkgram.y:836 -msgid "regular expression on right of comparison" -msgstr "正则表达å¼åœ¨æ¯”较算符的å³è¾¹" - -#: awkgram.y:893 -msgid "non-redirected `getline' undefined inside END action" -msgstr "在 END 环境中,éžé‡å®šå‘的“getlineâ€æœªå®šä¹‰" - -#: awkgram.y:904 -msgid "old awk does not support multidimensional arrays" -msgstr "è€ awk ä¸æ”¯æŒå¤šç»´æ•°ç»„" - -#: awkgram.y:950 -msgid "call of `length' without parentheses is not portable" -msgstr "ä¸å¸¦æ‹¬å·è°ƒç”¨â€œlengthâ€æ˜¯ä¸å¯ä»¥ç§»æ¤çš„" - -#: awkgram.y:955 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "POSIX 认为ä¸å¸¦æ‹¬å·è°ƒç”¨â€œlengthâ€æ˜¯å·²è¿‡æ—¶çš„" - -#: awkgram.y:1009 -msgid "use of non-array as array" -msgstr "把éžæ•°ç»„åšæ•°ç»„使用" - -#: awkgram.y:1012 -msgid "invalid subscript expression" -msgstr "无效的下标表达å¼" - -#: awkgram.y:1257 -msgid "unexpected newline or end of string" -msgstr "未预期的新行或字符串结æŸ" - -#: awkgram.y:1374 -msgid "empty program text on command line" -msgstr "命令行中程åºä½“为空" - -#: awkgram.y:1430 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "无法以读模å¼æ‰“å¼€æºæ–‡ä»¶â€œ%sâ€(%s)" - -#: awkgram.y:1528 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "无法读å–æºæ–‡ä»¶â€œ%sâ€(%s)" - -#: awkgram.y:1536 -#, c-format -msgid "source file `%s' is empty" -msgstr "æºæ–‡ä»¶â€œ%sâ€ä¸ºç©º" - -#: awkgram.y:1728 awkgram.y:1850 awkgram.y:1868 awkgram.y:2243 awkgram.y:2330 -msgid "source file does not end in newline" -msgstr "æºæ–‡ä»¶ä¸ä»¥æ¢è¡Œç¬¦ç»“æŸ" - -#: awkgram.y:1790 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "未终止的正则表达å¼åœ¨æ–‡ä»¶ç»“æŸå¤„以“\\â€ç»“æŸ" - -#: awkgram.y:1814 -#, c-format -msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "%s: %d: tawk 正则表达å¼ä¿®é¥°ç¬¦â€œ/.../%câ€æ— æ³•åœ¨ gawk 中工作" - -#: awkgram.y:1818 -#, c-format -msgid "tawk regex modifier `/.../%c' doesn't work in gawk" -msgstr "tawk 正则表达å¼ä¿®é¥°ç¬¦â€œ/.../%câ€æ— æ³•åœ¨ gawk 中工作" - -#: awkgram.y:1825 -msgid "unterminated regexp" -msgstr "未终止的正则表达å¼" - -#: awkgram.y:1828 -msgid "unterminated regexp at end of file" -msgstr "未终止的正则表达å¼åœ¨æ–‡ä»¶ç»“æŸå¤„" - -#: awkgram.y:1897 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "使用“\\ #...â€æ¥ç»­è¡Œæ˜¯ä¸å¯ç§»æ¤çš„" - -#: awkgram.y:1910 -msgid "backslash not last character on line" -msgstr "åæ–œæ ä¸æ˜¯è¡Œçš„最åŽä¸€ä¸ªå­—符" - -#: awkgram.y:1955 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX ä¸å…许æ“作符“**=â€" - -#: awkgram.y:1957 -msgid "old awk does not support operator `**='" -msgstr "è€ awk ä¸æ”¯æŒæ“作符“**=â€" - -#: awkgram.y:1966 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX ä¸å…许æ“作符“**â€" - -#: awkgram.y:1968 -msgid "old awk does not support operator `**'" -msgstr "è€ awk ä¸æ”¯æŒæ“作符“**â€" - -#: awkgram.y:1999 -msgid "operator `^=' is not supported in old awk" -msgstr "è€ awk ä¸æ”¯æŒæ“作符“^=â€" - -#: awkgram.y:2007 -msgid "operator `^' is not supported in old awk" -msgstr "è€ awk ä¸æ”¯æŒæ“作符“^â€" - -#: awkgram.y:2091 awkgram.y:2106 -msgid "unterminated string" -msgstr "未结æŸçš„字符串" - -#: awkgram.y:2291 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "表达å¼ä¸­çš„无效字符“%câ€" - -#: awkgram.y:2339 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "“%sâ€æ˜¯ gawk 扩展" - -#: awkgram.y:2342 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "“%sâ€æ˜¯è´å°”实验室扩展" - -#: awkgram.y:2345 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX ä¸å…许“%sâ€" - -#: awkgram.y:2349 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "è€ awk ä¸æ”¯æŒâ€œ%sâ€" - -#: awkgram.y:2375 -msgid "`goto' considered harmful!\n" -msgstr "“gotoâ€æœ‰å®³ï¼\n" - -#: awkgram.y:2437 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d 是 %s 的无效å‚数个数" - -#: awkgram.y:2456 awkgram.y:2459 -msgid "match: third argument is a gawk extension" -msgstr "match: 第三个å‚数是 gawk 扩展" - -#: awkgram.y:2472 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s: 字符串作为 substitute 的最åŽä¸€ä¸ªå‚数无任何效果" - -#: awkgram.y:2475 -#, c-format -msgid "%s third parameter is not a changeable object" -msgstr "%s 第三个å‚æ•°ä¸æ˜¯ä¸€ä¸ªå¯å˜å¯¹è±¡" - -#: awkgram.y:2502 awkgram.y:2505 -msgid "close: second argument is a gawk extension" -msgstr "close: 第二个å‚数是 gawk 扩展" - -#: awkgram.y:2515 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "使用 dcgettext(_\"...\") 是错误的: 去掉开始的下划线" - -#: awkgram.y:2530 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "使用 dcngettext(_\"...\") 是错误的: 去掉开始的下划线" - -#: awkgram.y:2602 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "函数“%sâ€: 第 %d 个å‚æ•°, “%sâ€, 与第 %d 个å‚æ•°é‡å¤" - -#: awkgram.y:2635 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "函数“%sâ€: å‚数“%sâ€æŽ©ç›–了公共å˜é‡" - -#: awkgram.y:2747 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "无法以写模å¼æ‰“开“%sâ€ï¼ˆ%s)" - -#: awkgram.y:2748 profile.c:96 -msgid "sending profile to standard error" -msgstr "å‘é€é…置到标准错误输出" - -#: awkgram.y:2780 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: 关闭失败(%s)" - -#: awkgram.y:2901 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() 被调用两次ï¼" - -#: awkgram.y:2928 -msgid "there were shadowed variables." -msgstr "那里有被掩盖的å˜é‡ã€‚" - -#: awkgram.y:3001 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "函数“%sâ€: 无法使用函数å作为å‚æ•°å" - -#: awkgram.y:3004 -#, c-format -msgid "function `%s': can't use special variable `%s' as a function parameter" -msgstr "函数“%sâ€: 无法使用特殊å˜é‡â€œ%sâ€ä½œä¸ºå‡½æ•°å‚æ•°" - -#: awkgram.y:3014 -#, c-format -msgid "function name `%s' previously defined" -msgstr "函数å“%sâ€å‰é¢å·²å®šä¹‰" - -#: awkgram.y:3165 awkgram.y:3171 -#, c-format -msgid "function `%s' called but never defined" -msgstr "函数“%sâ€è¢«è°ƒç”¨ä½†é‡æœªè¢«å®šä¹‰" - -#: awkgram.y:3174 -#, c-format -msgid "function `%s' defined but never called" -msgstr "函数“%sâ€è¢«å®šä¹‰ä½†é‡æœªè¢«è°ƒç”¨" - -#: awkgram.y:3201 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "第 %d 个å‚数的正则表达å¼å¸¸é‡äº§ç”Ÿå¸ƒå°”值" - -#: awkgram.y:3245 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"or used as a variable or an array" -msgstr "" -"函数“%sâ€è¢«è°ƒç”¨æ—¶å字与“(â€é—´æœ‰ç©ºæ ¼ï¼Œ\n" -"或被用作å˜é‡æˆ–数组" - -#: awkgram.y:3664 -#, fuzzy -msgid "division by zero attempted in `/'" -msgstr "在“/=â€ä¸­è¯•å›¾é™¤0" - -#: awkgram.y:3669 eval.c:1394 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "在“%%â€ä¸­è¯•å›¾é™¤0" - -#: builtin.c:122 -#, c-format -msgid "%s to \"%s\" failed (%s)" -msgstr "%s 到 \"%s\" 失败 (%s)" - -#: builtin.c:123 -msgid "standard output" -msgstr "标准输出" - -#: builtin.c:124 -msgid "reason unknown" -msgstr "未知原因" - -#: builtin.c:137 -msgid "exp: received non-numeric argument" -msgstr "exp: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:143 -#, c-format -msgid "exp: argument %g is out of range" -msgstr "exp: å‚æ•° %g 超出范围" - -#: builtin.c:201 -#, c-format -msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" -msgstr "fflush: 无法使用: 管é““%sâ€ä»¥åªè¯»æ–¹å¼æ‰“开,ä¸å¯å†™" - -#: builtin.c:204 -#, c-format -msgid "fflush: cannot flush: file `%s' opened for reading, not writing" -msgstr "fflush: 无法使用: 文件“%sâ€ä»¥åªè¯»æ–¹å¼æ‰“开,ä¸å¯å†™" - -#: builtin.c:216 -#, c-format -msgid "fflush: `%s' is not an open file, pipe or co-process" -msgstr "fflush: “%sâ€ä¸æ˜¯ä¸€ä¸ªå·²æ‰“开文件ã€ç®¡é“或åˆä½œè¿›ç¨‹" - -#: builtin.c:310 -msgid "index: received non-string first argument" -msgstr "index: 第一个å‚æ•°ä¸æ˜¯å­—符串" - -#: builtin.c:312 -msgid "index: received non-string second argument" -msgstr "index: 第二个å‚æ•°ä¸æ˜¯å­—符串" - -#: builtin.c:434 -msgid "int: received non-numeric argument" -msgstr "int: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:464 -msgid "`length(array)' is a gawk extension" -msgstr "“length(array)â€æ˜¯ gawk 扩展" - -#: builtin.c:471 -#, fuzzy -msgid "length: untyped parameter argument will be forced to scalar" -msgstr "length: 无类型的å‚数会被强制转æ¢ä¸ºæ ‡é‡" - -#: builtin.c:480 -msgid "length: untyped argument will be forced to scalar" -msgstr "length: 无类型的å‚数会被强制转æ¢ä¸ºæ ‡é‡" - -#: builtin.c:484 -msgid "length: received non-string argument" -msgstr "length: 收到éžå­—符串å‚æ•°" - -#: builtin.c:515 -msgid "log: received non-numeric argument" -msgstr "log: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:518 -#, c-format -msgid "log: received negative argument %g" -msgstr "log: 收到负数å‚æ•° %g" - -#: builtin.c:726 builtin.c:729 -msgid "must use `count$' on all formats or none" -msgstr "è¦ä¹ˆåœ¨æ‰€æœ‰æ ¼å¼ä¸Šä½¿ç”¨â€œcount$â€ï¼Œè¦ä¹ˆå®Œå…¨ä¸ä½¿ç”¨" - -#: builtin.c:790 -#, c-format -msgid "field width is ignored for `%%%%' specifier" -msgstr "“%%%%â€çš„字段宽度被忽略" - -#: builtin.c:792 -#, c-format -msgid "precision is ignored for `%%%%' specifier" -msgstr "“%%%%â€çš„精度被忽略" - -#: builtin.c:794 -#, c-format -msgid "field width and precision are ignored for `%%%%' specifier" -msgstr "“%%%%â€çš„字段宽度和精度被忽略" - -#: builtin.c:845 -msgid "`$' is not permitted in awk formats" -msgstr "awk æ ¼å¼ä¸­ä¸å…许 “$â€" - -#: builtin.c:851 -msgid "arg count with `$' must be > 0" -msgstr "å«æœ‰â€œ$â€çš„å‚数个数必须大于0" - -#: builtin.c:853 -#, c-format -msgid "arg count %ld greater than total number of supplied arguments" -msgstr "å‚数个数 %ld 大于æ供的å‚数总个数" - -#: builtin.c:855 -msgid "`$' not permitted after period in format" -msgstr "æ ¼å¼ä¸å…许在“.â€åŽä½¿ç”¨â€œ$â€" - -#: builtin.c:868 -msgid "no `$' supplied for positional field width or precision" -msgstr "没有为格å¼å®½åº¦æˆ–精度æ供“$â€" - -#: builtin.c:938 -msgid "`l' is meaningless in awk formats; ignored" -msgstr "“lâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略" - -#: builtin.c:942 -msgid "`l' is not permitted in POSIX awk formats" -msgstr "“lâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨" - -#: builtin.c:953 -msgid "`L' is meaningless in awk formats; ignored" -msgstr "“Lâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略" - -#: builtin.c:957 -msgid "`L' is not permitted in POSIX awk formats" -msgstr "“Lâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨" - -#: builtin.c:968 -msgid "`h' is meaningless in awk formats; ignored" -msgstr "“hâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略" - -#: builtin.c:972 -msgid "`h' is not permitted in POSIX awk formats" -msgstr "“hâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨" - -#: builtin.c:1252 -#, c-format -msgid "[s]printf: value %g is out of range for `%%%c' format" -msgstr "[s]printf: 值 %g 对“%%%câ€æ ¼å¼æ¥è¯´è¶…出范围" - -#: builtin.c:1332 -#, c-format -msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "忽略ä½ç½®çš„æ ¼å¼åŒ–字符“%câ€: æ— å‚数被转化" - -#: builtin.c:1338 -msgid "not enough arguments to satisfy format string" -msgstr "相对格å¼æ¥è¯´å‚数个数ä¸è¶³" - -#: builtin.c:1340 -msgid "^ ran out for this one" -msgstr "^ 跑出范围" - -#: builtin.c:1346 -msgid "[s]printf: format specifier does not have control letter" -msgstr "[s]printf: 指定格å¼ä¸å«æŽ§åˆ¶å­—符" - -#: builtin.c:1349 -msgid "too many arguments supplied for format string" -msgstr "相对格å¼æ¥è¯´å‚数个数过多" - -#: builtin.c:1424 builtin.c:1427 -msgid "printf: no arguments" -msgstr "printf: 没有å‚æ•°" - -#: builtin.c:1451 -msgid "sqrt: received non-numeric argument" -msgstr "sqrt: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:1455 -#, c-format -msgid "sqrt: called with negative argument %g" -msgstr "sqrt: 收到负数å‚æ•° %g" - -#: builtin.c:1479 -#, c-format -msgid "substr: start index %g is invalid, using 1" -msgstr "substr: 开始åæ ‡ %g 无效,使用 1" - -#: builtin.c:1484 -#, c-format -msgid "substr: non-integer start index %g will be truncated" -msgstr "substr: éžæ•´æ•°çš„开始åæ ‡ %g 会被截断" - -#: builtin.c:1510 -#, c-format -msgid "substr: length %g is not >= 1" -msgstr "substr: 长度 %g å°äºŽ 1" - -#: builtin.c:1512 -#, c-format -msgid "substr: length %g is not >= 0" -msgstr "substr: 长度 %g å°äºŽ 0" - -#: builtin.c:1519 -#, c-format -msgid "substr: non-integer length %g will be truncated" -msgstr "substr: éžæ•´æ•°çš„长度 %g 会被截断" - -#: builtin.c:1524 -#, c-format -msgid "substr: length %g too big for string indexing, truncating to %g" -msgstr "substr: 长度 %g 作为字符串å标过大,截断至 %g" - -#: builtin.c:1536 -msgid "substr: source string is zero length" -msgstr "substr: æºå­—符串长度为0" - -#: builtin.c:1552 -#, c-format -msgid "substr: start index %g is past end of string" -msgstr "substr: 开始åæ ‡ %g 超出字符串尾部" - -#: builtin.c:1560 -#, c-format -msgid "" -"substr: length %g at start index %g exceeds length of first argument (%lu)" -msgstr "substr: 在开始åæ ‡ %2$g 下长度 %1$g 超出第一个å‚数的长度 (%3$lu)" - -#: builtin.c:1637 -msgid "strftime: received non-string first argument" -msgstr "strftime: 第一个å‚æ•°ä¸æ˜¯å­—符串" - -#: builtin.c:1643 -msgid "strftime: received empty format string" -msgstr "strftime: 收到空格å¼å­—符串" - -#: builtin.c:1652 -msgid "strftime: received non-numeric second argument" -msgstr "strftime: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:1729 -msgid "mktime: received non-string argument" -msgstr "mktime: 收到éžå­—符串å‚æ•°" - -#: builtin.c:1746 -msgid "mktime: at least one of the values is out of the default range" -msgstr "" - -#: builtin.c:1783 -msgid "system: received non-string argument" -msgstr "system: 收到éžå­—符串å‚æ•°" - -#: builtin.c:1904 eval.c:2157 -#, c-format -msgid "reference to uninitialized field `$%d'" -msgstr "引用未åˆå§‹åŒ–的字段“$%dâ€" - -#: builtin.c:2009 -msgid "tolower: received non-string argument" -msgstr "tolower: 收到éžå­—符串å‚æ•°" - -#: builtin.c:2039 -msgid "toupper: received non-string argument" -msgstr "toupper: 收到éžå­—符串å‚æ•°" - -#: builtin.c:2072 -msgid "atan2: received non-numeric first argument" -msgstr "atan2: 第一个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2074 -msgid "atan2: received non-numeric second argument" -msgstr "atan2: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2093 -msgid "sin: received non-numeric argument" -msgstr "sin: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:2109 -msgid "cos: received non-numeric argument" -msgstr "cos: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:2162 -msgid "srand: received non-numeric argument" -msgstr "srand: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:2197 -msgid "match: third argument is not an array" -msgstr "match: 第三个å‚æ•°ä¸æ˜¯æ•°ç»„" - -#: builtin.c:2744 -msgid "gensub: third argument of 0 treated as 1" -msgstr "gensub: 第三个å‚æ•° 0 被当作 1" - -#: builtin.c:2860 -msgid "lshift: received non-numeric first argument" -msgstr "lshift: 第一个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2862 -msgid "lshift: received non-numeric second argument" -msgstr "lshift: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2868 -#, c-format -msgid "lshift(%lf, %lf): negative values will give strange results" -msgstr "lshift(%lf, %lf): 负值会得到奇怪的结果" - -#: builtin.c:2870 -#, c-format -msgid "lshift(%lf, %lf): fractional values will be truncated" -msgstr "lshift(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­" - -#: builtin.c:2872 -#, c-format -msgid "lshift(%lf, %lf): too large shift value will give strange results" -msgstr "lshift(%lf, %lf): 过大的移ä½ä¼šå¾—到奇怪的结果" - -#: builtin.c:2898 -msgid "rshift: received non-numeric first argument" -msgstr "rshift: 第一个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2900 -msgid "rshift: received non-numeric second argument" -msgstr "rshift: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2906 -#, c-format -msgid "rshift(%lf, %lf): negative values will give strange results" -msgstr "rshift(%lf, %lf): 负值会得到奇怪的结果" - -#: builtin.c:2908 -#, c-format -msgid "rshift(%lf, %lf): fractional values will be truncated" -msgstr "rshift(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­" - -#: builtin.c:2910 -#, c-format -msgid "rshift(%lf, %lf): too large shift value will give strange results" -msgstr "rshift(%lf, %lf): 过大的移ä½ä¼šå¾—到奇怪的结果" - -#: builtin.c:2936 -msgid "and: received non-numeric first argument" -msgstr "and: 第一个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2938 -msgid "and: received non-numeric second argument" -msgstr "and: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2944 -#, c-format -msgid "and(%lf, %lf): negative values will give strange results" -msgstr "and(%lf, %lf): 负值会得到奇怪的结果" - -#: builtin.c:2946 -#, c-format -msgid "and(%lf, %lf): fractional values will be truncated" -msgstr "and(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­" - -#: builtin.c:2972 -msgid "or: received non-numeric first argument" -msgstr "or: 第一个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2974 -msgid "or: received non-numeric second argument" -msgstr "or: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:2980 -#, c-format -msgid "or(%lf, %lf): negative values will give strange results" -msgstr "or(%lf, %lf): 负值会得到奇怪的结果" - -#: builtin.c:2982 -#, c-format -msgid "or(%lf, %lf): fractional values will be truncated" -msgstr "or(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­" - -#: builtin.c:3008 -msgid "xor: received non-numeric first argument" -msgstr "xor: 第一个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:3010 -msgid "xor: received non-numeric second argument" -msgstr "xor: 第二个å‚æ•°ä¸æ˜¯æ•°å­—" - -#: builtin.c:3016 -#, c-format -msgid "xor(%lf, %lf): negative values will give strange results" -msgstr "xor(%lf, %lf): 负值会得到奇怪的结果" - -#: builtin.c:3018 -#, c-format -msgid "xor(%lf, %lf): fractional values will be truncated" -msgstr "xor(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­" - -#: builtin.c:3042 -msgid "compl: received non-numeric argument" -msgstr "compl: 收到éžæ•°å­—å‚æ•°" - -#: builtin.c:3048 -#, c-format -msgid "compl(%lf): negative value will give strange results" -msgstr "compl(%lf): 负值会得到奇怪的结果" - -#: builtin.c:3050 -#, c-format -msgid "compl(%lf): fractional value will be truncated" -msgstr "compl(%lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­" - -#: builtin.c:3223 -#, c-format -msgid "dcgettext: `%s' is not a valid locale category" -msgstr "dcgettext: “%sâ€ä¸æ˜¯ä¸€ä¸ªåˆç†çš„本地化目录" - -#: eval.c:372 -#, c-format -msgid "unknown nodetype %d" -msgstr "未知的结点类型 %d" - -#: eval.c:422 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str 时缓冲区溢出" - -#: eval.c:454 eval.c:460 profile.c:785 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "试图在标é‡çŽ¯å¢ƒä¸­ä½¿ç”¨æ•°ç»„“%sâ€" - -#: eval.c:802 -#, c-format -msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" -msgstr "for loop: 数组“%sâ€åœ¨å¾ªçŽ¯æ‰§è¡Œæ—¶å¤§å°ä»Ž %ld 改å˜ä¸º %ld" - -#: eval.c:823 -msgid "`break' outside a loop is not portable" -msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å¯ç§»æ¤çš„" - -#: eval.c:827 -msgid "`break' outside a loop is not allowed" -msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的" - -#: eval.c:844 -msgid "`continue' outside a loop is not portable" -msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å¯ç§»æ¤çš„" - -#: eval.c:848 -msgid "`continue' outside a loop is not allowed" -msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的" - -#: eval.c:882 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "在 BEGIN 规则中ä¸å…许调用“nextâ€" - -#: eval.c:884 -msgid "`next' cannot be called from an END rule" -msgstr "在 END 规则中ä¸å…许调用“nextâ€" - -#: eval.c:893 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "在 BEGIN 规则中ä¸å…许调用“nextfileâ€" - -#: eval.c:895 -msgid "`nextfile' cannot be called from an END rule" -msgstr "在 END 规则中ä¸å…许调用“nextfileâ€" - -#: eval.c:952 -msgid "statement has no effect" -msgstr "表达å¼æ— ä»»ä½•ä½œç”¨" - -#: eval.c:1029 eval.c:2011 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "无法使用函数å“%sâ€ä½œä¸ºå˜é‡æˆ–数组" - -#: eval.c:1036 eval.c:1042 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "引用未åˆå§‹åŒ–çš„å‚数“%sâ€" - -#: eval.c:1051 eval.c:2020 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "引用未åˆå§‹åŒ–çš„å˜é‡â€œ%sâ€" - -#: eval.c:1197 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "concatenation: 一个表达å¼çš„é¢å¤–效应已改å˜å¦ä¸€ä¸ªçš„长度ï¼" - -#: eval.c:1301 -msgid "assignment used in conditional context" -msgstr "在æ¡ä»¶è¡¨è¾¾å¼ä¸­èµ‹å€¼" - -#: eval.c:1379 -msgid "division by zero attempted" -msgstr "试图除0" - -#: eval.c:1409 profile.c:661 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tree_eval 中的éžæ³•ç±»åž‹ (%s)" - -#: eval.c:1572 -msgid "division by zero attempted in `/='" -msgstr "在“/=â€ä¸­è¯•å›¾é™¤0" - -#: eval.c:1594 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "在“%%=â€ä¸­è¯•å›¾é™¤0" - -#: eval.c:1871 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "函数“%sâ€è¢«è°ƒç”¨æ—¶æ供了比声明时更多的å‚æ•°" - -#: eval.c:1916 -#, c-format -msgid "function `%s' not defined" -msgstr "函数“%sâ€æœªå®šä¹‰" - -#: eval.c:1983 -#, c-format -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# 函数调用栈:\n" -"\n" - -#: eval.c:1986 -#, c-format -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:2141 -msgid "attempt to field reference from non-numeric value" -msgstr "试图从éžæ•°å€¼å¼•ç”¨å­—段编å·" - -#: eval.c:2143 -msgid "attempt to reference from null string" -msgstr "试图从空字符串引用" - -#: eval.c:2149 -#, c-format -msgid "attempt to access field %d" -msgstr "试图访问字段 %d" - -#: eval.c:2170 eval.c:2177 profile.c:840 -msgid "assignment is not allowed to result of builtin function" -msgstr "ä¸å…许对内置函数的结果赋值" - -#: eval.c:2241 -msgid "`IGNORECASE' is a gawk extension" -msgstr "“IGNORECASEâ€æ˜¯ gawk 扩展" - -#: eval.c:2270 -msgid "`BINMODE' is a gawk extension" -msgstr "“BINMODEâ€æ˜¯ gawk 扩展" - -#: eval.c:2328 -#, c-format -msgid "BINMODE value `%s' is invalid, treated as 3" -msgstr "BINMODE 值 “%s†éžæ³•ï¼ŒæŒ‰ 3 处ç†" - -#: eval.c:2418 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "错误的“%sFMTâ€å®žçŽ°â€œ%sâ€" - -#: eval.c:2496 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "由于对“LINTâ€èµ‹å€¼æ‰€ä»¥å…³é—­â€œ--lintâ€" - -#: ext.c:62 ext.c:67 -msgid "`extension' is a gawk extension" -msgstr "“extensionâ€æ˜¯ gawk 扩展" - -#: ext.c:77 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: 无法打开 “%sâ€(%s)\n" - -#: ext.c:85 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: 库“%sâ€: 无法调用函数“%sâ€(%s)\n" - -#: ext.c:105 -msgid "extension: missing function name" -msgstr "extension: 缺少函数å" - -#: ext.c:110 -#, c-format -msgid "extension: illegal character `%c' in function name `%s'" -msgstr "extension: 函数å“%2$sâ€ä¸­æœ‰éžæ³•å­—符“%1$câ€" - -#: ext.c:116 -#, c-format -msgid "extension: can't redefine function `%s'" -msgstr "extension: 无法é‡å®šä¹‰å‡½æ•°â€œ%sâ€" - -#: ext.c:120 -#, c-format -msgid "extension: function `%s' already defined" -msgstr "extension: 函数“%sâ€å·²ç»è¢«å®šä¹‰" - -#: ext.c:125 -#, c-format -msgid "extension: can't use gawk built-in `%s' as function name" -msgstr "extension: 无法使用 gawk 内置的 “%s†作为函数å" - -#: ext.c:127 -#, c-format -msgid "extension: function name `%s' previously defined" -msgstr "extension: 函数å“%sâ€å‰é¢å·²è¢«å®šä¹‰" - -#: ext.c:204 -#, c-format -msgid "function `%s' defined to take no more than %d argument(s)" -msgstr "函数“%sâ€è¢«å®šä¹‰ä¸ºæ”¯æŒä¸è¶…过 %d 个å‚æ•°" - -#: ext.c:207 -#, c-format -msgid "function `%s': missing argument #%d" -msgstr "函数“%sâ€: 缺少第 %d 个å‚æ•°" - -#: ext.c:217 -#, c-format -msgid "function `%s': argument #%d: attempt to use scalar as an array" -msgstr "函数“%sâ€: 第 %d 个å‚æ•°: 试图把标é‡å½“作数组使用" - -#: ext.c:221 -#, c-format -msgid "function `%s': argument #%d: attempt to use array as a scalar" -msgstr "函数“%sâ€: 第 %d 个å‚æ•°: 试图把数组当标é‡ä½¿ç”¨" - -#: ext.c:246 -msgid "Operation Not Supported" -msgstr "æ“作ä¸è¢«æ”¯æŒ" - -#: field.c:330 -msgid "NF set to negative value" -msgstr "NF 被设置为负值" - -#: field.c:875 -msgid "split: second argument is not an array" -msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„" - -#: field.c:909 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: 第三个å‚数为空是 gawk 扩展" - -#: field.c:961 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "“FIELDWIDTHSâ€æ˜¯ gawk 扩展" - -#: field.c:991 field.c:1005 -#, c-format -msgid "invalid FIELDWIDTHS value, near `%s'" -msgstr "“%sâ€é™„è¿‘ FIELDWIDTHS 值无效" - -#: field.c:1088 -msgid "null string for `FS' is a gawk extension" -msgstr "把“FSâ€è®¾ä¸ºç©ºå­—符串是 gawk 扩展" - -#: field.c:1092 -msgid "old awk does not support regexps as value of `FS'" -msgstr "è€ awk ä¸æ”¯æŒæŠŠâ€œFSâ€è®¾ç½®ä¸ºæ­£åˆ™è¡¨è¾¾å¼" - -#: getopt.c:574 getopt.c:590 -#, c-format -msgid "%s: option '%s' is ambiguous\n" -msgstr "%s: 选项“%sâ€æœ‰æ­§ä¹‰\n" - -#: getopt.c:623 getopt.c:627 -#, c-format -msgid "%s: option '--%s' doesn't allow an argument\n" -msgstr "%s: 选项“--%sâ€ä¸å…许有å‚æ•°\n" - -#: getopt.c:636 getopt.c:641 -#, c-format -msgid "%s: option '%c%s' doesn't allow an argument\n" -msgstr "%s: 选项“%c%sâ€ä¸å…许有å‚æ•°\n" - -#: getopt.c:684 getopt.c:703 -#, fuzzy, c-format -msgid "%s: option '--%s' requires an argument\n" -msgstr "%s: 选项“%sâ€éœ€è¦ä¸€ä¸ªå‚æ•°\n" - -#: getopt.c:741 getopt.c:744 -#, c-format -msgid "%s: unrecognized option '--%s'\n" -msgstr "%s: 无法识别选项“--%sâ€\n" - -#: getopt.c:752 getopt.c:755 -#, c-format -msgid "%s: unrecognized option '%c%s'\n" -msgstr "%s: 无法识别选项“%c%sâ€\n" - -#: getopt.c:804 getopt.c:807 -#, c-format -msgid "%s: invalid option -- '%c'\n" -msgstr "%s: 无效选项 -- “%câ€\n" - -#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100 -#, c-format -msgid "%s: option requires an argument -- '%c'\n" -msgstr "%s: 选项需è¦ä¸€ä¸ªå‚æ•° -- “%câ€\n" - -#: getopt.c:930 getopt.c:946 -#, c-format -msgid "%s: option '-W %s' is ambiguous\n" -msgstr "%s: 选项“-W %sâ€æœ‰æ­§ä¹‰\n" - -#: getopt.c:970 getopt.c:988 -#, c-format -msgid "%s: option '-W %s' doesn't allow an argument\n" -msgstr "%s: 选项“-W %sâ€ä¸å…许å‚æ•°\n" - -#: getopt.c:1009 getopt.c:1027 -#, fuzzy, c-format -msgid "%s: option '-W %s' requires an argument\n" -msgstr "%s: 选项“%sâ€éœ€è¦ä¸€ä¸ªå‚æ•°\n" - -#: io.c:322 io.c:352 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "无法以读模å¼æ‰“开文件“%sâ€(%s)" - -#: io.c:443 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "å…³é—­æ–‡ä»¶å· %d (“%sâ€)失败(%s)" - -#: io.c:583 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "在 redirect() 中的无效的树类型 %s" - -#: io.c:589 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "“%sâ€é‡å®šå‘中的表达å¼åªæœ‰æ•°å­—值" - -#: io.c:595 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "“%sâ€é‡å®šå‘中的表达å¼æ˜¯ç©ºå­—符串" - -#: io.c:600 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "“%2$sâ€é‡å®šå‘中的文件å“%1$sâ€å¯èƒ½æ˜¯é€»è¾‘表达å¼çš„结果" - -#: io.c:638 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "在文件“%.*sâ€ä¸­ä¸å¿…è¦çš„æ··åˆä½¿ç”¨â€œ>â€å’Œâ€œ>>â€" - -#: io.c:685 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "无法为输出打开管é““%sâ€(%s)" - -#: io.c:694 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "无法为输入打开管é““%sâ€(%s)" - -#: io.c:717 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "无法为输入/输出打开åŒå‘管é““%sâ€(%s)" - -#: io.c:795 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "无法自“%sâ€é‡å®šå‘(%s)" - -#: io.c:798 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "无法é‡å®šå‘到“%sâ€(%s)" - -#: io.c:851 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "打开的文件数达到系统é™åˆ¶: 开始å¤ç”¨æ–‡ä»¶æ述符" - -#: io.c:867 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "关闭“%sâ€å¤±è´¥(%s)。" - -#: io.c:875 -msgid "too many pipes or input files open" -msgstr "打开过多管é“或输入文件" - -#: io.c:898 -msgid "close: second argument must be `to' or `from'" -msgstr "close: 第二个å‚数必须是“toâ€æˆ–“fromâ€" - -#: io.c:912 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: “%.*sâ€ä¸æ˜¯ä¸€ä¸ªå·²æ‰“开文件ã€ç®¡é“或åˆä½œè¿›ç¨‹" - -#: io.c:917 -msgid "close of redirection that was never opened" -msgstr "关闭一个从未被打开的é‡å®šå‘" - -#: io.c:1014 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "close: é‡å®šå‘“%sâ€ä¸æ˜¯ç”¨â€œ|&â€æ‰“开,第二个å‚数被忽略" - -#: io.c:1030 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "关闭管é““%2$sâ€æ—¶å¤±è´¥ï¼Œå¤±è´¥çŠ¶æ€ä¸º(%1$d)(%3$s)" - -#: io.c:1033 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "关闭文件“%2$sâ€æ—¶å¤±è´¥ï¼Œå¤±è´¥çŠ¶æ€ä¸º(%1$d)(%3$s)" - -#: io.c:1053 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "未显å¼å…³é—­ç«¯å£â€œ%sâ€" - -#: io.c:1056 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "未显å¼å…³é—­åˆä½œè¿›ç¨‹â€œ%sâ€" - -#: io.c:1059 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "未显å¼å…³é—­ç®¡é““%sâ€" - -#: io.c:1062 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "未显å¼å…³é—­æ–‡ä»¶â€œ%sâ€" - -#: io.c:1090 io.c:1145 main.c:781 main.c:823 -#, c-format -msgid "error writing standard output (%s)" -msgstr "å‘标准输出写时å‘生错误 (%s)" - -#: io.c:1094 io.c:1150 -#, c-format -msgid "error writing standard error (%s)" -msgstr "å‘标准错误输出写时å‘生错误 (%s)" - -#: io.c:1102 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "刷新管é““%sâ€æ—¶å‡ºé”™(%s)。" - -#: io.c:1105 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "刷新åˆä½œè¿›ç¨‹ç®¡é““%sâ€æ—¶å‡ºé”™(%s)。" - -#: io.c:1108 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "刷新文件“%sâ€æ—¶å‡ºé”™(%s)。" - -#: io.c:1222 -#, c-format -msgid "local port %s invalid in `/inet'" -msgstr "æœ¬åœ°ç«¯å£ %s 在“/inetâ€ä¸­æ— æ•ˆ" - -#: io.c:1239 -#, c-format -msgid "remote host and port information (%s, %s) invalid" -msgstr "远程主机和端å£ä¿¡æ¯ (%s, %s) 无效" - -#: io.c:1274 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw 客户端未准备好,对ä¸èµ·" - -#: io.c:1277 io.c:1313 -msgid "only root may use `/inet/raw'." -msgstr "ä»… root 能使用 “/inet/rawâ€" - -#: io.c:1311 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw æœåŠ¡å™¨æœªå‡†å¤‡å¥½ï¼Œå¯¹ä¸èµ·" - -#: io.c:1409 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "未æ供特殊文件å的“%sâ€çš„访问åè®®" - -#: io.c:1423 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "特殊文件å“%sâ€æ˜¯ä¸å®Œæ•´çš„" - -#: io.c:1438 -msgid "must supply a remote hostname to `/inet'" -msgstr "å¿…é¡»æ供远程主机å给“/inetâ€" - -#: io.c:1456 -msgid "must supply a remote port to `/inet'" -msgstr "å¿…é¡»æ供远程端å£ç»™â€œ/inetâ€" - -#: io.c:1502 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP 通讯ä¸è¢«æ”¯æŒ" - -#: io.c:1511 -#, c-format -msgid "file `%s' is a directory" -msgstr "文件“%sâ€æ˜¯ä¸€ä¸ªç›®å½•" - -#: io.c:1572 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "使用“PROCINFO[\"%s\"]â€è€Œä¸æ˜¯â€œ%sâ€" - -#: io.c:1610 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "使用“PROCINFO[...]â€è€Œä¸æ˜¯â€œ/dev/userâ€" - -#: io.c:1675 io.c:1872 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "无法以模å¼â€œ%2$sâ€æ‰“开“%1$sâ€" - -#: io.c:1923 -#, c-format -msgid "close of master pty failed (%s)" -msgstr "关闭主 pty 失败(%s)" - -#: io.c:1925 io.c:2077 io.c:2228 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "在å­è¿›ç¨‹ä¸­å…³é—­æ ‡å‡†è¾“出失败(%s)" - -#: io.c:1928 -#, c-format -msgid "moving slave pty to stdout in child failed (dup: %s)" -msgstr "在å­è¿›ç¨‹ä¸­å°†ä»Ž pty 改为标准输出失败(dup: %s)" - -#: io.c:1930 io.c:2082 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "在å­è¿›ç¨‹ä¸­å…³é—­æ ‡å‡†è¾“入失败(%s)" - -#: io.c:1933 -#, c-format -msgid "moving slave pty to stdin in child failed (dup: %s)" -msgstr "在å­è¿›ç¨‹ä¸­å°†ä»Ž pty 改为标准输入失败(dup: %s)" - -#: io.c:1935 io.c:1954 -#, c-format -msgid "close of slave pty failed (%s)" -msgstr "关闭从 pty 失败(%s)" - -#: io.c:2028 io.c:2080 io.c:2209 io.c:2231 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "在å­è¿›ç¨‹ä¸­å°†ç®¡é“改为标准输出失败(dup: %s)" - -#: io.c:2032 io.c:2085 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "在å­è¿›ç¨‹ä¸­å°†ç®¡é“改为标准输入失败(dup: %s)" - -#: io.c:2049 io.c:2222 -msgid "restoring stdout in parent process failed\n" -msgstr "在父进程中æ¢å¤æ ‡å‡†è¾“出失败\n" - -#: io.c:2054 -msgid "restoring stdin in parent process failed\n" -msgstr "在父进程中æ¢å¤æ ‡å‡†è¾“入失败\n" - -#: io.c:2088 io.c:2233 io.c:2244 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "关闭管é“失败(%s)" - -#: io.c:2133 -msgid "`|&' not supported" -msgstr "“|&â€ä¸è¢«æ”¯æŒ" - -#: io.c:2199 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "无法打开管é““%sâ€(%s)" - -#: io.c:2240 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "无法为“%sâ€åˆ›å»ºå­è¿›ç¨‹(fork: %s)" - -#: io.c:2622 -#, c-format -msgid "data file `%s' is empty" -msgstr "æ•°æ®æ–‡ä»¶â€œ%sâ€ä¸ºç©º" - -#: io.c:2663 io.c:2671 -msgid "could not allocate more input memory" -msgstr "无法分é…更多的输入内存" - -#: io.c:3039 io.c:3112 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "读å–输入文件“%sâ€æ—¶å‡ºé”™: %s" - -#: io.c:3237 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "“RSâ€è®¾ç½®ä¸ºå¤šå­—符是 gawk 扩展" - -#: main.c:306 -msgid "out of memory" -msgstr "内存ä¸è¶³" - -#: main.c:374 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "“-m[fr]â€é€‰é¡¹åœ¨ gawk 中ä¸ç›¸å…³" - -#: main.c:376 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m 选项用法: “-m[fr] nnnâ€" - -#: main.c:393 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: 选项“-W %sâ€æ— æ³•è¯†åˆ«ï¼Œå¿½ç•¥\n" - -#: main.c:434 -msgid "empty argument to `--source' ignored" -msgstr "“--sourceâ€çš„空å‚数被忽略" - -#: main.c:488 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: 选项需è¦ä¸€ä¸ªå‚æ•° -- %c\n" - -#: main.c:509 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "环境å˜é‡â€œPOSIXLY_CORRECTâ€è¢«è®¾ç½®: 打开“--posixâ€" - -#: main.c:515 -msgid "`--posix' overrides `--traditional'" -msgstr "“--posixâ€è¦†ç›–“--traditionalâ€" - -#: main.c:526 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "“--posixâ€æˆ–“--traditionalâ€è¦†ç›–“--non-decimal-dataâ€" - -#: main.c:530 -#, c-format -msgid "running %s setuid root may be a security problem" -msgstr "以设置 root ID æ–¹å¼è¿è¡Œâ€œ%sâ€å¯èƒ½å­˜åœ¨å®‰å…¨æ¼æ´ž" - -#: main.c:571 -#, c-format -msgid "can't set binary mode on stdin (%s)" -msgstr "无法在标准输入上设置二进制模å¼(%s)" - -#: main.c:574 -#, c-format -msgid "can't set binary mode on stdout (%s)" -msgstr "无法在标准输出上设置二进制模å¼(%s)" - -#: main.c:576 -#, c-format -msgid "can't set binary mode on stderr (%s)" -msgstr "无法在标准错误输出上设置二进制模å¼(%s)" - -#: main.c:617 -msgid "no program text at all!" -msgstr "完全没有程åºæ­£æ–‡ï¼" - -#: main.c:721 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "用法: %s [POSIX 或 GNU 风格选项] -f 脚本文件 [--] 文件 ...\n" - -#: main.c:723 -#, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "用法: %s [POSIX 或 GNU 风格选项] [--] %c程åº%c 文件 ...\n" - -#: main.c:728 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX 选项: \t\tGNU 长选项:\n" - -#: main.c:729 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f 脚本文件\t\t--file=脚本文件\n" - -#: main.c:730 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" - -#: main.c:731 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=val\t\t--assign=var=val\n" - -#: main.c:732 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] val\n" - -#: main.c:733 -msgid "\t-O\t\t\t--optimize\n" -msgstr "\t-O\t\t\t--optimize\n" - -#: main.c:734 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" - -#: main.c:735 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" - -#: main.c:736 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" - -#: main.c:737 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "\t-W dump-variables[=file]\t--dump-variables[=file]\n" - -#: main.c:738 -msgid "\t-W exec=file\t\t--exec=file\n" -msgstr "\t-W exec=file\t\t--exec=file\n" - -#: main.c:739 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "\t-W gen-po\t\t--gen-po\n" - -#: main.c:740 -msgid "\t-W help\t\t\t--help\n" -msgstr "\t-W help\t\t\t--help\n" - -#: main.c:741 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" - -#: main.c:742 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "\t-W lint-old\t\t--lint-old\n" - -#: main.c:743 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "\t-W non-decimal-data\t--non-decimal-data\n" - -#: main.c:745 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "\t-W nostalgia\t\t--nostalgia\n" - -#: main.c:748 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "\t-W parsedebug\t\t--parsedebug\n" - -#: main.c:750 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "\t-W profile[=file]\t--profile[=file]\n" - -#: main.c:751 -msgid "\t-W posix\t\t--posix\n" -msgstr "\t-W posix\t\t--posix\n" - -#: main.c:752 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "\t-W re-interval\t\t--re-interval\n" - -#: main.c:753 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "\t-W source=program-text\t--source=program-text\n" - -#: main.c:754 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "\t-W traditional\t\t--traditional\n" - -#: main.c:755 -msgid "\t-W usage\t\t--usage\n" -msgstr "\t-W usage\t\t--usage\n" - -#: main.c:756 -msgid "\t-W use-lc-numeric\t--use-lc-numeric\n" -msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n" - -#: main.c:757 -msgid "\t-W version\t\t--version\n" -msgstr "\t-W version\t\t--version\n" - -#. TRANSLATORS: --help output 5 (end) -#. TRANSLATORS: the placeholder indicates the bug-reporting address -#. for this application. Please add _another line_ with the -#. address for translation bugs. -#. no-wrap -#: main.c:766 -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" -"æ交错误报告请å‚考“gawk.infoâ€ä¸­çš„“Bugsâ€é¡µï¼Œå®ƒä½äºŽæ‰“å°ç‰ˆæœ¬ä¸­çš„“Reporting\n" -"Problems and Bugsâ€ä¸€èŠ‚\n" -"\n" -"翻译错误请å‘信至 translation-team-zh-cn@lists.sourceforge.net\n" -"\n" - -#: main.c:770 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" -"gawk 是一个模å¼æ‰«æåŠå¤„ç†è¯­è¨€ã€‚缺çœæƒ…况下它从标准输入读入并写至标准输出。\n" -"\n" - -#: main.c:774 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" -msgstr "" -"范例:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" - -#: main.c:794 -#, 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 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" -"版æƒæ‰€æœ‰ © 1989, 1991-%d 自由软件基金会(FSF)。\n" -"\n" -"该程åºä¸ºè‡ªç”±è½¯ä»¶ï¼Œä½ å¯ä»¥åœ¨è‡ªç”±è½¯ä»¶åŸºé‡‘会å‘布的 GNU 通用公共许å¯è¯(GPL)第\n" -"3版或以åŽç‰ˆæœ¬ä¸‹ä¿®æ”¹æˆ–é‡æ–°å‘布。\n" -"\n" - -#: main.c:802 -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 "" -"该程åºä¹‹æ‰€ä»¥è¢«å‘布是因为希望他能对你有所用处,但我们ä¸ä½œä»»ä½•æ‹…ä¿ã€‚这包å«\n" -"但ä¸é™äºŽä»»ä½•å•†ä¸šé€‚售性以åŠé’ˆå¯¹ç‰¹å®šç›®çš„的适用性的担ä¿ã€‚详情å‚è§ GNU 通用公\n" -"共许å¯è¯(GPL)。\n" -"\n" - -#: main.c:813 -msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program. If not, see http://www.gnu.org/licenses/.\n" -msgstr "" -"你应该收到程åºé™„带的一份 GNU 通用公共许å¯è¯(GPL)。如果没有收到,请å‚看 " -"http://www.gnu.org/licenses/ 。\n" - -#: main.c:848 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "在 POSIX awk 中 -Ft ä¸ä¼šå°† FS 设为制表符(tab)" - -#: main.c:1122 -#, c-format -msgid "" -"%s: `%s' argument to `-v' not in `var=value' form\n" -"\n" -msgstr "" -"%s: “-vâ€çš„å‚数“%sâ€ä¸æ˜¯â€œvar=valueâ€å½¢å¼\n" -"\n" - -#: main.c:1142 -#, c-format -msgid "`%s' is not a legal variable name" -msgstr "“%sâ€ä¸æ˜¯ä¸€ä¸ªåˆæ³•çš„å˜é‡å" - -#: main.c:1145 -#, c-format -msgid "`%s' is not a variable name, looking for file `%s=%s'" -msgstr "“%sâ€ä¸æ˜¯ä¸€ä¸ªå˜é‡å,查找文件“%s=%sâ€" - -#: main.c:1184 -msgid "floating point exception" -msgstr "浮点数异常" - -#: main.c:1191 -msgid "fatal error: internal error" -msgstr "致命错误: 内部错误" - -#: main.c:1206 -msgid "fatal error: internal error: segfault" -msgstr "致命错误: 内部错误: 段错误" - -#: main.c:1218 -msgid "fatal error: internal error: stack overflow" -msgstr "致命错误: 内部错误: 栈溢出" - -#: main.c:1268 -#, c-format -msgid "no pre-opened fd %d" -msgstr "文件æ述符 %d 未被打开" - -#: main.c:1275 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "无法为文件æ述符 %d 预打开 /dev/null" - -#: main.c:1298 main.c:1307 -#, c-format -msgid "could not find groups: %s" -msgstr "无法找到组: %s" - -#: msg.c:54 -#, c-format -msgid "cmd. line:" -msgstr "命令行:" - -#: msg.c:120 -msgid "warning: " -msgstr "警告: " - -#: msg.c:142 -msgid "error: " -msgstr "错误: " - -#: msg.c:178 -msgid "fatal: " -msgstr "致命错误: " - -#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151 -msgid "can't convert string to float" -msgstr "无法将字符串转化为浮点数" - -#: node.c:465 -msgid "backslash at end of string" -msgstr "字符串尾部的åæ–œæ " - -#: node.c:609 -#, c-format -msgid "old awk does not support the `\\%c' escape sequence" -msgstr "è€ awk ä¸æ”¯æŒâ€œ\\%câ€è½¬ä¹‰åºåˆ—" - -#: node.c:660 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX ä¸å…许“\\xâ€è½¬ä¹‰ç¬¦" - -#: node.c:666 -msgid "no hex digits in `\\x' escape sequence" -msgstr "“\\xâ€è½¬ä¹‰åºåˆ—中没有å六进制数" - -#: node.c:688 -#, c-format -msgid "" -"hex escape \\x%.*s of %d characters probably not interpreted the way you " -"expect" -msgstr "" - -#: node.c:703 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "转义åºåˆ—“\\%câ€è¢«å½“作å•çº¯çš„“%câ€" - -#: posix/gawkmisc.c:172 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s “%sâ€: 无法设置 close-on-exec: (fcntl: %s)" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "无法以写模å¼æ‰“开“%sâ€: %s" - -#: profile.c:457 -#, c-format -msgid "internal error: %s with null vname" -msgstr "内部错误: %s 带有空的 vname" - -#: profile.c:521 -#, fuzzy -msgid "# treated internally as `delete'" -msgstr "# 内部处ç†ä¸ºâ€œdeleteâ€" - -#: profile.c:1073 -#, c-format -msgid "# this is a dynamically loaded extension function" -msgstr "# 这是一个动æ€åŠ è½½çš„扩展函数" - -#: profile.c:1104 -#, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "\t# gawk é…ç½®, 创建 %s\n" - -#: profile.c:1107 -#, c-format -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" -"\t# BEGIN å—\n" -"\n" - -#: profile.c:1117 -#, c-format -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" -"\t# 规则\n" -"\n" - -#: profile.c:1123 -#, c-format -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" -"\t# END å—\n" -"\n" - -#: profile.c:1143 -#, c-format -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" -msgstr "" -"\n" -"\t# 函数列表,字典åº\n" - -#: profile.c:1405 -#, c-format -msgid "unexpected type %s in prec_level" -msgstr "在 prec_level 中未预期的类型 %s" - -#: profile.c:1527 -#, c-format -msgid "Unknown node type %s in pp_var" -msgstr "pp_var 中的未知的结点类型 %s" - -#: regcomp.c:132 -msgid "Success" -msgstr "æˆåŠŸ" - -#: regcomp.c:135 -msgid "No match" -msgstr "无匹é…" - -#: regcomp.c:138 -msgid "Invalid regular expression" -msgstr "无效的正则表达å¼" - -#: regcomp.c:141 -msgid "Invalid collation character" -msgstr "无效的收集字符" - -#: regcomp.c:144 -msgid "Invalid character class name" -msgstr "无效的字符类型å" - -#: regcomp.c:147 -msgid "Trailing backslash" -msgstr "尾端的åæ–œæ " - -#: regcomp.c:150 -msgid "Invalid back reference" -msgstr "无效的回引用" - -#: regcomp.c:153 -msgid "Unmatched [ or [^" -msgstr "未匹é…çš„ [ 或 [^" - -#: regcomp.c:156 -msgid "Unmatched ( or \\(" -msgstr "未匹é…çš„ ( 或 \\(" - -#: regcomp.c:159 -msgid "Unmatched \\{" -msgstr "未匹é…çš„ \\{" - -#: regcomp.c:162 -msgid "Invalid content of \\{\\}" -msgstr "\\{\\} 中内容无效" - -#: regcomp.c:165 -msgid "Invalid range end" -msgstr "无效的范围结æŸ" - -#: regcomp.c:168 -msgid "Memory exhausted" -msgstr "内存耗尽" - -#: regcomp.c:171 -msgid "Invalid preceding regular expression" -msgstr "无效的å‰ç½®æ­£åˆ™è¡¨è¾¾å¼" - -#: regcomp.c:174 -msgid "Premature end of regular expression" -msgstr "正则表达å¼éžæ­£å¸¸ç»“æŸ" - -#: regcomp.c:177 -msgid "Regular expression too big" -msgstr "正则表达å¼è¿‡å¤§" - -#: regcomp.c:180 -msgid "Unmatched ) or \\)" -msgstr "未匹é…çš„ ) 或 \\)" - -#: regcomp.c:699 -msgid "No previous regular expression" -msgstr "å‰é¢æ²¡æœ‰æ­£åˆ™è¡¨è¾¾å¼" - -#~ msgid "can't open two way socket `%s' for input/output (%s)" -#~ msgstr "无法为输入/输出打开åŒå‘端å£â€œ%sâ€(%s)" diff -Nru gawk-3.1.8+dfsg/posix/ChangeLog gawk-4.0.1+dfsg/posix/ChangeLog --- gawk-3.1.8+dfsg/posix/ChangeLog 2010-05-06 17:56:44.000000000 +0000 +++ gawk-4.0.1+dfsg/posix/ChangeLog 2012-03-28 20:02:21.000000000 +0000 @@ -1,134 +1,9 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Tue Apr 13 22:38:01 2010 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * gawkmisc.c: Remove use of ISxxx in favor of standard names. - -Tue Jul 21 22:28:56 2009 Arnold D. Robbins - - * Release 3.1.7: Release tar file made. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Sun Apr 2 21:43:02 2006 Corinna Vinschen - - * gawkmisc.c (os_setbinmode): Call `setmode' for Cygwin. - (cygwin_premain0, cygwin_premain2): Change type of `myself' - parameter to `void *'. - -Sun Mar 12 22:45:11 2006 Corinna Vinschen - - * gawkmisc.c (cygwin_premain2): New function. - Fixes CR-LF problem with already open stdin. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -Sun May 25 16:23:43 2003 Corinna Vinschen - - * gawkmisc.c (cygwin_premain0): New function. - -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. - -Tue Sep 25 15:19:53 2001 Arnold D. Robbins - - * gawkmisc.c (os_close_on_exec): If fd <= 2, return. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Sun Jan 28 15:50:02 2001 Eli Zaretskii - - * gawkmisc.c (os_restore_mode): New function. - -Sun Dec 3 16:53:37 2000 Arnold D. Robbins - - * gawkmisc.c (os_setbinmode): New function. - -Tue Nov 14 16:13:08 2000 Arnold D. Robbins - - * gawkmisc.c: Remove all includes. Done by ../gawkmisc.c. - -Tue Nov 7 14:09:14 2000 Arnold D. Robbins - - * gawkmisc.c (os_is_setuid): new function. - -Mon Aug 7 15:23:00 2000 Arnold D. Robbins - - * Release 3.0.6: Release tar file made. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * 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. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Wed Jan 10 22:58:55 1996 Arnold D. Robbins - - * ChangeLog created. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/posix/ChangeLog.0 gawk-4.0.1+dfsg/posix/ChangeLog.0 --- gawk-3.1.8+dfsg/posix/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/posix/ChangeLog.0 2011-06-20 17:19:35.000000000 +0000 @@ -0,0 +1,174 @@ +Mon Jun 20 20:19:03 2011 Corinna Vinschen + + * gawkmisc.c: Add include of for Cygwin to + remove a compiler warning. + +Mon May 2 23:38:06 2011 Corinna Vinschen + + * gawkmisc.c (cygwin_premain0): Use the real type for the secondnd + argument. + +Fri Apr 1 11:50:59 2011 Arnold D. Robbins + + * gawkmisc.c (os_iastty): New function. + +Sun Feb 13 20:23:34 2011 Eli Zaretskii + + * gawkmisc.c (files_are_same): Change arguments; call `stat' as + part of the body. + +Tue Feb 1 23:05:51 2011 Corinna Vinschen + + Make values of ctype macros into unsigned char to fix + warnings found on Cygwin / Newlib. + + * gawkmisc.c (optimal_bufsize): Add cast. + +Mon Jan 24 22:21:08 2011 Arnold D. Robbins + + Everything: Move to ANSI headers on the function definitions. + +Mon Jan 24 22:20:43 2011 Corinna Vinschen + + * gawkmisc.c: Update CYGWIN code. + +Wed Nov 24 17:26:24 2010 Arnold D. Robbins + + * gawkmisc.c (os_close_on_exec): After discussion on the Bash + list, change the routine to follow POSIX and use read/modify/write + on the flags value. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Tue Apr 13 22:38:01 2010 Arnold D. Robbins + + * gawkmisc.c: Remove use of ISxxx in favor of standard names. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Sun Apr 2 21:43:02 2006 Corinna Vinschen + + * gawkmisc.c (os_setbinmode): Call `setmode' for Cygwin. + (cygwin_premain0, cygwin_premain2): Change type of `myself' + parameter to `void *'. + +Sun Mar 12 22:45:11 2006 Corinna Vinschen + + * gawkmisc.c (cygwin_premain2): New function. + Fixes CR-LF problem with already open stdin. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +Sun May 25 16:23:43 2003 Corinna Vinschen + + * gawkmisc.c (cygwin_premain0): New function. + +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. + +Tue Sep 25 15:19:53 2001 Arnold D. Robbins + + * gawkmisc.c (os_close_on_exec): If fd <= 2, return. + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +Sun Jan 28 15:50:02 2001 Eli Zaretskii + + * gawkmisc.c (os_restore_mode): New function. + +Sun Dec 3 16:53:37 2000 Arnold D. Robbins + + * gawkmisc.c (os_setbinmode): New function. + +Tue Nov 14 16:13:08 2000 Arnold D. Robbins + + * gawkmisc.c: Remove all includes. Done by ../gawkmisc.c. + +Tue Nov 7 14:09:14 2000 Arnold D. Robbins + + * gawkmisc.c (os_is_setuid): new function. + +Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * 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. + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Wed Jan 10 22:58:55 1996 Arnold D. Robbins + + * ChangeLog created. diff -Nru gawk-3.1.8+dfsg/posix/gawkmisc.c gawk-4.0.1+dfsg/posix/gawkmisc.c --- gawk-3.1.8+dfsg/posix/gawkmisc.c 2010-04-13 19:26:17.000000000 +0000 +++ gawk-4.0.1+dfsg/posix/gawkmisc.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,6 +1,7 @@ /* gawkmisc.c --- miscellaneous gawk routines that are OS specific. - Copyright (C) 1986, 1988, 1989, 1991 - 1998, 2001 - 2004 the Free Software Foundation, Inc. + Copyright (C) 1986, 1988, 1989, 1991 - 1998, 2001 - 2004, 2011 + 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 @@ -16,6 +17,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifdef __CYGWIN__ +#include +#include +#include +#include +#endif + char quote = '\''; char *defpath = DEFPATH; char envsep = ':'; @@ -28,8 +36,7 @@ /* gawk_name --- pull out the "gawk" part from how the OS called us */ char * -gawk_name(filespec) -const char *filespec; +gawk_name(const char *filespec) { char *p; @@ -41,9 +48,7 @@ /* os_arg_fixup --- fixup the command line */ void -os_arg_fixup(argcp, argvp) -int *argcp; -char ***argvp; +os_arg_fixup(int *argcp, char ***argvp) { /* no-op */ return; @@ -52,9 +57,7 @@ /* os_devopen --- open special per-OS devices */ int -os_devopen(name, flag) -const char *name; -int flag; +os_devopen(const char *name, int flag) { /* no-op */ return INVALID_HANDLE; @@ -85,9 +88,7 @@ */ size_t -optimal_bufsize(fd, stb) -int fd; -struct stat *stb; +optimal_bufsize(int fd, struct stat *stb) { char *val; static size_t env_val = 0; @@ -107,8 +108,8 @@ if ((val = getenv("AWKBUFSIZE")) != NULL) { if (strcmp(val, "exact") == 0) exact = TRUE; - else if (isdigit(*val)) { - for (; *val && isdigit(*val); val++) + else if (isdigit((unsigned char) *val)) { + for (; *val && isdigit((unsigned char) *val); val++) env_val = (env_val * 10) + *val - '0'; return env_val; @@ -143,8 +144,7 @@ /* ispath --- return true if path has directory components */ int -ispath(file) -const char *file; +ispath(const char *file) { return (strchr(file, '/') != NULL); } @@ -152,8 +152,7 @@ /* isdirpunct --- return true if char is a directory separator */ int -isdirpunct(c) -int c; +isdirpunct(int c) { return (c == '/'); } @@ -161,15 +160,32 @@ /* os_close_on_exec --- set close on exec flag, print warning if fails */ void -os_close_on_exec(fd, name, what, dir) -int fd; -const char *name, *what, *dir; +os_close_on_exec(int fd, const char *name, const char *what, const char *dir) { + int curflags = 0; + if (fd <= 2) /* sanity */ return; - if (fcntl(fd, F_SETFD, 1) < 0) - warning(_("%s %s `%s': could not set close-on-exec: (fcntl: %s)"), + /* + * Per POSIX, use Read/Modify/Write - get the flags, + * add FD_CLOEXEC, set the flags back. + */ + + if ((curflags = fcntl(fd, F_GETFD)) < 0) { + warning(_("%s %s `%s': could not get fd flags: (fcntl F_GETFD: %s)"), + what, dir, name, strerror(errno)); + return; + } + +#ifndef FD_CLOEXEC +#define FD_CLOEXEC 1 +#endif + + curflags |= FD_CLOEXEC; + + if (fcntl(fd, F_SETFD, curflags) < 0) + warning(_("%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)"), what, dir, name, strerror(errno)); } @@ -180,8 +196,7 @@ #endif int -os_isdir(fd) -int fd; +os_isdir(int fd) { struct stat sbuf; @@ -204,8 +219,7 @@ /* os_setbinmode --- set binary mode on file */ int -os_setbinmode(fd, mode) -int fd, mode; +os_setbinmode(int fd, int mode) { #ifdef __CYGWIN__ setmode (fd, mode); @@ -216,33 +230,47 @@ /* os_restore_mode --- restore the original mode of the console device */ void -os_restore_mode (fd) -int fd; +os_restore_mode(int fd) { /* no-op */ return; } -#ifdef __CYGWIN__ -#include -#include +/* os_isatty --- return true if fd is a tty */ + +int +os_isatty(int fd) +{ + return isatty(fd); +} + +/* files_are_same --- return true if files are identical */ + +int +files_are_same(char *path, SRCFILE *src) +{ + struct stat st; -extern int _fmode; + return (stat(path, & st) == 0 + && st.st_dev == src->sbuf.st_dev + && st.st_ino == src->sbuf.st_ino); +} + +#ifdef __CYGWIN__ void -cygwin_premain0 (int argc, char **argv, void *myself) +cygwin_premain0(int argc, char **argv, struct per_process *myself) { - static struct __cygwin_perfile pf[] = - { - {"", O_RDONLY | O_TEXT}, - /*{"", O_WRONLY | O_BINARY},*/ - {NULL, 0} - }; - cygwin_internal (CW_PERFILE, pf); + static struct __cygwin_perfile pf[] = { + { "", O_RDONLY | O_TEXT }, + /*{ "", O_WRONLY | O_BINARY },*/ + { NULL, 0 } + }; + cygwin_internal(CW_PERFILE, pf); } void -cygwin_premain2 (int argc, char **argv, void *myself) +cygwin_premain2(int argc, char **argv, struct per_process *myself) { - setmode (fileno (stdin), O_TEXT); + setmode(fileno (stdin), O_TEXT); } #endif diff -Nru gawk-3.1.8+dfsg/profile.c gawk-4.0.1+dfsg/profile.c --- gawk-3.1.8+dfsg/profile.c 2010-01-31 20:45:32.000000000 +0000 +++ gawk-4.0.1+dfsg/profile.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,9 +1,9 @@ /* - * profile.c - gawk parse tree pretty-printer with counts + * profile.c - gawk bytecode pretty-printer with counts */ /* - * Copyright (C) 1999-2010 the Free Software Foundation, Inc. + * Copyright (C) 1999-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -25,47 +25,37 @@ #include "awk.h" -/* where to place redirections for getline, print, printf */ -enum redir_placement { - BEFORE = 0, - AFTER = 1 -}; - -#undef tree_eval -static void tree_eval P((NODE *tree)); -static void parenthesize P((NODETYPE parent_type, NODE *tree)); -static void parenthesize_expr 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 *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)); -static void pp_delete P((NODE *tree)); -static void pp_in_array P((NODE *array, NODE *subscript)); -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((const char *str, size_t len, int delim)); -static void pp_concat P((NODE *tree, int level)); -static void pp_var P((NODE *tree)); -static int is_scalar P((NODETYPE type)); -static int prec_level P((NODETYPE type)); +static void pprint(INSTRUCTION *startp, INSTRUCTION *endp, int in_for_header); +static void pp_parenthesize(NODE *n); +static void parenthesize(int type, NODE *left, NODE *right); +static char *pp_list(int nargs, const char *paren, const char *delim); +static char *pp_concat(const char *s1, const char *s2, const char *s3); +static int is_binary(int type); +static int prec_level(int type); +static void pp_push(int type, char *s, int flag); +static NODE *pp_pop(void); +static void pp_free(NODE *n); +const char *redir2str(int redirtype); + +#define pp_str hname +#define pp_len hlength + +#define DONT_FREE 1 +#define CAN_FREE 2 + #ifdef PROFILING -static RETSIGTYPE dump_and_exit P((int signum)) ATTRIBUTE_NORETURN; -static RETSIGTYPE just_dump P((int signum)); +static RETSIGTYPE dump_and_exit(int signum) ATTRIBUTE_NORETURN; +static RETSIGTYPE just_dump(int signum); #endif /* pretty printing related functions and variables */ +static NODE *pp_stack = NULL; static char **fparms; /* function parameter names */ static FILE *prof_fp; /* where to send the profile */ static long indent_level = 0; -static int in_BEGIN_or_END = FALSE; - -static int in_expr = FALSE; #define SPACEOVER 0 @@ -88,7 +78,6 @@ set_prof_file(const char *file) { assert(file != NULL); - prof_fp = fopen(file, "w"); if (prof_fp == NULL) { warning(_("could not open `%s' for writing: %s"), @@ -126,13 +115,13 @@ int i; if (count == 0) - putc('\t', prof_fp); + fprintf(prof_fp, "\t"); else fprintf(prof_fp, "%6ld ", count); assert(indent_level >= 0); for (i = 0; i < indent_level; i++) - putc('\t', prof_fp); + fprintf(prof_fp, "\t"); } /* indent_in --- increase the level, with error checking */ @@ -153,939 +142,798 @@ assert(indent_level >= 0); } -/* - * pprint: - * Tree is a bunch of rules to run. Returns zero if it hit an exit() - * statement - */ static void -pprint(register NODE *volatile tree) +pp_push(int type, char *s, int flag) { - register NODE *volatile t = NULL; /* temporary */ - int volatile traverse = TRUE; /* True => loop thru tree (Node_rule_list) */ - - /* avoid false source indications */ - source = NULL; - sourceline = 0; - - if (tree == NULL) - return; - sourceline = tree->source_line; - source = tree->source_file; - switch (tree->type) { - case Node_rule_node: - traverse = FALSE; /* False => one for-loop iteration only */ - /* FALL THROUGH */ - case Node_rule_list: - for (t = tree; t != NULL; t = t->rnode) { - if (traverse) - tree = t->lnode; - sourceline = tree->source_line; - source = tree->source_file; - - if (! in_BEGIN_or_END) - indent(tree->exec_count); - - if (tree->lnode) { - eval_condition(tree->lnode); - if (tree->rnode) - fprintf(prof_fp, "\t"); - } - - if (tree->rnode) { - if (! in_BEGIN_or_END) { - fprintf(prof_fp, "{"); -#ifdef PROFILING - if (tree->lnode != NULL - && tree->lnode->exec_count) - fprintf(prof_fp, " # %ld", - tree->lnode->exec_count); -#endif - fprintf(prof_fp, "\n"); - } - indent_in(); - pprint(tree->rnode); - indent_out(); - if (! in_BEGIN_or_END) { - indent(SPACEOVER); - fprintf(prof_fp, "}\n"); - } - } - - if (! traverse) /* case Node_rule_node */ - break; /* don't loop */ - - if (t->rnode && ! in_BEGIN_or_END) - fprintf(prof_fp, "\n"); - } - break; - - case Node_statement_list: - for (t = tree; t != NULL; t = t->rnode) { - pprint(t->lnode); - } - break; - - case Node_K_if: - indent(tree->exec_count); - fprintf(prof_fp, "if ("); - in_expr++; - eval_condition(tree->lnode); - in_expr--; - fprintf(prof_fp, ") {"); -#ifdef PROFILING - if (tree->rnode->exec_count) - fprintf(prof_fp, " # %ld", tree->rnode->exec_count); -#endif - fprintf(prof_fp, "\n"); - indent_in(); - pprint(tree->rnode->lnode); - indent_out(); - if (tree->rnode->rnode != NULL) { - if (tree->exec_count - tree->rnode->exec_count > 0) - indent(tree->exec_count - tree->rnode->exec_count); - else - indent(0); - fprintf(prof_fp, "} else {\n"); - indent_in(); - pprint(tree->rnode->rnode); - indent_out(); - } - indent(SPACEOVER); - fprintf(prof_fp, "}\n"); - break; - - case Node_K_switch: - indent(tree->exec_count); - fprintf(prof_fp, "switch ("); - in_expr++; - pprint(tree->lnode); - in_expr--; - fprintf(prof_fp, ") {\n"); - pprint(tree->rnode); - indent(SPACEOVER); - fprintf(prof_fp, "}\n"); - break; - - case Node_switch_body: - pprint(tree->lnode); - break; - - case Node_case_list: - pprint(tree->lnode); - pprint(tree->rnode); - break; - - case Node_K_case: - indent(tree->exec_count); - fprintf(prof_fp, "case "); - in_expr++; - pprint(tree->lnode); - in_expr--; - fprintf(prof_fp, ":\n"); - indent_in(); - pprint(tree->rnode); - indent_out(); - break; - - case Node_K_default: - indent(tree->exec_count); - fprintf(prof_fp, "default:\n"); - indent_in(); - pprint(tree->rnode); - indent_out(); - break; - - case Node_K_while: - indent(tree->exec_count); - fprintf(prof_fp, "while ("); - in_expr++; - eval_condition(tree->lnode); - in_expr--; - fprintf(prof_fp, ") {\n"); - indent_in(); - pprint(tree->rnode); - indent_out(); - indent(SPACEOVER); - fprintf(prof_fp, "}\n"); - break; - - case Node_K_do: - indent(tree->exec_count); - fprintf(prof_fp, "do {\n"); - indent_in(); - pprint(tree->rnode); - indent_out(); - indent(SPACEOVER); - fprintf(prof_fp, "} while ("); - in_expr++; - eval_condition(tree->lnode); - in_expr--; - fprintf(prof_fp, ")\n"); - break; - - case Node_K_for: - indent(tree->exec_count); - fprintf(prof_fp, "for ("); - in_expr++; - pprint(tree->forloop->init); - fprintf(prof_fp, "; "); - eval_condition(tree->forloop->cond); - fprintf(prof_fp, "; "); - pprint(tree->forloop->incr); - fprintf(prof_fp, ") {\n"); - in_expr--; - indent_in(); - pprint(tree->lnode); - indent_out(); - indent(SPACEOVER); - fprintf(prof_fp, "}\n"); - break; - - case Node_K_arrayfor: -#define hakvar forloop->init -#define arrvar forloop->incr - indent(tree->exec_count); - fprintf(prof_fp, "for ("); - in_expr++; - pp_lhs(tree->hakvar); - in_expr--; - fprintf(prof_fp, " in "); - t = tree->arrvar; - if (t->type == Node_param_list) - fprintf(prof_fp, "%s", fparms[t->param_cnt]); - else - fprintf(prof_fp, "%s", t->vname); - fprintf(prof_fp, ") {\n"); - indent_in(); - pprint(tree->lnode); - indent_out(); - indent(SPACEOVER); - fprintf(prof_fp, "}\n"); - break; -#undef hakvar -#undef arrvar - - case Node_K_break: - indent(tree->exec_count); - fprintf(prof_fp, "break\n"); - break; - - case Node_K_continue: - indent(tree->exec_count); - fprintf(prof_fp, "continue\n"); - break; - - case Node_K_print: - case Node_K_print_rec: - pp_print_stmt("print", tree); - break; - - case Node_K_printf: - pp_print_stmt("printf", tree); - break; - - case Node_K_delete: - pp_delete(tree); - break; - - case Node_K_next: - indent(tree->exec_count); - fprintf(prof_fp, "next\n"); - break; - - case Node_K_nextfile: - indent(tree->exec_count); - fprintf(prof_fp, "nextfile\n"); - break; - - case Node_K_exit: - indent(tree->exec_count); - fprintf(prof_fp, "exit"); - if (tree->lnode != NULL) { - fprintf(prof_fp, " "); - tree_eval(tree->lnode); - } - fprintf(prof_fp, "\n"); - break; - - case Node_K_return: - indent(tree->exec_count); - fprintf(prof_fp, "return"); - if (tree->lnode != NULL) { - fprintf(prof_fp, " "); - tree_eval(tree->lnode); - } - fprintf(prof_fp, "\n"); - break; - - default: - /* - * Appears to be an expression statement. - * Throw away the value. - */ - if (in_expr) - tree_eval(tree); - else { - indent(tree->exec_count); - tree_eval(tree); - fprintf(prof_fp, "\n"); - } - break; - } + NODE *n; + getnode(n); + n->pp_str = s; + n->pp_len = strlen(s); + n->flags = flag; + n->type = type; + n->hnext = pp_stack; + pp_stack = n; } -/* tree_eval --- evaluate a subtree */ - -static void -tree_eval(register NODE *tree) +static NODE * +pp_pop() { - if (tree == NULL) - return; - - switch (tree->type) { - case Node_param_list: - fprintf(prof_fp, "%s", fparms[tree->param_cnt]); - return; - - case Node_var_new: - case Node_var: - case Node_var_array: - if (tree->vname != NULL) - fprintf(prof_fp, "%s", tree->vname); - else - fatal(_("internal error: %s with null vname"), - nodetype2str(tree->type)); - return; - - case Node_val: - if ((tree->flags & NUMBER) != 0) - fprintf(prof_fp, "%g", tree->numbr); - else { - if ((tree->flags & INTLSTR) != 0) - fprintf(prof_fp, "_"); - pp_string(tree->stptr, tree->stlen, '"'); - } - return; - - case Node_and: - parenthesize_expr(Node_and, tree->lnode); - fprintf(prof_fp, " && "); - parenthesize_expr(Node_and, tree->rnode); - return; - - case Node_or: - parenthesize_expr(Node_or, tree->lnode); - fprintf(prof_fp, " || "); - parenthesize_expr(Node_or, tree->rnode); - return; - - case Node_not: - fprintf(prof_fp, "! "); - parenthesize(tree->type, tree->lnode); - return; - - /* Builtins */ - case Node_builtin: - pp_builtin(tree); - return; - - case Node_in_array: - in_expr++; - pp_in_array(tree->lnode, tree->rnode); - in_expr--; - return; - - case Node_func_call: - pp_func_call(tree); - return; - - case Node_K_getline: - pp_getline(tree); - return; - - case Node_K_delete_loop: - { - 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 */ - case Node_CONVFMT: - case Node_FIELDWIDTHS: - case Node_FNR: - case Node_FS: - case Node_IGNORECASE: - case Node_LINT: - case Node_NF: - case Node_NR: - case Node_OFMT: - case Node_OFS: - case Node_ORS: - case Node_RS: - case Node_TEXTDOMAIN: - case Node_SUBSEP: - pp_var(tree); - return; - - case Node_field_spec: - case Node_subscript: - pp_lhs(tree); - return; - - case Node_unary_minus: - fprintf(prof_fp, " -"); - if (is_scalar(tree->subnode->type)) - tree_eval(tree->subnode); - else { - fprintf(prof_fp, "("); - tree_eval(tree->subnode); - fprintf(prof_fp, ")"); - } - return; - - case Node_cond_exp: - eval_condition(tree->lnode); - fprintf(prof_fp, " ? "); - tree_eval(tree->rnode->lnode); - fprintf(prof_fp, " : "); - tree_eval(tree->rnode->rnode); - return; - - case Node_match: - case Node_nomatch: - case Node_regex: - case Node_dynregex: - pp_match_op(tree); - return; - - /* assignments */ - case Node_assign: - tree_eval(tree->lnode); - fprintf(prof_fp, " = "); - tree_eval(tree->rnode); - return; - - case Node_assign_concat: - tree_eval(tree->lnode); - fprintf(prof_fp, " = "); - tree_eval(tree->lnode); - fprintf(prof_fp, " "); - tree_eval(tree->rnode); - return; - - case Node_concat: - pp_concat(tree, 0); - return; - - /* other assignment types are easier because they are numeric */ - case Node_preincrement: - case Node_predecrement: - case Node_postincrement: - case Node_postdecrement: - case Node_assign_exp: - case Node_assign_times: - case Node_assign_quotient: - case Node_assign_mod: - case Node_assign_plus: - case Node_assign_minus: - pp_op_assign(tree); - return; - - default: - break; /* handled below */ - } - - /* handle binary ops */ - in_expr++; - parenthesize(tree->type, tree->lnode); - - switch (tree->type) { - case Node_geq: - fprintf(prof_fp, " >= "); - break; - case Node_leq: - fprintf(prof_fp, " <= "); - break; - case Node_greater: - fprintf(prof_fp, " > "); - break; - case Node_less: - fprintf(prof_fp, " < "); - break; - case Node_notequal: - fprintf(prof_fp, " != "); - break; - case Node_equal: - fprintf(prof_fp, " == "); - break; - case Node_exp: - fprintf(prof_fp, " ^ "); - break; - case Node_times: - fprintf(prof_fp, " * "); - break; - case Node_quotient: - fprintf(prof_fp, " / "); - break; - case Node_mod: - fprintf(prof_fp, " %% "); - break; - case Node_plus: - fprintf(prof_fp, " + "); - break; - case Node_minus: - fprintf(prof_fp, " - "); - break; - default: - fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type)); - } - parenthesize(tree->type, tree->rnode); - in_expr--; - - return; + NODE *n; + n = pp_stack; + pp_stack = n->hnext; + return n; } -/* eval_condition --- is TREE true or false */ - static void -eval_condition(register NODE *tree) +pp_free(NODE *n) { - if (tree == NULL) /* Null trees are the easiest kinds */ - return; - - if (tree->type == Node_line_range) { - /* /.../, /.../ */ - eval_condition(tree->condpair->lnode); - fprintf(prof_fp,", "); - eval_condition(tree->condpair->rnode); - return; - } - - /* - * Could just be J.random expression. in which case, null and 0 are - * false, anything else is true - */ - - tree_eval(tree); - return; + if ((n->flags & CAN_FREE) != 0) + efree(n->pp_str); + freenode(n); } -/* pp_op_assign --- do +=, -=, etc. */ +/* + * pprint --- pretty print a program segment + */ static void -pp_op_assign(register NODE *tree) +pprint(INSTRUCTION *startp, INSTRUCTION *endp, int in_for_header) { - const char *op = NULL; - enum Order { - NA = 0, - PRE = 1, - POST = 2 - } order = NA; - - switch(tree->type) { - case Node_preincrement: - op = "++"; - order = PRE; - break; - - case Node_predecrement: - op = "--"; - order = PRE; - break; - - case Node_postincrement: - op = "++"; - order = POST; - break; - - case Node_postdecrement: - op = "--"; - order = POST; - break; - - default: - break; /* handled below */ - } + INSTRUCTION *pc; + NODE *t1; + char *str; + NODE *t2; + INSTRUCTION *ip; + NODE *m; + char *tmp; + int rule; + static int rule_count[MAXRULE]; + + for (pc = startp; pc != endp; pc = pc->nexti) { + if (pc->source_line > 0) + sourceline = pc->source_line; + + switch (pc->opcode) { + case Op_rule: + source = pc->source_file; + rule = pc->in_rule; + + if (rule != Rule) { + if (! rule_count[rule]++) + fprintf(prof_fp, _("\t# %s block(s)\n\n"), ruletab[rule]); + fprintf(prof_fp, "\t%s {\n", ruletab[rule]); + ip = (pc + 1)->firsti; + } else { + if (! rule_count[rule]++) + fprintf(prof_fp, _("\t# Rule(s)\n\n")); + ip = pc->nexti; + indent(ip->exec_count); + if (ip != (pc + 1)->firsti) { /* non-empty pattern */ + pprint(ip->nexti, (pc + 1)->firsti, FALSE); + t1 = pp_pop(); + fprintf(prof_fp, "%s {", t1->pp_str); + pp_free(t1); + ip = (pc + 1)->firsti; +#ifdef PROFILING + if (ip->exec_count > 0) + fprintf(prof_fp, " # %ld", ip->exec_count); +#endif + fprintf(prof_fp, "\n"); + } else { + fprintf(prof_fp, "{\n"); + ip = (pc + 1)->firsti; + } + ip = ip->nexti; + } + indent_in(); + pprint(ip, (pc + 1)->lasti, FALSE); + indent_out(); + fprintf(prof_fp, "\t}\n\n"); + pc = (pc + 1)->lasti; + break; + + case Op_atexit: + break; + + case Op_stop: + memset(rule_count, 0, MAXRULE * sizeof(int)); + break; + + case Op_push_i: + m = pc->memory; + if (m == Nnull_string) /* optional return or exit value; don't print 0 or "" */ + pp_push(pc->opcode, m->stptr, DONT_FREE); + else if ((m->flags & NUMBER) != 0) + pp_push(pc->opcode, pp_number(m->numbr), CAN_FREE); + else { + str = pp_string(m->stptr, m->stlen, '"'); + if ((m->flags & INTLSTR) != 0) { + char *tmp = str; + str = pp_concat("_", tmp, ""); + efree(tmp); + } + pp_push(pc->opcode, str, CAN_FREE); + } + break; - if (order == PRE) { - fprintf(prof_fp, "%s", op); - pp_lhs(tree->lnode); - return; - } else if (order == POST) { - pp_lhs(tree->lnode); - fprintf(prof_fp, "%s", op); - return; - } + case Op_store_var: + case Op_store_sub: + case Op_assign_concat: + case Op_push_lhs: + case Op_push_param: + case Op_push_array: + case Op_push: + case Op_push_arg: + m = pc->memory; + switch (m->type) { + case Node_param_list: + pp_push(pc->opcode, fparms[m->param_cnt], DONT_FREE); + break; + + case Node_var: + case Node_var_new: + case Node_var_array: + if (m->vname != NULL) + pp_push(pc->opcode, m->vname, DONT_FREE); + else + fatal(_("internal error: %s with null vname"), + nodetype2str(m->type)); + break; - /* a binary op */ - pp_lhs(tree->lnode); + default: + cant_happen(); + } - switch(tree->type) { - case Node_assign_exp: - fprintf(prof_fp, " ^= "); - break; - - case Node_assign_times: - fprintf(prof_fp, " *= "); - break; - - case Node_assign_quotient: - fprintf(prof_fp, " /= "); - break; - - case Node_assign_mod: - fprintf(prof_fp, " %%= "); - break; - - case Node_assign_plus: - fprintf(prof_fp, " += "); - break; - - case Node_assign_minus: - fprintf(prof_fp, " -= "); - break; + switch (pc->opcode) { + case Op_store_var: + t2 = pp_pop(); /* l.h.s. */ + t1 = pp_pop(); /* r.h.s. */ + fprintf(prof_fp, "%s%s%s", t2->pp_str, op2str(pc->opcode), t1->pp_str); + goto cleanup; + + case Op_store_sub: + t1 = pp_pop(); /* array */ + tmp = pp_list(pc->expr_count, op2str(Op_subscript), ", "); /*subscript*/ + t2 = pp_pop(); /* r.h.s. */ + fprintf(prof_fp, "%s%s%s%s", t1->pp_str, tmp, + op2str(pc->opcode), t2->pp_str); + efree(tmp); + goto cleanup; + + case Op_assign_concat: + t2 = pp_pop(); /* l.h.s. */ + t1 = pp_pop(); + tmp = pp_concat(t2->pp_str, op2str(Op_concat), t1->pp_str); + fprintf(prof_fp, "%s%s%s", t2->pp_str, op2str(Op_assign), tmp); + efree(tmp); +cleanup: + pp_free(t2); + pp_free(t1); + if (! in_for_header) + fprintf(prof_fp, "\n"); + break; - default: - cant_happen(); - } + default: + break; + } + break; - tree_eval(tree->rnode); -} + case Op_sub_array: + case Op_subscript_lhs: + case Op_subscript: + tmp = pp_list(pc->sub_count, op2str(pc->opcode), ", "); + t1 = pp_pop(); + str = pp_concat(t1->pp_str, tmp, ""); + efree(tmp); + pp_free(t1); + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_and: + case Op_or: + pprint(pc->nexti, pc->target_jmp, in_for_header); + t2 = pp_pop(); + t1 = pp_pop(); + parenthesize(pc->opcode, t1, t2); + str = pp_concat(t1->pp_str, op2str(pc->opcode), t2->pp_str); + pp_free(t1); + pp_free(t2); + pp_push(pc->opcode, str, CAN_FREE); + pc = pc->target_jmp; + break; + + case Op_plus_i: + case Op_minus_i: + case Op_times_i: + case Op_exp_i: + case Op_quotient_i: + case Op_mod_i: + m = pc->memory; + t1 = pp_pop(); + if (prec_level(pc->opcode) > prec_level(t1->type) + && is_binary(t1->type)) /* (a - b) * 1 */ + pp_parenthesize(t1); + if ((m->flags & NUMBER) != 0) + tmp = pp_number(m->numbr); + else + tmp = pp_string(m->stptr, m->stlen, '"'); + str = pp_concat(t1->pp_str, op2str(pc->opcode), tmp); + efree(tmp); + pp_free(t1); + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_plus: + case Op_minus: + case Op_times: + case Op_exp: + case Op_quotient: + case Op_mod: + case Op_equal: + case Op_notequal: + case Op_less: + case Op_greater: + case Op_leq: + case Op_geq: + t2 = pp_pop(); + t1 = pp_pop(); + parenthesize(pc->opcode, t1, t2); + str = pp_concat(t1->pp_str, op2str(pc->opcode), t2->pp_str); + pp_free(t1); + pp_free(t2); + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_preincrement: + case Op_predecrement: + case Op_postincrement: + case Op_postdecrement: + t1 = pp_pop(); + if (pc->opcode == Op_preincrement || pc->opcode == Op_predecrement) + str = pp_concat(op2str(pc->opcode), t1->pp_str, ""); + else + str = pp_concat(t1->pp_str, op2str(pc->opcode), ""); + pp_free(t1); + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_field_spec: + case Op_field_spec_lhs: + case Op_unary_minus: + case Op_not: + t1 = pp_pop(); + if (is_binary(t1->type)) + pp_parenthesize(t1); + + /* optypes table (eval.c) includes space after ! */ + str = pp_concat(op2str(pc->opcode), t1->pp_str, ""); + pp_free(t1); + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_assign: + case Op_assign_plus: + case Op_assign_minus: + case Op_assign_times: + case Op_assign_quotient: + case Op_assign_mod: + case Op_assign_exp: + t2 = pp_pop(); /* l.h.s. */ + t1 = pp_pop(); + str = pp_concat(t2->pp_str, op2str(pc->opcode), t1->pp_str); + pp_free(t2); + pp_free(t1); + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_store_field: + t1 = pp_pop(); /* field num */ + if (is_binary(t1->type)) + pp_parenthesize(t1); + t2 = pp_pop(); /* r.h.s. */ + fprintf(prof_fp, "$%s%s%s", t1->pp_str, op2str(pc->opcode), t2->pp_str); + pp_free(t2); + pp_free(t1); + if (! in_for_header) + fprintf(prof_fp, "\n"); + break; -/* pp_lhs --- print the lhs */ + case Op_concat: + str = pp_list(pc->expr_count, NULL, + (pc->concat_flag & CSUBSEP) ? ", " : op2str(Op_concat)); + pp_push(Op_concat, str, CAN_FREE); + break; + + case Op_K_delete: + { + char *array; + t1 = pp_pop(); + array = t1->pp_str; + if (pc->expr_count > 0) { + char *sub; + sub = pp_list(pc->expr_count, NULL, ", "); + fprintf(prof_fp, "%s %s[%s]", op2str(Op_K_delete), array, sub); + efree(sub); + } else + fprintf(prof_fp, "%s %s", op2str(Op_K_delete), array); + if (! in_for_header) + fprintf(prof_fp, "\n"); + pp_free(t1); + } + break; -static void -pp_lhs(register NODE *ptr) -{ - register NODE *n; + case Op_K_delete_loop: + /* Efficency hack not in effect because of exec_count instruction */ + cant_happen(); + break; + + case Op_in_array: + { + char *array, *sub; + t1 = pp_pop(); + array = t1->pp_str; + if (pc->expr_count > 1) { + sub = pp_list(pc->expr_count, "()", ", "); + str = pp_concat(sub, op2str(Op_in_array), array); + efree(sub); + } else { + t2 = pp_pop(); + sub = t2->pp_str; + str = pp_concat(sub, op2str(Op_in_array), array); + pp_free(t2); + } + pp_free(t1); + pp_push(Op_in_array, str, CAN_FREE); + } + break; - switch (ptr->type) { - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - ptr->vname); - - case Node_var_new: - case Node_var: - fprintf(prof_fp, "%s", ptr->vname); - break; - - case Node_BINMODE: - case Node_CONVFMT: - case Node_FIELDWIDTHS: - case Node_FNR: - case Node_FS: - case Node_IGNORECASE: - case Node_LINT: - case Node_NF: - case Node_NR: - case Node_OFMT: - case Node_OFS: - case Node_ORS: - case Node_RS: - case Node_SUBSEP: - case Node_TEXTDOMAIN: - pp_var(ptr); - break; - - case Node_param_list: - fprintf(prof_fp, "%s", fparms[ptr->param_cnt]); - break; - - case Node_field_spec: - fprintf(prof_fp, "$"); - if (is_scalar(ptr->lnode->type)) - tree_eval(ptr->lnode); - else { - fprintf(prof_fp, "("); - tree_eval(ptr->lnode); - fprintf(prof_fp, ")"); + case Op_var_update: + case Op_var_assign: + case Op_field_assign: + case Op_arrayfor_init: + case Op_arrayfor_incr: + case Op_arrayfor_final: + case Op_newfile: + case Op_get_record: + case Op_lint: + case Op_jmp: + case Op_jmp_false: + case Op_jmp_true: + case Op_no_op: + case Op_and_final: + case Op_or_final: + case Op_cond_pair: + case Op_after_beginfile: + case Op_after_endfile: + break; + + case Op_sub_builtin: + { + const char *fname = "sub"; + if (pc->sub_flags & GSUB) + fname = "gsub"; + else if (pc->sub_flags & GENSUB) + fname = "gensub"; + tmp = pp_list(pc->expr_count, "()", ", "); + str = pp_concat(fname, tmp, ""); + efree(tmp); + pp_push(Op_sub_builtin, str, CAN_FREE); } - break; + break; - case Node_subscript: - n = ptr->lnode; - if (n->type == Node_param_list) { - fprintf(prof_fp, "%s[", fparms[n->param_cnt]); - } else - fprintf(prof_fp, "%s[", n->vname); - if (ptr->rnode->type == Node_expression_list) - pp_list(ptr->rnode); - else - tree_eval(ptr->rnode); - fprintf(prof_fp, "]"); - break; + case Op_builtin: + { + static char *ext_func = "extension_function()"; + const char *fname = getfname(pc->builtin); + if (fname != NULL) { + if (pc->expr_count > 0) { + tmp = pp_list(pc->expr_count, "()", ", "); + str = pp_concat(fname, tmp, ""); + efree(tmp); + } else + str = pp_concat(fname, "()", ""); + pp_push(Op_builtin, str, CAN_FREE); + } else + pp_push(Op_builtin, ext_func, DONT_FREE); + } + break; + + case Op_K_print: + case Op_K_printf: + case Op_K_print_rec: + if (pc->opcode == Op_K_print_rec) + tmp = pp_concat(" ", op2str(Op_field_spec), "0"); + else if (pc->redir_type != 0) + tmp = pp_list(pc->expr_count, "()", ", "); + else { + tmp = pp_list(pc->expr_count, " ", ", "); + tmp[strlen(tmp) - 1] = '\0'; /* remove trailing space */ + } + + if (pc->redir_type != 0) { + t1 = pp_pop(); + if (is_binary(t1->type)) + pp_parenthesize(t1); + fprintf(prof_fp, "%s%s%s%s", op2str(pc->opcode), + tmp, redir2str(pc->redir_type), t1->pp_str); + pp_free(t1); + } else + fprintf(prof_fp, "%s%s", op2str(pc->opcode), tmp); + efree(tmp); + if (! in_for_header) + fprintf(prof_fp, "\n"); + break; - case Node_builtin: - fatal(_("assignment is not allowed to result of builtin function")); + case Op_push_re: + if (pc->memory->type != Node_regex) + break; + /* else + fall through */ + case Op_match_rec: + { + NODE *re = pc->memory->re_exp; + str = pp_string(re->stptr, re->stlen, '/'); + pp_push(pc->opcode, str, CAN_FREE); + } + break; - default: - cant_happen(); - } -} + case Op_nomatch: + case Op_match: + { + char *restr, *txt; + t1 = pp_pop(); + if (is_binary(t1->type)) + pp_parenthesize(t1); + txt = t1->pp_str; + m = pc->memory; + if (m->type == Node_dynregex) { + restr = txt; + t2 = pp_pop(); + if (is_binary(t2->type)) + pp_parenthesize(t2); + txt = t2->pp_str; + str = pp_concat(txt, op2str(pc->opcode), restr); + pp_free(t2); + } else { + NODE *re = m->re_exp; + restr = pp_string(re->stptr, re->stlen, '/'); + str = pp_concat(txt, op2str(pc->opcode), restr); + efree(restr); + } + pp_free(t1); + pp_push(pc->opcode, str, CAN_FREE); + } + break; -/* match_op --- do ~ and !~ */ + case Op_K_getline: + case Op_K_getline_redir: + if (pc->into_var) { + t1 = pp_pop(); + tmp = pp_concat(op2str(Op_K_getline), " ", t1->pp_str); + pp_free(t1); + } else + tmp = pp_concat(op2str(Op_K_getline), "", ""); + + if (pc->redir_type != 0) { + int before = (pc->redir_type == redirect_pipein + || pc->redir_type == redirect_twoway); + + t2 = pp_pop(); + if (is_binary(t2->type)) + pp_parenthesize(t2); + if (before) + str = pp_concat(t2->pp_str, redir2str(pc->redir_type), tmp); + else + str = pp_concat(tmp, redir2str(pc->redir_type), t2->pp_str); + efree(tmp); + pp_free(t2); + } else + str = tmp; + pp_push(pc->opcode, str, CAN_FREE); + break; + + case Op_indirect_func_call: + case Op_func_call: + { + char *fname = pc->func_name; + char *pre; + int pcount; -static void -pp_match_op(register NODE *tree) -{ - register NODE *re; - const char *op; - const char *restr; - size_t relen; - NODE *text = NULL; - - if (tree->type == Node_dynregex) { - tree_eval(tree->re_exp); - return; - } + if (pc->opcode == Op_indirect_func_call) + pre = "@"; + else + pre = ""; + pcount = (pc + 1)->expr_count; + if (pcount > 0) { + tmp = pp_list(pcount, "()", ", "); + str = pp_concat(pre, fname, tmp); + efree(tmp); + } else + str = pp_concat(pre, fname, "()"); + if (pc->opcode == Op_indirect_func_call) { + t1 = pp_pop(); /* indirect var */ + pp_free(t1); + } + pp_push(pc->opcode, str, CAN_FREE); + } + break; - if (tree->type == Node_regex) { - re = tree->re_exp; - restr = re->stptr; - relen = re->stlen; - pp_string(restr, relen, '/'); - return; - } + case Op_K_continue: + case Op_K_break: + case Op_K_nextfile: + case Op_K_next: + fprintf(prof_fp, "%s\n", op2str(pc->opcode)); + break; + + case Op_K_return: + case Op_K_exit: + t1 = pp_pop(); + if (is_binary(t1->type)) + pp_parenthesize(t1); + if (pc->source_line > 0) /* don't print implicit 'return' at end of function */ + fprintf(prof_fp, "%s %s\n", op2str(pc->opcode), t1->pp_str); + pp_free(t1); + break; + + case Op_pop: + t1 = pp_pop(); + fprintf(prof_fp, "%s", t1->pp_str); + if (! in_for_header) + fprintf(prof_fp, "\n"); + pp_free(t1); + break; - /* at this point, have either ~ or !~ */ + case Op_line_range: + ip = pc + 1; + pprint(pc->nexti, ip->condpair_left, FALSE); + pprint(ip->condpair_left->nexti, ip->condpair_right, FALSE); + t2 = pp_pop(); + t1 = pp_pop(); + str = pp_concat(t1->pp_str, ", ", t2->pp_str); + pp_free(t1); + pp_free(t2); + pp_push(Op_line_range, str, CAN_FREE); + pc = ip->condpair_right; + break; + + case Op_K_while: + ip = pc + 1; + indent(ip->while_body->exec_count); + fprintf(prof_fp, "%s (", op2str(pc->opcode)); + pprint(pc->nexti, ip->while_body, FALSE); + t1 = pp_pop(); + fprintf(prof_fp, "%s) {\n", t1->pp_str); + pp_free(t1); + indent_in(); + pprint(ip->while_body->nexti, pc->target_break, FALSE); + indent_out(); + indent(SPACEOVER); + fprintf(prof_fp, "}\n"); + pc = pc->target_break; + break; + + case Op_K_do: + ip = pc + 1; + indent(pc->nexti->exec_count); + fprintf(prof_fp, "%s {\n", op2str(pc->opcode)); + indent_in(); + pprint(pc->nexti->nexti, ip->doloop_cond, FALSE); + indent_out(); + pprint(ip->doloop_cond, pc->target_break, FALSE); + indent(SPACEOVER); + t1 = pp_pop(); + fprintf(prof_fp, "} %s (%s)\n", op2str(Op_K_while), t1->pp_str); + pp_free(t1); + pc = pc->target_break; + break; + + case Op_K_for: + ip = pc + 1; + indent(ip->forloop_body->exec_count); + fprintf(prof_fp, "%s (", op2str(pc->opcode)); + pprint(pc->nexti, ip->forloop_cond, TRUE); + fprintf(prof_fp, "; "); + + if (ip->forloop_cond->opcode == Op_no_op && + ip->forloop_cond->nexti == ip->forloop_body) + fprintf(prof_fp, "; "); + else { + pprint(ip->forloop_cond, ip->forloop_body, TRUE); + t1 = pp_pop(); + fprintf(prof_fp, "%s; ", t1->pp_str); + pp_free(t1); + } - text = tree->lnode; - re = tree->rnode; + pprint(pc->target_continue, pc->target_break, TRUE); + fprintf(prof_fp, ") {\n"); + indent_in(); + pprint(ip->forloop_body->nexti, pc->target_continue, FALSE); + indent_out(); + indent(SPACEOVER); + fprintf(prof_fp, "}\n"); + pc = pc->target_break; + break; + + case Op_K_arrayfor: + { + char *array, *item; + + ip = pc + 1; + t1 = pp_pop(); + array = t1->pp_str; + m = ip->forloop_cond->array_var; + if (m->type == Node_param_list) + item = fparms[m->param_cnt]; + else + item = m->vname; + indent(ip->forloop_body->exec_count); + fprintf(prof_fp, "%s (%s%s%s) {\n", op2str(Op_K_arrayfor), + item, op2str(Op_in_array), array); + indent_in(); + pp_free(t1); + pprint(ip->forloop_body->nexti, pc->target_break, FALSE); + indent_out(); + indent(SPACEOVER); + fprintf(prof_fp, "}\n"); + pc = pc->target_break; + } + break; - if (tree->type == Node_nomatch) - op = "!~"; - else if (tree->type == Node_match) - op = "~"; - else - op = ""; + case Op_K_switch: + ip = pc + 1; + fprintf(prof_fp, "%s (", op2str(pc->opcode)); + pprint(pc->nexti, ip->switch_start, FALSE); + t1 = pp_pop(); + fprintf(prof_fp, "%s) {\n", t1->pp_str); + pp_free(t1); + pprint(ip->switch_start, ip->switch_end, FALSE); + indent(SPACEOVER); + fprintf(prof_fp, "}\n"); + pc = pc->target_break; + break; + + case Op_K_case: + case Op_K_default: + indent(pc->stmt_start->exec_count); + if (pc->opcode == Op_K_case) { + t1 = pp_pop(); + fprintf(prof_fp, "%s %s:\n", op2str(pc->opcode), t1->pp_str); + pp_free(t1); + } else + fprintf(prof_fp, "%s:\n", op2str(pc->opcode)); + indent_in(); + pprint(pc->stmt_start->nexti, pc->stmt_end->nexti, FALSE); + indent_out(); + break; - tree_eval(text); - fprintf(prof_fp, " %s ", op); - tree_eval(re); -} + case Op_K_if: + fprintf(prof_fp, "%s (", op2str(pc->opcode)); + pprint(pc->nexti, pc->branch_if, FALSE); + t1 = pp_pop(); + fprintf(prof_fp, "%s) {", t1->pp_str); + pp_free(t1); + + ip = pc->branch_if; + if (ip->exec_count > 0) + fprintf(prof_fp, " # %ld", ip->exec_count); + fprintf(prof_fp, "\n"); + indent_in(); + pprint(ip->nexti, pc->branch_else, FALSE); + indent_out(); + pc = pc->branch_else; + if (pc->nexti->opcode == Op_no_op) { + indent(SPACEOVER); + fprintf(prof_fp, "}\n"); + } + break; -/* pp_redir --- print a redirection */ + case Op_K_else: + fprintf(prof_fp, "} %s {\n", op2str(pc->opcode)); + indent_in(); + pprint(pc->nexti, pc->branch_end, FALSE); + indent_out(); + indent(SPACEOVER); + fprintf(prof_fp, "}\n"); + pc = pc->branch_end; + break; + + case Op_cond_exp: + { + NODE *f, *t, *cond; + size_t len; + + pprint(pc->nexti, pc->branch_if, FALSE); + ip = pc->branch_if; + pprint(ip->nexti, pc->branch_else, FALSE); + ip = pc->branch_else->nexti; + + pc = ip->nexti; + assert(pc->opcode == Op_cond_exp); + pprint(pc->nexti, pc->branch_end, FALSE); + + f = pp_pop(); + t = pp_pop(); + cond = pp_pop(); + + len = f->pp_len + t->pp_len + cond->pp_len + 12; + emalloc(str, char *, len, "pprint"); + sprintf(str, "(%s ? %s : %s)", cond->pp_str, t->pp_str, f->pp_str); + + pp_free(cond); + pp_free(t); + pp_free(f); + pp_push(Op_cond_exp, str, CAN_FREE); + pc = pc->branch_end; + } + break; -static void -pp_redir(register NODE *tree, enum redir_placement dir) -{ - const char *op = "[BOGUS]"; /* should never be seen */ + case Op_exec_count: + if (! in_for_header) + indent(pc->exec_count); + break; - if (tree == NULL) - return; + default: + cant_happen(); + } - switch (tree->type) { - case Node_redirect_output: - op = ">"; - break; - case Node_redirect_append: - op = ">>"; - break; - case Node_redirect_pipe: - op = "|"; - break; - case Node_redirect_pipein: - op = "|"; - break; - case Node_redirect_input: - op = "<"; - break; - case Node_redirect_twoway: - op = "|&"; - break; - default: - cant_happen(); - } - - if (dir == BEFORE) { - if (! is_scalar(tree->subnode->type)) { - fprintf(prof_fp, "("); - tree_eval(tree->subnode); - fprintf(prof_fp, ")"); - } else - tree_eval(tree->subnode); - fprintf(prof_fp, " %s ", op); - } else { - fprintf(prof_fp, " %s ", op); - if (! is_scalar(tree->subnode->type)) { - fprintf(prof_fp, "("); - tree_eval(tree->subnode); - fprintf(prof_fp, ")"); - } else - tree_eval(tree->subnode); + if (pc == endp) + break; } } -/* pp_list --- dump a list of arguments, without parens */ - -static void -pp_list(register NODE *tree) -{ - for (; tree != NULL; tree = tree->rnode) { - if (tree->type != Node_expression_list) { - fprintf(stderr, "pp_list: got %s\n", - nodetype2str(tree->type)); - fflush(stderr); - } - assert(tree->type == Node_expression_list); - tree_eval(tree->lnode); - if (tree->rnode != NULL) - fprintf(prof_fp, ", "); - } -} +/* pp_string_fp --- printy print a string to the fp */ -/* pp_print_stmt --- print a "print" or "printf" statement */ +/* + * This routine concentrates string pretty printing in one place, + * so that it can be called from multiple places within gawk. + */ -static void -pp_print_stmt(const char *command, register NODE *tree) +void +pp_string_fp(Func_print print_func, FILE *fp, const char *in_str, + size_t len, int delim, int breaklines) { - NODE *redir = tree->rnode; + char *s = pp_string(in_str, len, delim); + int count; + size_t slen; + const char *str = (const char *) s; +#define BREAKPOINT 70 /* arbitrary */ - indent(tree->exec_count); - fprintf(prof_fp, "%s", command); - 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, ")"); + slen = strlen(str); + for (count = 0; slen > 0; slen--, str++) { + if (++count >= BREAKPOINT && breaklines) { + print_func(fp, "%c\n%c", delim, delim); + count = 0; } else - fprintf(prof_fp, " $0"); - pp_redir(redir, AFTER); - } else { - fprintf(prof_fp, " "); - if (tree->lnode != NULL) - pp_list(tree->lnode); - else - fprintf(prof_fp, "$0"); - } - fprintf(prof_fp, "\n"); -} - -/* pp_delete --- print a "delete" statement */ - -static void -pp_delete(register NODE *tree) -{ - NODE *array, *subscript; - - array = tree->lnode; - subscript = tree->rnode; - indent(tree->exec_count); - if (array->type == Node_param_list) - fprintf(prof_fp, "delete %s", fparms[array->param_cnt]); - else - fprintf(prof_fp, "delete %s", array->vname); - if (subscript != NULL) { - fprintf(prof_fp, "["); - pp_list(subscript); - fprintf(prof_fp, "]"); + print_func(fp, "%c", *str); } - fprintf(prof_fp, "\n"); -} - -/* pp_in_array --- pretty print "foo in array" test */ - -static void -pp_in_array(NODE *array, NODE *subscript) -{ - if (subscript->type == Node_expression_list) { - fprintf(prof_fp, "("); - pp_list(subscript); - fprintf(prof_fp, ")"); - } else - pprint(subscript); - - if (array->type == Node_param_list) - fprintf(prof_fp, " in %s", fparms[array->param_cnt]); - else - fprintf(prof_fp, " in %s", array->vname); + efree(s); } -/* pp_getline --- print a getline statement */ +#ifdef PROFILING +/* just_dump --- dump the profile and function stack and keep going */ -static void -pp_getline(register NODE *tree) +static RETSIGTYPE +just_dump(int signum) { - NODE *redir = tree->rnode; - int before, after; - - /* - * command | getline - * or - * command |& getline - * or - * getline < file - */ - if (redir != NULL) { - before = (redir->type == Node_redirect_pipein - || redir->type == Node_redirect_twoway); - after = ! before; - } else - before = after = FALSE; - - if (before) - pp_redir(redir, BEFORE); - - fprintf(prof_fp, "getline"); - if (tree->lnode != NULL) { /* optional var */ - fprintf(prof_fp, " "); - pp_lhs(tree->lnode); - } + extern INSTRUCTION *code_block; - if (after) - pp_redir(redir, AFTER); + dump_prog(code_block); + dump_funcs(); + dump_fcall_stack(prof_fp); + fflush(prof_fp); + signal(signum, just_dump); /* for OLD Unix systems ... */ } -/* pp_builtin --- print a builtin function */ +/* dump_and_exit --- dump the profile, the function stack, and exit */ -static void -pp_builtin(register NODE *tree) +static RETSIGTYPE +dump_and_exit(int signum) { - const char *func = getfname(tree->builtin); - - if (func != NULL) { - fprintf(prof_fp, "%s(", func); - pp_list(tree->subnode); - fprintf(prof_fp, ")"); - } else - fprintf(prof_fp, _("# this is a dynamically loaded extension function")); + just_dump(signum); + exit(EXIT_FAILURE); } -/* pp_func_call --- print a function call */ - -static void -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, ")"); -} +#endif /* dump_prog --- dump the program */ @@ -1095,461 +943,432 @@ */ void -dump_prog(NODE *begin, NODE *prog, NODE *end) +dump_prog(INSTRUCTION *code) { time_t now; (void) time(& now); /* \n on purpose, with \n in ctime() output */ fprintf(prof_fp, _("\t# gawk profile, created %s\n"), ctime(& now)); - - if (begin != NULL) { - fprintf(prof_fp, _("\t# BEGIN block(s)\n\n")); - fprintf(prof_fp, "\tBEGIN {\n"); - in_BEGIN_or_END = TRUE; - pprint(begin); - in_BEGIN_or_END = FALSE; - fprintf(prof_fp, "\t}\n"); - if (prog != NULL || end != NULL) - fprintf(prof_fp, "\n"); - } - if (prog != NULL) { - fprintf(prof_fp, _("\t# Rule(s)\n\n")); - pprint(prog); - if (end != NULL) - fprintf(prof_fp, "\n"); - } - if (end != NULL) { - fprintf(prof_fp, _("\t# END block(s)\n\n")); - fprintf(prof_fp, "\tEND {\n"); - in_BEGIN_or_END = TRUE; - pprint(end); - in_BEGIN_or_END = FALSE; - fprintf(prof_fp, "\t}\n"); - } -} - -/* pp_func --- pretty print a function */ - -void -pp_func(const char *name, size_t namelen, NODE *f) -{ - int j; - char **pnames; - static int first = TRUE; - - if (first) { - first = FALSE; - fprintf(prof_fp, _("\n\t# Functions, listed alphabetically\n")); - } - - fprintf(prof_fp, "\n"); - indent(f->exec_count); - fprintf(prof_fp, "function %.*s(", (int) namelen, name); - pnames = f->parmlist; - fparms = pnames; - for (j = 0; j < f->lnode->param_cnt; j++) { - fprintf(prof_fp, "%s", pnames[j]); - if (j < f->lnode->param_cnt - 1) - fprintf(prof_fp, ", "); - } - fprintf(prof_fp, ")\n\t{\n"); - indent_in(); - pprint(f->rnode); /* body */ - indent_out(); - fprintf(prof_fp, "\t}\n"); -} - -/* - * pp_concat --- print string concatenations - * - * Multiple string concatenations grow downwards to the left. - * This routine attempts to print multiple concatenations with - * the minimal amount of parentheses. - */ - -static void -pp_concat(NODE *tree, int level) -{ - static int left_printed = FALSE; - - if (tree->lnode->type == Node_concat) - pp_concat(tree->lnode, level + 1); /* recurse down one level */ - else if (tree->lnode == Nnull_string) { - tree_eval(tree->rnode); - return; - } else { - fprintf(prof_fp, "("); /* outermost left paren */ - left_printed = TRUE; - - if (is_scalar(tree->lnode->type)) - tree_eval(tree->lnode); - else { - fprintf(prof_fp, "("); - tree_eval(tree->lnode); - fprintf(prof_fp, ")"); - } - } - - fprintf(prof_fp, " "); - - if (is_scalar(tree->rnode->type)) - tree_eval(tree->rnode); - else { - fprintf(prof_fp, "("); - tree_eval(tree->rnode); - fprintf(prof_fp, ")"); - } - - if (level == 0 && left_printed) { - fprintf(prof_fp, ")"); /* outermost right paren */ - left_printed = FALSE; - } -} - -/* pp_string --- pretty print a string or regex constant */ - -static void -pp_string(const char *str, size_t len, int delim) -{ - pp_string_fp(prof_fp, str, len, delim, FALSE); -} - -/* pp_string_fp --- printy print a string to the fp */ - -/* - * This routine concentrates string pretty printing in one place, - * so that it can be called from multiple places within gawk. - */ - -void -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\\"; - char *cp; - int i; - int count; -#define BREAKPOINT 70 /* arbitrary */ - const unsigned char *str = (const unsigned char *) in_str; - - fprintf(fp, "%c", delim); - for (count = 0; len > 0; len--, str++) { - if (++count >= BREAKPOINT && breaklines) { - fprintf(fp, "%c\n%c", delim, delim); - count = 0; - } - if (*str == delim) { - fprintf(fp, "\\%c", delim); - count++; - } else if (*str == BELL) { - fprintf(fp, "\\a"); - count++; - } else if ((cp = strchr(escapes, *str)) != NULL) { - i = cp - escapes; - putc('\\', fp); - count++; - putc(printables[i], fp); - if (breaklines && *str == '\n' && delim == '"') { - fprintf(fp, "\"\n\""); - count = 0; - } - /* NB: Deliberate use of lower-case versions. */ - } else if (isascii(*str) && isprint(*str)) { - putc(*str, fp); - } else { - char buf[10]; - - /* print 'em as they came if for whiny users */ - if (whiny_users) - sprintf(buf, "%c", *str & 0xff); - else - sprintf(buf, "\\%03o", *str & 0xff); - count += strlen(buf) - 1; - fprintf(fp, "%s", buf); - } - } - fprintf(fp, "%c", delim); -} - -/* is_scalar --- true or false if we'll get a scalar value */ - -static int -is_scalar(NODETYPE type) -{ - switch (type) { - case Node_var_new: - case Node_var: - case Node_var_array: - case Node_val: - case Node_BINMODE: - case Node_CONVFMT: - case Node_FIELDWIDTHS: - case Node_FNR: - case Node_FS: - case Node_IGNORECASE: - case Node_LINT: - case Node_NF: - case Node_NR: - case Node_OFMT: - case Node_OFS: - case Node_ORS: - case Node_RS: - case Node_SUBSEP: - case Node_TEXTDOMAIN: - case Node_subscript: - case Node_func_call: - return TRUE; - default: - return FALSE; - } + pprint(code, NULL, FALSE); } /* prec_level --- return the precedence of an operator, for paren tests */ static int -prec_level(NODETYPE type) +prec_level(int type) { switch (type) { - case Node_var_new: - case Node_var: - case Node_var_array: - case Node_param_list: - case Node_subscript: - case Node_func_call: - case Node_K_delete_loop: - case Node_val: - case Node_builtin: - case Node_BINMODE: - case Node_CONVFMT: - case Node_FIELDWIDTHS: - case Node_FNR: - case Node_FS: - case Node_IGNORECASE: - case Node_LINT: - case Node_NF: - case Node_NR: - case Node_OFMT: - case Node_OFS: - case Node_ORS: - case Node_RS: - case Node_SUBSEP: - case Node_TEXTDOMAIN: - case Node_regex: + case Op_push_lhs: + case Op_push_param: + case Op_push_array: + case Op_push: + case Op_push_i: + case Op_push_re: + case Op_match_rec: + case Op_subscript: + case Op_subscript_lhs: + case Op_func_call: + case Op_K_delete_loop: + case Op_builtin: return 15; - case Node_field_spec: + case Op_field_spec: + case Op_field_spec_lhs: return 14; - case Node_exp: + case Op_exp: + case Op_exp_i: return 13; - case Node_preincrement: - case Node_predecrement: - case Node_postincrement: - case Node_postdecrement: + case Op_preincrement: + case Op_predecrement: + case Op_postincrement: + case Op_postdecrement: return 12; - case Node_unary_minus: - case Node_not: + case Op_unary_minus: + case Op_not: return 11; - case Node_times: - case Node_quotient: - case Node_mod: + case Op_times: + case Op_times_i: + case Op_quotient: + case Op_quotient_i: + case Op_mod: + case Op_mod_i: return 10; - case Node_plus: - case Node_minus: + case Op_plus: + case Op_plus_i: + case Op_minus: + case Op_minus_i: return 9; - case Node_concat: + case Op_concat: + case Op_assign_concat: return 8; - case Node_equal: - case Node_notequal: - case Node_greater: - case Node_leq: - case Node_geq: - case Node_match: - case Node_nomatch: + case Op_equal: + case Op_notequal: + case Op_greater: + case Op_leq: + case Op_geq: + case Op_match: + case Op_nomatch: return 7; - case Node_K_getline: + case Op_K_getline: + case Op_K_getline_redir: return 6; - case Node_less: - case Node_in_array: + case Op_less: return 5; - case Node_and: + case Op_in_array: + return 5; + + case Op_and: return 4; - case Node_or: + case Op_or: return 3; - case Node_cond_exp: + case Op_cond_exp: return 2; - case Node_assign: - case Node_assign_times: - case Node_assign_quotient: - case Node_assign_mod: - case Node_assign_plus: - case Node_assign_minus: - case Node_assign_exp: - case Node_assign_concat: + case Op_assign: + case Op_assign_times: + case Op_assign_quotient: + case Op_assign_mod: + case Op_assign_plus: + case Op_assign_minus: + case Op_assign_exp: return 1; default: - fatal(_("unexpected type %s in prec_level"), nodetype2str(type)); - return 0; /* keep the compiler happy */ + return 0; + } +} + +static int +is_binary(int type) +{ + switch (type) { + case Op_geq: + case Op_leq: + case Op_greater: + case Op_less: + case Op_notequal: + case Op_equal: + case Op_exp: + case Op_times: + case Op_quotient: + case Op_mod: + case Op_plus: + case Op_minus: + case Op_exp_i: + case Op_times_i: + case Op_quotient_i: + case Op_mod_i: + case Op_plus_i: + case Op_minus_i: + case Op_concat: + case Op_assign_concat: + case Op_match: + case Op_nomatch: + case Op_assign: + case Op_assign_times: + case Op_assign_quotient: + case Op_assign_mod: + case Op_assign_plus: + case Op_assign_minus: + case Op_assign_exp: + case Op_cond_exp: + case Op_and: + case Op_or: + case Op_in_array: + case Op_K_getline_redir: /* sometimes */ + case Op_K_getline: + return TRUE; + + default: + return FALSE; } } -/* parenthesize --- print a subtree in parentheses if need be */ +/* parenthesize --- parenthesize an expression in stack */ static void -parenthesize(NODETYPE parent_type, NODE *tree) +pp_parenthesize(NODE *sp) { - NODETYPE child_type; + char *p = sp->pp_str; + size_t len = sp->pp_len; - if (tree == NULL) - return; + emalloc(p, char *, len + 3, "pp_parenthesize"); + *p = '('; + memcpy(p + 1, sp->pp_str, len); + p[len + 1] = ')'; + p[len + 2] = '\0'; + if ((sp->flags & CAN_FREE) != 0) + efree(sp->pp_str); + sp->pp_str = p; + sp->pp_len += 2; + sp->flags |= CAN_FREE; +} - child_type = tree->type; +static void +parenthesize(int type, NODE *left, NODE *right) +{ + int rprec = prec_level(right->type); + int lprec = prec_level(left->type); + int prec = prec_level(type); - in_expr++; - /* first the special cases, then the general ones */ - if (parent_type == Node_not && child_type == Node_in_array) { - fprintf(prof_fp, "("); - pp_in_array(tree->lnode, tree->rnode); - fprintf(prof_fp, ")"); - /* other special cases here, as needed */ - } else if (prec_level(child_type) < prec_level(parent_type)) { - fprintf(prof_fp, "("); - tree_eval(tree); - fprintf(prof_fp, ")"); - } else - tree_eval(tree); - in_expr--; + if (prec > lprec) { + if (is_binary(left->type)) /* (a - b) * c */ + pp_parenthesize(left); + if (prec >= rprec && is_binary(right->type)) /* (a - b) * (c - d) */ + pp_parenthesize(right); + } else { + if (prec >= rprec && is_binary(right->type)) /* a - b - (c - d) */ + pp_parenthesize(right); + } } -/* parenthesize_expr --- print an expression subtree in parentheses if need be */ +/* pp_string --- pretty format a string or regex constant */ -static void -parenthesize_expr(NODETYPE parent_type, NODE *tree) +char * +pp_string(const char *in_str, size_t len, int delim) { - NODETYPE child_type; + static char str_escapes[] = "\a\b\f\n\r\t\v\\"; + static char str_printables[] = "abfnrtv\\"; + static char re_escapes[] = "\a\b\f\n\r\t\v"; + static char re_printables[] = "abfnrtv"; + char *escapes; + char *printables; + char *cp; + int i; + const unsigned char *str = (const unsigned char *) in_str; + size_t ofre, osiz; + char *obuf, *obufout; - if (tree == NULL) - return; + assert(delim == '"' || delim == '/'); - child_type = tree->type; + if (delim == '/') { + escapes = re_escapes; + printables = re_printables; + } else { + escapes = str_escapes; + printables = str_printables; + } - in_expr++; - if (prec_level(child_type) < prec_level(parent_type)) { - fprintf(prof_fp, "("); - eval_condition(tree); - fprintf(prof_fp, ")"); - } else - eval_condition(tree); - in_expr--; +/* make space for something l big in the buffer */ +#define chksize(l) if ((l) > ofre) { \ + long olen = obufout - obuf; \ + erealloc(obuf, char *, osiz * 2, "pp_string"); \ + obufout = obuf + olen; \ + ofre += osiz; \ + osiz *= 2; \ +} ofre -= (l) + + osiz = len + 3 + 2; /* initial size; 3 for delim + terminating null */ + emalloc(obuf, char *, osiz, "pp_string"); + obufout = obuf; + ofre = osiz - 1; + + *obufout++ = delim; + for (; len > 0; len--, str++) { + chksize(2); /* make space for 2 chars */ + if (delim != '/' && *str == delim) { + *obufout++ = '\\'; + *obufout++ = delim; + } else if ((cp = strchr(escapes, *str)) != NULL) { + i = cp - escapes; + *obufout++ = '\\'; + *obufout++ = printables[i]; + /* NB: Deliberate use of lower-case versions. */ + } else if (isascii(*str) && isprint(*str)) { + *obufout++ = *str; + ofre += 1; + } else { + size_t len; + + chksize(8); /* total available space is 10 */ + + sprintf(obufout, "\\%03o", *str & 0xff); + len = strlen(obufout); + ofre += (10 - len); /* adjust free space count */ + obufout += len; + } + } + chksize(1); + *obufout++ = delim; + *obufout = '\0'; + return obuf; +#undef chksize } -/* pp_var --- print builtin variables, do it in one place */ +/* pp_number --- pretty format a number */ -static void -pp_var(NODE *tree) +char * +pp_number(AWKNUM d) { - switch (tree->type) { - case Node_BINMODE: - fprintf(prof_fp, "BINMODE"); - return; - - case Node_CONVFMT: - fprintf(prof_fp, "CONVFMT"); - return; - - case Node_FIELDWIDTHS: - fprintf(prof_fp, "FIELDWIDTHS"); - return; - - case Node_FNR: - fprintf(prof_fp, "FNR"); - return; - - case Node_FS: - fprintf(prof_fp, "FS"); - return; - - case Node_IGNORECASE: - fprintf(prof_fp, "IGNORECASE"); - return; - - case Node_LINT: - fprintf(prof_fp, "LINT"); - return; - - case Node_NF: - fprintf(prof_fp, "NF"); - return; - - case Node_NR: - fprintf(prof_fp, "NR"); - return; - - case Node_OFMT: - fprintf(prof_fp, "OFMT"); - return; - - case Node_OFS: - fprintf(prof_fp, "OFS"); - return; - - case Node_ORS: - fprintf(prof_fp, "ORS"); - return; - - case Node_RS: - fprintf(prof_fp, "RS"); - return; - - case Node_SUBSEP: - fprintf(prof_fp, "SUBSEP"); - return; - - case Node_TEXTDOMAIN: - fprintf(prof_fp, "TEXTDOMAIN"); - return; +#define PP_PRECISION 6 + char *str; - default: - fatal(_("Unknown node type %s in pp_var"), nodetype2str(tree->type)); - break; + emalloc(str, char *, PP_PRECISION + 10, "pp_number"); + sprintf(str, "%0.*g", PP_PRECISION, d); + return str; +#undef PP_PRECISION +} + +/* pp_node --- pretty format a node */ + +char * +pp_node(NODE *n) +{ + if ((n->flags & NUMBER) != 0) + return pp_number(n->numbr); + return pp_string(n->stptr, n->stlen, '"'); +} + +static NODE **pp_args = NULL; +static int npp_args; + +static char * +pp_list(int nargs, const char *paren, const char *delim) +{ + NODE *r; + char *str, *s; + size_t len; + size_t delimlen; + int i; + + if (pp_args == NULL) { + npp_args = nargs; + emalloc(pp_args, NODE **, (nargs + 2) * sizeof(NODE *), "pp_list"); + } else if (nargs > npp_args) { + npp_args = nargs; + erealloc(pp_args, NODE **, (nargs + 2) * sizeof(NODE *), "pp_list"); + } + + delimlen = strlen(delim); + len = -delimlen; + for (i = 1; i <= nargs; i++) { + r = pp_args[i] = pp_pop(); + len += r->pp_len + delimlen; + } + if (paren != NULL) { + assert(strlen(paren) == 2); + len += 2; + } + + emalloc(str, char *, len + 1, "pp_list"); + s = str; + if (paren != NULL) + *s++ = paren[0]; + r = pp_args[nargs]; + memcpy(s, r->pp_str, r->pp_len); + s += r->pp_len; + pp_free(r); + for (i = nargs - 1; i > 0; i--) { + if (delimlen > 0) { + memcpy(s, delim, delimlen); + s += delimlen; + } + r = pp_args[i]; + memcpy(s, r->pp_str, r->pp_len); + s += r->pp_len; + pp_free(r); + } + if (paren != NULL) + *s++ = paren[1]; + *s = '\0'; + return str; +} + +static char * +pp_concat(const char *s1, const char *s2, const char *s3) +{ + size_t len1, len2, len3, l; + char *str, *s; + + len1 = strlen(s1); + len2 = strlen(s2); + len3 = strlen(s3); + l = len1 + len2 + len3 + 2; + emalloc(str, char *, l, "pp_concat"); + s = str; + if (len1 > 0) { + memcpy(s, s1, len1); + s += len1; + } + if (len2 > 0) { + memcpy(s, s2, len2); + s += len2; + } + if (len3 > 0) { + memcpy(s, s3, len3); + s += len3; } + *s = '\0'; + return str; } -#ifdef PROFILING -/* just_dump --- dump the profile and function stack and keep going */ +/* pp_func --- pretty print a function */ -static RETSIGTYPE -just_dump(int signum) +int +pp_func(INSTRUCTION *pc, void *data ATTRIBUTE_UNUSED) { - extern NODE *begin_block, *expression_value, *end_block; + int j; + char **pnames; + NODE *f; + static int first = TRUE; + int pcount; - dump_prog(begin_block, expression_value, end_block); - dump_funcs(); - dump_fcall_stack(prof_fp); - fflush(prof_fp); - signal(signum, just_dump); /* for OLD Unix systems ... */ + if (first) { + first = FALSE; + fprintf(prof_fp, _("\n\t# Functions, listed alphabetically\n")); + } + + f = pc->func_body; + fprintf(prof_fp, "\n"); + indent(pc->nexti->exec_count); + fprintf(prof_fp, "%s %s(", op2str(Op_K_function), f->lnode->param); + pnames = f->parmlist; + fparms = pnames; + pcount = f->lnode->param_cnt; + for (j = 0; j < pcount; j++) { + fprintf(prof_fp, "%s", pnames[j]); + if (j < pcount - 1) + fprintf(prof_fp, ", "); + } + fprintf(prof_fp, ")\n\t{\n"); + indent_in(); + pprint(pc->nexti->nexti, NULL, FALSE); /* function body */ + indent_out(); + fprintf(prof_fp, "\t}\n"); + return 0; } -/* dump_and_exit --- dump the profile, the function stack, and exit */ +/* redir2str --- convert a redirection type into a printable value */ -static RETSIGTYPE -dump_and_exit(int signum) +const char * +redir2str(int redirtype) { - just_dump(signum); - exit(EXIT_FAILURE); + static const char *const redirtab[] = { + "", + " > ", /* redirect_output */ + " >> ", /* redirect_append */ + " | ", /* redirect_pipe */ + " | ", /* redirect_pipein */ + " < ", /* redirect_input */ + " |& ", /* redirect_twoway */ + }; + + if (redirtype < 0 || redirtype > redirect_twoway) + fatal(_("redir2str: unknown redirection type %d"), redirtype); + return redirtab[redirtype]; } -#endif + + diff -Nru gawk-3.1.8+dfsg/protos.h gawk-4.0.1+dfsg/protos.h --- gawk-3.1.8+dfsg/protos.h 2007-08-11 19:39:49.000000000 +0000 +++ gawk-4.0.1+dfsg/protos.h 2011-02-27 06:00:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1991 - 2002 the Free Software Foundation, Inc. + * Copyright (C) 1991 - 2002, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -23,105 +23,126 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifdef __STDC__ +#ifndef STDC_HEADERS + #define aptr_t void * /* arbitrary pointer type */ -#else -#define aptr_t char * -#endif -extern aptr_t malloc P((MALLOC_ARG_T)); -extern aptr_t realloc P((aptr_t, MALLOC_ARG_T)); -extern aptr_t calloc P((MALLOC_ARG_T, MALLOC_ARG_T)); +extern aptr_t malloc(MALLOC_ARG_T); +extern aptr_t realloc(aptr_t, MALLOC_ARG_T); +extern aptr_t calloc(MALLOC_ARG_T, MALLOC_ARG_T); -extern void free P((aptr_t)); -extern char *getenv P((const char *)); +extern void free(aptr_t); +extern char *getenv(const char *); #if ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H) -extern char *strcpy P((char *, const char *)); -extern char *strcat P((char *, const char *)); -extern char *strncpy P((char *, const char *, size_t)); -extern int strcmp P((const char *, const char *)); -extern int strncmp P((const char *, const char *, size_t)); -extern char *strchr P((const char *, int)); -extern char *strrchr P((const char *, int)); -extern char *strstr P((const char *s1, const char *s2)); -extern size_t strlen P((const char *)); -extern long strtol P((const char *, char **, int)); - -extern aptr_t memset P((aptr_t, int, size_t)); -extern aptr_t memcpy P((aptr_t, const aptr_t, size_t)); -extern aptr_t memmove P((aptr_t, const aptr_t, size_t)); -extern aptr_t memchr P((const aptr_t, int, size_t)); -extern int memcmp P((const aptr_t, const aptr_t, size_t)); +extern char *strcpy(char *, const char *); +extern char *strcat(char *, const char *); +extern char *strncpy(char *, const char *, size_t); +extern int strcmp(const char *, const char *); +extern int strncmp(const char *, const char *, size_t); +extern char *strchr(const char *, int); +extern char *strrchr(const char *, int); +extern char *strstr(const char *s1, const char *s2); +extern size_t strlen(const char *); +extern long strtol(const char *, char **, int); + +extern aptr_t memset(aptr_t, int, size_t); +extern aptr_t memcpy(aptr_t, const aptr_t, size_t); +extern aptr_t memmove(aptr_t, const aptr_t, size_t); +extern aptr_t memchr(const aptr_t, int, size_t); +extern int memcmp(const aptr_t, const aptr_t, size_t); #endif /* ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H) */ #ifndef VMS -extern char *strerror P((int)); +extern char *strerror(int); #else -extern char *strerror P((int,...)); +extern char *strerror(int,...); #endif -#if ! defined(_MSC_VER) && ! defined(__GNU_LIBRARY__) -extern size_t strftime P((char *, size_t, const char *, const struct tm *)); +#if ! defined(__GNU_LIBRARY__) +extern size_t strftime(char *, size_t, const char *, const struct tm *); #endif -#ifdef __STDC__ -extern time_t time P((time_t *)); -#else -extern long time(); +extern time_t time(time_t *); + +extern FILE *fdopen(int, const char *); +extern int fprintf(FILE *, const char *, ...); +#if ! defined(__GNU_LIBRARY__) +extern size_t fwrite(const aptr_t, size_t, size_t, FILE *); +#endif +extern int fputs(const char *, FILE *); +extern int unlink(const char *); +extern int fflush(FILE *); +extern int fclose(FILE *); +extern FILE *popen(const char *, const char *); +extern int pclose(FILE *); +extern void abort(); +extern int isatty(int); +extern void exit(int); +extern int system(const char *); +extern int sscanf(const char *, const char *, ...); +#ifndef toupper +extern int toupper(int); +#endif +#ifndef tolower +extern int tolower(int); #endif -extern FILE *fdopen P((int, const char *)); -extern int fprintf P((FILE *, const char *, ...)); -#if ! defined(MSDOS) && ! defined(__GNU_LIBRARY__) -#ifdef __STDC__ -extern size_t fwrite P((const aptr_t, size_t, size_t, FILE *)); -#else -extern int fwrite(); +extern double pow(double x, double y); +extern double atof(const char *); +extern double strtod(const char *, char **); +extern int fstat(int, struct stat *); +extern int stat(const char *, struct stat *); +extern off_t lseek(int, off_t, int); +extern int close(int); +extern int creat(const char *, mode_t); +extern int open(const char *, int, ...); +extern int pipe(int *); +extern int dup(int); +extern int dup2(int,int); +extern int fork(); +extern int execl(const char *, const char *, ...); +#ifndef HAVE_SYS_WAIT_H +extern int wait(int *); #endif -extern int fputs P((const char *, FILE *)); -extern int unlink P((const char *)); +extern void _exit(int); + +#undef aptr_t + +#endif /* STDC_HEADERS */ + + +/* prototypes for missing functions defined in missing_d/ */ + +#ifndef HAVE_STRNCASECMP +extern int strcasecmp(const char *s1, const char *s2); +extern int strncasecmp(const char *s1, const char *s2, register size_t n); #endif -extern int fflush P((FILE *)); -extern int fclose P((FILE *)); -extern FILE *popen P((const char *, const char *)); -extern int pclose P((FILE *)); -extern void abort P(()); -extern int isatty P((int)); -extern void exit P((int)); -extern int system P((const char *)); -extern int sscanf P((const char *, const char *, ...)); -#ifndef toupper -extern int toupper P((int)); + +#ifndef HAVE_STRTOUL +extern unsigned long int strtoul(const char *, char **endptr, int base); #endif -#ifndef tolower -extern int tolower P((int)); + +#ifndef HAVE_TZSET +extern void tzset(); +#endif + +#ifndef HAVE_MKTIME +extern time_t mktime(struct tm *tp); #endif -extern double pow P((double x, double y)); -extern double atof P((const char *)); -extern double strtod P((const char *, char **)); -extern int fstat P((int, struct stat *)); -extern int stat P((const char *, struct stat *)); -extern off_t lseek P((int, off_t, int)); -extern int close P((int)); -extern int creat P((const char *, mode_t)); -extern int open P((const char *, int, ...)); -extern int pipe P((int *)); -extern int dup P((int)); -extern int dup2 P((int,int)); -extern int fork P(()); -extern int execl P((const char *, const char *, ...)); -#ifndef __STDC__ -extern int read P((int, void *, unsigned int)); +#ifndef HAVE_SNPRINTF +extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...); #endif -#ifndef HAVE_SYS_WAIT_H -extern int wait P((int *)); + +#ifndef HAVE_USLEEP +extern int usleep(unsigned int); #endif -extern void _exit P((int)); -#ifndef __STDC__ -extern long time P((long *)); +#ifndef HAVE_SETENV +extern int setenv(const char *, const char *, int); +extern int unsetenv(const char *); #endif -extern SPRINTF_RET sprintf P((char *, const char *, ...)); +#if !defined(HAVE_STRCOLL) +extern int strcoll(const char *, const char *); +#endif -#undef aptr_t diff -Nru gawk-3.1.8+dfsg/re.c gawk-4.0.1+dfsg/re.c --- gawk-3.1.8+dfsg/re.c 2010-04-20 08:04:05.000000000 +0000 +++ gawk-4.0.1+dfsg/re.c 2012-03-28 19:52:21.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1991-2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -26,27 +26,33 @@ #include "awk.h" static reg_syntax_t syn; +static void check_bracket_exp(char *s, size_t len); /* make_regexp --- generate compiled regular expressions */ Regexp * -make_regexp(const char *s, size_t len, int ignorecase, int dfa) +make_regexp(const char *s, size_t len, int ignorecase, int dfa, int canfatal) { Regexp *rp; const char *rerr; const char *src = s; - char *temp; + static char *buf = NULL; + static size_t buflen; const char *end = s + len; - register char *dest; - register int c, c2; + char *dest; + int c, c2; static short first = TRUE; static short no_dfa = FALSE; int has_anchor = FALSE; + int may_have_range = 0; + reg_syntax_t dfa_syn; - /* The number of bytes in the current multibyte character. - It is 0, when the current character is a singlebyte character. */ + /* + * The number of bytes in the current multibyte character. + * It is 0, when the current character is a singlebyte character. + */ size_t is_multibyte = 0; -#ifdef MBS_SUPPORT +#if MBS_SUPPORT mbstate_t mbs; if (gawk_mb_cur_max > 1) @@ -55,27 +61,39 @@ if (first) { first = FALSE; - no_dfa = (getenv("GAWK_NO_DFA") != NULL); /* for debugging and testing */ + /* for debugging and testing */ + no_dfa = (getenv("GAWK_NO_DFA") != NULL); } + /* always check */ + check_bracket_exp((char *) s, len); + /* Handle escaped characters first. */ /* - * Build a copy of the string (in dest) with the + * Build a copy of the string (in buf) with the * escaped characters translated, and generate the regex - * from that. + * from that. */ - emalloc(dest, char *, len + 2, "make_regexp"); - temp = dest; + if (buf == NULL) { + emalloc(buf, char *, len + 2, "make_regexp"); + buflen = len; + } else if (len > buflen) { + erealloc(buf, char *, len + 2, "make_regexp"); + buflen = len; + } + dest = buf; while (src < end) { -#ifdef MBS_SUPPORT +#if MBS_SUPPORT 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); - if ((is_multibyte == 1) || (is_multibyte == (size_t) -1) - || (is_multibyte == (size_t) -2 || (is_multibyte == 0))) { + if ( (is_multibyte == 1) + || (is_multibyte == (size_t) -1) + || (is_multibyte == (size_t) -2 + || (is_multibyte == 0))) { /* We treat it as a singlebyte character. */ is_multibyte = 0; } @@ -112,7 +130,9 @@ * literally in re's, so escape regexp * metacharacters. */ - if (do_traditional && ! do_posix && (isdigit(c) || c == 'x') + if (do_traditional + && ! do_posix + && (isdigit(c) || c == 'x') && strchr("()|*+?.^$\\[]", c2) != NULL) *dest++ = '\\'; *dest++ = (char) c2; @@ -141,16 +161,21 @@ c = *src; if (c == '^' || c == '$') has_anchor = TRUE; + if (c == '[' || c == '-' || c == ']') + may_have_range++; + *dest++ = *src++; /* not '\\' */ } if (gawk_mb_cur_max > 1 && is_multibyte) is_multibyte--; } /* while */ - *dest = '\0' ; /* Only necessary if we print dest ? */ + *dest = '\0'; + len = dest - buf; + emalloc(rp, Regexp *, sizeof(*rp), "make_regexp"); memset((char *) rp, 0, sizeof(*rp)); - rp->dfareg = dfaalloc(); + rp->dfareg = NULL; rp->pat.allocated = 0; /* regex will allocate the buffer */ emalloc(rp->pat.fastmap, char *, 256, "make_regexp"); @@ -169,6 +194,7 @@ * discussion by the definition of casetable[] in eval.c. */ + ignorecase = !! ignorecase; /* force to 1 or 0 */ if (ignorecase) { if (gawk_mb_cur_max > 1) { syn |= RE_ICASE; @@ -182,31 +208,40 @@ syn &= ~RE_ICASE; } - dfasyntax(syn | (ignorecase ? RE_ICASE : 0), ignorecase ? TRUE : FALSE, '\n'); + dfa_syn = syn; + if (ignorecase) + dfa_syn |= RE_ICASE; + dfasyntax(dfa_syn, ignorecase, '\n'); re_set_syntax(syn); - len = dest - temp; - if ((rerr = re_compile_pattern(temp, len, &(rp->pat))) != NULL) - fatal("%s: /%s/", rerr, temp); /* rerr already gettextized inside regex routines */ + if ((rerr = re_compile_pattern(buf, len, &(rp->pat))) != NULL) { + refree(rp); + if (! canfatal) { + /* rerr already gettextized inside regex routines */ + error("%s: /%s/", rerr, buf); + return NULL; + } + fatal("%s: /%s/", rerr, buf); + } /* gack. this must be done *after* re_compile_pattern */ rp->pat.newline_anchor = FALSE; /* don't get \n in middle of string */ if (dfa && ! no_dfa) { - dfacomp(temp, len, rp->dfareg, TRUE); rp->dfa = TRUE; + rp->dfareg = dfaalloc(); + dfacomp(buf, len, rp->dfareg, TRUE); } else rp->dfa = FALSE; rp->has_anchor = has_anchor; - - free(temp); + return rp; } /* research --- do a regexp search. use dfa if possible */ int -research(Regexp *rp, register char *str, int start, - register size_t len, int flags) +research(Regexp *rp, char *str, int start, + size_t len, int flags) { const char *ret = str; int try_backref; @@ -227,20 +262,14 @@ * The dfa matcher doesn't have a no_bol flag, so don't bother * trying it in that case. * - * 4/2007: Grrrr. The dfa matcher has bugs in certain multibyte - * cases that are just too deeply buried to ferret out. Don't - * let this kill us if we need_start. (This may be too narrowly - * focused, perhaps we should relegate the DFA matcher to the - * single byte case all the time. OTOH, the speed difference - * between the matchers in non-trivial... Sigh.) - * - * 7/2008: Simplify: skip dfa matcher if need_start. The above - * problems are too much to deal with. + * 7/2008: Skip the dfa matcher if need_start. The dfa matcher + * has bugs in certain multibyte cases and it's too difficult + * to try to special case things. */ if (rp->dfa && ! no_bol && ! need_start) { char save; int count = 0; - /* + /* * dfa likes to stick a '\n' right after the matched * text. So we just save and restore the character. */ @@ -272,14 +301,9 @@ void refree(Regexp *rp) { - /* - * 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.) - */ + if (rp == NULL) + return; rp->pat.translate = NULL; - regfree(& rp->pat); if (rp->regs.start) free(rp->regs.start); @@ -289,15 +313,16 @@ dfafree(rp->dfareg); free(rp->dfareg); } - free(rp); + efree(rp); } - + /* dfaerror --- print an error message for the dfa routines */ void dfaerror(const char *s) { fatal("%s", s); + exit(EXIT_FATAL); /* for DJGPP */ } /* re_update --- recompile a dynamic regexp */ @@ -308,21 +333,26 @@ NODE *t1; if ((t->re_flags & CASE) == IGNORECASE) { + /* regex was compiled with settings matching IGNORECASE */ if ((t->re_flags & CONSTANT) != 0) { + /* it's a constant, so just return it as is */ assert(t->type == Node_regex); return t->re_reg; } - t1 = force_string(tree_eval(t->re_exp)); + t1 = t->re_exp; if (t->re_text != NULL) { - if (cmp_nodes(t->re_text, t1) == 0) { - free_temp(t1); + /* if contents haven't changed, just return it */ + if (cmp_nodes(t->re_text, t1) == 0) return t->re_reg; - } + /* things changed, fall through to recompile */ unref(t->re_text); } + /* get fresh copy of the text of the regexp */ t->re_text = dupnode(t1); - free_temp(t1); } + /* was compiled with different IGNORECASE or text changed */ + + /* free old */ if (t->re_reg != NULL) refree(t->re_reg); if (t->re_cnt > 0) @@ -330,14 +360,18 @@ 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)); + /* reset regexp text if needed */ + t1 = t->re_exp; unref(t->re_text); t->re_text = dupnode(t1); - free_temp(t1); } + /* compile it */ t->re_reg = make_regexp(t->re_text->stptr, t->re_text->stlen, - IGNORECASE, t->re_cnt); + IGNORECASE, t->re_cnt, TRUE); + + /* clear case flag */ t->re_flags &= ~CASE; + /* set current value of case flag */ t->re_flags |= IGNORECASE; return t->re_reg; } @@ -355,17 +389,18 @@ syn = RE_SYNTAX_GNU_AWK; /* POSIX re's + GNU ops */ /* - * Interval expressions are off by default, since it's likely to - * break too many old programs to have them on. + * Interval expressions are now on by default, as POSIX is + * wide-spread enough that people want it. The do_intervals + * variable remains for use with --traditional. */ if (do_intervals) - syn |= RE_INTERVALS; + syn |= RE_INTERVALS | RE_INVALID_INTERVAL_ORD; (void) re_set_syntax(syn); dfasyntax(syn, FALSE, '\n'); } -/* avoid_dfa --- FIXME: temporary kludge function until we have a new dfa.c */ +/* avoid_dfa --- return true if we should not use the DFA matcher */ int avoid_dfa(NODE *re, char *str, size_t len) @@ -447,7 +482,6 @@ { RE_UNMATCHED_RIGHT_PAREN_ORD, "RE_UNMATCHED_RIGHT_PAREN_ORD" }, { RE_NO_POSIX_BACKTRACKING, "RE_NO_POSIX_BACKTRACKING" }, { RE_NO_GNU_OPS, "RE_NO_GNU_OPS" }, - { RE_DEBUG, "RE_DEBUG" }, { RE_INVALID_INTERVAL_ORD, "RE_INVALID_INTERVAL_ORD" }, { RE_ICASE, "RE_ICASE" }, { RE_CARET_ANCHORS_HERE, "RE_CARET_ANCHORS_HERE" }, @@ -461,3 +495,117 @@ return genflags2str(flagval, values); } + +/* + * dfawarn() is called by the dfa routines whenever a regex is compiled + * must supply a dfawarn. + */ + +void +dfawarn(const char *dfa_warning) +{ + /* + * This routine does nothing, since gawk does its own + * (better) check for bad [[:foo:]] syntax. + */ +} + +/* check_bracket_exp --- look for /[:space:]/ that should be /[[:space:]]/ */ + +static void +check_bracket_exp(char *s, size_t length) +{ + static struct reclass { + const char *name; + size_t len; + short warned; + } classes[] = { + /* + * Ordered by what we hope is frequency, + * since it's linear searched. + */ + { "[:alpha:]", 9, FALSE }, + { "[:digit:]", 9, FALSE }, + { "[:alnum:]", 9, FALSE }, + { "[:upper:]", 9, FALSE }, + { "[:lower:]", 9, FALSE }, + { "[:space:]", 9, FALSE }, + { "[:xdigit:]", 10, FALSE }, + { "[:punct:]", 9, FALSE }, + { "[:print:]", 9, FALSE }, + { "[:graph:]", 9, FALSE }, + { "[:cntrl:]", 9, FALSE }, + { "[:blank:]", 9, FALSE }, + { NULL, 0 } + }; + int i; + int found = FALSE; + char save; + char *sp, *sp2, *end; + int len; + int count = 0; + + if (length == 0) + return; + + end = s + length; + save = s[length]; + s[length] = '\0'; + sp = s; + +again: + sp = sp2 = memchr(sp, '[', (end - sp)); + if (sp == NULL) + goto done; + + for (count++, sp++; *sp != '\0'; sp++) { + static short range_warned = FALSE; + + if (*sp == '[') + count++; + else if (*sp == ']') + count--; + if (*sp == '-' && do_lint && ! range_warned && count == 1 + && sp[-1] != '[' && sp[1] != ']' + && ! isdigit((unsigned char) sp[-1]) && ! isdigit((unsigned char) sp[1]) + && ! (sp[-2] == '[' && sp[-1] == '^')) { + range_warned = TRUE; + warning(_("range of the form `[%c-%c]' is locale dependent"), + sp[-1], sp[1]); + } + if (count == 0) { + sp++; /* skip past ']' */ + break; + } + } + + if (count > 0) { /* bad regex, give up */ + goto done; + } + + /* sp2 has start */ + + for (i = 0; classes[i].name != NULL; i++) { + if (classes[i].warned) + continue; + len = classes[i].len; + if ( len == (sp - sp2) + && memcmp(sp2, classes[i].name, len) == 0) { + found = TRUE; + break; + } + } + + if (found && ! classes[i].warned) { + warning(_("regexp component `%.*s' should probably be `[%.*s]'"), + len, sp2, len, sp2); + classes[i].warned = TRUE; + } + + if (sp < end) { + found = FALSE; + goto again; + } +done: + s[length] = save; +} diff -Nru gawk-3.1.8+dfsg/regcomp.c gawk-4.0.1+dfsg/regcomp.c --- gawk-3.1.8+dfsg/regcomp.c 2010-04-13 18:55:31.000000000 +0000 +++ gawk-4.0.1+dfsg/regcomp.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2007,2009,2010 Free Software Foundation, Inc. + Copyright (C) 2002-2007,2009,2010,2011,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,9 +14,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); @@ -213,11 +212,13 @@ { wchar_t wtmp[2]; char tmp[2]; + mbstate_t mbs; + memset(& mbs, 0, sizeof(mbs)); tmp[0] = c; tmp[1] = 0; - mbtowc (wtmp, tmp, 1); + mbrtowc (wtmp, tmp, 1, & mbs); return wtmp[0]; } #endif @@ -972,6 +973,35 @@ { int i, j, ch; dfa->word_ops_used = 1; +#ifndef GAWK + if (BE (dfa->map_notascii == 0, 1)) + { + if (sizeof (dfa->word_char[0]) == 8) + { + dfa->word_char[0] = UINT64_C (0x03ff000000000000); + dfa->word_char[1] = UINT64_C (0x07fffffe87fffffe); + i = 2; + } + else if (sizeof (dfa->word_char[0]) == 4) + { + dfa->word_char[0] = UINT32_C (0x00000000); + dfa->word_char[1] = UINT32_C (0x03ff0000); + dfa->word_char[2] = UINT32_C (0x87fffffe); + dfa->word_char[3] = UINT32_C (0x07fffffe); + i = 4; + } + else + abort (); + ch = 128; + + if (BE (dfa->is_utf8, 1)) + { + memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8); + return; + } + } +#endif + for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') @@ -1876,7 +1906,6 @@ if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; -#ifndef GAWK case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; @@ -1885,7 +1914,6 @@ if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; -#endif case '`': if (!(syntax & RE_NO_GNU_OPS)) { @@ -2206,16 +2234,21 @@ exp = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && exp == NULL, 0)) { + if (tree != NULL) + postorder (tree, free_tree, NULL); return NULL; } if (tree != NULL && exp != NULL) { - tree = create_tree (dfa, tree, exp, CONCAT); - if (tree == NULL) + bin_tree_t *newtree = create_tree (dfa, tree, exp, CONCAT); + if (newtree == NULL) { + postorder (exp, free_tree, NULL); + postorder (tree, free_tree, NULL); *err = REG_ESPACE; return NULL; } + tree = newtree; } else if (tree == NULL) tree = exp; @@ -2464,7 +2497,11 @@ { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) - *err = REG_EPAREN; + { + if (tree != NULL) + postorder (tree, free_tree, NULL); + *err = REG_EPAREN; + } if (BE (*err != REG_NOERROR, 0)) return NULL; } @@ -2633,14 +2670,16 @@ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N -build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, - bracket_elem_t *start_elem, bracket_elem_t *end_elem) +build_range_exp (reg_syntax_t syntax, bitset_t sbcset, re_charset_t *mbcset, + int *range_alloc, bracket_elem_t *start_elem, + bracket_elem_t *end_elem) # else /* not RE_ENABLE_I18N */ -build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem, - bracket_elem_t *end_elem) +build_range_exp (reg_syntax_t syntax, bitset_t sbcset, + bracket_elem_t *start_elem, bracket_elem_t *end_elem) # endif /* not RE_ENABLE_I18N */ { 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, @@ -2660,7 +2699,6 @@ wchar_t wc; wint_t start_wc; wint_t 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] @@ -2686,9 +2724,7 @@ #endif if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; - cmp_buf[0] = start_wc; - cmp_buf[4] = end_wc; - if (wcscoll (cmp_buf, cmp_buf + 4) > 0) + else if ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. @@ -2729,10 +2765,8 @@ /* 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); + if (start_wc <= wc && wc <= end_wc) + bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ @@ -3092,6 +3126,10 @@ if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { + re_free (sbcset); +#ifdef RE_ENABLE_I18N + re_free (mbcset); +#endif *err = REG_ESPACE; return NULL; } @@ -3187,15 +3225,15 @@ token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC - *err = build_range_exp (sbcset, mbcset, &range_alloc, + *err = build_range_exp (syntax, sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N - *err = build_range_exp (sbcset, + *err = build_range_exp (syntax, sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else - *err = build_range_exp (sbcset, &start_elem, &end_elem); + *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) @@ -3460,8 +3498,8 @@ _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)) + idx1 = findidx (&cp, -1); + if (BE (idx1 == 0 || *cp != '\0', 0)) /* This isn't a valid character. */ return REG_ECOLLATE; @@ -3472,7 +3510,7 @@ { char_buf[0] = ch; cp = char_buf; - idx2 = findidx (&cp); + idx2 = findidx (&cp, 1); /* idx2 = table[ch]; */ diff -Nru gawk-3.1.8+dfsg/regex.c gawk-4.0.1+dfsg/regex.c --- gawk-3.1.8+dfsg/regex.c 2010-04-12 19:49:22.000000000 +0000 +++ gawk-4.0.1+dfsg/regex.c 2012-03-28 19:47:54.000000000 +0000 @@ -14,9 +14,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,10 +51,6 @@ # include "../locale/localeinfo.h" #endif -#if defined (_MSC_VER) -#include /* for size_t */ -#endif - /* On some systems, limits.h sets RE_DUP_MAX to a lower value than GNU regex allows. Include it before , which correctly #undefs RE_DUP_MAX and sets it to the right value. */ diff -Nru gawk-3.1.8+dfsg/regex.h gawk-4.0.1+dfsg/regex.h --- gawk-3.1.8+dfsg/regex.h 2010-04-12 19:48:50.000000000 +0000 +++ gawk-4.0.1+dfsg/regex.h 2012-03-28 19:47:54.000000000 +0000 @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008 + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -15,9 +15,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ #ifndef _REGEX_H #define _REGEX_H 1 @@ -72,10 +71,10 @@ /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: - ^ is an anchor if it is at the beginning of a regular - expression or after an open-group or an alternation operator; - $ is an anchor if it is at the end of a regular expression, or - before a close-group or an alternation operator. + ^ is an anchor if it is at the beginning of a regular + expression or after an open-group or an alternation operator; + $ is an anchor if it is at the end of a regular expression, or + before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. @@ -204,16 +203,19 @@ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CHAR_CLASSES \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) #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_CONTEXT_INVALID_OPS )) + ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INVALID_INTERVAL_ORD) \ + & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \ + | RE_CONTEXT_INVALID_OPS )) #define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ - | RE_INTERVALS | RE_NO_GNU_OPS) + | RE_INTERVALS | RE_NO_GNU_OPS \ + | RE_INVALID_INTERVAL_ORD) #define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ @@ -346,9 +348,9 @@ /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', - `translate', and `no_sub' can be set. After the pattern has been - compiled, the `re_nsub' field is available. All other fields are - private to the regex routines. */ + and `translate' can be set. After the pattern has been compiled, + the fields `re_nsub', `not_bol' and `not_eol' are available. All + other fields are private to the regex routines. */ #ifndef RE_TRANSLATE_TYPE # define __RE_TRANSLATE_TYPE unsigned char * @@ -473,7 +475,12 @@ /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global `re_syntax_options', into the buffer - BUFFER. Return NULL if successful, and an error string if not. */ + BUFFER. Return NULL if successful, and an error string if not. + + To free the allocated storage, you must call `regfree' on BUFFER. + Note that the translate table must either have been initialised by + `regcomp', with a malloc'ed value, or set to NULL before calling + `regfree'. */ extern const char *re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); diff -Nru gawk-3.1.8+dfsg/regex_internal.c gawk-4.0.1+dfsg/regex_internal.c --- gawk-3.1.8+dfsg/regex_internal.c 2010-04-21 19:28:20.000000000 +0000 +++ gawk-4.0.1+dfsg/regex_internal.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2006, 2010 Free Software Foundation, Inc. + Copyright (C) 2002-2006, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,9 +14,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ static void re_string_construct_common (const char *str, int len, re_string_t *pstr, @@ -45,7 +44,7 @@ re_string_reconstruct before using the object. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) { @@ -73,7 +72,7 @@ /* This function allocate the buffers, and initialize them. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_string_construct (re_string_t *pstr, const char *str, int len, RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa) { @@ -136,7 +135,7 @@ /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) { #ifdef RE_ENABLE_I18N @@ -246,13 +245,8 @@ else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = __mbrtowc (&wc, p, 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)) + if (BE (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; @@ -261,6 +255,12 @@ wc = pstr->trans[wc]; pstr->cur_state = prev_st; } + else if (BE (mbclen == (size_t) -2, 0)) + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; @@ -276,7 +276,7 @@ but for REG_ICASE. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; @@ -343,9 +343,11 @@ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } - else if (mbclen == (size_t) -1 || mbclen == 0) + else if (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) { - /* It is an invalid character or '\0'. Just use the byte. */ + /* It is an invalid character, an incomplete character + at the end of the string, or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ @@ -458,7 +460,8 @@ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } - else if (mbclen == (size_t) -1 || mbclen == 0) + else if (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; @@ -505,11 +508,11 @@ rawbuf_idx < new_raw_idx;) { wchar_t wc2; - int remain_len = pstr->len - rawbuf_idx; + int remain_len = pstr->raw_len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc2, (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)) + if (BE ((ssize_t) mbclen <= 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) @@ -577,7 +580,7 @@ convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) { int offset = idx - pstr->raw_mbs_idx; @@ -692,10 +695,10 @@ } else { +#ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ int prev_valid_len = pstr->valid_len; -#ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; @@ -741,16 +744,18 @@ unsigned char buf[6]; size_t mbclen; + const unsigned char *pp = p; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; + pp = buf; } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); - mbclen = __mbrtowc (&wc2, (const char *) p, mlen, + mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) @@ -871,7 +876,7 @@ } static unsigned char -internal_function __attribute ((pure)) +internal_function re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) @@ -967,7 +972,7 @@ /* Functions for set operation. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, int size) { /* @@ -989,7 +994,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, int elem) { set->alloc = 1; @@ -1005,7 +1010,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, int elem1, int elem2) { set->alloc = 2; @@ -1035,7 +1040,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; @@ -1060,7 +1065,7 @@ Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { @@ -1151,7 +1156,7 @@ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { @@ -1204,7 +1209,7 @@ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { int is, id, sbase, delta; @@ -1287,7 +1292,7 @@ return -1 if an error is occured, return 1 otherwise. */ static int -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, int elem) { int idx; @@ -1344,7 +1349,7 @@ Return -1 if an error is occured, return 1 otherwise. */ static int -internal_function +internal_function __attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, int elem) { /* Realloc if we need. */ @@ -1486,7 +1491,7 @@ optimization. */ static re_dfastate_t * -internal_function +internal_function __attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { @@ -1530,7 +1535,7 @@ optimization. */ static re_dfastate_t * -internal_function +internal_function __attribute_warn_unused_result__ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { @@ -1567,6 +1572,7 @@ indicates the error code if failed. */ static reg_errcode_t +__attribute_warn_unused_result__ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, unsigned int hash) { @@ -1621,7 +1627,7 @@ Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * -internal_function +internal_function __attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash) { @@ -1671,7 +1677,7 @@ Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * -internal_function +internal_function __attribute_warn_unused_result__ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash) { diff -Nru gawk-3.1.8+dfsg/regex_internal.h gawk-4.0.1+dfsg/regex_internal.h --- gawk-3.1.8+dfsg/regex_internal.h 2010-04-20 08:21:31.000000000 +0000 +++ gawk-4.0.1+dfsg/regex_internal.h 2012-03-28 19:47:54.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2005, 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2002-2005, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,9 +14,8 @@ 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. */ + License along with the GNU C Library; if not, see + . */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 @@ -27,16 +26,18 @@ #include #include +#include "mbsupport.h" /* gawk */ + #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC # include #endif #if defined HAVE_LOCALE_H || defined _LIBC # include #endif -#if defined HAVE_WCHAR_H || defined _LIBC +#if MBS_SUPPORT && (defined HAVE_WCHAR_H || defined _LIBC) # include #endif /* HAVE_WCHAR_H || _LIBC */ -#if defined HAVE_WCTYPE_H || defined _LIBC +#if MBS_SUPPORT && (defined HAVE_WCTYPE_H || defined _LIBC) # include #endif /* HAVE_WCTYPE_H || _LIBC */ #if defined HAVE_STDBOOL_H || defined _LIBC @@ -108,14 +109,7 @@ # define SIZE_MAX ((size_t) -1) #endif -#ifndef NO_MBSUPPORT -#include "mbsupport.h" /* gawk */ -#endif -#ifndef MB_CUR_MAX -#define MB_CUR_MAX 1 -#endif - -#if (defined MBS_SUPPORT) || _LIBC +#if MBS_SUPPORT || _LIBC # define RE_ENABLE_I18N #endif @@ -163,6 +157,15 @@ # define __attribute(arg) #endif +#ifdef GAWK +/* + * Instead of trying to figure out which GCC version introduced + * this symbol, just define it out and be done. + */ +# undef __attribute_warn_unused_result__ +# define __attribute_warn_unused_result__ +#endif + extern const char __re_error_msgid[] attribute_hidden; extern const size_t __re_error_msgid_idx[] attribute_hidden; @@ -454,17 +457,12 @@ #ifndef _LIBC # if HAVE_ALLOCA -# if (_MSC_VER) -# include -# define __libc_use_alloca(n) 0 -# else -# include +# include /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. */ # define __libc_use_alloca(n) ((n) < 4032) -# endif # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 @@ -472,8 +470,7 @@ #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) -/* SunOS 4.1.x realloc doesn't accept null pointers: pre-Standard C. Sigh. */ -#define re_realloc(p,t,n) ((p != NULL) ? (t *) realloc (p,(n)*sizeof(t)) : (t *) calloc(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 @@ -785,7 +782,6 @@ # 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); @@ -797,7 +793,7 @@ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; - tmp = findidx (&p); + findidx (&p, pstr->len - idx); return p - pstr->mbs - idx; } else diff -Nru gawk-3.1.8+dfsg/regexec.c gawk-4.0.1+dfsg/regexec.c --- gawk-3.1.8+dfsg/regexec.c 2010-04-13 19:06:58.000000000 +0000 +++ gawk-4.0.1+dfsg/regexec.c 2012-03-28 19:47:54.000000000 +0000 @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,9 +14,8 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA. */ + License along with the GNU C Library; if not, see + . */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, int n) internal_function; @@ -200,6 +199,15 @@ internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; + +#ifdef GAWK +#undef MIN /* safety */ +static int +MIN(size_t a, size_t b) +{ + return (a < b ? a : b); +} +#endif /* Entry point for POSIX code. */ @@ -369,7 +377,7 @@ int len = length1 + length2; int free_str = 0; - if (BE (length1 < 0 || length2 < 0 || stop < 0, 0)) + if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) return -2; /* Concatenate the strings. */ @@ -380,8 +388,12 @@ if (BE (s == NULL, 0)) return -2; +#ifdef _LIBC + memcpy (__mempcpy (s, string1, length1), string2, length2); +#else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); +#endif str = s; free_str = 1; } @@ -621,6 +633,7 @@ (START + RANGE >= 0 && START + RANGE <= LENGTH) */ static reg_errcode_t +__attribute_warn_unused_result__ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, eflags) const regex_t *preg; @@ -947,6 +960,7 @@ } static reg_errcode_t +__attribute_warn_unused_result__ prune_impossible_nodes (mctx) re_match_context_t *mctx; { @@ -1085,7 +1099,7 @@ index of the buffer. */ static int -internal_function +internal_function __attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, int fl_longest_match, int *p_match_first) { @@ -1150,7 +1164,8 @@ re_dfastate_t *old_state = cur_state; int next_char_idx = re_string_cur_idx (&mctx->input) + 1; - if (BE (next_char_idx >= mctx->input.bufs_len, 0) + if ((BE (next_char_idx >= mctx->input.bufs_len, 0) + && mctx->input.bufs_len < mctx->input.len) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { @@ -1358,7 +1373,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { @@ -1405,7 +1420,7 @@ pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack) { @@ -1661,7 +1676,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *cur_dest) { @@ -1728,7 +1743,8 @@ { int top = mctx->state_log_top; - if (next_state_log_idx >= mctx->input.bufs_len + if ((next_state_log_idx >= mctx->input.bufs_len + && mctx->input.bufs_len < mctx->input.len) || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { @@ -1823,7 +1839,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { @@ -2136,7 +2152,7 @@ } static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, const re_node_set *candidates) { @@ -2266,7 +2282,7 @@ update the destination of STATE_LOG. */ static re_dfastate_t * -internal_function +internal_function __attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { @@ -2691,7 +2707,7 @@ delay these checking for prune_impossible_nodes(). */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; @@ -2891,7 +2907,7 @@ Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int type) { @@ -3052,14 +3068,16 @@ Can't we unify them? */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; int result; int cur_idx; +#ifdef RE_ENABLE_I18N reg_errcode_t err = REG_NOERROR; +#endif re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) @@ -3184,7 +3202,7 @@ problematic append it to DST_NODES. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int type) { @@ -3228,7 +3246,7 @@ in MCTX->BKREF_ENTS. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int subexp_num, int type) { @@ -3371,6 +3389,8 @@ { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); + if (BE (state->trtable == NULL, 0)) + return 0; return 1; } return 0; @@ -3914,6 +3934,7 @@ if (cset->nequiv_classes) { const unsigned char *cp = pin; + int32_t idx; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) @@ -3922,7 +3943,7 @@ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); - int32_t idx = findidx (&cp); + idx = findidx (&cp, elem_len); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { @@ -3953,18 +3974,10 @@ # 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) + if (cset->range_starts[i] <= wc + && wc <= cset->range_ends[i]) { match_len = char_len; goto check_node_accept_bytes_match; @@ -4033,7 +4046,7 @@ /* 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); + idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); @@ -4100,7 +4113,7 @@ /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; @@ -4111,7 +4124,7 @@ return REG_ESPACE; /* Double the lengthes of the buffers. */ - ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); + ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2)); if (BE (ret != REG_NOERROR, 0)) return ret; @@ -4163,7 +4176,7 @@ /* Initialize MCTX. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, int n) { mctx->eflags = eflags; @@ -4236,7 +4249,7 @@ */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from, int to) { @@ -4308,7 +4321,7 @@ at STR_IDX. */ static reg_errcode_t -internal_function +internal_function __attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx) { #ifdef DEBUG diff -Nru gawk-3.1.8+dfsg/replace.c gawk-4.0.1+dfsg/replace.c --- gawk-3.1.8+dfsg/replace.c 2010-03-19 07:13:54.000000000 +0000 +++ gawk-4.0.1+dfsg/replace.c 2011-12-08 19:12:16.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1989, 1991-2010 the Free Software Foundation, Inc. + * Copyright (C) 1989, 1991-2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -31,21 +31,8 @@ #include "awk.h" -#ifdef atarist -/* - * this will work with gcc compiler - for other compilers you may - * have to replace path separators in this file into backslashes - */ -#include "unsupported/atari/stack.c" -#include "unsupported/atari/tmpnam.c" -#endif /* atarist */ - #ifndef HAVE_SYSTEM -#ifdef atarist -#include "unsupported/atari/system.c" -#else #include "missing_d/system.c" -#endif #endif /* HAVE_SYSTEM */ #ifndef HAVE_MEMCMP @@ -73,7 +60,14 @@ #endif /* HAVE_STRERROR */ #ifndef HAVE_STRFTIME +# ifdef __MINGW32__ +/* Need to use underlying_strftime in replacement strftime. */ +# define HAVE_STRFTIME 1 +# endif #include "missing_d/strftime.c" +# ifdef __MINGW32__ +# undef HAVE_STRFTIME +# endif #endif /* HAVE_STRFTIME */ #ifndef HAVE_STRCHR @@ -91,13 +85,7 @@ #ifndef HAVE_TZSET #include "missing_d/tzset.c" #endif /* HAVE_TZSET */ - -#if defined TANDEM -#include "strdupc" -#include "getidc" -#include "strnchkc" -#endif /* TANDEM */ - + #ifndef HAVE_MKTIME /* mktime.c defines main() if DEBUG is set */ #undef DEBUG @@ -115,3 +103,15 @@ #ifndef HAVE_USLEEP #include "missing_d/usleep.c" #endif + +#ifndef HAVE_SETENV +#include "missing_d/setenv.c" +#endif + +#ifndef HAVE_STRCOLL +#include "missing_d/strcoll.c" +#endif + +#if ! MBS_SUPPORT +#include "missing_d/wcmisc.c" +#endif diff -Nru gawk-3.1.8+dfsg/test/ChangeLog gawk-4.0.1+dfsg/test/ChangeLog --- gawk-3.1.8+dfsg/test/ChangeLog 2010-05-06 17:57:03.000000000 +0000 +++ gawk-4.0.1+dfsg/test/ChangeLog 2012-03-28 20:02:15.000000000 +0000 @@ -1,1508 +1,92 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Wed Apr 21 22:23:30 2010 Arnold D. Robbins +2012-03-20 Arnold D. Robbins - * Makefile.am (EXTRA_DIST): Add Gentests.vms so it'll be - in the dist. - * localenl.sh, localenl.ok: Remove UNKNOWN locale per - request from Nelson Beebe. - * lc_num1.awk, lc_num1.ok: Revised to not fail on systems - where the quote flag isn't supported. Also per Nelson Beebe. + * Makefile.am (printfbad3): New test. + * printfbad3.awk, printfbad3.ok: New files. -Thu Feb 18 22:50:54 2010 Arnold D. Robbins +2012-02-22 Arnold D. Robbins - * Makefile.am (fcall_exit2): New test. - * fcall_exit2.awk, fcall_exit2.in, fcall_exit2.ok: New files. + * Makefile.am (beginfile2, next): Set LC_ALL=C so that error + messages will be in English for comparison with .ok files. + Thanks to Jeroen Schot . -Wed Feb 17 23:25:27 2010 Arnold D. Robbins +2011-12-26 Arnold D. Robbins - * Makefile.am (fcall_exit): New test. - * fcall_exit.awk, fcall_exit.ok: New files. + * Makefile.am (rri1): New test. + * rri1.awk, rri1.in, rri1.ok: New files. -Fri Feb 5 13:02:10 2010 Arnold D. Robbins +2011-12-06 Arnold D. Robbins - * Makefile.am (forref): New test. - * forref.awk, forref.ok: New files. + * Makefile.am: Rationalize the $(CMP) lines wherever possible. -Tue Oct 6 19:49:22 2009 Arnold D. Robbins +2011-10-24 Arnold D. Robbins - * Makefile.am (uninit5): New test. - * uninit5.awk, uninit5.ok: New files. + * beginfile2.sh: Use `...` instead of $(...) for broken systems + where /bin/sh doesn't support $(...). Thanks to Nelson Beebe for + the report. -Tue Aug 4 06:04:04 2009 Arnold D. Robbins +2011-10-21 John Haque - * hsprint.ok: Updated. + * beginfile2.in, beginfile2.sh, beginfile2.ok: Adjust input file names. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2011-10-21 Corinna Vinschen - * Release 3.1.7: Release tar file made. + * Makefile.am (beginfile2): Adjust for running out of srcdir. + * beginfile2.sh: Same. -Fri Jul 3 13:04:55 2009 Arnold D. Robbins +2011-10-02 Arnold D. Robbins - * Makefile.am (charset-tests): Moved tests that can fail based on - character set and locale issues into a separate section. + * Makefile.am (rtlen, rtlen01, rtlenmb): New tests. + * rtlen.ok, rtlen.sh, rtlen01.ok, rtlen01.sh: New files. + Thanks to Rogier as forwarded by + Jeroen Schot . -Wed Jun 24 22:30:31 2009 Arnold D. Robbins +2011-08-10 Arnold D. Robbins - * lintold.awk: Changed to avoid floating point problems on VMS. + * Makefile.am (beginfile2, fpat3, fwtest3): New tests. + * beginfile2.awk, beginfile2.in, beginfile2.ok: New files. + * fpat3.awk, fpat3.in, fpat3.ok: New files. + * fwtest3.awk, fwtest3.in, fwtest3.ok: New files. -Wed Jun 24 05:39:00 2009 Arnold D. Robbins +2011-08-09 Arnold D. Robbins - * printfbad2.awk, printfbad2.ok: Adjusted for systems where sed - will add a final newline if the input didn't contain one. + * pty1.awk, pty1.ok: New files. + * Makefile.am (pty1): New test. + (profile1, profile2, profile3): Use unique names for the profile + files to avoid problems with parallel 'make check' -Mon Jun 22 00:44:50 2009 Pat Rankin +2011-07-29 Arnold D. Robbins - * getlndir.awk (SRCDIR): Allow caller to override "." as directory. - * intformat.awk (HUGEVAL): Allow caller to override the largest - value, and restructure 10^x and 2^y loops to use it without - overflowing on non-IEEE floating pointing hosts. + * Makefile.am (next): Redirect output to output file! -Tue Jun 23 05:26:52 2009 Arnold D. Robbins +2011-07-28 Arnold D. Robbins - * Makefile.am (MACHINE_TESTS): Move fmtspcl to here per Pat Rankin. + * sortu.awk, sortu.ok: Modified to make numeric comparison do + a stable sort. Thanks to Peter Fales . + * backgsub.ok: Update for change in code. + * Makefile.am (posix2008sub): Add --posix to invocation. -Fri Jun 19 14:26:55 2009 Arnold D. Robbins +2011-07-26 Arnold D. Robbins - * Makefile.am (GAWK_EXT_TESTS): Fixed sorting of tests. - Removed ovrflow1 test since double1 is a superset; thanks - to Pat Rankin. - * (ovrflow1.awk, ovrflow1.ok): Removed. + * Makefile.am (getline4, gsubtst8): New tests. + * getline4.awk, getline4.in, getline4.ok: New files. + * gsubtst8.awk, gsubtst8.in, gsubtst8.ok: New files. -Thu Jun 18 05:46:32 2009 Arnold D. Robbins +2011-07-15 Arnold D. Robbins - * Makefile.am (localenl): Per Michal Jaegermann, send stderr output - to /dev/null. - * (machine-tests): Moved several tests to new section for tests - whose output can vary by hardware. + * Makefile.am (gsubtst7): New test. + * gsubtst7.awk, gsubtst7.in, gsubtst7.ok: New files. -Thu Jun 11 04:50:44 2009 Arnold D. Robbins +2011-06-24 Arnold D. Robbins - * Makefile.am (lc_num1): Don't need --posix, changed command line - so that AWKPATH influences again. Thanks to Corinna Vinschen - for making me fix this. + * Makefile.am (EXTRA_DIST): Add ChangeLog.0. + * 4.0.0: Remake the tar ball. -Wed Jun 10 08:28:13 2009 Arnold D. Robbins +2011-06-23 Arnold D. Robbins - * Makefile.am (lc_num1, printfbad2): Fix so building outside the - source directory works. - -Thu May 21 21:10:53 2009 Arnold D. Robbins - - * badargs.ok: Updated. - -Fri May 15 14:38:16 2009 Arnold D. Robbins - - * Makefile.am (paramres): New test. - * paramres.awk, paramres.ok: New files. - -Fri Mar 27 10:57:49 2009 Arnold D. Robbins - - * Makefile.am (printfbad2): New test. - * printfbad2.awk, printfbad2.in, printfbad2.ok: New files. - -Tue Feb 3 22:08:27 2009 Arnold D. Robbins - - * Makefile.am (uparrfs): New test. - * uparrfs.awk, uparrfs.in, uparrfs.ok: New files. - -Mon Jan 5 22:53:26 2009 Arnold D. Robbins - - * Makefile.am (getlndir): New test. - * getlndir.awk, getlndir.ok: New files. - -Mon Dec 29 22:46:10 2008 Arnold D. Robbins - - * Makefile.am (mbprintf3): New test. - * mbprintf3.awk, mbprintf3.in, mbprintf3.ok: New files. - -Thu Dec 18 20:57:39 2008 Stepan Kasal - - * lc_num1.awk, lc_num1.ok: Test that the quote modifier in - printf is not sticky. - * Makefile.am: Add it. - * Gentests: Allow _ in test names. - -Thu Dec 11 21:36:11 2008 Arnold D. Robbins - - * Makefile.am (mbstr1): New test. - * mbstr1.awk, mbstr1.ok: New files. - -Thu Dec 4 22:44:39 2008 Arnold D. Robbins - - * Makefile.am (closebad): New test. - * closebad.awk, closebad.ok: New files. - -Thu Jul 31 21:44:21 2008 Arnold D. Robbins - - * Makefile.am (match3, gsubtst6): New tests. - * match3.awk, match3.in, match3.ok: New files. - * gsubtst6.awk, gsubtst6.ok: New files. - -Fri May 2 12:43:51 2008 Steffen Schuler - - * Makefile.am (mbfw1): Add code for test to use a UTF locale. - -Wed Apr 23 22:13:47 2008 Arnold D. Robbins - - * Makefile.am (funlen, mbfw1, mbprintf1, mbprintf2): New tests. - * funlen.awk, funlen.in, funlen.ok: New files. - * mbfw1.awk, mbfw1.in, mbfw1.ok: New files. - * mbprintf1.awk, mbprintf1.in, mbprintf1.ok: New files. - * mbprintf2.awk, mbprintf2.ok: New files. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Wed Sep 26 14:32:28 2007 Arnold D. Robbins - - * Makefile.am (localenl): New test. - (regtest): Fixed invocation of shell script. - * localenl.sh, localenl.ok: New files. - * reg/func2.good: Revised to match current gawk output. - -Wed Sep 26 14:49:04 2007 Eli Zaretskii - - * exitval2.w32: New file, a Windows version for exitval2.awk. - -Tue May 29 13:22:33 2007 Arnold D. Robbins - - * badargs.ok: Updated. - -Thu May 17 21:10:51 2007 Pat Rankin - - * icasers.awk: Modify pattern to work on VMS too, doesn't - break Unix/Linux. - -Tue May 15 22:05:24 2007 Pat Rankin - - Steps towards generating VMS .mms file to run test suite. - - * Makefile.am (FAIL_CODE1): New macro, list of programs - that exit 1. - * Gentests: Add VMS code. - * Gentests.vms: New file. - -Wed May 2 19:30:54 2007 Stepan Kasal - - Revert precedence of concatenation and | getline. - From mail dated 2005-10-31. - - * parsefld.awk, parsefld.in, parsefld.ok: New files. - * Makefile.am (parsefld): New basic test, check for $/regex/ and - for /re1/+/re2/. - * getline.awk, getline.ok: Add precedence check "echo " "date"|getline - -Sun Apr 29 22:43:28 2007 Arnold D. Robbins - - * hsprint.awk: Add extra "%" to format string. Thanks to Nelson Beebe. - * hsprint.ok: Revised. - -Tue Apr 24 23:15:01 2007 Andrew J. Schorr - - * fmtspcl.tok: Provide correct version. - -Tue Apr 17 22:23:41 2007 Arnold D. Robbins - - * double2.awk, double2.ok: Limit to 2^63 for portability across - different platforms. Sigh. - -Thu Apr 12 20:00:27 2007 Andrew J. Schorr - - * Makefile.am, Makefile.in (fmtspcl): Use fmtspcl.tok to build - a fmtspcl.ok file suitable for the given platform. - (diffout): Handle case where the .ok file is in the build directory. - -Mon Mar 26 08:24:04 2007 Arnold D. Robbins - - * Makefile.am (fmtspcl.ok): Don't remove for cleaning, add - to EXTRA_DIST. - -Fri Mar 9 11:38:34 2007 Arnold D. Robbins - - * Makefile.am (fmtspcl.tok): Removed use of and reference - to this file. - -Tue Feb 6 08:21:02 2007 Arnold D. Robbins - - * Makefile.am (double1, double2, zero2): New tests. - * double1.awk, double1.ok, double2.awk, double2.ok, - zero2.awk, zero2.ok: New files. - -Sun Feb 4 16:32:45 2007 Arnold D. Robbins - - * Makefile.am (parse1): New test. - * parse1.awk, parse1.in, parse1.ok: New files. - -Thu Feb 1 17:41:48 2007 Andrew J. Schorr - - * Makefile.am (fmtspcl): New test. - (CLEANFILES): Add fmtpspcl.ok to list. - * fmtspcl.awk, fmtspcl.tok: New files. - -Mon Jan 29 15:31:35 2007 Andrew J. Schorr - - * Makefile.am (diffout): Make it work if no problems. - (valgrind-scan): New target to show problems. - -Mon Jan 29 12:51:16 2007 Arnold D. Robbins - - * Makefile.am (reint2): New test. - * reint2.awk, reint2.in, reint2.ok: New files. - -Fri Jan 26 20:01:38 2007 Andrew J. Schorr - - * Makefile.am (intformat): New test. - * intformat.awk, intformat.ok: New files. - -Tue Jan 23 08:10:48 2007 Arnold D. Robbins - - * Makefile.am (fwtest2): New test. - * fwtest2.awk, fwtest2.in, fwtest2.ok: New files. - -Sun Jan 21 13:09:33 2007 Arnold D. Robbins - - * Makefile.am (synerr2, wideidx2): New test. - * synerr2.awk, synerr2.ok, wideidx2.awk, wideidx2.ok: New files. - -Fri Jan 19 15:11:12 2007 Arnold D. Robbins - - * Makefile.am (strnum1, widesub4): New test. - * strnum1.awk, strnum1.ok, widesub4.awk, widesub4.ok: New files. - -Thu Jan 18 13:37:00 2007 Andrew J. Schorr - - * Makeilfe.am (devfd, wideidx, widesub, widesub2, widesub3): New - tests. - * devfd.in4, devfd.in5, devfd.ok, wideidx.awk, wideidx.in, wideidx.ok, - widesub.awk, widesub.ok, widesub2.awk, widesub2.ok, widesub3.awk, - widesub3.in, widesub3.ok: New files. - -Tue Jan 16 12:16:39 2007 Andrew J. Schorr - - * Makefile.am: In pid test, no further need to remove _pid.in, - since the test no longer creates that file. - * pid.awk: Do not read correct values from stdin (they are now passed - as command-line variables with -v). Make sure to produce output - if the comparisons are successful. - * pid.ok: No longer empty, should contain 3 lines if all goes well. - * pid.sh: Do not create _pid.in; instead, pass values in with -v. - -Sun Jan 14 18:03:12 2007 Arnold D. Robbins - - * fnarray.ok: Updated. - -2007-01-13 Eli Zaretskii - - * pipeio2.awk: Don't use empty lines, because Windows ECHO does - something different when invoked without arguments. - - * pipeio2.ok: Update. - - * Makefile.am (EXTRA_DIST): Add exitval2.w32. - - * exitval2.w32: New file. - -Sat Jan 13 21:25:11 2007 Ralf Wildenhues - - * lintold.awk, lintold.in, lintold.ok: New `--lint-old' test. - * Gentests, Makefile.am: Adjust. - -Sat Jan 13 21:17:51 2007 Ralf Wildenhues - - * Makefile.am (Maketests): Allow rebuilding from a VPATH build. - -Fri Jan 12 14:04:24 2007 Arnold D. Robbins - - * Makefile.am (mtchi18n): new test. - * mtchi18n.awk, mtchi18n.in, mtchi18n.ok: new files. - -Wed Sep 6 02:09:26 2006 Arnold D. Robbins - - * Makefile.am (mixed1): new test. - * mixed1.ok: new file. - -Tue Jun 20 05:37:53 2006 Arnold D. Robbins - - * Makefile.am (devfd1, devfd2): new tests. - * devfd.in1, devfd.in2, devfd1.awk, devfd1.ok, devfd2.ok: new files. - -Sun Mar 12 23:48:31 2006 Arnold D. Robbins - - * Makefile.am (concat4): new test. - * concat4.awk, concat4.in, concat4.ok: new files. - -Sun Mar 12 23:33:26 2006 Arnold D. Robbins - - * Makefile.am (subi18n): new test (from - KIMURA Koichi ). - * subi18n.awk, subi18n.ok: New files. - -Mon Dec 19 05:41:56 2005 Arnold D. Robbins - - * Makefile.am (ovrflow1): new test. - * ovrflow1.awk, ovrflow1.ok: new files. - -Wed Dec 14 19:01:08 2005 Arnold D. Robbins - - * Makefile.am (binmode1): new test. - * binmode1.ok: new file. - -Fri Oct 7 12:28:41 2005 Arnold D. Robbins - - * Makefile.am (fwtest): new test. - * fwtest.awk, fwtest.in, fwtest.ok: new files. - -Fri Aug 12 14:40:47 2005 Arnold D. Robbins - - * Makefile.am (nofile): New test. - * nofile.ok: New file. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Sun Jul 10 18:31:45 2005 Scott Deifik - - * regtest.sh: Changed to use diff instead of cmp for djgpp. - This addresses DOS vs. UNIX end-of-line issues. - -Thu Jun 9 23:40:14 2005 Arnold D. Robbins - - * Makefile.am (Maketests): Don't use $< in rule, it breaks - on some non-GNU versions of make. Sigh. - -Wed Apr 27 22:22:05 2005 Arnold D. Robbins - - * Makefile.am (longdbl): new test. - * longdbl.awk, longdbl.in, longdbl.ok: new files. - -Wed Feb 2 16:44:41 2005 Arnold D. Robbins - - * Makefile.am (exitval2): new test. - * exitval2.awk, exitval2.ok: new files. - -Mon Jan 31 10:00:52 2005 Arnold D. Robbins - - * Makefile.am (gnuops3): new test. - * gnuops3.awk, gnuops3.ok: new files. - -Wed Jan 19 18:04:40 2005 Arnold D. Robbins - - * Makefile.am (hex): new test. - * hex.awk, hex.ok: new files. - -Sun Jan 9 11:53:09 2005 Arnold D. Robbins - - * Makefile.am (strftime, igncras2, subamp): Use `GAWKLOCALE', - not `GAWK_LOCALE'. Grrr! - -Mon Jan 3 12:20:08 2005 William J. Poser - - * Makefile.am (wjposer1): new test. - * wjposer1.awk, wjposer1.in, wjposer1.ok: new files. - -Mon Jan 3 11:55:48 2005 Arnold D. Robbins - - * Makefile.am (rsstart1, rsstart2, rsstart3): new tests. - * rsstart1.in, rsstart1.awk, rsstart1.ok, rsstart2.awk, - rsstart2.ok, rsstart3.ok: new files. - -Sun Dec 19 17:31:48 2004 Arnold D. Robbins - - * Makefile.am (gensub2): new test. - * gensub2.awk, gensub2.ok: new files. - - Thanks to "John H. DuBois III" . - -Thu Dec 9 15:22:58 2004 Arnold D. Robbins - - * Makefile.am (fsspcoln): new test. - * fsspcoln.awk, fsspcoln.in, fsspcoln.ok: new files. - -Mon Nov 29 18:41:33 2004 Arnold D. Robbins - - * Makefile.am (iobug1): new test. - * iobug1.awk, iobug1.ok: new files. - -Tue Sep 28 18:39:53 2004 Arnold D. Robbins - - * nondec.awk, nondec.ok: Add 00.34 as value to print, it should - not be treated as octal. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Wed Jul 14 16:04:46 2004 Arnold D. Robbins - - * Makefile.am (rstest6): new test. - * rstest6.awk, rstest6.in, rstest6.ok: new files. - -Tue Jul 13 10:53:32 2004 Arnold D. Robbins - - * strftlng: Use `$(CMP) ... >/dev/null 2>&1' instead of `-s' - for OS/2 and other systems that use `CMP = diff -a'. - -Mon Jun 14 18:44:39 2004 Pat Rankin - - * longwrds.awk: allow caller the means to override SORT command. - -Tue Jun 8 14:12:52 2004 Arnold D. Robbins - - * Makefile.am (fordel, printfbad1): new tests. - * fordel.awk, fordel.ok: new files. - * printfbad1.awk, printfbad1.ok: new files. - -Mon Apr 19 20:29:52 2004 Arnold D. Robbins - - * Makefile.am (manglprm): new test. - * manglprm.awk, manglprm.in, manglprm.ok: new files. - -Mon Feb 23 18:39:24 2004 Arnold D. Robbins - - * inftest.awk: Add loop limit per Nelson H.F. Beebe. - * Makefile.am (strftime): Use LC_ALL=C for `date' invocation. - -Thu Feb 12 02:08:15 2004 Stepan Kasal - - * Makefile.am (diffout): Use $(srcdir), when we are not building - in the source tree. - -Wed Feb 11 10:23:39 2004 Arnold D. Robbins - - * Makefile.am (strcat1): new test. - * strcat1.awk, strcat1.ok: new files. - -Fri Feb 6 12:09:55 2004 Arnold D. Robbins - - * Makefile.am (CLEANFILES): Added. - -Thu Feb 5 15:34:14 2004 Arnold D. Robbins - - * Makefile.am (exitval1): new test. - * exitval1.awk, exitval1.ok: new files. - -Mon Feb 2 10:29:19 2004 Arnold D. Robbins - - * Makefile.am (subamp): new test. - * subamp.awk, subamp.in, subamp.ok: new files. - - * subamp, ignrcas2, strftime: Set GAWK_LOCALE, not LC_ALL. - -Wed Jan 14 15:28:34 2004 Arnold D. Robbins - - * Makefile.am (backw): new test. - * backw.awk, backw.in, backw.ok: new files. - -Mon Dec 1 10:29:22 2003 Arnold D. Robbins - - * Makefile.am (concat3): new test. - * concat3.awk, concat3.ok: new files. - -Sun Nov 2 16:05:21 2003 Arnold D. Robbins - - * Makefile.am (concat2): new test. - * concat2.awk, concat2.ok: new files. - -Wed Oct 29 13:35:37 2003 Arnold D. Robbins - - * Makefile.am (subsepnm): new test. - * subsepnm.awk, subsepnm.ok: new files. - -Mon Sep 15 16:05:37 2003 Arnold D. Robbins - - * Makefile.am (ignrcas2): new test. - * ignrcas2.awk, ignrcas2.ok: new files. - -Tue Sep 9 16:03:34 2003 Arnold D. Robbins - - * Makefile.am (unterm): new test. - * unterm.awk, unterm.ok: new files. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -Fri Jul 4 11:12:07 2003 Arnold D. Robbins - - * Makefile.am (poundbang2): Removed. - (poundbang): Added env var settings. - -Thu Jun 26 15:44:33 2003 Arnold D. Robbins - - * Makefile.am (match2, whiny): new tests. - * match2.awk, match2.ok: new files. - * whiny.awk, whiny.ok: new files. - -Thu Jun 26 14:51:40 2003 Arnold D. Robbins - - * Makefile.am: Use double quotes for sed invocation to make - life easier (eventually) for DOS version of Makefile. - * pipeio2.awk, pipio2.ok: Ditto. - -Wed Jun 18 12:32:14 2003 Arnold D. Robbins - - * Makefile.am (AWK): Use LC_ALL=$${GAWKLOCALE:-C} and - same for LANG when running awk. Provides sane locale for - tests with ability to override it if need be. - (all tests): Removed explicit setting of LC_ALL and LANG. - * Gentests: Ditto. - -Wed May 28 08:02:33 CEST 2003 Stepan Kasal - - * Makefile.am (uninit4): new test. - * uninit4.awk, uninit4.ok: new files. - -Wed May 28 06:30:23 2003 Stepan Kasal - - * Makefile.am (aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 scalar uninit3): - new tests. - * aryprm4.awk aryprm4.ok aryprm5.awk aryprm5.ok aryprm6.awk aryprm6.ok: - aryprm7.awk aryprm7.ok aryprm8.awk aryprm8.ok scalar.awk scalar.ok: - uninit3.awk uninit3.ok: new files. - -Tue May 27 14:27:50 2003 Stepan Kasal - - * Makefile.am (aryprm1, aryprm2, aryprm3, sortempty): New tests. - * aryprm1.awk, aryprm1.ok, aryprm2.awk, aryprm2.ok: New files. - * aryprm3.awk, aryprm3.ok, sortempty.awk, sortempty.ok: dtto - * prmarscl.ok: The actual error message has changed. - -Tue May 27 08:23:51 2003 Stepan Kasal - - * arrayref3.ok, arrayref4.ok, fnaryscl.ok: Error messages reformatted. - -Sun Jun 8 17:18:06 2003 Arnold D. Robbins - - * Makefile.am (fmttest, strtonum, nested, gsubtst5, delarpm2): New tests. - * fmttest.awk, fmttest.ok: New files. From Nelson Beebe, - . - * strtonum.awk, strtonum.ok: New files. - * nested.awk, nested.in, nested.ok: New files. - * gsubtst5.awk, gsubtst5.in, gsubtst5.ok: New files. - * delarpm2.awk, delarpm2.ok: New files. (Also from Nelson Beebe.) - - * switch2.awk: Currently unused test for switch code. - -Wed May 14 16:49:53 2003 Arnold D. Robbins - - * Gentests: Add LC_ALL=C LANG=C to generated tests. - * Makefile.am: All other manual tests: ditto. - -Sun May 11 15:27:55 2003 Stepan Kasal - - * Makefile.am (rsnulbig, rsnulbig2): New tests. - * rsnulbig.ok, rsnulbig2.ok: New files. - -Sun May 11 15:00:20 2003 Arnold D. Robbins - - * Makefile.am (arrayprm2, arrayprm3, arryref2, arryref3, arryref4, - arryref5, rstest3, rstest4, rstest5): New tests. - * arrayprm2.awk, arrayprm2.ok, arrayprm3.awk, arrayprm3.ok, arryref2.ok, - arryref3.ok, arryref4.ok, arryref5.ok, rstest3.awk, rstest3.ok, rstest4.awk, - rstest4.ok, rstest5.awk, rstest5.ok: New files. - -Sun May 11 12:20:59 2003 Arnold D. Robbins - - * strftime.awk: Remove seconds from input and strftime output, - to decrease chance of failing on second boundary. - * Makefile.am (strftime): Tweak message appropriately. - -Tue Mar 25 08:35:42 2003 Arnold D. Robbins - - * Makefile.am (fnarray2): New test. - * fnarray2.awk, fnarray2.ok: New files. - -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, for `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. - -Tue Apr 16 17:07:25 2002 Arnold D. Robbins - - * Makefile.am (pass-fail): New target that prints an - `all passed' or `x tests failed' message, for use in - grep-ing build logs. - (check): Add pass-fail as last dependency. - - Thanks to Nelson Beebe for the thought, beebe@math.utah.edu. - -Sun Mar 10 17:00:51 2002 Scott Deifik - - * Makefile.am (strftime): Add TZ=GMT0 into environment, to - regularize things, esp. for some DJGPP systems. - -Mon Feb 18 14:55:19 2002 Arnold D. Robbins - - * Makefile.am (longsub): new test case. - * longsub.awk, longsub.in, longsub.ok: new files. - -Wed Jan 23 15:03:36 2002 Andreas Buening - - * Makefile.am (PATH_SEPARATOR): Added. - (awkpath): Make use of PATH_SEPARATOR. - -Wed Jan 23 14:50:38 2002 Arnold D. Robbins - - * Makefile.am (concat1): new test case. - * concat1.awk, concat1.in, concat1.ok: new files. - -Mon Jan 7 22:21:25 2002 Arnold D. Robbins - - * Makefile.am (forsimp): new test case. - * forsimp.awk, forsimp.ok: new files. - -Wed Dec 26 22:01:52 2001 Arnold D. Robbins - - * Makefile.am (inftest): Add sed to fix case issues between - different libc versions. Ugh. - -Wed Dec 19 16:01:58 2001 Peter J. Farley III - - * Makefile.am (manyfiles): Also delete \15 in tr. - -Tue Dec 18 20:56:07 2001 Andreas Buening - - * Makefile.am (nors): Add \15 to list of chars to delete so - test will run on OS/2 also. - -Thu Oct 4 18:34:49 2001 Arnold D. Robbins - - * Makefile.am (membug1): new test case. - * membug1.awk, membug1.in, membug1.ok: new files. - -Thu Aug 23 14:04:10 2001 Arnold D. Robbins - - * Makefile.am (minusstr): new test case. - * minusstr.awk, minusstr.ok: new files. - -Sat Aug 4 23:42:37 2001 Arnold D. Robbins - - * Makefile.am (arrymem1): new test case. - (compare2): new test case. - (regtest): Make test work, use regtest.sh, not .awk. - * arrymem1.awk, arrymem1.ok: new files. - * compare2.awk, compare2.ok: new files. - -Mon Jul 23 17:32:03 2001 Arnold D. Robbins - - * Makefile.am (onlynl): new test case. - * onlynl.awk, onlynl.in, onlynl.ok: new files. - -Wed Jun 13 18:12:43 2001 Arnold D. Robbins - - * Makefile.am (ofmtfidl): new test case. - * ofmtfidl.awk, ofmtfidl.in, ofmtfidl.ok: new files. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Sun May 6 13:30:20 2001 Arnold Robbins - - * inftest.awk: Changed test to use < so that it will - work for MSC and DJGPP combination, per Scott Deifik. - -Tue Mar 20 11:09:51 2001 Arnold Robbins - - * Makefile.am (funsemnl): new test case. - * funsemnl.awk, funsemnl.ok: new files. - -Wed Mar 7 11:31:41 2001 Arnold Robbins - - * Makefile.am (leadnl): new test case. - * leadnl.awk, leadnl.in, leadnl.ok: new files. - -Tue Feb 6 18:08:15 2001 Arnold Robbins - - * Makefile.am (rebt8b1, rebt8b2): new test case. - * rebt8b1.awk, rebt8b1.ok: new files. - * rebt8b2.awk, rebt8b2.ok: new files. - -Sun Dec 3 15:36:41 2000 Arnold Robbins - - * Makefile.am (gnuops2): New test case. - * gnuops2.awk, gnuops2.ok: New files, based on bug report from - Servatius.Brandt@fujitsu-siemens.com. - -Mon Nov 27 15:52:46 2000 Arnold Robbins - - * regx8bit.awk, regx8bit.ok: Updated to what should - work on all systems. - -Wed Nov 22 13:27:59 2000 Arnold Robbins - - * Makefile.am (poundbang): Added some smarts for /tmp mounted - noexec. Hopefully it'll even work. - -Tue Nov 14 17:45:02 2000 Arnold Robbins - - * Makefile.am: Added - to all cmp calls for consistency. - -Sun Nov 12 17:50:18 2000 Arnold Robbins - - * Makefile.am (addcomma): new test case. - * addcomma.awk, addcomma.in, addcomma.ok: new files. - -Tue Nov 7 16:03:06 2000 Arnold Robbins - - * Makefile.am (regx8bit, psx96sub): new test cases. - * regx8bit.awk, regx8bit.ok, psx96sub.awk, psx96sub.ok: new files. - -Sun Oct 22 12:09:43 2000 Arnold Robbins - - * Makefile.am (shadow): new test case. - * shadow.awk, shadow.ok: new files. - -Tue Oct 17 10:51:09 2000 Arnold Robbins - - * Makefile.am (arynasty): new test case. - * arynasty.awk, arynasty.ok: new files. - -Mon Oct 2 10:17:13 2000 Arnold Robbins - - * Makefile.am (clsflnam): Add redirect of stderr. - * clsflnam.awk, clsflnam.ok: modified to reflect changed - semantics of close() for a non-open file. See ../ChangeLog. - -Sun Sep 24 16:46:29 2000 Arnold Robbins - - * Makefile.am (nasty2): new test case. - * nasty2.awk, nasty2.ok: new files. - -Wed Sep 13 11:09:49 2000 Arnold Robbins - - * Makefile.am (check): Added calls to new targets that - print messages. - (clos1way, basic-msg-start, basic-msg-end, unix-msg-start, - unix-msg-end, extend-msg-start, extend-msg-end): new targets. - * clos1way.awk, clos1way.ok: new files. - -Tue Sep 12 16:29:54 2000 Arnold Robbins - - * Makefile.am (leaddig): new test case. - * leaddig.awk, leaddig.ok: new files. - -Wed Sep 6 14:09:15 2000 Arnold Robbins - - * Makefile.am (strtod): new test case. - * strtod.awk, strtod.in, strtod.ok: new files. - -Mon Sep 4 09:33:28 2000 Arnold D. Robbins - - * Makefile.in (octsub): new test case. - * octsub.awk, octsub.ok: new files. - -Sun Aug 13 12:37:16 2000 Arnold Robbins - - * Makefile.am (sort1, diffout): new test cases. - * sort1.awk, sort1.ok: new files. - -2000-02-15 Arnold Robbins - - * MOVED TO AUTOMAKE AND GETTEXT. - Just about every file touched. Work done by Arno Peters. - -Wed May 19 15:41:41 1999 Arnold D. Robbins - - * Makefile.in (datanonl,regeq,redfilnm): new test cases. - * datanonl.awk, datanonl.in, datanonl.ok: new files. - * regeq.awk, regeq.in, regeq.ok: new files. - * redfilnm.awk, redfilnm.in, redfilnm.ok: new files. - -Mon May 10 17:11:30 1999 Arnold D. Robbins - - * Makefile.in (rsnul1nl): new test case. - * rsnul1nl.awk, rsnul1nl.in, rsnul1nl.ok: new files. - -Sun Apr 25 13:02:35 1999 Arnold D. Robbins - - * Makefile.in (inetechu,inetecht,inetdayu,inetdayt,inet): new - tests, courtesy of Juergen Khars. - (paramtyp): new test for bug from Juergen. - * paramtyp.awk, paramtyp.in: new files. - -Sun Oct 25 23:11:46 1998 Arnold D. Robbins - - * Makefile.in (ofmtbig,procinfs): new test cases. - * procinfs.awk, procinfs.ok: new files. - * ofmtbig.awk, ofmtbig.in, ofmtbig.ok: new files. - -Tue Oct 20 22:07:10 1998 Arnold D. Robbins - - * Makefile.in (lint): new test case. - * lint.awk, lint.ok: new files. - * badargs.ok: updated output corresponding to change made to - main.c (see main ChangeLog). - -Tue May 26 20:39:07 1998 Arnold D. Robbins - - * pipeio2.awk: change "\'" to "'" to avoid new warning. - -Mon Mar 23 21:53:36 1998 Arnold D. Robbins - - * Makefile.in (fnasgnm): new test case. - * fnasgnm.awk, fnasgnm.in, fnasgnm.ok: new files. - -Fri Mar 20 11:01:38 1998 Arnold D. Robbins - - * Makefile.in (fnaryscl): new test case. - * fnaryscl.awk, fnaryscl.ok: new files. - -Mon Mar 16 15:23:22 1998 Arnold D. Robbins - - * Makefile.in (splitdef): new test case. - * splitdef.awk, splitdef.ok: new files. - -Fri Sep 26 01:10:14 1997 Arnold D. Robbins - - * Makefile.in (parseme): new test case. - * parseme.awk, parseme.ok: new files. - -Sun Sep 14 23:25:10 1997 Arnold D. Robbins - - * Makefile.in (ofmts): new test case. - * ofmts.awk, ofmts.in, ofmts.ok: new files. - -Sun Aug 17 07:17:35 1997 Arnold D. Robbins - - * Makefile.in (fsfwfs): new test case. - * fsfwfs.awk, fsfwfs.in, fsfwfs.ok: new files. - -Sun Jul 27 23:08:53 1997 Arnold D. Robbins - - * Makefile.in (hsprint): new test case. - * hsprint.awk, hsprint.ok, printfloat.awk: new files. - -Thu Jul 17 20:07:31 1997 Arnold D. Robbins - - * Makefile.in (ofmt): new test case. - * ofmt.awk, ofmt.in, ofmt.ok: new files. - -Sun Jun 22 16:17:35 1997 Arnold D. Robbins - - * Makefile.in (nlinstr): new test case. - * nlinstr.awk, nlinstr.in, nlinstr.ok: new files. - -Wed Jun 4 13:18:21 1997 Arnold D. Robbins - - * pid.sh: send errors to /dev/null to toss warning about - using PROCINFO["pid"] etc. This test explicitly tests - the special files. It'll need changing in 3.2. - -Thu Apr 24 23:24:59 1997 Arnold D. Robbins - - * Makefile.in (messages): remove special case if /dev/fd exists. - Finally. - -Mon Aug 7 15:23:00 2000 Arnold D. Robbins - - * Release 3.0.6: Release tar file made. - -Thu Aug 3 17:51:56 2000 Arnold D. Robbins - - * Makefile.in (nlstrina): new test case. - * nlstrina.awk, nlstrina.ok: new files. - -Tue Jul 11 14:22:55 2000 Arnold D. Robbins - - * Makefile.in (fnparydl): new test case. - * fnparydl.awk, fnparydl.ok: new files. - -Fri Jun 30 22:00:03 2000 Arnold D. Robbins - - * Makefile.in (arysubnm): new test case. - * arysubnm.awk, arysubnm.ok: new files. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 14 13:17:59 2000 Arnold D. Robbins - - * Makefile.in (getlnbuf): new test case. - * getlnbuf.awk, gtlnbufv.awk, getlnbuf.in, getlnbuf.ok: new files. - -Mon Jun 5 15:51:39 2000 Arnold D. Robbins - - * pipeio2.awk: Change use of tr to sed, fixes problems - on SCO OS5. - * pipeio2.ok: Updated to reflect use of sed. - -Tue May 2 13:28:04 2000 Arnold D. Robbins - - * Makefile.in (strftime): moved test code into a separate - file for the PC guys. - * strftime.awk: new file. - -Mon Apr 10 15:58:13 2000 Arnold D. Robbins - - * Makefile.in (longwrds): Add setting LC_ALL=C to sort - call to preserve traditional output. (Theme from the - Twilight Zone plays eerily in the background...) - -Sun Apr 2 17:51:40 2000 Arnold D. Robbins - - * Makefile.in (igncdym): new test case. - * igncdym.awk, igncdym.in, igncdym.ok: new files. - -Wed Mar 8 13:43:44 2000 Arnold D. Robbins - - * Makefile.in (arynocls): new test case. - * arynocls.awk, arynocls.in, arynocls.ok: new files. - -Sun Feb 6 11:45:15 2000 Arnold D. Robbins - - * Makefile.in (opasnidx): new test case. - * opasnidx.awk, opasnidx.ok: new files. - -Tue Feb 1 18:40:45 2000 Arnold D. Robbins - - * Makefile.in (opasnslf): new test case. - * opasnslf.awk, opasnslf.ok: new files. - -Thu Jan 27 18:09:18 2000 Arnold D. Robbins - - * Makefile.in (subslash): new test case. - * subslash.awk, subslash.ok: new files. - -Fri Nov 26 11:03:07 1999 Arnold D. Robbins - - * Makefile.in (numindex): new test case. - * numindex.awk, numindex.in, numindex.ok: new files. - -Sun Oct 24 08:46:16 1999 Arnold D. Robbins - - * Makefile.in (strftime): Add tweak for $NF that should - hopefully avoid cygwin problems with lack of timezone. - -Thu Jul 29 19:25:02 1999 Arnold D. Robbins - - * Makefile.in (fsmnam, fnamedat): new test cases. - * fsmnam.awk, fsmnam.ok: new files. - * fnamedat.awk, fnamedat.in, fnamedat.ok: new files. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Tue May 25 16:37:50 1999 Arnold D. Robbins - - * Makefile.in (printf1): new test case. - * printf1.awk, printf1.ok: new files. - -Wed May 19 15:32:09 1999 Arnold D. Robbins - - * reg/*: moved exp and log tests to new `Obsolete' directory; they - would only succeed under SunOS 4.x. - -Mon May 3 11:53:33 1999 Arnold D. Robbins - - * Makefile.in (gawk.extensions): removed `nondec' until the - associated features get documented in 3.1. - -Tue Nov 3 16:46:39 1998 Arnold D. Robbins - - * Makefile.in (getnr2tm, getnr2tb): new test cases. - * getnr2tm.awk, getnr2tm.in, getnr2tm.ok: new files. - * getnr2tb.awk, getnr2tb.in, getnr2tb.ok: new files. - -Sun Nov 1 13:20:08 1998 Arnold D. Robbins - - * Makefile.in (zeroflag): new test case. - * zeroflag.awk, zeroflag.ok: new files - -Wed Oct 28 18:44:19 1998 Arnold D. Robbins - - * Makefile.in (nasty): new test case. - * nasty.awk, nasty.ok: new files - -Sun Nov 16 20:08:59 1997 Arnold D. Robbins - - * gsubtest.awk, gsubtest.ok: fix for count of matches in gsub - from Geert.Debyser@esat.kuleuven.ac.be. - -Sun Nov 16 19:54:50 1997 Arnold D. Robbins - - * Makefile.in (strftime): fix a typo (LANC -> LANG). - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Tue May 13 12:53:46 1997 Arnold D. Robbins - - * Makefile.in (messages): more testing for OK failure on Linux. - -Sun May 11 14:57:11 1997 Arnold D. Robbins - - * Makefile.in (nondec): new test case. - * nondec.awk, nondec.ok: new files. - -Sun May 11 07:07:05 1997 Arnold D. Robbins - - * Makefile.in (prdupval): new test case. - * prdupval.awk, prdupval.in, prdupval.ok: new files. - -Wed May 7 21:54:34 1997 Arnold D. Robbins - - * Makefile.in (delarprm): new test case. - * delarprm.awk, delarprm.ok: new files. - -Wed May 7 17:54:00 1997 Arnold D. Robbins - - * Makefile.in (pid): several fixes from ghazi@caip.rutgers.edu. - -Tue May 6 20:28:30 1997 Arnold D. Robbins - - * Makefile.in (strftime): Use the right locale stuff. - (clobber): don't need an input file. - -Thu Apr 24 22:24:42 1997 Arnold D. Robbins - - * Makefile.in (pid): new test case, from jco@convex.com. - (specfile): removed test case, pid does it better. - * pid.awk, pid.ok, pid.sh: new files. - * specfile.awk: removed. - -Wed Apr 23 23:37:10 1997 Arnold D. Robbins - - * Makefile.in (pipeio2): new test case. - * pipeio2.awk, pipeio2.ok, pipeio2.in: new files. - -Sun Apr 20 12:22:52 1997 Arnold D. Robbins - - * Makefile.in (clobber): new test case. - * clobber.awk, clobber.ok: new files. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Tue Apr 15 05:57:29 1997 Arnold D. Robbins - - * Makefile.in (strftlng): More wizardry for bizarre Unix systems. - (nlfldsep): use program and input file, not shell script - (basic, unix-tests, gawk.extensions): moved specfile, pipeio1 - and strftlng into unix-tests per Pat Rankin. - * nlfldsep.awk, nlfldsep.in: new files. - * nlfldsep.sh: removed. - -Wed Apr 9 23:32:47 1997 Arnold D. Robbins - - * Makefile.in (funstack): new test case. - * funstack.awk, funstack.in, funstack.ok: new files. - * substr.awk: added many more tests. - * substr.ok: updated - -Wed Mar 19 20:10:21 1997 Arnold D. Robbins - - * Makefile.in (pipeio1): new test case. - * pipeio1.awk, pipeio1.ok: new files. - -Tue Mar 18 06:38:36 1997 Arnold D. Robbins - - * Makefile.in (noparm): new test case. - * noparm.awk, noparm.ok: new files. - -Fri Feb 21 06:30:18 1997 Arnold D. Robbins - - * Makefile.in (reint): new test case. - * reint.awk, reint.in, reint.ok: new files. - -Wed Feb 5 18:17:51 1997 Arnold D. Robbins - - * Makefile.in (fnarydel): new test case. - * fnarydel.awk, fnarydel.ok: new files. - -Sun Jan 19 17:06:18 1997 Arnold D. Robbins - - * Makefile.in (nors): new test case. - * nors.ok: new file. - -Sun Jan 19 17:06:18 1997 Arnold D. Robbins - - * Makefile.in (specfile, strftlng, nfldstr): new test cases. - * specfile.awk, strftlng.awk, strftlng.ok, nfldstr.ok: new files. - -Fri Dec 27 11:27:13 1996 Arnold D. Robbins - - * Makefile.in (intest): new test case. - * intest.awk, intest.ok: new files. - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Thu Nov 7 09:12:20 1996 Arnold D. Robbins - - * Makefile.in (splitvar): new test case. - * splitvar.awk, splitvar.in, splitvar.ok: new files. - -Sun Nov 3 10:55:50 1996 Arnold D. Robbins - - * Makefile.in (nlfldsep): new test case. - * nlfldsep.sh, nlfldsep.ok: new files. - -Fri Oct 25 10:29:56 1996 Arnold D. Robbins - - * rand.awk: call srand with fixed seed. - * rand.ok: new file. - * Makefile.in (rand): changed to compare output with rand.ok. - -Sat Oct 19 21:52:04 1996 Arnold D. Robbins - - * Makefile.in (tradanch): new test case. - * tradanch.awk, tradanch.in, tradanch.ok: new files. - -Thu Oct 17 21:22:05 1996 Arnold D. Robbins - - * tweakfld.awk: move `rm' out into Makefile.in. - * eofsplit.awk: fixed buggy code so won't loop forever. - * Makefile.in (all): add unix-tests. - (unix-tests): new target, has pound-bang, fflush, getlnhd. - (basic): removed fflush, getlnhd. - (tweakfld): added rm from tweakfld.awk. - -Sun Oct 6 22:00:35 1996 Arnold D. Robbins - - * Makefile.in (back89): new test case. - * back89.in, back89.ok: new files. - -Sun Oct 6 20:45:54 1996 Arnold D. Robbins - - * Makefile.in (splitwht): new test case. - * splitwht.awk, splitwht.ok: new files. - -Sun Sep 29 23:14:20 1996 Arnold D. Robbins - - * Makefile.in (gsubtest): new test case. - * gsubtest.awk, gsubtest.ok: new files. - -Fri Sep 20 11:58:40 1996 Arnold D. Robbins - - * Makefile.in (prtoeval): new test case. - * prtoeval.awk, prtoeval.ok: new files. - -Tue Sep 10 06:26:44 1996 Arnold D. Robbins - - * Makefile.in (gsubasgn): new test case. - * gsubasgn.awk, gsubasgn.ok: new files. - -Wed Aug 28 22:06:33 1996 Arnold D. Robbins - - * badargs.ok: updated output corresponding to change made to - main.c (see main ChangeLog). - -Thu Aug 1 07:20:28 1996 Arnold D. Robbins - - * Makefile.in (clean): remove out[123] files from `messages' test. - Thanks to Pat Rankin (rankin@eql.caltech.edu). - -Sat Jul 27 23:56:57 1996 Arnold D. Robbins - - * Makefile.in (prt1eval): new test case. - * prt1eval.awk, prt1eval.ok: new files. - -Mon Jul 22 22:06:10 1996 Arnold D. Robbins - - * Makefile.in (eofsplit): new test case. - * eofsplit.awk, eofsplit.ok: new files. - -Sun Jul 14 07:07:45 1996 Arnold D. Robbins - - * Makefile.in (fldchgnf): new test case. - * fldchgnf.awk, fldchgnf.ok: new files. - -Tue May 21 23:23:22 1996 Arnold D. Robbins - - * Makefile.in (substr): new test case. - * substr.awk, substr.ok: new files. - -Tue May 14 15:05:23 1996 Arnold D. Robbins - - * Makefile.in (dynlj): new test case. - * dynlj.awk, dynlj.ok: new files. - -Sun May 12 20:45:34 1996 Arnold D. Robbins - - * Makefile.in (fnarray): new test case. - * fnarray.awk, fnarray.ok: new files. - -Fri Mar 15 06:46:48 1996 Arnold D. Robbins - - * Makefile.in (clean): added `*~' to list of files to be removed. - * tweakfld.awk (END): added to do clean up action. - -Thu Mar 14 16:41:32 1996 Arnold D. Robbins - - * Makefile.in (mmap8k): new test case. - * mmap8k.in, mmap8k.ok: new files. - -Sun Mar 10 22:58:35 1996 Arnold D. Robbins - - * Makefile.in (clsflnam): new test case. - * clsflnam.in, clsflnam.awk, clsflnam.ok: new files. - * tweakfld.awk: changed to have a fixed date. - -Thu Mar 7 09:56:09 1996 Arnold D. Robbins - - * Makefile.in (tweakfld): new test case. - * tweakfld.in, tweakfld.awk, tweakfld.ok: new files. - -Sun Mar 3 06:51:26 1996 Arnold D. Robbins - - * Makefile.in (getlnhd, backgsub) : new test cases. - * getlnhd.awk, getlnhd.ok: new files. - * backgsub.in, backgsub.awk, backgsub.ok: new files. - -Mon Feb 26 22:30:02 1996 Arnold D. Robbins - - * Makefile.in (sprintfc): new test case. - * sprintfc.in, sprintfc.awk, sprintfc.ok: new files. - * gensub.awk: updated for case of no match of regex. - -Wed Jan 24 10:06:16 1996 Arnold D. Robbins - - * Makefile.in (distclean, maintainer-clean): new targets. - (reindops): added test from Rick Adams (rick@uunet.uu.net). - (arrayparm, paramdup, defref, strftime, prmarscl, sclforin, - sclifin): Fix from Larry Schwimmer (schwim@cyclone.stanford.edu) - so that tests that are supposed to fail use `... || exit 0' to - cause a clean `make clean'. - -Wed Jan 10 22:58:55 1996 Arnold D. Robbins - - * ChangeLog created. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/test/ChangeLog.0 gawk-4.0.1+dfsg/test/ChangeLog.0 --- gawk-3.1.8+dfsg/test/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/ChangeLog.0 2011-06-20 17:35:24.000000000 +0000 @@ -0,0 +1,1785 @@ +Mon Jun 20 20:35:04 2011 Arnold D. Robbins + + * dfastress.awk, dfastress.ok: New files. + * Makefile.am (dfastress): New test. + +Sun Jun 5 21:45:27 2011 Arnold D. Robbins + + * fpat1.ok, fpat1.in: Updated to test things better. + +Tue May 31 22:50:28 2011 Arnold D. Robbins + + * regrange.awk, regrange.ok: New files. + * Makefile.am (regrange): New test. + +Thu May 26 22:08:27 2011 Arnold D. Robbins + + * fpat2.awk, fpat2.ok: New files. Thanks to Pat Rankin for the cases. + * Makefile.am (fpat2): New test. + +Mon May 23 14:03:15 2011 Arnold D. Robbins + + * fpatnull.awk, fpatnull.in, fpatnull.ok: New files. + * Makefile.am (fpatnull): New test. + +Sun May 22 11:58:58 2011 Arnold D. Robbins + + * dumpvars.ok: Updated. + +Thu May 19 16:56:31 2011 Arnold D. Robbins + + * badargs.ok: Updated. + +Sat May 14 22:28:56 2011 Arnold D. Robbins + + * delargv.awk, delargv.ok: New files. + * Makefile.am (delargv): New test. + +Mon May 9 15:06:17 2011 Arnold D. Robbins + + * Makefile.am: Put next and exit tests into gawk specific tests + since they use BEGINFILE and ENDFILE. Thanks to Pat Rankin. + +Sun May 8 20:32:59 2011 Arnold D. Robbins + + * arraysort.ok, sort1.ok: Updated. + +Wed May 4 23:37:27 2011 Arnold D. Robbins + + Revise tests for array sorting. + + * arraysort.awk, arraysort.ok, sort1.awk, sort1.ok, + sortfor.awk: Revised. + +Wed May 4 23:07:39 2011 Arnold D. Robbins + + * nastyparm.awk, nastyparm.ok: New files from John Haque. + * Makefile.am (nastyparm): New test. + +Wed May 4 23:03:06 2011 Arnold D. Robbins + + * delsub.awk, delsub.ok: New files. + * Makefile.am (delsub): New test. + +Fri Apr 22 16:07:01 2011 John Haque + + * sortu.awk, sortu.ok: New files. + +Fri Apr 22 09:19:06 2011 Arnold D. Robbins + + * arraysort.ok: Updated. + +Mon Apr 18 10:22:28 2011 John Haque + + * arraysort.awk, arraysort.ok, sort1.awk, sort1.ok: Updated. + +Fri Apr 15 13:49:36 2011 Arnold D. Robbins + + * ofmta.awk, ofmta.ok: New files from John Haque. + * Makefile.am (ofmta): New test. + +Thu Apr 7 21:44:06 2011 Arnold D. Robbins + + * arraysort.awk, arraysort.ok: Added more test cases. + +Fri Apr 1 11:56:54 2011 Arnold D. Robbins + + * arraysort.awk, arraysort.ok: New files from John Haque, + edited somewhat. + * Makefile.am (arraysort): New test. + +Wed Mar 30 22:00:59 2011 Arnold D. Robbins + + * next.sh, exit.sh: New files from John Haque, edited somewhat. + * Makefile.am (next, exit): New tests. + +Mon Feb 21 20:32:36 2011 Arnold D. Robbins + + * Makefile.am (GAWK_EXT_TESTS): Include profile3. Thanks to + Scott Deifik for pointing out the omission. + +Tue Feb 15 17:11:26 2011 Pat Rankin + + * sortfor.awk: New values for PROCINFO["sorted_in"]. + * sortfor.ok: Sync with updated sortfor.awk. + +Wed Feb 16 21:09:50 2011 Arnold D. Robbins + + * Makefile.am (lintwarn): New test. + * lintwarn.awk, lintwarn.ok: New files from John Haque. + * funsmnam.ok, noeffect.ok, paramdup.ok, paramres.ok: Adjust + after fixes to lint warnings. + +Mon Feb 14 21:31:10 2011 Arnold D. Robbins + + * Makefile.am (profile2): Add -v sortcmd=sort to pgawk invocation. + (profile1): Remove awkprof.out. Thanks to Pat Rankin for noticing. + +Sun Feb 13 20:27:35 2011 Pat Rankin + + * xref.awk: Allow sortcmd to be preset via -v option. + * profile2.ok: Sync with updated xref.awk. + +Sun Feb 13 19:55:15 2011 Arnold D. Robbins + + * Makefile.am (profile3): New test. + * profile3.awk, profile3.ok: New files. + +Fri Feb 11 10:29:48 2011 Arnold D. Robbins + + * Makefile.am (manyfiles): Bump limit up above 1024, which is + what most modern systems have for number of open file descriptors. + +Tue Feb 8 22:49:17 2011 Arnold D. Robbins + + * aryprm4.ok, scalar.ok, sclforin.ok, sclifin.ok: Fixed to match + output message changes. + +Mon Feb 7 21:39:39 2011 Arnold D. Robbins + + * Makefile.am (negrange): New test. + * negrange.awk, negrange.ok: New files. + +Tue Feb 1 23:21:39 2011 Arnold D. Robbins + + * xref.awk: Change sort command to just "sort"; avoids + problems for Windows and is good enough for the test. + * profile2.ok: Update. + +Tue Feb 1 10:20:47 2011 Arnold D. Robbins + + * sortfor.awk: Change magic string to match code. + +Thu Jan 27 22:56:19 2011 Arnold D. Robbins + + * Makefile.am (sortfor): New test. + * sortfor.awk, sortfor.in, sortfor.ok: New files. + +Thu Jan 27 22:03:22 2011 John Haque + + * xref.awk, profile2.ok: Fixed to be character set independent. + +Sun Dec 26 13:54:21 2010 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): Include profile2.ok in the list. Oops. + +Mon Dec 13 13:54:56 2010 Arnold D. Robbins + + * localenl.sh: Use --posix option. + +Sun Dec 12 13:58:36 2010 Arnold D. Robbins + + * gsubtst5.ok: Adjust contents. + +Tue Dec 7 22:31:51 2010 Arnold D. Robbins + + * Makefile.am (profile1, profile2): New tests. + * dtdgport.awk, xref.original, xref.awk, profile2.ok: New files. + * Gentests: Use POSIX character classes instead of ranges. + +Mon Dec 6 19:47:09 2010 Arnold D. Robbins + + * Makefile.am (whiny): Removed test. + * whiny.awk, whiny.in, whiny.ok: Removed. + +Wed Dec 1 08:11:46 2010 Corinna Vinschen + + * Makefile.am (beginfile1): Refer to Makefile instead of + $(srcdir)/Makefile for building out of the source directory. + +Tue Nov 30 13:51:35 2010 Arnold D. Robbins + + * badargs.ok: Updated. + +Mon Nov 29 21:52:49 2010 Arnold D. Robbins + + * funstack.awk, gsubtst5.ok, igncfs.awk, longwrds.awk, + ofmtbig.awk, subamp.awk: Fix regexes to remove ranges. + +Fri Nov 12 11:58:40 2010 Arnold D. Robbins + + * Makefile.am (dumpvars): New test. + * dumpvars.in, dumpvars.ok: New files. + +Thu Nov 11 16:29:06 2010 Arnold D. Robbins + + * backgsub.ok: Updated to match change in code. + * posix2008sub.awk, posix2008.ok: New files, renamed from ... + * psx96sub.awk, psx96sub.ok: Removed. + * Makefile.am (posix2008sub): Renamed from `psx96sub'. + +Tue Nov 2 12:14:50 2010 Arnold D. Robbins + + * badargs.ok: Updated. + +Mon Nov 1 21:44:48 2010 Arnold D. Robbins + + New tests for arrays of arrays, courtesy of John Haque + . + + * Makefile.am (aadelete1, aadelete2, aarray1, + aasort, aasorti): New tests. + * aadelete1.awk, aadelete1.ok, aadelete2.awk, aadelete2.ok, + aarray1.awk, aarray1.ok, aasort.awk, aasort.ok, + aasorti.awk, aasorti.ok: New files. + + Unrelated: + * badargs.ok: Updated. + +Tue Oct 26 20:49:41 2010 Arnold D. Robbins + + * Makefile.am (switch2): Made into a test. + * switch2.ok: New file. + +Tue Oct 19 08:26:03 2010 Arnold D. Robbins + + * Makefile.am (gsubtst6, mbstr1, mbprintf3, printfbad2): + Re-enable these tests that got lost during the merge. Thanks + to Scott Deifik for noticing. + +Fri Oct 15 14:20:22 2010 Arnold D. Robbins + + * Makefile.am (beginfile1, range1): New tests. + * beginfile1.awk, beginfile1.in, beginfile1.ok: New files. + * range1.awk, range1.in, range1.ok: New files. + +Sun Jun 27 22:01:38 2010 Arnold D. Robbins + + * badargs.ok: Updated with new usage message. + +Tue Jun 22 20:55:47 2010 Arnold D. Robbins + + * Makefile.am (fpat1, patsplit): New tests. + * fpat1.awk, fpat1.in, fpat1.ok, patsplit.awk, patsplit.ok: new files. + +Fri Jan 16 11:36:02 2009 Arnold D. Robbins + + * badargs.ok, funstack.awk, gsubtst4.ok: Adjust to change in + --gen-po option, removal of -r, and enabling interval expressions. + +Fri Jan 16 11:36:02 2009 Arnold D. Robbins + + * Makefile.am (indirectcall): New test. + * indirectcall.awk, indirectcall.in, indirectcall.ok: New files. + +Tue Dec 30 22:27:08 2008 Arnold D. Robbins + + * badargs.ok: Updated. + +Tue Dec 9 06:58:00 2008 Steffen Schuler + + * Makefile.am (splitarg4): New test. + * splitarg4.awk, splitarg4.in, splitarg4.ok: New files. + +Wed Dec 26 22:01:52 2001 Arnold D. Robbins + + * pid.awk: Fix to use PROCINFO now that /dev/pid, /dev/ppid gone. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Wed Apr 21 22:23:30 2010 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): Add Gentests.vms so it'll be + in the dist. + * localenl.sh, localenl.ok: Remove UNKNOWN locale per + request from Nelson Beebe. + * lc_num1.awk, lc_num1.ok: Revised to not fail on systems + where the quote flag isn't supported. Also per Nelson Beebe. + +Thu Feb 18 22:50:54 2010 Arnold D. Robbins + + * Makefile.am (fcall_exit2): New test. + * fcall_exit2.awk, fcall_exit2.in, fcall_exit2.ok: New files. + +Wed Feb 17 23:25:27 2010 Arnold D. Robbins + + * Makefile.am (fcall_exit): New test. + * fcall_exit.awk, fcall_exit.ok: New files. + +Fri Feb 5 13:02:10 2010 Arnold D. Robbins + + * Makefile.am (forref): New test. + * forref.awk, forref.ok: New files. + +Tue Oct 6 19:49:22 2009 Arnold D. Robbins + + * Makefile.am (uninit5): New test. + * uninit5.awk, uninit5.ok: New files. + +Tue Aug 4 06:04:04 2009 Arnold D. Robbins + + * hsprint.ok: Updated. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Fri Jul 3 13:04:55 2009 Arnold D. Robbins + + * Makefile.am (charset-tests): Moved tests that can fail based on + character set and locale issues into a separate section. + +Wed Jun 24 22:30:31 2009 Arnold D. Robbins + + * lintold.awk: Changed to avoid floating point problems on VMS. + +Wed Jun 24 05:39:00 2009 Arnold D. Robbins + + * printfbad2.awk, printfbad2.ok: Adjusted for systems where sed + will add a final newline if the input didn't contain one. + +Mon Jun 22 00:44:50 2009 Pat Rankin + + * getlndir.awk (SRCDIR): Allow caller to override "." as directory. + * intformat.awk (HUGEVAL): Allow caller to override the largest + value, and restructure 10^x and 2^y loops to use it without + overflowing on non-IEEE floating pointing hosts. + +Tue Jun 23 05:26:52 2009 Arnold D. Robbins + + * Makefile.am (MACHINE_TESTS): Move fmtspcl to here per Pat Rankin. + +Fri Jun 19 14:26:55 2009 Arnold D. Robbins + + * Makefile.am (GAWK_EXT_TESTS): Fixed sorting of tests. + Removed ovrflow1 test since double1 is a superset; thanks + to Pat Rankin. + * (ovrflow1.awk, ovrflow1.ok): Removed. + +Thu Jun 18 05:46:32 2009 Arnold D. Robbins + + * Makefile.am (localenl): Per Michal Jaegermann, send stderr output + to /dev/null. + * (machine-tests): Moved several tests to new section for tests + whose output can vary by hardware. + +Thu Jun 11 04:50:44 2009 Arnold D. Robbins + + * Makefile.am (lc_num1): Don't need --posix, changed command line + so that AWKPATH influences again. Thanks to Corinna Vinschen + for making me fix this. + +Wed Jun 10 08:28:13 2009 Arnold D. Robbins + + * Makefile.am (lc_num1, printfbad2): Fix so building outside the + source directory works. + +Thu May 21 21:10:53 2009 Arnold D. Robbins + + * badargs.ok: Updated. + +Fri May 15 14:38:16 2009 Arnold D. Robbins + + * Makefile.am (paramres): New test. + * paramres.awk, paramres.ok: New files. + +Fri Mar 27 10:57:49 2009 Arnold D. Robbins + + * Makefile.am (printfbad2): New test. + * printfbad2.awk, printfbad2.in, printfbad2.ok: New files. + +Tue Feb 3 22:08:27 2009 Arnold D. Robbins + + * Makefile.am (uparrfs): New test. + * uparrfs.awk, uparrfs.in, uparrfs.ok: New files. + +Mon Jan 5 22:53:26 2009 Arnold D. Robbins + + * Makefile.am (getlndir): New test. + * getlndir.awk, getlndir.ok: New files. + +Mon Dec 29 22:46:10 2008 Arnold D. Robbins + + * Makefile.am (mbprintf3): New test. + * mbprintf3.awk, mbprintf3.in, mbprintf3.ok: New files. + +Thu Dec 18 20:57:39 2008 Stepan Kasal + + * lc_num1.awk, lc_num1.ok: Test that the quote modifier in + printf is not sticky. + * Makefile.am: Add it. + * Gentests: Allow _ in test names. + +Thu Dec 11 21:36:11 2008 Arnold D. Robbins + + * Makefile.am (mbstr1): New test. + * mbstr1.awk, mbstr1.ok: New files. + +Thu Dec 4 22:44:39 2008 Arnold D. Robbins + + * Makefile.am (closebad): New test. + * closebad.awk, closebad.ok: New files. + +Thu Jul 31 21:44:21 2008 Arnold D. Robbins + + * Makefile.am (match3, gsubtst6): New tests. + * match3.awk, match3.in, match3.ok: New files. + * gsubtst6.awk, gsubtst6.ok: New files. + +Fri May 2 12:43:51 2008 Steffen Schuler + + * Makefile.am (mbfw1): Add code for test to use a UTF locale. + +Wed Apr 23 22:13:47 2008 Arnold D. Robbins + + * Makefile.am (funlen, mbfw1, mbprintf1, mbprintf2): New tests. + * funlen.awk, funlen.in, funlen.ok: New files. + * mbfw1.awk, mbfw1.in, mbfw1.ok: New files. + * mbprintf1.awk, mbprintf1.in, mbprintf1.ok: New files. + * mbprintf2.awk, mbprintf2.ok: New files. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Wed Sep 26 14:32:28 2007 Arnold D. Robbins + + * Makefile.am (localenl): New test. + (regtest): Fixed invocation of shell script. + * localenl.sh, localenl.ok: New files. + * reg/func2.good: Revised to match current gawk output. + +Wed Sep 26 14:49:04 2007 Eli Zaretskii + + * exitval2.w32: New file, a Windows version for exitval2.awk. + +Tue May 29 13:22:33 2007 Arnold D. Robbins + + * badargs.ok: Updated. + +Thu May 17 21:10:51 2007 Pat Rankin + + * icasers.awk: Modify pattern to work on VMS too, doesn't + break Unix/Linux. + +Tue May 15 22:05:24 2007 Pat Rankin + + Steps towards generating VMS .mms file to run test suite. + + * Makefile.am (FAIL_CODE1): New macro, list of programs + that exit 1. + * Gentests: Add VMS code. + * Gentests.vms: New file. + +Wed May 2 19:30:54 2007 Stepan Kasal + + Revert precedence of concatenation and | getline. + From mail dated 2005-10-31. + + * parsefld.awk, parsefld.in, parsefld.ok: New files. + * Makefile.am (parsefld): New basic test, check for $/regex/ and + for /re1/+/re2/. + * getline.awk, getline.ok: Add precedence check "echo " "date"|getline + +Sun Apr 29 22:43:28 2007 Arnold D. Robbins + + * hsprint.awk: Add extra "%" to format string. Thanks to Nelson Beebe. + * hsprint.ok: Revised. + +Tue Apr 24 23:15:01 2007 Andrew J. Schorr + + * fmtspcl.tok: Provide correct version. + +Tue Apr 17 22:23:41 2007 Arnold D. Robbins + + * double2.awk, double2.ok: Limit to 2^63 for portability across + different platforms. Sigh. + +Thu Apr 12 20:00:27 2007 Andrew J. Schorr + + * Makefile.am, Makefile.in (fmtspcl): Use fmtspcl.tok to build + a fmtspcl.ok file suitable for the given platform. + (diffout): Handle case where the .ok file is in the build directory. + +Mon Mar 26 08:24:04 2007 Arnold D. Robbins + + * Makefile.am (fmtspcl.ok): Don't remove for cleaning, add + to EXTRA_DIST. + +Fri Mar 9 11:38:34 2007 Arnold D. Robbins + + * Makefile.am (fmtspcl.tok): Removed use of and reference + to this file. + +Tue Feb 6 08:21:02 2007 Arnold D. Robbins + + * Makefile.am (double1, double2, zero2): New tests. + * double1.awk, double1.ok, double2.awk, double2.ok, + zero2.awk, zero2.ok: New files. + +Sun Feb 4 16:32:45 2007 Arnold D. Robbins + + * Makefile.am (parse1): New test. + * parse1.awk, parse1.in, parse1.ok: New files. + +Thu Feb 1 17:41:48 2007 Andrew J. Schorr + + * Makefile.am (fmtspcl): New test. + (CLEANFILES): Add fmtpspcl.ok to list. + * fmtspcl.awk, fmtspcl.tok: New files. + +Mon Jan 29 15:31:35 2007 Andrew J. Schorr + + * Makefile.am (diffout): Make it work if no problems. + (valgrind-scan): New target to show problems. + +Mon Jan 29 12:51:16 2007 Arnold D. Robbins + + * Makefile.am (reint2): New test. + * reint2.awk, reint2.in, reint2.ok: New files. + +Fri Jan 26 20:01:38 2007 Andrew J. Schorr + + * Makefile.am (intformat): New test. + * intformat.awk, intformat.ok: New files. + +Tue Jan 23 08:10:48 2007 Arnold D. Robbins + + * Makefile.am (fwtest2): New test. + * fwtest2.awk, fwtest2.in, fwtest2.ok: New files. + +Sun Jan 21 13:09:33 2007 Arnold D. Robbins + + * Makefile.am (synerr2, wideidx2): New test. + * synerr2.awk, synerr2.ok, wideidx2.awk, wideidx2.ok: New files. + +Fri Jan 19 15:11:12 2007 Arnold D. Robbins + + * Makefile.am (strnum1, widesub4): New test. + * strnum1.awk, strnum1.ok, widesub4.awk, widesub4.ok: New files. + +Thu Jan 18 13:37:00 2007 Andrew J. Schorr + + * Makeilfe.am (devfd, wideidx, widesub, widesub2, widesub3): New + tests. + * devfd.in4, devfd.in5, devfd.ok, wideidx.awk, wideidx.in, wideidx.ok, + widesub.awk, widesub.ok, widesub2.awk, widesub2.ok, widesub3.awk, + widesub3.in, widesub3.ok: New files. + +Tue Jan 16 12:16:39 2007 Andrew J. Schorr + + * Makefile.am: In pid test, no further need to remove _pid.in, + since the test no longer creates that file. + * pid.awk: Do not read correct values from stdin (they are now passed + as command-line variables with -v). Make sure to produce output + if the comparisons are successful. + * pid.ok: No longer empty, should contain 3 lines if all goes well. + * pid.sh: Do not create _pid.in; instead, pass values in with -v. + +Sun Jan 14 18:03:12 2007 Arnold D. Robbins + + * fnarray.ok: Updated. + +2007-01-13 Eli Zaretskii + + * pipeio2.awk: Don't use empty lines, because Windows ECHO does + something different when invoked without arguments. + + * pipeio2.ok: Update. + + * Makefile.am (EXTRA_DIST): Add exitval2.w32. + + * exitval2.w32: New file. + +Sat Jan 13 21:25:11 2007 Ralf Wildenhues + + * lintold.awk, lintold.in, lintold.ok: New `--lint-old' test. + * Gentests, Makefile.am: Adjust. + +Sat Jan 13 21:17:51 2007 Ralf Wildenhues + + * Makefile.am (Maketests): Allow rebuilding from a VPATH build. + +Fri Jan 12 14:04:24 2007 Arnold D. Robbins + + * Makefile.am (mtchi18n): new test. + * mtchi18n.awk, mtchi18n.in, mtchi18n.ok: new files. + +Wed Sep 6 02:09:26 2006 Arnold D. Robbins + + * Makefile.am (mixed1): new test. + * mixed1.ok: new file. + +Tue Jun 20 05:37:53 2006 Arnold D. Robbins + + * Makefile.am (devfd1, devfd2): new tests. + * devfd.in1, devfd.in2, devfd1.awk, devfd1.ok, devfd2.ok: new files. + +Sun Mar 12 23:48:31 2006 Arnold D. Robbins + + * Makefile.am (concat4): new test. + * concat4.awk, concat4.in, concat4.ok: new files. + +Sun Mar 12 23:33:26 2006 Arnold D. Robbins + + * Makefile.am (subi18n): new test (from + KIMURA Koichi ). + * subi18n.awk, subi18n.ok: New files. + +Mon Dec 19 05:41:56 2005 Arnold D. Robbins + + * Makefile.am (ovrflow1): new test. + * ovrflow1.awk, ovrflow1.ok: new files. + +Wed Dec 14 19:01:08 2005 Arnold D. Robbins + + * Makefile.am (binmode1): new test. + * binmode1.ok: new file. + +Fri Oct 7 12:28:41 2005 Arnold D. Robbins + + * Makefile.am (fwtest): new test. + * fwtest.awk, fwtest.in, fwtest.ok: new files. + +Fri Aug 12 14:40:47 2005 Arnold D. Robbins + + * Makefile.am (nofile): New test. + * nofile.ok: New file. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Sun Jul 10 18:31:45 2005 Scott Deifik + + * regtest.sh: Changed to use diff instead of cmp for djgpp. + This addresses DOS vs. UNIX end-of-line issues. + +Thu Jun 9 23:40:14 2005 Arnold D. Robbins + + * Makefile.am (Maketests): Don't use $< in rule, it breaks + on some non-GNU versions of make. Sigh. + +Wed Apr 27 22:22:05 2005 Arnold D. Robbins + + * Makefile.am (longdbl): new test. + * longdbl.awk, longdbl.in, longdbl.ok: new files. + +Wed Feb 2 16:44:41 2005 Arnold D. Robbins + + * Makefile.am (exitval2): new test. + * exitval2.awk, exitval2.ok: new files. + +Mon Jan 31 10:00:52 2005 Arnold D. Robbins + + * Makefile.am (gnuops3): new test. + * gnuops3.awk, gnuops3.ok: new files. + +Wed Jan 19 18:04:40 2005 Arnold D. Robbins + + * Makefile.am (hex): new test. + * hex.awk, hex.ok: new files. + +Sun Jan 9 11:53:09 2005 Arnold D. Robbins + + * Makefile.am (strftime, igncras2, subamp): Use `GAWKLOCALE', + not `GAWK_LOCALE'. Grrr! + +Mon Jan 3 12:20:08 2005 William J. Poser + + * Makefile.am (wjposer1): new test. + * wjposer1.awk, wjposer1.in, wjposer1.ok: new files. + +Mon Jan 3 11:55:48 2005 Arnold D. Robbins + + * Makefile.am (rsstart1, rsstart2, rsstart3): new tests. + * rsstart1.in, rsstart1.awk, rsstart1.ok, rsstart2.awk, + rsstart2.ok, rsstart3.ok: new files. + +Sun Dec 19 17:31:48 2004 Arnold D. Robbins + + * Makefile.am (gensub2): new test. + * gensub2.awk, gensub2.ok: new files. + + Thanks to "John H. DuBois III" . + +Thu Dec 9 15:22:58 2004 Arnold D. Robbins + + * Makefile.am (fsspcoln): new test. + * fsspcoln.awk, fsspcoln.in, fsspcoln.ok: new files. + +Mon Nov 29 18:41:33 2004 Arnold D. Robbins + + * Makefile.am (iobug1): new test. + * iobug1.awk, iobug1.ok: new files. + +Tue Sep 28 18:39:53 2004 Arnold D. Robbins + + * nondec.awk, nondec.ok: Add 00.34 as value to print, it should + not be treated as octal. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Wed Jul 14 16:04:46 2004 Arnold D. Robbins + + * Makefile.am (rstest6): new test. + * rstest6.awk, rstest6.in, rstest6.ok: new files. + +Tue Jul 13 10:53:32 2004 Arnold D. Robbins + + * strftlng: Use `$(CMP) ... >/dev/null 2>&1' instead of `-s' + for OS/2 and other systems that use `CMP = diff -a'. + +Mon Jun 14 18:44:39 2004 Pat Rankin + + * longwrds.awk: allow caller the means to override SORT command. + +Tue Jun 8 14:12:52 2004 Arnold D. Robbins + + * Makefile.am (fordel, printfbad1): new tests. + * fordel.awk, fordel.ok: new files. + * printfbad1.awk, printfbad1.ok: new files. + +Mon Apr 19 20:29:52 2004 Arnold D. Robbins + + * Makefile.am (manglprm): new test. + * manglprm.awk, manglprm.in, manglprm.ok: new files. + +Mon Feb 23 18:39:24 2004 Arnold D. Robbins + + * inftest.awk: Add loop limit per Nelson H.F. Beebe. + * Makefile.am (strftime): Use LC_ALL=C for `date' invocation. + +Thu Feb 12 02:08:15 2004 Stepan Kasal + + * Makefile.am (diffout): Use $(srcdir), when we are not building + in the source tree. + +Wed Feb 11 10:23:39 2004 Arnold D. Robbins + + * Makefile.am (strcat1): new test. + * strcat1.awk, strcat1.ok: new files. + +Fri Feb 6 12:09:55 2004 Arnold D. Robbins + + * Makefile.am (CLEANFILES): Added. + +Thu Feb 5 15:34:14 2004 Arnold D. Robbins + + * Makefile.am (exitval1): new test. + * exitval1.awk, exitval1.ok: new files. + +Mon Feb 2 10:29:19 2004 Arnold D. Robbins + + * Makefile.am (subamp): new test. + * subamp.awk, subamp.in, subamp.ok: new files. + + * subamp, ignrcas2, strftime: Set GAWK_LOCALE, not LC_ALL. + +Wed Jan 14 15:28:34 2004 Arnold D. Robbins + + * Makefile.am (backw): new test. + * backw.awk, backw.in, backw.ok: new files. + +Mon Dec 1 10:29:22 2003 Arnold D. Robbins + + * Makefile.am (concat3): new test. + * concat3.awk, concat3.ok: new files. + +Sun Nov 2 16:05:21 2003 Arnold D. Robbins + + * Makefile.am (concat2): new test. + * concat2.awk, concat2.ok: new files. + +Wed Oct 29 13:35:37 2003 Arnold D. Robbins + + * Makefile.am (subsepnm): new test. + * subsepnm.awk, subsepnm.ok: new files. + +Mon Sep 15 16:05:37 2003 Arnold D. Robbins + + * Makefile.am (ignrcas2): new test. + * ignrcas2.awk, ignrcas2.ok: new files. + +Tue Sep 9 16:03:34 2003 Arnold D. Robbins + + * Makefile.am (unterm): new test. + * unterm.awk, unterm.ok: new files. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +Fri Jul 4 11:12:07 2003 Arnold D. Robbins + + * Makefile.am (poundbang2): Removed. + (poundbang): Added env var settings. + +Thu Jun 26 15:44:33 2003 Arnold D. Robbins + + * Makefile.am (match2, whiny): new tests. + * match2.awk, match2.ok: new files. + * whiny.awk, whiny.ok: new files. + +Thu Jun 26 14:51:40 2003 Arnold D. Robbins + + * Makefile.am: Use double quotes for sed invocation to make + life easier (eventually) for DOS version of Makefile. + * pipeio2.awk, pipio2.ok: Ditto. + +Wed Jun 18 12:32:14 2003 Arnold D. Robbins + + * Makefile.am (AWK): Use LC_ALL=$${GAWKLOCALE:-C} and + same for LANG when running awk. Provides sane locale for + tests with ability to override it if need be. + (all tests): Removed explicit setting of LC_ALL and LANG. + * Gentests: Ditto. + +Wed May 28 08:02:33 CEST 2003 Stepan Kasal + + * Makefile.am (uninit4): new test. + * uninit4.awk, uninit4.ok: new files. + +Wed May 28 06:30:23 2003 Stepan Kasal + + * Makefile.am (aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 scalar uninit3): + new tests. + * aryprm4.awk aryprm4.ok aryprm5.awk aryprm5.ok aryprm6.awk aryprm6.ok: + aryprm7.awk aryprm7.ok aryprm8.awk aryprm8.ok scalar.awk scalar.ok: + uninit3.awk uninit3.ok: new files. + +Tue May 27 14:27:50 2003 Stepan Kasal + + * Makefile.am (aryprm1, aryprm2, aryprm3, sortempty): New tests. + * aryprm1.awk, aryprm1.ok, aryprm2.awk, aryprm2.ok: New files. + * aryprm3.awk, aryprm3.ok, sortempty.awk, sortempty.ok: dtto + * prmarscl.ok: The actual error message has changed. + +Tue May 27 08:23:51 2003 Stepan Kasal + + * arrayref3.ok, arrayref4.ok, fnaryscl.ok: Error messages reformatted. + +Sun Jun 8 17:18:06 2003 Arnold D. Robbins + + * Makefile.am (fmttest, strtonum, nested, gsubtst5, delarpm2): New tests. + * fmttest.awk, fmttest.ok: New files. From Nelson Beebe, + . + * strtonum.awk, strtonum.ok: New files. + * nested.awk, nested.in, nested.ok: New files. + * gsubtst5.awk, gsubtst5.in, gsubtst5.ok: New files. + * delarpm2.awk, delarpm2.ok: New files. (Also from Nelson Beebe.) + + * switch2.awk: Currently unused test for switch code. + +Wed May 14 16:49:53 2003 Arnold D. Robbins + + * Gentests: Add LC_ALL=C LANG=C to generated tests. + * Makefile.am: All other manual tests: ditto. + +Sun May 11 15:27:55 2003 Stepan Kasal + + * Makefile.am (rsnulbig, rsnulbig2): New tests. + * rsnulbig.ok, rsnulbig2.ok: New files. + +Sun May 11 15:00:20 2003 Arnold D. Robbins + + * Makefile.am (arrayprm2, arrayprm3, arryref2, arryref3, arryref4, + arryref5, rstest3, rstest4, rstest5): New tests. + * arrayprm2.awk, arrayprm2.ok, arrayprm3.awk, arrayprm3.ok, arryref2.ok, + arryref3.ok, arryref4.ok, arryref5.ok, rstest3.awk, rstest3.ok, rstest4.awk, + rstest4.ok, rstest5.awk, rstest5.ok: New files. + +Sun May 11 12:20:59 2003 Arnold D. Robbins + + * strftime.awk: Remove seconds from input and strftime output, + to decrease chance of failing on second boundary. + * Makefile.am (strftime): Tweak message appropriately. + +Tue Mar 25 08:35:42 2003 Arnold D. Robbins + + * Makefile.am (fnarray2): New test. + * fnarray2.awk, fnarray2.ok: New files. + +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, for `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. + +Tue Apr 16 17:07:25 2002 Arnold D. Robbins + + * Makefile.am (pass-fail): New target that prints an + `all passed' or `x tests failed' message, for use in + grep-ing build logs. + (check): Add pass-fail as last dependency. + + Thanks to Nelson Beebe for the thought, beebe@math.utah.edu. + +Sun Mar 10 17:00:51 2002 Scott Deifik + + * Makefile.am (strftime): Add TZ=GMT0 into environment, to + regularize things, esp. for some DJGPP systems. + +Mon Feb 18 14:55:19 2002 Arnold D. Robbins + + * Makefile.am (longsub): new test case. + * longsub.awk, longsub.in, longsub.ok: new files. + +Wed Jan 23 15:03:36 2002 Andreas Buening + + * Makefile.am (PATH_SEPARATOR): Added. + (awkpath): Make use of PATH_SEPARATOR. + +Wed Jan 23 14:50:38 2002 Arnold D. Robbins + + * Makefile.am (concat1): new test case. + * concat1.awk, concat1.in, concat1.ok: new files. + +Mon Jan 7 22:21:25 2002 Arnold D. Robbins + + * Makefile.am (forsimp): new test case. + * forsimp.awk, forsimp.ok: new files. + +Wed Dec 26 22:01:52 2001 Arnold D. Robbins + + * Makefile.am (inftest): Add sed to fix case issues between + different libc versions. Ugh. + +Wed Dec 19 16:01:58 2001 Peter J. Farley III + + * Makefile.am (manyfiles): Also delete \15 in tr. + +Tue Dec 18 20:56:07 2001 Andreas Buening + + * Makefile.am (nors): Add \15 to list of chars to delete so + test will run on OS/2 also. + +Thu Oct 4 18:34:49 2001 Arnold D. Robbins + + * Makefile.am (membug1): new test case. + * membug1.awk, membug1.in, membug1.ok: new files. + +Thu Aug 23 14:04:10 2001 Arnold D. Robbins + + * Makefile.am (minusstr): new test case. + * minusstr.awk, minusstr.ok: new files. + +Sat Aug 4 23:42:37 2001 Arnold D. Robbins + + * Makefile.am (arrymem1): new test case. + (compare2): new test case. + (regtest): Make test work, use regtest.sh, not .awk. + * arrymem1.awk, arrymem1.ok: new files. + * compare2.awk, compare2.ok: new files. + +Mon Jul 23 17:32:03 2001 Arnold D. Robbins + + * Makefile.am (onlynl): new test case. + * onlynl.awk, onlynl.in, onlynl.ok: new files. + +Wed Jun 13 18:12:43 2001 Arnold D. Robbins + + * Makefile.am (ofmtfidl): new test case. + * ofmtfidl.awk, ofmtfidl.in, ofmtfidl.ok: new files. + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +Sun May 6 13:30:20 2001 Arnold Robbins + + * inftest.awk: Changed test to use < so that it will + work for MSC and DJGPP combination, per Scott Deifik. + +Tue Mar 20 11:09:51 2001 Arnold Robbins + + * Makefile.am (funsemnl): new test case. + * funsemnl.awk, funsemnl.ok: new files. + +Wed Mar 7 11:31:41 2001 Arnold Robbins + + * Makefile.am (leadnl): new test case. + * leadnl.awk, leadnl.in, leadnl.ok: new files. + +Tue Feb 6 18:08:15 2001 Arnold Robbins + + * Makefile.am (rebt8b1, rebt8b2): new test case. + * rebt8b1.awk, rebt8b1.ok: new files. + * rebt8b2.awk, rebt8b2.ok: new files. + +Sun Dec 3 15:36:41 2000 Arnold Robbins + + * Makefile.am (gnuops2): New test case. + * gnuops2.awk, gnuops2.ok: New files, based on bug report from + Servatius.Brandt@fujitsu-siemens.com. + +Mon Nov 27 15:52:46 2000 Arnold Robbins + + * regx8bit.awk, regx8bit.ok: Updated to what should + work on all systems. + +Wed Nov 22 13:27:59 2000 Arnold Robbins + + * Makefile.am (poundbang): Added some smarts for /tmp mounted + noexec. Hopefully it'll even work. + +Tue Nov 14 17:45:02 2000 Arnold Robbins + + * Makefile.am: Added - to all cmp calls for consistency. + +Sun Nov 12 17:50:18 2000 Arnold Robbins + + * Makefile.am (addcomma): new test case. + * addcomma.awk, addcomma.in, addcomma.ok: new files. + +Tue Nov 7 16:03:06 2000 Arnold Robbins + + * Makefile.am (regx8bit, psx96sub): new test cases. + * regx8bit.awk, regx8bit.ok, psx96sub.awk, psx96sub.ok: new files. + +Sun Oct 22 12:09:43 2000 Arnold Robbins + + * Makefile.am (shadow): new test case. + * shadow.awk, shadow.ok: new files. + +Tue Oct 17 10:51:09 2000 Arnold Robbins + + * Makefile.am (arynasty): new test case. + * arynasty.awk, arynasty.ok: new files. + +Mon Oct 2 10:17:13 2000 Arnold Robbins + + * Makefile.am (clsflnam): Add redirect of stderr. + * clsflnam.awk, clsflnam.ok: modified to reflect changed + semantics of close() for a non-open file. See ../ChangeLog. + +Sun Sep 24 16:46:29 2000 Arnold Robbins + + * Makefile.am (nasty2): new test case. + * nasty2.awk, nasty2.ok: new files. + +Wed Sep 13 11:09:49 2000 Arnold Robbins + + * Makefile.am (check): Added calls to new targets that + print messages. + (clos1way, basic-msg-start, basic-msg-end, unix-msg-start, + unix-msg-end, extend-msg-start, extend-msg-end): new targets. + * clos1way.awk, clos1way.ok: new files. + +Tue Sep 12 16:29:54 2000 Arnold Robbins + + * Makefile.am (leaddig): new test case. + * leaddig.awk, leaddig.ok: new files. + +Wed Sep 6 14:09:15 2000 Arnold Robbins + + * Makefile.am (strtod): new test case. + * strtod.awk, strtod.in, strtod.ok: new files. + +Mon Sep 4 09:33:28 2000 Arnold D. Robbins + + * Makefile.in (octsub): new test case. + * octsub.awk, octsub.ok: new files. + +Sun Aug 13 12:37:16 2000 Arnold Robbins + + * Makefile.am (sort1, diffout): new test cases. + * sort1.awk, sort1.ok: new files. + +2000-02-15 Arnold Robbins + + * MOVED TO AUTOMAKE AND GETTEXT. + Just about every file touched. Work done by Arno Peters. + +Wed May 19 15:41:41 1999 Arnold D. Robbins + + * Makefile.in (datanonl,regeq,redfilnm): new test cases. + * datanonl.awk, datanonl.in, datanonl.ok: new files. + * regeq.awk, regeq.in, regeq.ok: new files. + * redfilnm.awk, redfilnm.in, redfilnm.ok: new files. + +Mon May 10 17:11:30 1999 Arnold D. Robbins + + * Makefile.in (rsnul1nl): new test case. + * rsnul1nl.awk, rsnul1nl.in, rsnul1nl.ok: new files. + +Sun Apr 25 13:02:35 1999 Arnold D. Robbins + + * Makefile.in (inetechu,inetecht,inetdayu,inetdayt,inet): new + tests, courtesy of Juergen Khars. + (paramtyp): new test for bug from Juergen. + * paramtyp.awk, paramtyp.in: new files. + +Sun Oct 25 23:11:46 1998 Arnold D. Robbins + + * Makefile.in (ofmtbig,procinfs): new test cases. + * procinfs.awk, procinfs.ok: new files. + * ofmtbig.awk, ofmtbig.in, ofmtbig.ok: new files. + +Tue Oct 20 22:07:10 1998 Arnold D. Robbins + + * Makefile.in (lint): new test case. + * lint.awk, lint.ok: new files. + * badargs.ok: updated output corresponding to change made to + main.c (see main ChangeLog). + +Tue May 26 20:39:07 1998 Arnold D. Robbins + + * pipeio2.awk: change "\'" to "'" to avoid new warning. + +Mon Mar 23 21:53:36 1998 Arnold D. Robbins + + * Makefile.in (fnasgnm): new test case. + * fnasgnm.awk, fnasgnm.in, fnasgnm.ok: new files. + +Fri Mar 20 11:01:38 1998 Arnold D. Robbins + + * Makefile.in (fnaryscl): new test case. + * fnaryscl.awk, fnaryscl.ok: new files. + +Mon Mar 16 15:23:22 1998 Arnold D. Robbins + + * Makefile.in (splitdef): new test case. + * splitdef.awk, splitdef.ok: new files. + +Fri Sep 26 01:10:14 1997 Arnold D. Robbins + + * Makefile.in (parseme): new test case. + * parseme.awk, parseme.ok: new files. + +Sun Sep 14 23:25:10 1997 Arnold D. Robbins + + * Makefile.in (ofmts): new test case. + * ofmts.awk, ofmts.in, ofmts.ok: new files. + +Sun Aug 17 07:17:35 1997 Arnold D. Robbins + + * Makefile.in (fsfwfs): new test case. + * fsfwfs.awk, fsfwfs.in, fsfwfs.ok: new files. + +Sun Jul 27 23:08:53 1997 Arnold D. Robbins + + * Makefile.in (hsprint): new test case. + * hsprint.awk, hsprint.ok, printfloat.awk: new files. + +Thu Jul 17 20:07:31 1997 Arnold D. Robbins + + * Makefile.in (ofmt): new test case. + * ofmt.awk, ofmt.in, ofmt.ok: new files. + +Sun Jun 22 16:17:35 1997 Arnold D. Robbins + + * Makefile.in (nlinstr): new test case. + * nlinstr.awk, nlinstr.in, nlinstr.ok: new files. + +Wed Jun 4 13:18:21 1997 Arnold D. Robbins + + * pid.sh: send errors to /dev/null to toss warning about + using PROCINFO["pid"] etc. This test explicitly tests + the special files. It'll need changing in 3.2. + +Thu Apr 24 23:24:59 1997 Arnold D. Robbins + + * Makefile.in (messages): remove special case if /dev/fd exists. + Finally. + +Mon Aug 7 15:23:00 2000 Arnold D. Robbins + + * Release 3.0.6: Release tar file made. + +Thu Aug 3 17:51:56 2000 Arnold D. Robbins + + * Makefile.in (nlstrina): new test case. + * nlstrina.awk, nlstrina.ok: new files. + +Tue Jul 11 14:22:55 2000 Arnold D. Robbins + + * Makefile.in (fnparydl): new test case. + * fnparydl.awk, fnparydl.ok: new files. + +Fri Jun 30 22:00:03 2000 Arnold D. Robbins + + * Makefile.in (arysubnm): new test case. + * arysubnm.awk, arysubnm.ok: new files. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed Jun 14 13:17:59 2000 Arnold D. Robbins + + * Makefile.in (getlnbuf): new test case. + * getlnbuf.awk, gtlnbufv.awk, getlnbuf.in, getlnbuf.ok: new files. + +Mon Jun 5 15:51:39 2000 Arnold D. Robbins + + * pipeio2.awk: Change use of tr to sed, fixes problems + on SCO OS5. + * pipeio2.ok: Updated to reflect use of sed. + +Tue May 2 13:28:04 2000 Arnold D. Robbins + + * Makefile.in (strftime): moved test code into a separate + file for the PC guys. + * strftime.awk: new file. + +Mon Apr 10 15:58:13 2000 Arnold D. Robbins + + * Makefile.in (longwrds): Add setting LC_ALL=C to sort + call to preserve traditional output. (Theme from the + Twilight Zone plays eerily in the background...) + +Sun Apr 2 17:51:40 2000 Arnold D. Robbins + + * Makefile.in (igncdym): new test case. + * igncdym.awk, igncdym.in, igncdym.ok: new files. + +Wed Mar 8 13:43:44 2000 Arnold D. Robbins + + * Makefile.in (arynocls): new test case. + * arynocls.awk, arynocls.in, arynocls.ok: new files. + +Sun Feb 6 11:45:15 2000 Arnold D. Robbins + + * Makefile.in (opasnidx): new test case. + * opasnidx.awk, opasnidx.ok: new files. + +Tue Feb 1 18:40:45 2000 Arnold D. Robbins + + * Makefile.in (opasnslf): new test case. + * opasnslf.awk, opasnslf.ok: new files. + +Thu Jan 27 18:09:18 2000 Arnold D. Robbins + + * Makefile.in (subslash): new test case. + * subslash.awk, subslash.ok: new files. + +Fri Nov 26 11:03:07 1999 Arnold D. Robbins + + * Makefile.in (numindex): new test case. + * numindex.awk, numindex.in, numindex.ok: new files. + +Sun Oct 24 08:46:16 1999 Arnold D. Robbins + + * Makefile.in (strftime): Add tweak for $NF that should + hopefully avoid cygwin problems with lack of timezone. + +Thu Jul 29 19:25:02 1999 Arnold D. Robbins + + * Makefile.in (fsmnam, fnamedat): new test cases. + * fsmnam.awk, fsmnam.ok: new files. + * fnamedat.awk, fnamedat.in, fnamedat.ok: new files. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + +Tue May 25 16:37:50 1999 Arnold D. Robbins + + * Makefile.in (printf1): new test case. + * printf1.awk, printf1.ok: new files. + +Wed May 19 15:32:09 1999 Arnold D. Robbins + + * reg/*: moved exp and log tests to new `Obsolete' directory; they + would only succeed under SunOS 4.x. + +Mon May 3 11:53:33 1999 Arnold D. Robbins + + * Makefile.in (gawk.extensions): removed `nondec' until the + associated features get documented in 3.1. + +Tue Nov 3 16:46:39 1998 Arnold D. Robbins + + * Makefile.in (getnr2tm, getnr2tb): new test cases. + * getnr2tm.awk, getnr2tm.in, getnr2tm.ok: new files. + * getnr2tb.awk, getnr2tb.in, getnr2tb.ok: new files. + +Sun Nov 1 13:20:08 1998 Arnold D. Robbins + + * Makefile.in (zeroflag): new test case. + * zeroflag.awk, zeroflag.ok: new files + +Wed Oct 28 18:44:19 1998 Arnold D. Robbins + + * Makefile.in (nasty): new test case. + * nasty.awk, nasty.ok: new files + +Sun Nov 16 20:08:59 1997 Arnold D. Robbins + + * gsubtest.awk, gsubtest.ok: fix for count of matches in gsub + from Geert.Debyser@esat.kuleuven.ac.be. + +Sun Nov 16 19:54:50 1997 Arnold D. Robbins + + * Makefile.in (strftime): fix a typo (LANC -> LANG). + +Thu May 15 12:49:08 1997 Arnold D. Robbins + + * Release 3.0.3: Release tar file made. + +Tue May 13 12:53:46 1997 Arnold D. Robbins + + * Makefile.in (messages): more testing for OK failure on Linux. + +Sun May 11 14:57:11 1997 Arnold D. Robbins + + * Makefile.in (nondec): new test case. + * nondec.awk, nondec.ok: new files. + +Sun May 11 07:07:05 1997 Arnold D. Robbins + + * Makefile.in (prdupval): new test case. + * prdupval.awk, prdupval.in, prdupval.ok: new files. + +Wed May 7 21:54:34 1997 Arnold D. Robbins + + * Makefile.in (delarprm): new test case. + * delarprm.awk, delarprm.ok: new files. + +Wed May 7 17:54:00 1997 Arnold D. Robbins + + * Makefile.in (pid): several fixes from ghazi@caip.rutgers.edu. + +Tue May 6 20:28:30 1997 Arnold D. Robbins + + * Makefile.in (strftime): Use the right locale stuff. + (clobber): don't need an input file. + +Thu Apr 24 22:24:42 1997 Arnold D. Robbins + + * Makefile.in (pid): new test case, from jco@convex.com. + (specfile): removed test case, pid does it better. + * pid.awk, pid.ok, pid.sh: new files. + * specfile.awk: removed. + +Wed Apr 23 23:37:10 1997 Arnold D. Robbins + + * Makefile.in (pipeio2): new test case. + * pipeio2.awk, pipeio2.ok, pipeio2.in: new files. + +Sun Apr 20 12:22:52 1997 Arnold D. Robbins + + * Makefile.in (clobber): new test case. + * clobber.awk, clobber.ok: new files. + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Tue Apr 15 05:57:29 1997 Arnold D. Robbins + + * Makefile.in (strftlng): More wizardry for bizarre Unix systems. + (nlfldsep): use program and input file, not shell script + (basic, unix-tests, gawk.extensions): moved specfile, pipeio1 + and strftlng into unix-tests per Pat Rankin. + * nlfldsep.awk, nlfldsep.in: new files. + * nlfldsep.sh: removed. + +Wed Apr 9 23:32:47 1997 Arnold D. Robbins + + * Makefile.in (funstack): new test case. + * funstack.awk, funstack.in, funstack.ok: new files. + * substr.awk: added many more tests. + * substr.ok: updated + +Wed Mar 19 20:10:21 1997 Arnold D. Robbins + + * Makefile.in (pipeio1): new test case. + * pipeio1.awk, pipeio1.ok: new files. + +Tue Mar 18 06:38:36 1997 Arnold D. Robbins + + * Makefile.in (noparm): new test case. + * noparm.awk, noparm.ok: new files. + +Fri Feb 21 06:30:18 1997 Arnold D. Robbins + + * Makefile.in (reint): new test case. + * reint.awk, reint.in, reint.ok: new files. + +Wed Feb 5 18:17:51 1997 Arnold D. Robbins + + * Makefile.in (fnarydel): new test case. + * fnarydel.awk, fnarydel.ok: new files. + +Sun Jan 19 17:06:18 1997 Arnold D. Robbins + + * Makefile.in (nors): new test case. + * nors.ok: new file. + +Sun Jan 19 17:06:18 1997 Arnold D. Robbins + + * Makefile.in (specfile, strftlng, nfldstr): new test cases. + * specfile.awk, strftlng.awk, strftlng.ok, nfldstr.ok: new files. + +Fri Dec 27 11:27:13 1996 Arnold D. Robbins + + * Makefile.in (intest): new test case. + * intest.awk, intest.ok: new files. + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Thu Nov 7 09:12:20 1996 Arnold D. Robbins + + * Makefile.in (splitvar): new test case. + * splitvar.awk, splitvar.in, splitvar.ok: new files. + +Sun Nov 3 10:55:50 1996 Arnold D. Robbins + + * Makefile.in (nlfldsep): new test case. + * nlfldsep.sh, nlfldsep.ok: new files. + +Fri Oct 25 10:29:56 1996 Arnold D. Robbins + + * rand.awk: call srand with fixed seed. + * rand.ok: new file. + * Makefile.in (rand): changed to compare output with rand.ok. + +Sat Oct 19 21:52:04 1996 Arnold D. Robbins + + * Makefile.in (tradanch): new test case. + * tradanch.awk, tradanch.in, tradanch.ok: new files. + +Thu Oct 17 21:22:05 1996 Arnold D. Robbins + + * tweakfld.awk: move `rm' out into Makefile.in. + * eofsplit.awk: fixed buggy code so won't loop forever. + * Makefile.in (all): add unix-tests. + (unix-tests): new target, has pound-bang, fflush, getlnhd. + (basic): removed fflush, getlnhd. + (tweakfld): added rm from tweakfld.awk. + +Sun Oct 6 22:00:35 1996 Arnold D. Robbins + + * Makefile.in (back89): new test case. + * back89.in, back89.ok: new files. + +Sun Oct 6 20:45:54 1996 Arnold D. Robbins + + * Makefile.in (splitwht): new test case. + * splitwht.awk, splitwht.ok: new files. + +Sun Sep 29 23:14:20 1996 Arnold D. Robbins + + * Makefile.in (gsubtest): new test case. + * gsubtest.awk, gsubtest.ok: new files. + +Fri Sep 20 11:58:40 1996 Arnold D. Robbins + + * Makefile.in (prtoeval): new test case. + * prtoeval.awk, prtoeval.ok: new files. + +Tue Sep 10 06:26:44 1996 Arnold D. Robbins + + * Makefile.in (gsubasgn): new test case. + * gsubasgn.awk, gsubasgn.ok: new files. + +Wed Aug 28 22:06:33 1996 Arnold D. Robbins + + * badargs.ok: updated output corresponding to change made to + main.c (see main ChangeLog). + +Thu Aug 1 07:20:28 1996 Arnold D. Robbins + + * Makefile.in (clean): remove out[123] files from `messages' test. + Thanks to Pat Rankin (rankin@eql.caltech.edu). + +Sat Jul 27 23:56:57 1996 Arnold D. Robbins + + * Makefile.in (prt1eval): new test case. + * prt1eval.awk, prt1eval.ok: new files. + +Mon Jul 22 22:06:10 1996 Arnold D. Robbins + + * Makefile.in (eofsplit): new test case. + * eofsplit.awk, eofsplit.ok: new files. + +Sun Jul 14 07:07:45 1996 Arnold D. Robbins + + * Makefile.in (fldchgnf): new test case. + * fldchgnf.awk, fldchgnf.ok: new files. + +Tue May 21 23:23:22 1996 Arnold D. Robbins + + * Makefile.in (substr): new test case. + * substr.awk, substr.ok: new files. + +Tue May 14 15:05:23 1996 Arnold D. Robbins + + * Makefile.in (dynlj): new test case. + * dynlj.awk, dynlj.ok: new files. + +Sun May 12 20:45:34 1996 Arnold D. Robbins + + * Makefile.in (fnarray): new test case. + * fnarray.awk, fnarray.ok: new files. + +Fri Mar 15 06:46:48 1996 Arnold D. Robbins + + * Makefile.in (clean): added `*~' to list of files to be removed. + * tweakfld.awk (END): added to do clean up action. + +Thu Mar 14 16:41:32 1996 Arnold D. Robbins + + * Makefile.in (mmap8k): new test case. + * mmap8k.in, mmap8k.ok: new files. + +Sun Mar 10 22:58:35 1996 Arnold D. Robbins + + * Makefile.in (clsflnam): new test case. + * clsflnam.in, clsflnam.awk, clsflnam.ok: new files. + * tweakfld.awk: changed to have a fixed date. + +Thu Mar 7 09:56:09 1996 Arnold D. Robbins + + * Makefile.in (tweakfld): new test case. + * tweakfld.in, tweakfld.awk, tweakfld.ok: new files. + +Sun Mar 3 06:51:26 1996 Arnold D. Robbins + + * Makefile.in (getlnhd, backgsub) : new test cases. + * getlnhd.awk, getlnhd.ok: new files. + * backgsub.in, backgsub.awk, backgsub.ok: new files. + +Mon Feb 26 22:30:02 1996 Arnold D. Robbins + + * Makefile.in (sprintfc): new test case. + * sprintfc.in, sprintfc.awk, sprintfc.ok: new files. + * gensub.awk: updated for case of no match of regex. + +Wed Jan 24 10:06:16 1996 Arnold D. Robbins + + * Makefile.in (distclean, maintainer-clean): new targets. + (reindops): added test from Rick Adams (rick@uunet.uu.net). + (arrayparm, paramdup, defref, strftime, prmarscl, sclforin, + sclifin): Fix from Larry Schwimmer (schwim@cyclone.stanford.edu) + so that tests that are supposed to fail use `... || exit 0' to + cause a clean `make clean'. + +Wed Jan 10 22:58:55 1996 Arnold D. Robbins + + * ChangeLog created. diff -Nru gawk-3.1.8+dfsg/test/Gentests gawk-4.0.1+dfsg/test/Gentests --- gawk-3.1.8+dfsg/test/Gentests 2008-12-18 18:57:03.000000000 +0000 +++ gawk-4.0.1+dfsg/test/Gentests 2012-03-20 18:56:40.000000000 +0000 @@ -17,8 +17,8 @@ # process the file Makefile.am: -/^[A-Z_]*_TESTS *=/,/[^\\]$/ { - gsub(/(^[A-Z_]*_TESTS *=|\\$)/,"") +/^[[:upper:]_]*_TESTS *=/,/[^\\]$/ { + gsub(/(^[[:upper:]_]*_TESTS *=|\\$)/,"") for (i = 1; i <= NF; i++) tests[++ntests] = $i next @@ -45,7 +45,7 @@ next } -/^[a-zA-Z_][a-zA-Z0-9_]*:/ { +/^[[:alpha:]_][[:alnum:]_]*:/ { # remember all targets from Makefile.am sub(/:.*/,"") targets[$0] diff -Nru gawk-3.1.8+dfsg/test/Makefile.am gawk-4.0.1+dfsg/test/Makefile.am --- gawk-3.1.8+dfsg/test/Makefile.am 2010-04-21 19:23:22.000000000 +0000 +++ gawk-4.0.1+dfsg/test/Makefile.am 2012-03-28 19:47:54.000000000 +0000 @@ -1,7 +1,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2010 the Free Software Foundation, Inc. +# Copyright (C) 1988-2012 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -26,16 +26,29 @@ EXTRA_DIST = \ reg \ lib \ + ChangeLog.0 \ Gentests \ Gentests.vms \ Maketests \ README \ + aadelete1.awk \ + aadelete1.ok \ + aadelete2.awk \ + aadelete2.ok \ + aarray1.awk \ + aarray1.ok \ + aasort.awk \ + aasort.ok \ + aasorti.awk \ + aasorti.ok \ addcomma.awk \ addcomma.in \ addcomma.ok \ anchgsub.awk \ anchgsub.in \ anchgsub.ok \ + arraysort.awk \ + arraysort.ok \ argarray.awk \ argarray.in \ argarray.ok \ @@ -100,6 +113,11 @@ backw.in \ backw.ok \ badargs.ok \ + beginfile1.awk \ + beginfile1.ok \ + beginfile2.in \ + beginfile2.ok \ + beginfile2.sh \ binmode1.ok \ childin.awk \ childin.in \ @@ -135,12 +153,16 @@ datanonl.ok \ defref.awk \ defref.ok \ + delargv.awk \ + delargv.ok \ delarprm.awk \ delarprm.ok \ delarpm2.awk \ delarpm2.ok \ delfunc.awk \ delfunc.ok \ + delsub.awk \ + delsub.ok \ devfd.in1 \ devfd.in2 \ devfd.in4 \ @@ -149,14 +171,21 @@ devfd1.awk \ devfd1.ok \ devfd2.ok \ + dfastress.awk \ + dfastress.ok \ double1.awk \ double1.ok \ double2.awk \ double2.ok \ + dtdgport.awk \ + dumpvars.in \ + dumpvars.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ + exit.ok \ + exit.sh \ exitval1.awk \ exitval1.ok \ exitval2.awk \ @@ -200,6 +229,17 @@ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ + fpat1.awk \ + fpat1.in \ + fpat1.ok \ + fpat2.awk \ + fpat2.ok \ + fpat3.awk \ + fpat3.in \ + fpat3.ok \ + fpatnull.awk \ + fpatnull.in \ + fpatnull.ok \ fordel.awk \ fordel.ok \ forref.awk \ @@ -237,6 +277,9 @@ fwtest2.awk \ fwtest2.in \ fwtest2.ok \ + fwtest3.awk \ + fwtest3.in \ + fwtest3.ok \ gensub.awk \ gensub.in \ gensub.ok \ @@ -249,6 +292,9 @@ getline2.ok \ getline3.awk \ getline3.ok \ + getline4.awk \ + getline4.in \ + getline4.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ @@ -284,6 +330,12 @@ gsubtst5.ok \ gsubtst6.awk \ gsubtst6.ok \ + gsubtst7.awk \ + gsubtst7.in \ + gsubtst7.ok \ + gsubtst8.awk \ + gsubtst8.in \ + gsubtst8.ok \ gtlnbufv.awk \ hex.awk \ hex.ok \ @@ -305,6 +357,9 @@ ignrcase.ok \ ignrcas2.awk \ ignrcas2.ok \ + indirectcall.awk \ + indirectcall.in \ + indirectcall.ok \ inftest.awk \ inftest.ok \ inputred.awk \ @@ -329,6 +384,8 @@ lintold.awk \ lintold.in \ lintold.ok \ + lintwarn.awk \ + lintwarn.ok \ litoct.awk \ litoct.ok \ localenl.ok \ @@ -384,11 +441,17 @@ nasty.ok \ nasty2.awk \ nasty2.ok \ + nastyparm.awk \ + nastyparm.ok \ negexp.awk \ negexp.ok \ + negrange.awk \ + negrange.ok \ nested.awk \ nested.in \ nested.ok \ + next.ok \ + next.sh \ nfldstr.awk \ nfldstr.in \ nfldstr.ok \ @@ -440,6 +503,8 @@ ofmt.awk \ ofmt.in \ ofmt.ok \ + ofmta.awk \ + ofmta.ok \ ofmtbig.awk \ ofmtbig.in \ ofmtbig.ok \ @@ -473,6 +538,8 @@ parsefld.ok \ parseme.awk \ parseme.ok \ + patsplit.awk \ + patsplit.ok \ pcntplus.awk \ pcntplus.ok \ pid.awk \ @@ -486,10 +553,15 @@ posix.awk \ posix.in \ posix.ok \ + posix2008sub.awk \ + posix2008sub.ok \ poundbang.awk \ prdupval.awk \ prdupval.in \ prdupval.ok \ + profile2.ok \ + profile3.awk \ + profile3.ok \ prec.awk \ prec.ok \ printf0.awk \ @@ -501,6 +573,8 @@ printfbad2.awk \ printfbad2.in \ printfbad2.ok \ + printfbad3.awk \ + printfbad3.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -513,10 +587,13 @@ prt1eval.ok \ prtoeval.awk \ prtoeval.ok \ - psx96sub.awk \ - psx96sub.ok \ + pty1.awk \ + pty1.ok \ rand.awk \ rand.ok \ + range1.awk \ + range1.in \ + range1.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ @@ -527,6 +604,8 @@ regeq.awk \ regeq.in \ regeq.ok \ + regrange.awk \ + regrange.ok \ regtest.sh \ regx8bit.awk \ regx8bit.ok \ @@ -548,6 +627,9 @@ resplit.awk \ resplit.in \ resplit.ok \ + rri1.awk \ + rri1.in \ + rri1.ok \ rs.awk \ rs.in \ rs.ok \ @@ -578,6 +660,10 @@ rswhite.awk \ rswhite.in \ rswhite.ok \ + rtlen.ok \ + rtlen.sh \ + rtlen01.ok \ + rtlen01.sh \ scalar.awk \ scalar.ok \ sclforin.awk \ @@ -590,7 +676,15 @@ sort1.ok \ sortempty.awk \ sortempty.ok \ + sortfor.awk \ + sortfor.in \ + sortfor.ok \ + sortu.awk \ + sortu.ok \ space.ok \ + splitarg4.awk \ + splitarg4.in \ + splitarg4.ok \ splitargv.awk \ splitargv.in \ splitargv.ok \ @@ -633,6 +727,7 @@ swaplns.in \ swaplns.ok \ switch2.awk \ + switch2.ok \ synerr1.awk \ synerr1.ok \ synerr2.awk \ @@ -658,9 +753,6 @@ uparrfs.awk \ uparrfs.in \ uparrfs.ok \ - whiny.awk \ - whiny.in \ - whiny.ok \ wideidx.awk \ wideidx.in \ wideidx.ok \ @@ -678,6 +770,8 @@ wjposer1.awk \ wjposer1.in \ wjposer1.ok \ + xref.awk \ + xref.original \ zero2.awk \ zero2.ok \ zeroe0.awk \ @@ -690,68 +784,93 @@ # Get rid of core files when cleaning and generated .ok file CLEANFILES = core core.* fmtspcl.ok -# try to keep these sorted +# try to keep these sorted. each letter starts a new line BASIC_TESTS = \ - addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \ - arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \ - aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \ - arysubnm asgext awkpath back89 backgsub childin clobber closebad \ - clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \ - datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \ - exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray \ - fnarray2 fnaryscl fnasgnm \ - fnmisc fordel forref forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ - funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ + addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \ + arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ + arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ + aryprm8 arysubnm asgext awkpath \ + back89 backgsub \ + childin clobber closebad clsflnam compare compare2 concat1 concat2 \ + concat3 concat4 convfmt \ + datanonl defref delargv delarpm2 delarprm delfunc dfastress dynlj \ + eofsplit exitval1 exitval2 \ + fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ + fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ + fstabplus funsemnl funsmnam funstack \ + getline getline2 getline3 getline4 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ - hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ - longsub longwrds manglprm math membug1 messages minusstr mmap8k \ - mtchi18n nasty nasty2 negexp nested nfldstr nfneg nfset nlfldsep \ - nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ - nors nulrsend numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts \ - onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 parsefld \ - parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ - prt1eval prtoeval psx96sub rand rebt8b1 redfilnm regeq reindops \ - reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ - rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin sortempty \ - splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \ - strtod subamp subi18n subsepnm subslash substr swaplns synerr1 \ - synerr2 tradanch tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \ - unterm uparrfs wideidx wideidx2 widesub widesub2 widesub3 \ - widesub4 wjposer1 zero2 zeroe0 zeroflag - -UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng + gsubtst7 gsubtst8 \ + hex hsprint \ + inputred intest intprec iobug1 \ + leaddig leadnl litoct longsub longwrds \ + manglprm math membug1 messages minusstr mmap8k mtchi18n \ + nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ + nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ + noparms nors nulrsend numindex numsubstr \ + octsub ofmt ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf \ + paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ + posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ + prt1eval prtoeval \ + rand range1 rebt8b1 redfilnm regeq regrange reindops reparse \ + resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ + rstest3 rstest4 rstest5 rswhite \ + scalar sclforin sclifin sortempty splitargv splitarr splitdef \ + splitvar splitwht strcat1 strnum1 strtod subamp subi18n \ + subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \ + uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \ + wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ + zero2 zeroe0 zeroflag + +UNIX_TESTS = \ + fflush getlnhd localenl pid pipeio1 pipeio2 poundbang rtlen rtlen01 \ + space strftlng GAWK_EXT_TESTS = \ - argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 fieldwdth \ - fsfwfs funlen fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 \ - gnureops icasefs icasers igncdym igncfs ignrcas2 ignrcase lint lintold \ - manyfiles match1 match2 match3 mbprintf3 mbstr1 nondec nondec2 posix \ - printfbad1 printfbad2 procinfs rebuf regx8bit reint reint2 rsstart1 \ - rsstart2 rsstart3 rstest6 shadow strftime strtonum + aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ + backw badargs beginfile1 beginfile2 binmode1 \ + clos1way delsub devfd devfd1 devfd2 dumpvars exit \ + fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ + fwtest fwtest2 fwtest3 \ + gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ + icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall \ + lint lintold lintwarn \ + manyfiles match1 match2 match3 mbstr1 \ + nastyparm next nondec nondec2 \ + patsplit posix printfbad1 printfbad2 printfbad3 procinfs \ + profile1 profile2 profile3 pty1 \ + rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + strtonum switch2 -EXTRA_TESTS = regtest inftest +EXTRA_TESTS = inftest regtest -INET_TESTS = inetechu inetecht inetdayu inetdayt +INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat -LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ - mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny +LOCALE_CHARSET_TESTS = \ + asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ + mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc # List of the tests which should be run with --lint option: -NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 uninit5 uninitialized +NEED_LINT = \ + defref fmtspcl lintwarn noeffect nofmtch shadow \ + uninit2 uninit3 uninit4 uninit5 uninitialized # List of the tests which should be run with --lint-old option: NEED_LINT_OLD = lintold # List of the tests which fail with EXIT CODE 1 -FAIL_CODE1 = fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm +FAIL_CODE1 = \ + fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm # List of the files that appear in manual tests or are for reserve testing: -GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk +GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk CMP = cmp AWKPROG = ../gawk$(EXEEXT) +PGAWKPROG = ../pgawk$(EXEEXT) # This business forces the locale to be C for running the tests, # unless we override it to something else for testing. @@ -759,6 +878,7 @@ # This can also be done in individual tests where we wish to # check things specifically not in the C locale. AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(AWKPROG) +PGAWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(PGAWKPROG) # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid @@ -868,7 +988,7 @@ .) : ;; \ *) rm -f ./argarray.in ;; \ esac - @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @@ -880,46 +1000,47 @@ @echo manyfiles @rm -rf junk @mkdir junk - @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ + @$(AWK) 'BEGIN { for (i = 1; i <= 1030; 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 _$@ + @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 _$@ + @-$(CMP) $(srcdir)/$@.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 _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ - @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ - @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ - @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ - @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 - @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @@ -933,7 +1054,7 @@ litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ - @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd:: @echo $@ @@ -943,13 +1064,13 @@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ - @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup - @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @@ -959,7 +1080,7 @@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ - @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.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. @@ -974,12 +1095,12 @@ @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi - @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.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 _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fmtspcl.ok: fmtspcl.tok Makefile @$(AWK) -v "sd=$(srcdir)" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < $(srcdir)/fmtspcl.tok > $@ 2>/dev/null @@ -992,18 +1113,18 @@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ - @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 - @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ - @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clobber:: @echo $@ @@ -1014,7 +1135,7 @@ arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ - @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @@ -1048,12 +1169,12 @@ redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ - @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ - @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @@ -1086,11 +1207,6 @@ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -whiny:: - @echo $@ - @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - wideidx:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ @@ -1166,6 +1282,22 @@ @head $(srcdir)/rsstart1.in | $(AWK) -f $(srcdir)/rsstart2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rtlen:: + @echo $@ + @$(srcdir)/$@.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rtlen01:: + @echo $@ + @$(srcdir)/$@.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rtlenmb:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(srcdir)/rtlen.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/rtlen.ok _$@ && rm -f _$@ + nondec2:: @echo $@ @$(AWK) --non-decimal-data -v a=0x1 -f $(srcdir)/$@.awk >_$@ @@ -1264,6 +1396,60 @@ @$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +beginfile1:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk $(srcdir)/$@.awk . ./no/such/file Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +beginfile2: + @echo $@ + @-( cd $(srcdir) && LC_ALL=C AWK="$(abs_builddir)/$(AWKPROG)" $(srcdir)/$@.sh $(srcdir)/$@.in ) > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +dumpvars:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --dump-variables 1 < $(srcdir)/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@ + @mv awkvars.out _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile1: + @echo $@ + @$(AWK) --profile=ap-$@.out -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > _$@.out1 + @$(AWK) -f ap-$@.out $(srcdir)/dtdgport.awk > _$@.out2 ; rm ap-$@.out + @cmp _$@.out1 _$@.out2 && rm _$@.out[12] || echo EXIT CODE: $$? >>_$@ + +profile2: + @echo $@ + @$(PGAWK) --profile=ap-$@.out -v sortcmd=sort -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile3: + @echo $@ + @$(PGAWK) --profile=ap-$@.out -f $(srcdir)/$@.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +posix2008sub: + @echo $@ + @$(AWK) --posix -f $(srcdir)/$@.awk > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +next: + @echo $@ + @-AWK="$(AWKPROG)" $(srcdir)/$@.sh > _$@ 2>&1 + @-LC_ALL=C $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +exit: + @echo $@ + @-AWK="$(AWKPROG)" $(srcdir)/$@.sh > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rri1:: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: include Maketests diff -Nru gawk-3.1.8+dfsg/test/Makefile.in gawk-4.0.1+dfsg/test/Makefile.in --- gawk-3.1.8+dfsg/test/Makefile.in 2010-05-06 17:55:44.000000000 +0000 +++ gawk-4.0.1+dfsg/test/Makefile.in 2012-03-28 20:03:23.000000000 +0000 @@ -18,7 +18,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2010 the Free Software Foundation, Inc. +# Copyright (C) 1988-2012 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -62,13 +62,14 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -121,6 +122,7 @@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ +LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ @@ -148,7 +150,6 @@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ -U = @U@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ @@ -209,16 +210,29 @@ EXTRA_DIST = \ reg \ lib \ + ChangeLog.0 \ Gentests \ Gentests.vms \ Maketests \ README \ + aadelete1.awk \ + aadelete1.ok \ + aadelete2.awk \ + aadelete2.ok \ + aarray1.awk \ + aarray1.ok \ + aasort.awk \ + aasort.ok \ + aasorti.awk \ + aasorti.ok \ addcomma.awk \ addcomma.in \ addcomma.ok \ anchgsub.awk \ anchgsub.in \ anchgsub.ok \ + arraysort.awk \ + arraysort.ok \ argarray.awk \ argarray.in \ argarray.ok \ @@ -283,6 +297,11 @@ backw.in \ backw.ok \ badargs.ok \ + beginfile1.awk \ + beginfile1.ok \ + beginfile2.in \ + beginfile2.ok \ + beginfile2.sh \ binmode1.ok \ childin.awk \ childin.in \ @@ -318,12 +337,16 @@ datanonl.ok \ defref.awk \ defref.ok \ + delargv.awk \ + delargv.ok \ delarprm.awk \ delarprm.ok \ delarpm2.awk \ delarpm2.ok \ delfunc.awk \ delfunc.ok \ + delsub.awk \ + delsub.ok \ devfd.in1 \ devfd.in2 \ devfd.in4 \ @@ -332,14 +355,21 @@ devfd1.awk \ devfd1.ok \ devfd2.ok \ + dfastress.awk \ + dfastress.ok \ double1.awk \ double1.ok \ double2.awk \ double2.ok \ + dtdgport.awk \ + dumpvars.in \ + dumpvars.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ + exit.ok \ + exit.sh \ exitval1.awk \ exitval1.ok \ exitval2.awk \ @@ -383,6 +413,17 @@ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ + fpat1.awk \ + fpat1.in \ + fpat1.ok \ + fpat2.awk \ + fpat2.ok \ + fpat3.awk \ + fpat3.in \ + fpat3.ok \ + fpatnull.awk \ + fpatnull.in \ + fpatnull.ok \ fordel.awk \ fordel.ok \ forref.awk \ @@ -420,6 +461,9 @@ fwtest2.awk \ fwtest2.in \ fwtest2.ok \ + fwtest3.awk \ + fwtest3.in \ + fwtest3.ok \ gensub.awk \ gensub.in \ gensub.ok \ @@ -432,6 +476,9 @@ getline2.ok \ getline3.awk \ getline3.ok \ + getline4.awk \ + getline4.in \ + getline4.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ @@ -467,6 +514,12 @@ gsubtst5.ok \ gsubtst6.awk \ gsubtst6.ok \ + gsubtst7.awk \ + gsubtst7.in \ + gsubtst7.ok \ + gsubtst8.awk \ + gsubtst8.in \ + gsubtst8.ok \ gtlnbufv.awk \ hex.awk \ hex.ok \ @@ -488,6 +541,9 @@ ignrcase.ok \ ignrcas2.awk \ ignrcas2.ok \ + indirectcall.awk \ + indirectcall.in \ + indirectcall.ok \ inftest.awk \ inftest.ok \ inputred.awk \ @@ -512,6 +568,8 @@ lintold.awk \ lintold.in \ lintold.ok \ + lintwarn.awk \ + lintwarn.ok \ litoct.awk \ litoct.ok \ localenl.ok \ @@ -567,11 +625,17 @@ nasty.ok \ nasty2.awk \ nasty2.ok \ + nastyparm.awk \ + nastyparm.ok \ negexp.awk \ negexp.ok \ + negrange.awk \ + negrange.ok \ nested.awk \ nested.in \ nested.ok \ + next.ok \ + next.sh \ nfldstr.awk \ nfldstr.in \ nfldstr.ok \ @@ -623,6 +687,8 @@ ofmt.awk \ ofmt.in \ ofmt.ok \ + ofmta.awk \ + ofmta.ok \ ofmtbig.awk \ ofmtbig.in \ ofmtbig.ok \ @@ -656,6 +722,8 @@ parsefld.ok \ parseme.awk \ parseme.ok \ + patsplit.awk \ + patsplit.ok \ pcntplus.awk \ pcntplus.ok \ pid.awk \ @@ -669,10 +737,15 @@ posix.awk \ posix.in \ posix.ok \ + posix2008sub.awk \ + posix2008sub.ok \ poundbang.awk \ prdupval.awk \ prdupval.in \ prdupval.ok \ + profile2.ok \ + profile3.awk \ + profile3.ok \ prec.awk \ prec.ok \ printf0.awk \ @@ -684,6 +757,8 @@ printfbad2.awk \ printfbad2.in \ printfbad2.ok \ + printfbad3.awk \ + printfbad3.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -696,10 +771,13 @@ prt1eval.ok \ prtoeval.awk \ prtoeval.ok \ - psx96sub.awk \ - psx96sub.ok \ + pty1.awk \ + pty1.ok \ rand.awk \ rand.ok \ + range1.awk \ + range1.in \ + range1.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ @@ -710,6 +788,8 @@ regeq.awk \ regeq.in \ regeq.ok \ + regrange.awk \ + regrange.ok \ regtest.sh \ regx8bit.awk \ regx8bit.ok \ @@ -731,6 +811,9 @@ resplit.awk \ resplit.in \ resplit.ok \ + rri1.awk \ + rri1.in \ + rri1.ok \ rs.awk \ rs.in \ rs.ok \ @@ -761,6 +844,10 @@ rswhite.awk \ rswhite.in \ rswhite.ok \ + rtlen.ok \ + rtlen.sh \ + rtlen01.ok \ + rtlen01.sh \ scalar.awk \ scalar.ok \ sclforin.awk \ @@ -773,7 +860,15 @@ sort1.ok \ sortempty.awk \ sortempty.ok \ + sortfor.awk \ + sortfor.in \ + sortfor.ok \ + sortu.awk \ + sortu.ok \ space.ok \ + splitarg4.awk \ + splitarg4.in \ + splitarg4.ok \ splitargv.awk \ splitargv.in \ splitargv.ok \ @@ -816,6 +911,7 @@ swaplns.in \ swaplns.ok \ switch2.awk \ + switch2.ok \ synerr1.awk \ synerr1.ok \ synerr2.awk \ @@ -841,9 +937,6 @@ uparrfs.awk \ uparrfs.in \ uparrfs.ok \ - whiny.awk \ - whiny.in \ - whiny.ok \ wideidx.awk \ wideidx.in \ wideidx.ok \ @@ -861,6 +954,8 @@ wjposer1.awk \ wjposer1.in \ wjposer1.ok \ + xref.awk \ + xref.original \ zero2.awk \ zero2.ok \ zeroe0.awk \ @@ -873,64 +968,93 @@ # Get rid of core files when cleaning and generated .ok file CLEANFILES = core core.* fmtspcl.ok -# try to keep these sorted +# try to keep these sorted. each letter starts a new line BASIC_TESTS = \ - addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \ - arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \ - aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \ - arysubnm asgext awkpath back89 backgsub childin clobber closebad \ - clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \ - datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \ - exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray \ - fnarray2 fnaryscl fnasgnm \ - fnmisc fordel forref forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ - funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ + addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \ + arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ + arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ + aryprm8 arysubnm asgext awkpath \ + back89 backgsub \ + childin clobber closebad clsflnam compare compare2 concat1 concat2 \ + concat3 concat4 convfmt \ + datanonl defref delargv delarpm2 delarprm delfunc dfastress dynlj \ + eofsplit exitval1 exitval2 \ + fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ + fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ + fstabplus funsemnl funsmnam funstack \ + getline getline2 getline3 getline4 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ - hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ - longsub longwrds manglprm math membug1 messages minusstr mmap8k \ - mtchi18n nasty nasty2 negexp nested nfldstr nfneg nfset nlfldsep \ - nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ - nors nulrsend numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts \ - onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 parsefld \ - parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ - prt1eval prtoeval psx96sub rand rebt8b1 redfilnm regeq reindops \ - reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ - rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin sortempty \ - splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \ - strtod subamp subi18n subsepnm subslash substr swaplns synerr1 \ - synerr2 tradanch tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \ - unterm uparrfs wideidx wideidx2 widesub widesub2 widesub3 \ - widesub4 wjposer1 zero2 zeroe0 zeroflag + gsubtst7 gsubtst8 \ + hex hsprint \ + inputred intest intprec iobug1 \ + leaddig leadnl litoct longsub longwrds \ + manglprm math membug1 messages minusstr mmap8k mtchi18n \ + nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ + nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ + noparms nors nulrsend numindex numsubstr \ + octsub ofmt ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf \ + paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ + posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ + prt1eval prtoeval \ + rand range1 rebt8b1 redfilnm regeq regrange reindops reparse \ + resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ + rstest3 rstest4 rstest5 rswhite \ + scalar sclforin sclifin sortempty splitargv splitarr splitdef \ + splitvar splitwht strcat1 strnum1 strtod subamp subi18n \ + subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \ + uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \ + wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ + zero2 zeroe0 zeroflag + +UNIX_TESTS = \ + fflush getlnhd localenl pid pipeio1 pipeio2 poundbang rtlen rtlen01 \ + space strftlng -UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = \ - argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 fieldwdth \ - fsfwfs funlen fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 \ - gnureops icasefs icasers igncdym igncfs ignrcas2 ignrcase lint lintold \ - manyfiles match1 match2 match3 mbprintf3 mbstr1 nondec nondec2 posix \ - printfbad1 printfbad2 procinfs rebuf regx8bit reint reint2 rsstart1 \ - rsstart2 rsstart3 rstest6 shadow strftime strtonum + aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ + backw badargs beginfile1 beginfile2 binmode1 \ + clos1way delsub devfd devfd1 devfd2 dumpvars exit \ + fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ + fwtest fwtest2 fwtest3 \ + gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ + icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall \ + lint lintold lintwarn \ + manyfiles match1 match2 match3 mbstr1 \ + nastyparm next nondec nondec2 \ + patsplit posix printfbad1 printfbad2 printfbad3 procinfs \ + profile1 profile2 profile3 pty1 \ + rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + strtonum switch2 -EXTRA_TESTS = regtest inftest -INET_TESTS = inetechu inetecht inetdayu inetdayt +EXTRA_TESTS = inftest regtest +INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat -LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ - mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny +LOCALE_CHARSET_TESTS = \ + asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ + mbprintf1 mbprintf2 mbprintf3 rebt8b2 rtlenmb sort1 sprintfc # List of the tests which should be run with --lint option: -NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 uninit5 uninitialized +NEED_LINT = \ + defref fmtspcl lintwarn noeffect nofmtch shadow \ + uninit2 uninit3 uninit4 uninit5 uninitialized + # List of the tests which should be run with --lint-old option: NEED_LINT_OLD = lintold # List of the tests which fail with EXIT CODE 1 -FAIL_CODE1 = fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm +FAIL_CODE1 = \ + fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm + # List of the files that appear in manual tests or are for reserve testing: -GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk +GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk CMP = cmp AWKPROG = ../gawk$(EXEEXT) +PGAWKPROG = ../pgawk$(EXEEXT) +PGAWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(PGAWKPROG) all: all-am .SUFFIXES: @@ -1214,7 +1338,7 @@ .) : ;; \ *) rm -f ./argarray.in ;; \ esac - @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @@ -1226,46 +1350,47 @@ @echo manyfiles @rm -rf junk @mkdir junk - @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ + @$(AWK) 'BEGIN { for (i = 1; i <= 1030; 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 _$@ + @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 _$@ + @-$(CMP) $(srcdir)/$@.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 _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ - @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ - @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ - @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ - @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 - @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @@ -1279,7 +1404,7 @@ litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ - @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ devfd:: @echo $@ @@ -1289,13 +1414,13 @@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ - @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup - @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @@ -1305,7 +1430,7 @@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ - @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.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. @@ -1320,12 +1445,12 @@ @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi - @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.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 _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fmtspcl.ok: fmtspcl.tok Makefile @$(AWK) -v "sd=$(srcdir)" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < $(srcdir)/fmtspcl.tok > $@ 2>/dev/null @@ -1338,18 +1463,18 @@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ - @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 - @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ - @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clobber:: @echo $@ @@ -1360,7 +1485,7 @@ arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ - @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @@ -1394,12 +1519,12 @@ redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ - @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ - @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @@ -1432,11 +1557,6 @@ $(AWK) '/^[^a]/; END { print NR }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -whiny:: - @echo $@ - @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - wideidx:: @echo $@ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ @@ -1512,6 +1632,22 @@ @head $(srcdir)/rsstart1.in | $(AWK) -f $(srcdir)/rsstart2.awk >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +rtlen:: + @echo $@ + @$(srcdir)/$@.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rtlen01:: + @echo $@ + @$(srcdir)/$@.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rtlenmb:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(srcdir)/rtlen.sh >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/rtlen.ok _$@ && rm -f _$@ + nondec2:: @echo $@ @$(AWK) --non-decimal-data -v a=0x1 -f $(srcdir)/$@.awk >_$@ @@ -1609,6 +1745,61 @@ @echo $@ @$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +beginfile1:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) -f $@.awk $(srcdir)/$@.awk . ./no/such/file Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +beginfile2: + @echo $@ + @-( cd $(srcdir) && LC_ALL=C AWK="$(abs_builddir)/$(AWKPROG)" $(srcdir)/$@.sh $(srcdir)/$@.in ) > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +dumpvars:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --dump-variables 1 < $(srcdir)/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@ + @mv awkvars.out _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile1: + @echo $@ + @$(AWK) --profile=ap-$@.out -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > _$@.out1 + @$(AWK) -f ap-$@.out $(srcdir)/dtdgport.awk > _$@.out2 ; rm ap-$@.out + @cmp _$@.out1 _$@.out2 && rm _$@.out[12] || echo EXIT CODE: $$? >>_$@ + +profile2: + @echo $@ + @$(PGAWK) --profile=ap-$@.out -v sortcmd=sort -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile3: + @echo $@ + @$(PGAWK) --profile=ap-$@.out -f $(srcdir)/$@.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +posix2008sub: + @echo $@ + @$(AWK) --posix -f $(srcdir)/$@.awk > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +next: + @echo $@ + @-AWK="$(AWKPROG)" $(srcdir)/$@.sh > _$@ 2>&1 + @-LC_ALL=C $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +exit: + @echo $@ + @-AWK="$(AWKPROG)" $(srcdir)/$@.sh > _$@ 2>&1 + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rri1:: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -1781,6 +1972,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delargv: + @echo delargv + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + delarpm2: @echo delarpm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1796,6 +1992,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +dfastress: + @echo dfastress + @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: $$? >>_$@ @@ -1916,6 +2117,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getline4: + @echo getline4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 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: $$? >>_$@ @@ -1951,6 +2157,16 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +gsubtst7: + @echo gsubtst7 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst8: + @echo gsubtst8 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + hex: @echo hex @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2031,6 +2247,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +negrange: + @echo negrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nested: @echo nested @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2116,6 +2337,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ofmta: + @echo ofmta + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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: $$? >>_$@ @@ -2216,16 +2442,16 @@ @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 _$@ +range1: + @echo range1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + rebt8b1: @echo rebt8b1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2236,6 +2462,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regrange: + @echo regrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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: $$? >>_$@ @@ -2441,6 +2672,36 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +aadelete1: + @echo aadelete1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aadelete2: + @echo aadelete2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aarray1: + @echo aarray1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aasort: + @echo aasort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aasorti: + @echo aasorti + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arraysort: + @echo arraysort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + backw: @echo backw @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2451,11 +2712,36 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delsub: + @echo delsub + @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 _$@ +fpat1: + @echo fpat1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpat2: + @echo fpat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpat3: + @echo fpat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpatnull: + @echo fpatnull + @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: $$? >>_$@ @@ -2476,6 +2762,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fwtest3: + @echo fwtest3 + @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: $$? >>_$@ @@ -2531,6 +2822,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +indirectcall: + @echo indirectcall + @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: $$? >>_$@ @@ -2541,6 +2837,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint-old < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +lintwarn: + @echo lintwarn + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + match1: @echo match1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2556,11 +2857,21 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +nastyparm: + @echo nastyparm + @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 _$@ +patsplit: + @echo patsplit + @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: $$? >>_$@ @@ -2571,11 +2882,21 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +printfbad3: + @echo printfbad3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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 _$@ +pty1: + @echo pty1 + @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: $$? >>_$@ @@ -2596,11 +2917,31 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +sortfor: + @echo sortfor + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sortu: + @echo sortu + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitarg4: + @echo splitarg4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + strtonum: @echo strtonum @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +switch2: + @echo switch2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + double1: @echo double1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff -Nru gawk-3.1.8+dfsg/test/Maketests gawk-4.0.1+dfsg/test/Maketests --- gawk-3.1.8+dfsg/test/Maketests 2010-04-21 19:32:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/Maketests 2012-03-28 19:47:54.000000000 +0000 @@ -170,6 +170,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delargv: + @echo delargv + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + delarpm2: @echo delarpm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -185,6 +190,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +dfastress: + @echo dfastress + @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: $$? >>_$@ @@ -305,6 +315,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getline4: + @echo getline4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 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: $$? >>_$@ @@ -340,6 +355,16 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +gsubtst7: + @echo gsubtst7 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst8: + @echo gsubtst8 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + hex: @echo hex @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -420,6 +445,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +negrange: + @echo negrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nested: @echo nested @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -505,6 +535,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ofmta: + @echo ofmta + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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: $$? >>_$@ @@ -605,16 +640,16 @@ @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 _$@ +range1: + @echo range1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + rebt8b1: @echo rebt8b1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -625,6 +660,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regrange: + @echo regrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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: $$? >>_$@ @@ -830,6 +870,36 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +aadelete1: + @echo aadelete1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aadelete2: + @echo aadelete2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aarray1: + @echo aarray1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aasort: + @echo aasort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +aasorti: + @echo aasorti + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arraysort: + @echo arraysort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + backw: @echo backw @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -840,11 +910,36 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delsub: + @echo delsub + @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 _$@ +fpat1: + @echo fpat1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpat2: + @echo fpat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpat3: + @echo fpat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fpatnull: + @echo fpatnull + @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: $$? >>_$@ @@ -865,6 +960,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fwtest3: + @echo fwtest3 + @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: $$? >>_$@ @@ -920,6 +1020,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +indirectcall: + @echo indirectcall + @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: $$? >>_$@ @@ -930,6 +1035,11 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint-old < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +lintwarn: + @echo lintwarn + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + match1: @echo match1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -945,11 +1055,21 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +nastyparm: + @echo nastyparm + @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 _$@ +patsplit: + @echo patsplit + @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: $$? >>_$@ @@ -960,11 +1080,21 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +printfbad3: + @echo printfbad3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 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 _$@ +pty1: + @echo pty1 + @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: $$? >>_$@ @@ -985,11 +1115,31 @@ @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +sortfor: + @echo sortfor + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sortu: + @echo sortu + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitarg4: + @echo splitarg4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + strtonum: @echo strtonum @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +switch2: + @echo switch2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + double1: @echo double1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff -Nru gawk-3.1.8+dfsg/test/aadelete1.awk gawk-4.0.1+dfsg/test/aadelete1.awk --- gawk-3.1.8+dfsg/test/aadelete1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aadelete1.awk 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,19 @@ +BEGIN { + a[1][1] = 11 + a[1][2] = 12 + a[2] = 2 + delete a[1][1] + f(a, a[1]) + print a[1][1] + print length(a), length(a[1]) + delete a + print length(a), length(a[1]), length(a) + a[1][1] = 11 +} + +function f(c, b) { + delete b + b[1] = 1 + print c[1][1], b[1] + delete c[2] +} diff -Nru gawk-3.1.8+dfsg/test/aadelete1.ok gawk-4.0.1+dfsg/test/aadelete1.ok --- gawk-3.1.8+dfsg/test/aadelete1.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aadelete1.ok 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,6 @@ +1 1 +1 +1 1 +0 0 1 +gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array +EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/aadelete2.awk gawk-4.0.1+dfsg/test/aadelete2.awk --- gawk-3.1.8+dfsg/test/aadelete2.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aadelete2.awk 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,10 @@ +BEGIN { + a[1][1]=1; + b[1][1]=11; +# delete b[a[1]][1]; + f(b, a) +} + +function f(arr, s) { + delete arr[s[1]][1] +} diff -Nru gawk-3.1.8+dfsg/test/aadelete2.ok gawk-4.0.1+dfsg/test/aadelete2.ok --- gawk-3.1.8+dfsg/test/aadelete2.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aadelete2.ok 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,2 @@ +gawk: aadelete2.awk:9: fatal: attempt to use array `a["1"]' in a scalar context +EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/aarray1.awk gawk-4.0.1+dfsg/test/aarray1.awk --- gawk-3.1.8+dfsg/test/aarray1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aarray1.awk 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,28 @@ +BEGIN { + a[1][1] = 10; + a[1][2] = 20; + a[1][3] = 30; + a[2] = "hello world! we have multi-dimensional array" + a[3, "X"] = "Y" + print length(a), length(a[1]) + delete a[2] + delete a[3, "X"] + a[2][1] = 100; + a[2][2] = 200; + a[2][3] = 300; + for (i in a) { + sum[i] = 0 + for (j in a[i]) + sum[i] += a[i][j] + } + print sum[1], sum[2] + f(a[1]) + print a[1][1] +} + +function f(x, i) +{ + for (i=1;i<=length(x);i++) + print x[i] + x[1] = 1001 +} diff -Nru gawk-3.1.8+dfsg/test/aarray1.ok gawk-4.0.1+dfsg/test/aarray1.ok --- gawk-3.1.8+dfsg/test/aarray1.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aarray1.ok 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,6 @@ +3 3 +60 600 +10 +20 +30 +1001 diff -Nru gawk-3.1.8+dfsg/test/aasort.awk gawk-4.0.1+dfsg/test/aasort.awk --- gawk-3.1.8+dfsg/test/aasort.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aasort.awk 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,34 @@ +function init(b, a, i) +{ + a[1] = "aardvark" + a[2] = "animal" + a[3] = "zebra" + a[4] = "zoo" + a[5] = "Iguana" + a[6] = "Alligator" + a[7] = "Nouns" + a[8] = "people" + for (i in a) + b[IGNORECASE][i] = a[i] +} + +BEGIN { + + for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) { + init(b) + + n = asort(b[IGNORECASE]) + + for (i = 1; i <= n; i++) + printf("b[%d][%d] = \"%s\"\n", IGNORECASE, i, b[IGNORECASE][i]) + + print "============" + } + + IGNORECASE = 1 + init(b) + b[2][1] = "" + n = asort(b[1], b[2]) + for (i = 1; i <= n; i++) + printf("b[2][%d] = \"%s\"\n", i, b[2][i]) +} diff -Nru gawk-3.1.8+dfsg/test/aasort.ok gawk-4.0.1+dfsg/test/aasort.ok --- gawk-3.1.8+dfsg/test/aasort.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aasort.ok 2010-11-01 19:43:40.000000000 +0000 @@ -0,0 +1,26 @@ +b[0][1] = "Alligator" +b[0][2] = "Iguana" +b[0][3] = "Nouns" +b[0][4] = "aardvark" +b[0][5] = "animal" +b[0][6] = "people" +b[0][7] = "zebra" +b[0][8] = "zoo" +============ +b[1][1] = "aardvark" +b[1][2] = "Alligator" +b[1][3] = "animal" +b[1][4] = "Iguana" +b[1][5] = "Nouns" +b[1][6] = "people" +b[1][7] = "zebra" +b[1][8] = "zoo" +============ +b[2][1] = "aardvark" +b[2][2] = "Alligator" +b[2][3] = "animal" +b[2][4] = "Iguana" +b[2][5] = "Nouns" +b[2][6] = "people" +b[2][7] = "zebra" +b[2][8] = "zoo" diff -Nru gawk-3.1.8+dfsg/test/aasorti.awk gawk-4.0.1+dfsg/test/aasorti.awk --- gawk-3.1.8+dfsg/test/aasorti.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aasorti.awk 2010-11-01 19:43:23.000000000 +0000 @@ -0,0 +1,35 @@ +function init(b, a, i) +{ + 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 + for (i in a) + b[IGNORECASE][i] = a[i] +} + +BEGIN { + + for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) { + init(b) + + n = asorti(b[IGNORECASE]) + + for (i = 1; i <= n; i++) + printf("b[%d][%d] = \"%s\"\n", IGNORECASE, i, b[IGNORECASE][i]) + + print "============" + + } + + n = asorti(b) + for (i = 1; i <= n; i++) + printf("b[%d] = \"%s\"\n", i, b[i]) + +} diff -Nru gawk-3.1.8+dfsg/test/aasorti.ok gawk-4.0.1+dfsg/test/aasorti.ok --- gawk-3.1.8+dfsg/test/aasorti.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aasorti.ok 2010-11-01 19:43:40.000000000 +0000 @@ -0,0 +1,20 @@ +b[0][1] = "Alligator" +b[0][2] = "Iguana" +b[0][3] = "Nouns" +b[0][4] = "aardvark" +b[0][5] = "animal" +b[0][6] = "people" +b[0][7] = "zebra" +b[0][8] = "zoo" +============ +b[1][1] = "aardvark" +b[1][2] = "Alligator" +b[1][3] = "animal" +b[1][4] = "Iguana" +b[1][5] = "Nouns" +b[1][6] = "people" +b[1][7] = "zebra" +b[1][8] = "zoo" +============ +b[1] = "0" +b[2] = "1" diff -Nru gawk-3.1.8+dfsg/test/arrayparm.ok gawk-4.0.1+dfsg/test/arrayparm.ok --- gawk-3.1.8+dfsg/test/arrayparm.ok 2009-02-14 20:36:45.000000000 +0000 +++ gawk-4.0.1+dfsg/test/arrayparm.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: arrayparm.awk:18: fatal: attempt to use array `i (from foo)' in a scalar context +gawk: arrayparm.awk:13: fatal: attempt to use array `i (from foo)' in a scalar context EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/arraysort.awk gawk-4.0.1+dfsg/test/arraysort.awk --- gawk-3.1.8+dfsg/test/arraysort.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/arraysort.awk 2011-05-04 20:29:05.000000000 +0000 @@ -0,0 +1,90 @@ +# From: j.eh@mchsi.com +# March and April 2010 + +BEGIN { + print "--- test1 ---" + a[1] = b[3] = 5 + a[2] = b[2] = "3D" + a[3] = b[1] = 10 + asort(a) + asort(b) + for (i = 1; i <= 3; ++i) + printf(" %2s %-2s\n", (a[i] ""), (b[i] "")) + + delete a + delete b +} + +BEGIN { + print "--- test2 ---" + a[100] = a[1] = a["x"] = a["y"] = 1 + PROCINFO["sorted_in"] = "@ind_num_asc" + for (i in a) + print i, a[i] + delete a +} + +BEGIN { + print "--- test3 ---" + a[100] = a[1] = a["x"] = 1 + PROCINFO["sorted_in"] = "@ind_num_asc" + for (i in a) + print i, a[i] + delete a +} + +BEGIN { + print "--- test4 ---" + a[0] = a[100] = a[1] = a["x"] = 1 + PROCINFO["sorted_in"] = "@ind_num_asc" + for (i in a) + print i, a[i] + delete a +} + +BEGIN { + print "--- test5 ---" + a[""] = a["y"] = a[0] = 1 + PROCINFO["sorted_in"] = "@ind_num_asc" + for (i in a) + print i, a[i] + delete a +} + +BEGIN { + print "--- test6 ---" + a[2] = a[1] = a[4] = a["3 "] = 1 + PROCINFO["sorted_in"] = "@ind_num_asc" + for (i in a) + print "\""i"\"" + delete a +} + + +BEGIN { + print "--- test7 ---" + n = split(" 4 \n 3\n3D\nD3\n3\n0\n2\n4\n1\n5", a, "\n") + for (i = 1; i <= n; i++) + b[a[i]] = a[i] + print "--unsorted--" + PROCINFO["sorted_in"] = "@unsorted" + for (i in b) + print "|"i"|"b[i]"|" + + print "--asc ind str--" + PROCINFO["sorted_in"] = "@ind_str_asc" + for (i in b) + print "|"i"|"b[i]"|" + print "--asc val str--" + PROCINFO["sorted_in"] = "@val_str_asc" + for (i in b) + print "|"i"|"b[i]"|" + print "--asc ind num--" + PROCINFO["sorted_in"] = "@ind_num_asc" + for (i in b) + print "|"i"|"b[i]"|" + print "--asc val num--" + PROCINFO["sorted_in"] = "@val_num_asc" + for (i in b) + print "|"i"|"b[i]"|" +} diff -Nru gawk-3.1.8+dfsg/test/arraysort.ok gawk-4.0.1+dfsg/test/arraysort.ok --- gawk-3.1.8+dfsg/test/arraysort.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/arraysort.ok 2011-05-08 17:30:16.000000000 +0000 @@ -0,0 +1,83 @@ +--- test1 --- + 5 5 + 10 10 + 3D 3D +--- test2 --- +x 1 +y 1 +1 1 +100 1 +--- test3 --- +x 1 +1 1 +100 1 +--- test4 --- +0 1 +x 1 +1 1 +100 1 +--- test5 --- + 1 +0 1 +y 1 +--- test6 --- +"1" +"2" +"3 " +"4" +--- test7 --- +--unsorted-- +|4|4| +|5|5| +|D3|D3| +|3D|3D| +| 3| 3| +|0|0| +|1|1| +| 4 | 4 | +|2|2| +|3|3| +--asc ind str-- +| 3| 3| +| 4 | 4 | +|0|0| +|1|1| +|2|2| +|3|3| +|3D|3D| +|4|4| +|5|5| +|D3|D3| +--asc val str-- +| 3| 3| +| 4 | 4 | +|0|0| +|1|1| +|2|2| +|3|3| +|3D|3D| +|4|4| +|5|5| +|D3|D3| +--asc ind num-- +|0|0| +|D3|D3| +|1|1| +|2|2| +| 3| 3| +|3|3| +|3D|3D| +| 4 | 4 | +|4|4| +|5|5| +--asc val num-- +|0|0| +|D3|D3| +|1|1| +|2|2| +| 3| 3| +|3|3| +|3D|3D| +| 4 | 4 | +|4|4| +|5|5| diff -Nru gawk-3.1.8+dfsg/test/aryprm3.ok gawk-4.0.1+dfsg/test/aryprm3.ok --- gawk-3.1.8+dfsg/test/aryprm3.ok 2009-02-14 20:36:45.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aryprm3.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: aryprm3.awk:6: fatal: attempt to use array `a (from arr)' in a scalar context +gawk: aryprm3.awk:4: fatal: attempt to use array `a (from arr)' in a scalar context EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/aryprm4.ok gawk-4.0.1+dfsg/test/aryprm4.ok --- gawk-3.1.8+dfsg/test/aryprm4.ok 2009-02-14 20:36:45.000000000 +0000 +++ gawk-4.0.1+dfsg/test/aryprm4.ok 2011-02-08 20:47:56.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: aryprm4.awk:6: fatal: attempt to use scalar `a' as array +gawk: aryprm4.awk:6: fatal: attempt to use scalar `a' as an array EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/badargs.ok gawk-4.0.1+dfsg/test/badargs.ok --- gawk-3.1.8+dfsg/test/badargs.ok 2009-06-07 22:20:23.000000000 +0000 +++ gawk-4.0.1+dfsg/test/badargs.ok 2012-03-28 19:47:54.000000000 +0000 @@ -1,30 +1,29 @@ gawk: option requires an argument -- f Usage: gawk [POSIX or GNU style options] -f progfile [--] file ... Usage: gawk [POSIX or GNU style options] [--] 'program' file ... -POSIX options: GNU long options: +POSIX options: GNU long options: (standard) -f progfile --file=progfile -F fs --field-separator=fs -v var=val --assign=var=val - -m[fr] val +Short options: GNU long options: (extensions) + -b --characters-as-bytes + -c --traditional + -C --copyright + -d[file] --dump-variables[=file] + -e 'program-text' --source='program-text' + -E file --exec=file + -g --gen-pot + -h --help + -L [fatal] --lint[=fatal] + -n --non-decimal-data + -N --use-lc-numeric -O --optimize - -W compat --compat - -W copyleft --copyleft - -W copyright --copyright - -W dump-variables[=file] --dump-variables[=file] - -W exec=file --exec=file - -W gen-po --gen-po - -W help --help - -W lint[=fatal] --lint[=fatal] - -W lint-old --lint-old - -W non-decimal-data --non-decimal-data - -W profile[=file] --profile[=file] - -W posix --posix - -W re-interval --re-interval - -W source=program-text --source=program-text - -W traditional --traditional - -W usage --usage - -W use-lc-numeric --use-lc-numeric - -W version --version + -p[file] --profile[=file] + -P --posix + -r --re-interval + -S --sandbox + -t --lint-old + -V --version To report bugs, see node `Bugs' in `gawk.info', which is section `Reporting Problems and Bugs' in the printed version. diff -Nru gawk-3.1.8+dfsg/test/beginfile1.awk gawk-4.0.1+dfsg/test/beginfile1.awk --- gawk-3.1.8+dfsg/test/beginfile1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/beginfile1.awk 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,19 @@ +BEGINFILE { + print "In BEGINFILE:" + filename = FILENAME + gsub(/.*[/]/, "", filename) + printf "\tFILENAME = %s, FNR = %d, ERRNO = \"%s\"\n", filename, FNR, ERRNO + + if (ERRNO != "") + nextfile +} + +FNR == 1 { print "processing", filename } +FNR > 1 { nextfile } + +ENDFILE { + print "In ENDFILE:" + filename = FILENAME + gsub(/.*[/]/, "", filename) + printf "\tFILENAME = %s, FNR = %d, ERRNO = \"%s\"\n", filename, FNR, ERRNO +} diff -Nru gawk-3.1.8+dfsg/test/beginfile1.ok gawk-4.0.1+dfsg/test/beginfile1.ok --- gawk-3.1.8+dfsg/test/beginfile1.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/beginfile1.ok 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,14 @@ +In BEGINFILE: + FILENAME = beginfile1.awk, FNR = 0, ERRNO = "" +processing beginfile1.awk +In ENDFILE: + FILENAME = beginfile1.awk, FNR = 2, ERRNO = "" +In BEGINFILE: + FILENAME = ., FNR = 0, ERRNO = "Is a directory" +In BEGINFILE: + FILENAME = file, FNR = 0, ERRNO = "No such file or directory" +In BEGINFILE: + FILENAME = Makefile, FNR = 0, ERRNO = "" +processing Makefile +In ENDFILE: + FILENAME = Makefile, FNR = 2, ERRNO = "" diff -Nru gawk-3.1.8+dfsg/test/beginfile2.in gawk-4.0.1+dfsg/test/beginfile2.in --- gawk-3.1.8+dfsg/test/beginfile2.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/beginfile2.in 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,242 @@ +#TEST1# +BEGINFILE { + print "In BEGINFILE:", FILENAME +} +BEGIN { + count = 0 + print "In BEGIN" + while (getline > 0) + count++; + print count == NR +} + +#TEST2# +BEGINFILE { + print "In BEGINFILE:", FILENAME + nextfile +} +ENDFILE{ + print "In ENDFILE:", FILENAME +} + + +#TEST3# +BEGINFILE { + print "In BEGINFILE:", FILENAME +} +END { + print "executing END rule" + ARGV[ARGC++] = src; + count = 0 + while (getline> 0) + count++; + print count == FNR + print "Done executing END rule" +} +ENDFILE { + print "In ENDFILE:", FILENAME +} + +#TEST4# +BEGINFILE { + print "In BEGINFILE:", FILENAME + nextfile +} +END { + print "executing END rule" + ARGV[ARGC++] = src; + getline + print $0 + print "Done executing END rule" +} +ENDFILE { + print "ENDFILE:", FILENAME +} + + +#TEST5# +BEGIN { + getline + count++ + print NR, count +} +{ + count++ +} +END { + print NR == count +} + +#TEST6# +BEGINFILE { + print "In BEGINFILE:", FILENAME + count = 0 +} +BEGIN { + getline + count++ + print FNR, count +} +{ + count++ +} +ENDFILE { + print "In ENDFILE:", FILENAME + print count == FNR +} + +#TEST7# +BEGINFILE { + print "In BEGINFILE:", FILENAME + count = 0 + if (ARGIND == 1) + nextfile +} +BEGIN { + getline + print "In BEGIN:", FILENAME +} +{ count++ } +ENDFILE { + print "In ENDFILE:", FILENAME + print (FNR - count) +} + +#TEST8# +function f(a, b) { + getline + print FILENAME + print a, b +} +function g(x, y) { + return x +} +BEGINFILE { nextfile } +BEGIN { g(3, f(1, 2)) } + +#TEST9# +function f(a, b) { + b = b ":" a; + if (skip || ERRNO != "") { + print "Skipping:", b + nextfile + } + return b +} +BEGINFILE { print "In BEGINFILE:", f(FILENAME, ++i)} +FNR == 1 { print "In Rule:", FILENAME } +ENDFILE { print "In ENDFILE:", FILENAME } + +#TEST10# +function f() { + nextfile +} +function g( cnt) { + cnt = 0 + while (getline > 0) + cnt++; + return cnt +} +BEGINFILE { if (ARGIND == 1) f(); } +BEGIN { + print g(), NR +} + +#TEST11# +function f(a, b) { + print a + nextfile + print b +} +function g(x, y) { + print x + getline + return y +} +BEGINFILE { ARGIND == 1 ? g(3, f(FILENAME, 2)) : f(3, g(FILENAME, 2)) } + +#TEST12# +BEGINFILE { + print "In BEGINFILE:", FILENAME +} +function g() { + nextfile +} +function f( cnt) { + print cnt + 0 + while (getline > 0) { + if (++cnt == 2) { + g() + print "shouldn't see this line" + } + } +} +{ + print FNR + f() +} +ENDFILE { + print "In ENDFILE:", FILENAME +} + +#TEST13# +# exit in BEGINFILE +BEGINFILE { + print "In BEGINFILE:", FILENAME + exit(0) +} +ENDFILE { + print "In ENDFILE:", FILENAME +} +END { + print "In END:", FILENAME + while (getline > 0) + ; + print "shouldn't see this line" +} + +#TEST14# +# exit in ENDFILE +BEGINFILE { + print "In BEGINFILE:", FILENAME +} +ENDFILE { + print "In ENDFILE:", FILENAME + exit(0) +} +END { + print "In END:", FILENAME + while (getline > 0) + ; + print "shouldn't see this line" +} + +#TEST15# +BEGINFILE { + print "BEGINFILE:", FILENAME +} +{ nextfile } +END { + print NR +} + +#TEST16# +BEGINFILE { + print "In BEGINFILE:", FILENAME +} +BEGIN { + getline + print "In BEGIN:", FILENAME +} +{ + if (NR == FNR) { + print "In Rule:", FILENAME + nextfile + } + exit(0) +} + +ENDFILE { + print "In ENDFILE: ", FILENAME +} + diff -Nru gawk-3.1.8+dfsg/test/beginfile2.ok gawk-4.0.1+dfsg/test/beginfile2.ok --- gawk-3.1.8+dfsg/test/beginfile2.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/beginfile2.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,93 @@ +--Test 1a-- +In BEGIN +In BEGINFILE: beginfile2.in +1 +--Test 1b-- +In BEGIN +In BEGINFILE: beginfile2.in +In BEGINFILE: /file/does/not/exist +gawk: cmd. line:3: fatal: cannot open file `/file/does/not/exist' for reading (No such file or directory) +--Test 2-- +In BEGINFILE: beginfile2.in +In ENDFILE: beginfile2.in +In BEGINFILE: /file/does/not/exist +--Test 3-- +In BEGINFILE: beginfile2.in +In ENDFILE: beginfile2.in +executing END rule +In BEGINFILE: beginfile2.sh +In ENDFILE: beginfile2.sh +1 +Done executing END rule +--Test 4-- +In BEGINFILE: beginfile2.in +ENDFILE: beginfile2.in +executing END rule +In BEGINFILE: beginfile2.sh +ENDFILE: beginfile2.sh + +Done executing END rule +--Test 5-- +1 1 +1 +--Test 6-- +In BEGINFILE: beginfile2.in +1 1 +In ENDFILE: beginfile2.in +1 +--Test 7-- +In BEGINFILE: beginfile2.in +In ENDFILE: beginfile2.in +0 +In BEGINFILE: beginfile2.sh +In BEGIN: beginfile2.sh +In ENDFILE: beginfile2.sh +1 +--Test 8-- +beginfile2.in +1 2 +--Test 9a-- +Skipping: 1:/file/does/not/exist +In BEGINFILE: 2:beginfile2.in +In Rule: beginfile2.in +In ENDFILE: beginfile2.in +--Test 9b-- +Skipping: 1:/file/does/not/exist +Skipping: 2:beginfile2.in +In ENDFILE: beginfile2.in +--Test 10-- +82 82 +--Test 11-- +beginfile2.in +beginfile2.sh +gawk: cmd. line:9: fatal: non-redirected `getline' invalid inside `BEGINFILE' rule +--Test 12-- +In BEGINFILE: beginfile2.in +1 +0 +In ENDFILE: beginfile2.in +In BEGINFILE: beginfile2.sh +1 +0 +In ENDFILE: beginfile2.sh +--Test 13-- +In BEGINFILE: beginfile2.in +In END: beginfile2.in +In ENDFILE: beginfile2.in +In BEGINFILE: beginfile2.sh +--Test 14-- +In BEGINFILE: beginfile2.in +In ENDFILE: beginfile2.in +In END: beginfile2.in +In BEGINFILE: beginfile2.sh +In ENDFILE: beginfile2.sh +--Test 15-- +BEGINFILE: beginfile2.in +BEGINFILE: beginfile2.sh +2 +--Test 16-- +In BEGINFILE: beginfile2.in +In BEGIN: beginfile2.in +In Rule: beginfile2.in +In ENDFILE: beginfile2.in +In BEGINFILE: beginfile2.sh diff -Nru gawk-3.1.8+dfsg/test/beginfile2.sh gawk-4.0.1+dfsg/test/beginfile2.sh --- gawk-3.1.8+dfsg/test/beginfile2.sh 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/beginfile2.sh 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,82 @@ +#!/bin/sh + +# beginfile2.sh --- test BEGINFILE/ENDFILE/getline/nextfile/exit combinations + +#AWK="../gawk" +AWKPROG="beginfile2.in" +SCRIPT=`basename $0` + +if [ "$AWK" = "" ] +then + echo $0: You must set AWK >&2 + exit 1 +fi + +echo "--Test 1a--" +prog=`$AWK '/#TEST1#/, /#TEST2#/' $AWKPROG` +$AWK "$prog" $AWKPROG +echo "--Test 1b--" +$AWK "$prog" $AWKPROG /file/does/not/exist + +echo "--Test 2--" +prog=`$AWK '/#TEST2#/, /#TEST3#/' $AWKPROG` +$AWK "$prog" $AWKPROG /file/does/not/exist + +echo "--Test 3--" +prog=`$AWK '/#TEST3#/, /#TEST4#/' $AWKPROG` +$AWK -vsrc=$SCRIPT "$prog" $AWKPROG + +echo "--Test 4--" +prog=`$AWK '/#TEST4#/, /#TEST5#/' $AWKPROG` +$AWK -vsrc=$SCRIPT "$prog" $AWKPROG + +echo "--Test 5--" +prog=`$AWK '/#TEST5#/, /#TEST6#/' $AWKPROG` +$AWK "$prog" $AWKPROG + +echo "--Test 6--" +prog=`$AWK '/#TEST6#/, /#TEST7#/' $AWKPROG` +$AWK "$prog" $AWKPROG + +echo "--Test 7--" +prog=`$AWK '/#TEST7#/, /#TEST8#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 8--" +prog=`$AWK '/#TEST8#/, /#TEST9#/' $AWKPROG` +$AWK "$prog" $AWKPROG + +echo "--Test 9a--" +prog=`$AWK '/#TEST9#/, /#TEST10#/' $AWKPROG` +$AWK "$prog" /file/does/not/exist $AWKPROG +echo "--Test 9b--" +$AWK -vskip=1 "$prog" /file/does/not/exist $AWKPROG + +echo "--Test 10--" +prog=`$AWK '/#TEST10#/, /#TEST11#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 11--" +prog=`$AWK '/#TEST11#/, /#TEST12#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 12--" +prog=`$AWK '/#TEST12#/, /#TEST13#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 13--" +prog=`$AWK '/#TEST13#/, /#TEST14#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 14--" +prog=`$AWK '/#TEST14#/, /#TEST15#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 15--" +prog=`$AWK '/#TEST15#/, /#TEST16#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + +echo "--Test 16--" +prog=`$AWK '/#TEST16#/, /#TEST17#/' $AWKPROG` +$AWK "$prog" $AWKPROG $SCRIPT + diff -Nru gawk-3.1.8+dfsg/test/concat4.awk gawk-4.0.1+dfsg/test/concat4.awk --- gawk-3.1.8+dfsg/test/concat4.awk 2006-08-11 12:52:23.000000000 +0000 +++ gawk-4.0.1+dfsg/test/concat4.awk 2010-10-31 10:25:52.000000000 +0000 @@ -1,7 +1,9 @@ { a = $0 + print a print index(a,"b") getline a = a $0 + print a print index(a,"b") } diff -Nru gawk-3.1.8+dfsg/test/concat4.ok gawk-4.0.1+dfsg/test/concat4.ok --- gawk-3.1.8+dfsg/test/concat4.ok 2006-08-11 12:52:23.000000000 +0000 +++ gawk-4.0.1+dfsg/test/concat4.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,2 +1,4 @@ +foo 0 +foobar 4 diff -Nru gawk-3.1.8+dfsg/test/defref.ok gawk-4.0.1+dfsg/test/defref.ok --- gawk-3.1.8+dfsg/test/defref.ok 2009-02-14 20:36:46.000000000 +0000 +++ gawk-4.0.1+dfsg/test/defref.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,3 +1,3 @@ -gawk: defref.awk:2: warning: function `foo' called but never defined +gawk: warning: function `foo' called but never defined gawk: defref.awk:1: fatal: function `foo' not defined EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/delargv.awk gawk-4.0.1+dfsg/test/delargv.awk --- gawk-3.1.8+dfsg/test/delargv.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/delargv.awk 2011-05-14 19:12:24.000000000 +0000 @@ -0,0 +1,12 @@ +BEGIN { + ARGV[1] = "/dev/null" + ARGV[2] = "/dev/null" + ARGV[3] = "/dev/null" + ARGC = 4 + delete ARGV[2] +} + +END { + for (i in ARGV) + printf("length of ARGV[%d] is %d\n", i, length(ARGV[i])) +} diff -Nru gawk-3.1.8+dfsg/test/delargv.ok gawk-4.0.1+dfsg/test/delargv.ok --- gawk-3.1.8+dfsg/test/delargv.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/delargv.ok 2011-05-14 19:27:56.000000000 +0000 @@ -0,0 +1,3 @@ +length of ARGV[0] is 4 +length of ARGV[1] is 9 +length of ARGV[3] is 9 diff -Nru gawk-3.1.8+dfsg/test/delsub.awk gawk-4.0.1+dfsg/test/delsub.awk --- gawk-3.1.8+dfsg/test/delsub.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/delsub.awk 2011-05-04 20:01:55.000000000 +0000 @@ -0,0 +1,2 @@ +function f(c, d, x) { delete c; x = d[0] } +BEGIN { a[0][0] = 1; f(a, a[0]); print "still here" } diff -Nru gawk-3.1.8+dfsg/test/delsub.ok gawk-4.0.1+dfsg/test/delsub.ok --- gawk-3.1.8+dfsg/test/delsub.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/delsub.ok 2011-05-04 20:02:20.000000000 +0000 @@ -0,0 +1 @@ +still here diff -Nru gawk-3.1.8+dfsg/test/dfastress.awk gawk-4.0.1+dfsg/test/dfastress.awk --- gawk-3.1.8+dfsg/test/dfastress.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/dfastress.awk 2011-06-20 17:15:34.000000000 +0000 @@ -0,0 +1 @@ +BEGIN { print "a" ~ /(^| )*(a|b)*(c|d)( |$)/ } diff -Nru gawk-3.1.8+dfsg/test/dfastress.ok gawk-4.0.1+dfsg/test/dfastress.ok --- gawk-3.1.8+dfsg/test/dfastress.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/dfastress.ok 2011-06-20 17:15:55.000000000 +0000 @@ -0,0 +1 @@ +0 diff -Nru gawk-3.1.8+dfsg/test/dtdgport.awk gawk-4.0.1+dfsg/test/dtdgport.awk --- gawk-3.1.8+dfsg/test/dtdgport.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/dtdgport.awk 2010-12-07 20:19:27.000000000 +0000 @@ -0,0 +1,325 @@ +# dtdgport.awk +# Reads an XML document from standard input and +# prints a DTD for this document to standard output. +# http://saxon.sourceforge.net/dtdgen.html +# JK 2004-10-09 +# JK 2006-03-05 +# JK 2007-08-05 Converted for portability from the original dtd_generator.awk + +# The program makes an internal list of all the elements +# and attributes that appear in your document, noting how +# they are nested, and noting which elements contain +# character data. + +BEGIN { + while (getXMLEVENT(ARGV[1])) { + # Remember each element. + if ( XMLEVENT == "STARTELEM" ) { + # Remember the parent names of each child node. + name[XMLDEPTH] = XMLSTARTELEM + if (XMLDEPTH>1) + child[name[XMLDEPTH-1], XMLSTARTELEM] ++ + # Count how often the element occurs. + elem[XMLSTARTELEM] ++ + # Remember all the attributes with the element. + for (a in XMLATTR) + attr[XMLSTARTELEM,a] ++ + } + } +} + +END { print_elem(1, name[1]) } # name[1] is the root + +# Print one element (including sub-elements) but only once. +function print_elem(depth, element, c, atn, chl, n, i, myChildren) { + if (already_printed[element]++) + return + indent=sprintf("%*s", 2*depth-2, "") + myChildren="" + for (c in child) { + split(c, chl, SUBSEP) + if (element == chl[1]) { + if (myChildren=="") + myChildren = chl[2] + else + myChildren = myChildren " | " chl[2] + } + } + # If an element has no child nodes, declare it as such. + if (myChildren=="") + print indent "" + else + print indent "" + # After the element name itself, list its attributes. + for (a in attr) { + split(a, atn, SUBSEP) + # Treat only those attributes that belong to the current element. + if (element == atn[1]) { + # If an attribute occured each time with its element, notice this. + if (attr[element, atn[2]] == elem[element]) + print indent "" + else + print indent "" + } + } + # Now go through the child nodes of this elements and print them. + gsub(/[\|]/, " ", myChildren) + n=split(myChildren, chl) + for(i=1; i<=n; i++) { + print_elem(depth+1, chl[i]) + split(myChildren, chl) + } +} + +## +# getXMLEVENT( file ): # read next xml-data into XMLEVENT,XMLNAME,XMLATTR +# # referenced entities are not resolved +# Parameters: +# file -- path to xml file +# External variables: +# XMLEVENT -- type of item read, e.g. "STARTELEM"(tag), "ENDELEM"(end tag), +# "COMMENT"(comment), "CHARDATA"(data) +# XMLNAME -- value of item, e.g. tagname if type is "STARTELEM" or "ENDELEM" +# XMLATTR -- Map of attributes, only set if XMLEVENT=="STARTELEM" +# XMLPATH -- Path to current tag, e.g. /TopLevelTag/SubTag1/SubTag2 +# XMLROW -- current line number in input file +# XMLERROR -- error text, set on parse error +# Returns: +# 1 on successful read: XMLEVENT, XMLNAME, XMLATTR are set accordingly +# "" at end of file or parse error, XMLERROR is set on error +# Private Data: +# _XMLIO -- buffer, XMLROW, XMLPATH for open files +## + +function getXMLEVENT( file ,end,p,q,tag,att,accu,mline,mode,S0,ex,dtd) { + XMLEVENT=XMLNAME=XMLERROR=XMLSTARTELEM=XMLENDELEM = "" + split("", XMLATTR) + S0 = _XMLIO[file,"S0"] + XMLROW = _XMLIO[file,"line"]; + XMLPATH = _XMLIO[file,"path"]; + XMLDEPTH=_XMLIO[file,"depth"]+0; + dtd = _XMLIO[file,"dtd"]; + while (!XMLEVENT) { + if (S0 == "") { + if (1 != (getline S0 < file)) + break; + XMLROW ++; + S0 = S0 RS; + } + if (mode == "") { + mline = XMLROW + accu="" + p = substr(S0,1,1) + if (p != "<" && !(dtd && p=="]")) + mode="CHARDATA" + else if (p == "]") { + S0 = substr(S0,2) + mode="ENDDOCT" + end=">" + dtd=0 + } else if ( substr(S0,1,4) == "" + } else if ( substr(S0,1,9) == "" + } else if (substr(S0,1,9) == "" + } else if ( substr(S0,1,2) == "" + } else if (substr(S0,1,2) == "" + } else if ( substr(S0,1,2)==""; + tag = S0 + sub(/[ \n\r\t>].*$/,"",tag) + S0 = substr(S0,length(tag)+1) + ex = XMLPATH + sub(/\/[^\/]*$/,"",XMLPATH) + ex = substr(ex, length(XMLPATH)+2) + if (tag != ex) { + XMLERROR = "unexpected close tag <" ex ">.." + break + } + } else { + S0 = substr(S0,2) + mode = "STARTELEM" + tag = S0 + sub(/[ \n\r\t\/>].*$/,"",tag) + S0 = substr(S0, length(tag)+1) + if (tag !~ /^[A-Za-z:_][0-9A-Za-z:_.-]*$/ ) { # /^[[:alpha:]:_][[:alnum:]:_.-]*$/ + XMLERROR = "invalid tag name '" tag "'" + break + } + XMLPATH = XMLPATH "/" tag; + } + } else if (mode == "CHARDATA") { # terminated by "<" or EOF + p = index(S0, "<") + if (dtd && (q=index(S0,"]")) && (!p || q" ) { + S0 = substr(S0, 3) + mode = "" + XMLEVENT = "STARTELEM" + XMLNAME = XMLSTARTELEM = tag + XMLDEPTH ++ + S0 = "" S0 + } else if (substr(S0, 1, 1) == ">" ) { + S0 = substr(S0, 2) + mode = "" + XMLEVENT = "STARTELEM" + XMLNAME = XMLSTARTELEM = tag + XMLDEPTH ++ + } else { + att = S0 + sub(/[= \n\r\t\/>].*$/,"",att) + S0 = substr(S0, length(att) + 1) + mode = "ATTR" + if (att !~ /^[A-Za-z:_][0-9A-Za-z:_.-]*$/ ) { # /^[[:alpha:]:_][[:alnum:]:_.-]*$/ + XMLERROR = "invalid attribute name '" att "'" + break + } + } + } else if (mode == "ATTR") { + sub(/^[ \n\r\t]*/, "", S0) + if (S0 == "") + continue + if (substr(S0,1,1) == "=" ) { + S0 = substr(S0,2) + mode = "EQ" + } else { + XMLATTR[att] = att + mode = "STARTELEM" + } + } else if (mode == "EQ") { + sub(/^[ \n\r\t]*/,"",S0) + if (S0 == "") + continue + end = substr(S0,1,1) + if (end == "\"" || end == "'") { + S0 = substr(S0,2) + accu = "" + mode = "VALUE" + } else { + accu = S0 + sub(/[ \n\r\t\/>].*$/,"", accu) + S0 = substr(S0, length(accu)+1) + XMLATTR[att] = unescapeXML(accu) + mode = "STARTELEM" + } + } else if (mode == "VALUE") { # terminated by end + if (p = index(S0, end)) { + XMLATTR[att] = accu unescapeXML(substr(S0,1,p-1)) + S0 = substr(S0, p+length(end)) + mode = "STARTELEM" + } else { + accu = accu unescapeXML(S0) + S0="" + } + } else if (mode == "STARTDOCT") { # terminated by "[" or ">" + if ((q = index(S0, "[")) && (!(p = index(S0,end)) || q

", text ) + gsub( "<", "<", text ) + gsub( "&", "\\&", text) + return text +} + +# close xml file +function closeXMLEVENT(file) { + close(file); + delete _XMLIO[file,"S0"] + delete _XMLIO[file,"line"] + delete _XMLIO[file,"path"]; + delete _XMLIO[file,"depth"]; + delete _XMLIO[file,"dtd"] + delete _XMLIO[file,"open"] + delete _XMLIO[file,"IND"] +} diff -Nru gawk-3.1.8+dfsg/test/dumpvars.in gawk-4.0.1+dfsg/test/dumpvars.in --- gawk-3.1.8+dfsg/test/dumpvars.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/dumpvars.in 2010-11-12 09:52:55.000000000 +0000 @@ -0,0 +1,3 @@ +A +B +C diff -Nru gawk-3.1.8+dfsg/test/dumpvars.ok gawk-4.0.1+dfsg/test/dumpvars.ok --- gawk-3.1.8+dfsg/test/dumpvars.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/dumpvars.ok 2012-03-20 18:56:40.000000000 +0000 @@ -0,0 +1,24 @@ +ARGC: 1 +ARGIND: 0 +ARGV: array, 1 elements +BINMODE: 0 +CONVFMT: "%.6g" +ERRNO: "" +FIELDWIDTHS: "" +FILENAME: "-" +FNR: 3 +FPAT: "[^[:space:]]+" +FS: " " +IGNORECASE: 0 +LINT: 0 +NF: 1 +NR: 3 +OFMT: "%.6g" +OFS: " " +ORS: "\n" +RLENGTH: 0 +RS: "\n" +RSTART: 0 +RT: "\n" +SUBSEP: "\034" +TEXTDOMAIN: "messages" diff -Nru gawk-3.1.8+dfsg/test/exit.ok gawk-4.0.1+dfsg/test/exit.ok --- gawk-3.1.8+dfsg/test/exit.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/exit.ok 2011-03-30 19:59:43.000000000 +0000 @@ -0,0 +1,25 @@ +1 +3 +-- 1 +2 +-- 2 +2 +-- 3 +2 +2 +-- 4 +0 +-- 5 +1 null +-- 6 +1 null +-- 7 +0 exit.sh +-- 8 +1 +0 exit.sh +-- 9 +0 null +-- 10 +1 null +-- 11 diff -Nru gawk-3.1.8+dfsg/test/exit.sh gawk-4.0.1+dfsg/test/exit.sh --- gawk-3.1.8+dfsg/test/exit.sh 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/exit.sh 2011-05-09 12:05:13.000000000 +0000 @@ -0,0 +1,57 @@ +#!/bin/sh + +# exit.sh --- test exit invoked in various ways + +if [ "$AWK" = "" ] +then + echo $0: You must set AWK >&2 + exit 1 +fi + +# Use awk to print the string instead of echo or printf. + +x='BEGIN{print 1; exit; print 2}; NR>1{print}; END{print 3; exit; print 4}' +$AWK 'BEGIN { print "a\nb" }' | $AWK "$x" +echo "-- 1" + +x='function f(){ exit}; END{print NR;f();print NR}' +$AWK 'BEGIN { print "a\nb" }' | $AWK "$x" +echo "-- 2" + +x='function f(){ exit}; NR>1 {f()}; END{print NR; f();print NR}' +$AWK 'BEGIN { print "a\nb" }' | $AWK "$x" +echo "-- 3" + +x='function f(){ exit}; NR>1{ f()}; END{print NR;print NR}' +$AWK 'BEGIN { print "a\nb" }' | $AWK "$x" +echo "-- 4" + +x='function f(){ exit}; BEGINFILE {f()}; NR>1{ f()}; END{print NR}' +$AWK 'BEGIN { print "a\nb" }' | $AWK "$x" +echo "-- 5" + +y='function strip(f) { sub(/.*\//, "", f); return f };' + +x='BEGINFILE{if(++i==1) exit;}; END{print i, strip(FILENAME)}' +$AWK "$y$x" /dev/null $0 +echo "-- 6" + +x='BEGINFILE{if(++i==1) exit;}; ENDFILE{print i++}; END{print i, strip(FILENAME)}' +$AWK "$y$x" /dev/null $0 +echo "-- 7" + +x='function f(){ exit}; BEGINFILE{i++ && f()}; END{print NR,strip(FILENAME)}' +$AWK "$y$x" /dev/null $0 +echo "-- 8" + +x='function f(){ exit}; BEGINFILE{i++ && f()}; ENDFILE{ print i}; END{print NR,strip(FILENAME)}' +$AWK "$y$x" /dev/null $0 +echo "-- 9" + +x='function f(){ exit}; BEGINFILE{i++}; ENDFILE{ f(); print i}; END{print NR,strip(FILENAME)}' +$AWK "$y$x" /dev/null $0 +echo "-- 10" + +x='function f(){ exit}; BEGINFILE{i++}; ENDFILE{ i>1 && f(); print i, strip(FILENAME)}' +$AWK "$y$x" /dev/null $0 +echo "-- 11" diff -Nru gawk-3.1.8+dfsg/test/fmtspcl.tok gawk-4.0.1+dfsg/test/fmtspcl.tok --- gawk-3.1.8+dfsg/test/fmtspcl.tok 2007-04-24 20:13:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fmtspcl.tok 2010-10-31 10:25:52.000000000 +0000 @@ -1,9 +1,9 @@ gawk: fmtspcl.awk:10: warning: sqrt: called with negative argument -1 -gawk: fmtspcl.awk:6: warning: [s]printf: value positive_nan is out of range for `%x' format -gawk: fmtspcl.awk:6: warning: [s]printf: value positive_nan is out of range for `%d' format -gawk: fmtspcl.awk:6: warning: [s]printf: value negative_nan is out of range for `%x' format -gawk: fmtspcl.awk:6: warning: [s]printf: value negative_nan is out of range for `%d' format -gawk: fmtspcl.awk:6: warning: [s]printf: value positive_infinity is out of range for `%x' format -gawk: fmtspcl.awk:6: warning: [s]printf: value positive_infinity is out of range for `%d' format -gawk: fmtspcl.awk:6: warning: [s]printf: value negative_infinity is out of range for `%x' format -gawk: fmtspcl.awk:6: warning: [s]printf: value negative_infinity is out of range for `%d' format +gawk: fmtspcl.awk:3: warning: [s]printf: value positive_nan is out of range for `%x' format +gawk: fmtspcl.awk:3: warning: [s]printf: value positive_nan is out of range for `%d' format +gawk: fmtspcl.awk:3: warning: [s]printf: value negative_nan is out of range for `%x' format +gawk: fmtspcl.awk:3: warning: [s]printf: value negative_nan is out of range for `%d' format +gawk: fmtspcl.awk:3: warning: [s]printf: value positive_infinity is out of range for `%x' format +gawk: fmtspcl.awk:3: warning: [s]printf: value positive_infinity is out of range for `%d' format +gawk: fmtspcl.awk:3: warning: [s]printf: value negative_infinity is out of range for `%x' format +gawk: fmtspcl.awk:3: warning: [s]printf: value negative_infinity is out of range for `%d' format diff -Nru gawk-3.1.8+dfsg/test/fnarray.ok gawk-4.0.1+dfsg/test/fnarray.ok --- gawk-3.1.8+dfsg/test/fnarray.ok 2009-02-14 20:36:46.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fnarray.ok 2012-03-28 19:47:54.000000000 +0000 @@ -1,5 +1,5 @@ gawk: fnarray.awk:5: Num = foo[c] gawk: fnarray.awk:5: ^ use of non-array as array -gawk: fnarray.awk:5: fatal: function `foo' called with space between name and `(', +gawk: fnarray.awk:5: error: function `foo' called with space between name and `(', or used as a variable or an array -EXIT CODE: 2 +EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/fnasgnm.awk gawk-4.0.1+dfsg/test/fnasgnm.awk --- gawk-3.1.8+dfsg/test/fnasgnm.awk 2006-08-11 12:58:14.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fnasgnm.awk 2010-10-31 10:25:52.000000000 +0000 @@ -1,6 +1,6 @@ # AFP_Bug1.awk - illustrate a problem with `gawk' (GNU Awk 3.0.3 on OS/2) # Arthur Pool .. pool@commerce.uq.edu.au -# $Id: AFP_Bug1.awk,v 1.1 1998-03-17 12:22:44+10 pool Exp pool $ +# $Id: fnasgnm.awk,v 1.1.1.1 2008/11/16 19:21:15 arnold Exp $ # Assignment to a variable with the same name as a function from within # that function causes an ABEND. diff -Nru gawk-3.1.8+dfsg/test/fpat1.awk gawk-4.0.1+dfsg/test/fpat1.awk --- gawk-3.1.8+dfsg/test/fpat1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat1.awk 2011-06-05 18:44:56.000000000 +0000 @@ -0,0 +1,22 @@ +BEGIN { +# if (t == 0) + FPAT = "([^,]+)|(\"[^\"]+\")" +# else +# FPAT = "([^,]*)|(\"[^\"]+\")" +} +FNR == 1 { + # This part was added later + print $1 + print $1, $3 + for (i = 1; i <= NF; i++) + print i, $i + + # Reset for original part of test + FPAT = "([^,]*)|(\"[^\"]+\")" + $0 = $0 +} +{ + print "NF =", NF + for (i = 1; i <= NF; i++) + printf("$%d = <%s>\n", i, $i) +} diff -Nru gawk-3.1.8+dfsg/test/fpat1.in gawk-4.0.1+dfsg/test/fpat1.in --- gawk-3.1.8+dfsg/test/fpat1.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat1.in 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,2 @@ +Robbins,Arnold,"1234 A Pretty Place, NE",Sometown,NY,12345-6789,USA +Smith,,"1234 A Pretty Place, NE",Sometown,NY,12345-6789,USA diff -Nru gawk-3.1.8+dfsg/test/fpat1.ok gawk-4.0.1+dfsg/test/fpat1.ok --- gawk-3.1.8+dfsg/test/fpat1.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat1.ok 2011-06-05 18:45:05.000000000 +0000 @@ -0,0 +1,25 @@ +Robbins +Robbins "1234 A Pretty Place, NE" +1 Robbins +2 Arnold +3 "1234 A Pretty Place, NE" +4 Sometown +5 NY +6 12345-6789 +7 USA +NF = 7 +$1 = +$2 = +$3 = <"1234 A Pretty Place, NE"> +$4 = +$5 = +$6 = <12345-6789> +$7 = +NF = 7 +$1 = +$2 = <> +$3 = <"1234 A Pretty Place, NE"> +$4 = +$5 = +$6 = <12345-6789> +$7 = diff -Nru gawk-3.1.8+dfsg/test/fpat2.awk gawk-4.0.1+dfsg/test/fpat2.awk --- gawk-3.1.8+dfsg/test/fpat2.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat2.awk 2011-05-26 18:39:41.000000000 +0000 @@ -0,0 +1,11 @@ +BEGIN { + FPAT = " " + $0 = "" + print NF + + $0 = "abc" + print NF + + $0 = "a b c" + print NF +} diff -Nru gawk-3.1.8+dfsg/test/fpat2.ok gawk-4.0.1+dfsg/test/fpat2.ok --- gawk-3.1.8+dfsg/test/fpat2.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat2.ok 2011-05-26 19:07:14.000000000 +0000 @@ -0,0 +1,3 @@ +0 +0 +2 diff -Nru gawk-3.1.8+dfsg/test/fpat3.awk gawk-4.0.1+dfsg/test/fpat3.awk --- gawk-3.1.8+dfsg/test/fpat3.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat3.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,10 @@ +BEGIN { + FPAT = "[^,]*" + +} + +{ + if (x) NF + for (i = 1; i <= 4; ++i) + print i, $i +} diff -Nru gawk-3.1.8+dfsg/test/fpat3.in gawk-4.0.1+dfsg/test/fpat3.in --- gawk-3.1.8+dfsg/test/fpat3.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat3.in 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ +a,b,,c diff -Nru gawk-3.1.8+dfsg/test/fpat3.ok gawk-4.0.1+dfsg/test/fpat3.ok --- gawk-3.1.8+dfsg/test/fpat3.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpat3.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,4 @@ +1 a +2 b +3 +4 c diff -Nru gawk-3.1.8+dfsg/test/fpatnull.awk gawk-4.0.1+dfsg/test/fpatnull.awk --- gawk-3.1.8+dfsg/test/fpatnull.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpatnull.awk 2011-05-23 18:30:57.000000000 +0000 @@ -0,0 +1,2 @@ +BEGIN { FPAT = "" } +{ print NF } diff -Nru gawk-3.1.8+dfsg/test/fpatnull.in gawk-4.0.1+dfsg/test/fpatnull.in --- gawk-3.1.8+dfsg/test/fpatnull.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpatnull.in 2011-05-23 18:30:57.000000000 +0000 @@ -0,0 +1 @@ +hello, world diff -Nru gawk-3.1.8+dfsg/test/fpatnull.ok gawk-4.0.1+dfsg/test/fpatnull.ok --- gawk-3.1.8+dfsg/test/fpatnull.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fpatnull.ok 2011-05-23 18:30:57.000000000 +0000 @@ -0,0 +1 @@ +13 diff -Nru gawk-3.1.8+dfsg/test/fsbs.awk gawk-4.0.1+dfsg/test/fsbs.awk --- gawk-3.1.8+dfsg/test/fsbs.awk 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fsbs.awk 2010-10-31 10:25:52.000000000 +0000 @@ -1,2 +1,2 @@ BEGIN { FS = "\\" } -{ print $1, $2 } +{ print $1, $2} diff -Nru gawk-3.1.8+dfsg/test/funsmnam.ok gawk-4.0.1+dfsg/test/funsmnam.ok --- gawk-3.1.8+dfsg/test/funsmnam.ok 2009-02-14 20:36:46.000000000 +0000 +++ gawk-4.0.1+dfsg/test/funsmnam.ok 2012-03-28 19:47:54.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: funsmnam.awk:6: fatal: function `foo': can't use function name as parameter name -EXIT CODE: 2 +gawk: funsmnam.awk:1: error: function `foo': can't use function name as parameter name +EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/funstack.awk gawk-4.0.1+dfsg/test/funstack.awk --- gawk-3.1.8+dfsg/test/funstack.awk 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/funstack.awk 2010-11-29 19:53:39.000000000 +0000 @@ -118,7 +118,7 @@ BEGIN { initialize() } -/^ *@ *[Ss][Tt][Rr][Ii][Nn][Gg] *{/ { do_String(); next } +/^ *@ *[Ss][Tt][Rr][Ii][Nn][Gg] *\{/ { do_String(); next } /^ *@ *[Pp][Rr][Ee][Aa][Mm][Bb][Ll][Ee]/ { next } @@ -163,7 +163,7 @@ In_Article = 1 Citation_label = $0 - sub(/^[^\{]*{/,"",Citation_label) + sub(/^[^\{]*\{/,"",Citation_label) sub(/ *, *$/,"",Citation_label) Author = "" @@ -376,82 +376,82 @@ gsub(/{\\aa}/, "\\å", s) gsub(/{\\ae}/, "\\æ", s) - gsub(/{\\c{c}}/,"\\ç", s) + gsub(/\{\\c\{c\}\}/,"\\ç", s) - gsub(/{\\\e}/, "\\è", s) - gsub(/{\\'e}/, "\\é", s) - gsub(/{\\[\^]e}/,"\\ê", s) - gsub(/{\\\"e}/, "\\ë", s) - - gsub(/{\\\i}/, "\\ì", s) - gsub(/{\\'i}/, "\\í", s) - gsub(/{\\[\^]i}/,"\\î", s) - gsub(/{\\\"i}/, "\\ï", s) + gsub(/\{\\\e\}/, "\\è", s) + gsub(/\{\\'e\}/, "\\é", s) + gsub(/\{\\[\^]e\}/,"\\ê", s) + gsub(/\{\\\"e\}/, "\\ë", s) + + gsub(/\{\\\i\}/, "\\ì", s) + gsub(/\{\\'i\}/, "\\í", s) + gsub(/\{\\[\^]i\}/,"\\î", s) + gsub(/\{\\\"i\}/, "\\ï", s) # ignore eth and thorn - gsub(/{\\~n}/, "\\ñ", s) + gsub(/\{\\~n\}/, "\\ñ", s) - gsub(/{\\\o}/, "\\ò", s) - gsub(/{\\'o}/, "\\ó", s) - gsub(/{\\[\^]o}/, "\\ô", s) - gsub(/{\\~o}/, "\\õ", s) - gsub(/{\\\"o}/, "\\ö", s) - gsub(/{\\o}/, "\\ø", s) - - gsub(/{\\\u}/, "\\ù", s) - gsub(/{\\'u}/, "\\ú", s) - gsub(/{\\[\^]u}/,"\\û", s) - gsub(/{\\\"u}/, "\\ü", s) + gsub(/\{\\\o\}/, "\\ò", s) + gsub(/\{\\'o\}/, "\\ó", s) + gsub(/\{\\[\^]o\}/, "\\ô", s) + gsub(/\{\\~o\}/, "\\õ", s) + gsub(/\{\\\"o\}/, "\\ö", s) + gsub(/\{\\o\}/, "\\ø", s) + + gsub(/\{\\\u\}/, "\\ù", s) + gsub(/\{\\'u\}/, "\\ú", s) + gsub(/\{\\[\^]u\}/,"\\û", s) + gsub(/\{\\\"u\}/, "\\ü", s) - gsub(/{\\'y}/, "\\ý", s) - gsub(/{\\\"y}/, "\\ÿ", s) + gsub(/\{\\'y\}/, "\\ý", s) + gsub(/\{\\\"y\}/, "\\ÿ", s) # Now do the same for upper-case accents - gsub(/{\\\A}/, "\\À", s) - gsub(/{\\'A}/, "\\Á", s) - gsub(/{\\[\^]A}/, "\\Â", s) - gsub(/{\\~A}/, "\\Ã", s) - gsub(/{\\\"A}/, "\\Ä", s) - gsub(/{\\AA}/, "\\Å", s) - gsub(/{\\AE}/, "\\Æ", s) - - gsub(/{\\c{C}}/,"\\Ç", s) - - gsub(/{\\\e}/, "\\È", s) - gsub(/{\\'E}/, "\\É", s) - gsub(/{\\[\^]E}/, "\\Ê", s) - gsub(/{\\\"E}/, "\\Ë", s) - - gsub(/{\\\I}/, "\\Ì", s) - gsub(/{\\'I}/, "\\Í", s) - gsub(/{\\[\^]I}/, "\\Î", s) - gsub(/{\\\"I}/, "\\Ï", s) + gsub(/\{\\\A\}/, "\\À", s) + gsub(/\{\\'A\}/, "\\Á", s) + gsub(/\{\\[\^]A\}/, "\\Â", s) + gsub(/\{\\~A\}/, "\\Ã", s) + gsub(/\{\\\"A\}/, "\\Ä", s) + gsub(/\{\\AA\}/, "\\Å", s) + gsub(/\{\\AE\}/, "\\Æ", s) + + gsub(/\{\\c\{C\}\}/,"\\Ç", s) + + gsub(/\{\\\e\}/, "\\È", s) + gsub(/\{\\'E\}/, "\\É", s) + gsub(/\{\\[\^]E\}/, "\\Ê", s) + gsub(/\{\\\"E\}/, "\\Ë", s) + + gsub(/\{\\\I\}/, "\\Ì", s) + gsub(/\{\\'I\}/, "\\Í", s) + gsub(/\{\\[\^]I\}/, "\\Î", s) + gsub(/\{\\\"I\}/, "\\Ï", s) # ignore eth and thorn - gsub(/{\\~N}/, "\\Ñ", s) + gsub(/\{\\~N\}/, "\\Ñ", s) - gsub(/{\\\O}/, "\\Ò", s) - gsub(/{\\'O}/, "\\Ó", s) - gsub(/{\\[\^]O}/, "\\Ô", s) - gsub(/{\\~O}/, "\\Õ", s) - gsub(/{\\\"O}/, "\\Ö", s) - gsub(/{\\O}/, "\\Ø", s) - - gsub(/{\\\U}/, "\\Ù", s) - gsub(/{\\'U}/, "\\Ú", s) - gsub(/{\\[\^]U}/, "\\Û", s) - gsub(/{\\\"U}/, "\\Ü", s) + gsub(/\{\\\O\}/, "\\Ò", s) + gsub(/\{\\'O\}/, "\\Ó", s) + gsub(/\{\\[\^]O\}/, "\\Ô", s) + gsub(/\{\\~O\}/, "\\Õ", s) + gsub(/\{\\\"O\}/, "\\Ö", s) + gsub(/\{\\O\}/, "\\Ø", s) + + gsub(/\{\\\U\}/, "\\Ù", s) + gsub(/\{\\'U\}/, "\\Ú", s) + gsub(/\{\\[\^]U\}/, "\\Û", s) + gsub(/\{\\\"U\}/, "\\Ü", s) - gsub(/{\\'Y}/, "\\Ý", s) + gsub(/\{\\'Y\}/, "\\Ý", s) - gsub(/{\\ss}/, "\\ß", s) + gsub(/\{\\ss\}/, "\\ß", s) # Others not mentioned in Flynn's book - gsub(/{\\'\\i}/,"\\í", s) - gsub(/{\\'\\j}/,"j", s) + gsub(/\{\\'\\i\}/,"\\í", s) + gsub(/\{\\'\\j\}/,"j", s) } return (s) } @@ -663,7 +663,8 @@ function html_label( label) { label = Volume "(" Number "):" Month ":" Year - gsub(/[^A-Za-z0-9():,;.\/\-]/,"",label) + # gsub(/[^A-Za-z0-9():,;.\/\-]/,"",label) + gsub(/[^[:alnum:]():,;.\/\-]/,"",label) return (label) } @@ -673,7 +674,8 @@ if (HTML) { gsub(/<\/?[^>]*>/,"",s) # remove SGML tags - gsub(/&[A-Za-z0-9]+;/,"",s) # remove SGML entities + # gsub(/&[A-Za-z0-9]+;/,"",s) # remove SGML entities + gsub(/&[[:alnum:]]+;/,"",s) # remove SGML entities } return (length(s)) } @@ -949,8 +951,10 @@ { gsub(/\\\&/, "\\&", s) # reduce TeX ampersands to conventional ones - gsub(/\\[a-z][a-z] +/,"",s) # remove TeX font changes - gsub(/\\[^A-Za-z]/,"",s) # remove remaining TeX control symbols + #gsub(/\\[a-z][a-z] +/,"",s) # remove TeX font changes + gsub(/\\[[:lower:]][[:lower:]] +/,"",s) # remove TeX font changes + #gsub(/\\[^A-Za-z]/,"",s) # remove remaining TeX control symbols + gsub(/\\[^[:alpha:]]/,"",s) # remove remaining TeX control symbols } } return (s) diff -Nru gawk-3.1.8+dfsg/test/fwtest3.awk gawk-4.0.1+dfsg/test/fwtest3.awk --- gawk-3.1.8+dfsg/test/fwtest3.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fwtest3.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ +BEGIN { FIELDWIDTHS="5" } { print $1 } diff -Nru gawk-3.1.8+dfsg/test/fwtest3.in gawk-4.0.1+dfsg/test/fwtest3.in --- gawk-3.1.8+dfsg/test/fwtest3.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fwtest3.in 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ +1234567890 diff -Nru gawk-3.1.8+dfsg/test/fwtest3.ok gawk-4.0.1+dfsg/test/fwtest3.ok --- gawk-3.1.8+dfsg/test/fwtest3.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/fwtest3.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ +12345 diff -Nru gawk-3.1.8+dfsg/test/getline4.awk gawk-4.0.1+dfsg/test/getline4.awk --- gawk-3.1.8+dfsg/test/getline4.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/getline4.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ +END { getline $2; print} diff -Nru gawk-3.1.8+dfsg/test/getline4.in gawk-4.0.1+dfsg/test/getline4.in --- gawk-3.1.8+dfsg/test/getline4.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/getline4.in 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ + aaa bbb diff -Nru gawk-3.1.8+dfsg/test/getline4.ok gawk-4.0.1+dfsg/test/getline4.ok --- gawk-3.1.8+dfsg/test/getline4.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/getline4.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ + aaa bbb diff -Nru gawk-3.1.8+dfsg/test/gsubtst4.ok gawk-4.0.1+dfsg/test/gsubtst4.ok --- gawk-3.1.8+dfsg/test/gsubtst4.ok 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst4.ok 2010-10-31 10:25:52.000000000 +0000 @@ -19,15 +19,15 @@ .((^)|(2)) x345 .((2)|($)) x34x .(($)|(2)) x34x -x{0}((2)|(^)) 12345 -x{0}((^)|(2)) 12345 -x{0}((2)|($)) 12345 -x{0}(($)|(2)) 12345 +x{0}((2)|(^)) x1x345 +x{0}((^)|(2)) x1x345 +x{0}((2)|($)) 1x345x +x{0}(($)|(2)) 1x345x 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 +x{0}^ x12345 +x{0}$ 12345x +(x{0}^)|2 x1x345 +(x{0}$)|2 1x345x diff -Nru gawk-3.1.8+dfsg/test/gsubtst7.awk gawk-4.0.1+dfsg/test/gsubtst7.awk --- gawk-3.1.8+dfsg/test/gsubtst7.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst7.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,92 @@ +# From bug-gawk-bounces+arnold=skeeve.com@gnu.org Tue Jul 12 08:18:24 2011 +# Return-Path: +# Received: from localhost (localhost [127.0.0.1]) +# by skeeve.com (8.14.3/8.14.3) with ESMTP id p6C5HArm002260 +# for ; Tue, 12 Jul 2011 08:18:23 +0300 +# X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sls-af11p1 +# X-Spam-Level: +# X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DNS_FROM_OPENWHOIS, +# RCVD_IN_DNSWL_MED autolearn=ham version=3.2.5 +# X-Envelope-From: bug-gawk-bounces+arnold=skeeve.com@gnu.org +# Received: from server1.f7.net [66.148.120.132] +# by localhost with IMAP (fetchmail-6.3.11) +# for (single-drop); Tue, 12 Jul 2011 08:18:23 +0300 (IDT) +# Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) +# by freefriends.org (8.14.4/8.14.4) with ESMTP id p6BIYi4t032040; +# Mon, 11 Jul 2011 14:34:48 -0400 +# Received: from localhost ([::1]:38787 helo=lists.gnu.org) +# by lists.gnu.org with esmtp (Exim 4.71) +# (envelope-from ) +# id 1QgLJb-0004tM-Eg +# for arnold@skeeve.com; Mon, 11 Jul 2011 14:34:43 -0400 +# Received: from eggs.gnu.org ([140.186.70.92]:54022) +# by lists.gnu.org with esmtp (Exim 4.71) +# (envelope-from ) id 1QgD0R-0004Vi-HZ +# for bug-gawk@gnu.org; Mon, 11 Jul 2011 05:42:24 -0400 +# Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) +# (envelope-from ) id 1QgD0Q-0000SE-8u +# for bug-gawk@gnu.org; Mon, 11 Jul 2011 05:42:23 -0400 +# Received: from moat.camk.edu.pl ([148.81.175.50]:34696) +# by eggs.gnu.org with esmtp (Exim 4.71) +# (envelope-from ) id 1QgD0P-0000Px-V3 +# for bug-gawk@gnu.org; Mon, 11 Jul 2011 05:42:22 -0400 +# Received: from localhost (localhost.localdomain [127.0.0.1]) +# by moat.camk.edu.pl (Postfix) with ESMTP id 72C1D5F004C +# for ; Mon, 11 Jul 2011 11:42:13 +0200 (CEST) +# X-Virus-Scanned: amavisd-new at camk.edu.pl +# Received: from moat.camk.edu.pl ([127.0.0.1]) +# by localhost (liam.camk.edu.pl [127.0.0.1]) (amavisd-new, port 10024) +# with LMTP id oh+-Yw+zHhK6 for ; +# Mon, 11 Jul 2011 11:42:07 +0200 (CEST) +# Received: from gatekeeper.camk.edu.pl (gatekeeper.camk.edu.pl [192.168.1.23]) +# by moat.camk.edu.pl (Postfix) with ESMTP id 89AA55F0046 +# for ; Mon, 11 Jul 2011 11:42:07 +0200 (CEST) +# Received: by gatekeeper.camk.edu.pl (Postfix, from userid 1293) +# id 796C8809FB; Mon, 11 Jul 2011 11:42:07 +0200 (CEST) +# Date: Mon, 11 Jul 2011 11:42:07 +0200 +# From: Kacper Kornet +# To: bug-gawk@gnu.org +# Message-ID: <20110711094207.GA2616@camk.edu.pl> +# MIME-Version: 1.0 +# Content-Type: text/plain; charset=iso-8859-2 +# Content-Disposition: inline +# User-Agent: Mutt/1.5.20 (2009-06-14) +# X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) +# X-Received-From: 148.81.175.50 +# X-Mailman-Approved-At: Mon, 11 Jul 2011 14:34:26 -0400 +# Subject: [bug-gawk] Change in behavior of gsub inside loop +# X-BeenThere: bug-gawk@gnu.org +# X-Mailman-Version: 2.1.14 +# Precedence: list +# List-Id: "Bug reports and all discussion about gawk." +# List-Unsubscribe: , +# +# List-Archive: +# List-Post: +# List-Help: +# List-Subscribe: , +# +# Errors-To: bug-gawk-bounces+arnold=skeeve.com@gnu.org +# Sender: bug-gawk-bounces+arnold=skeeve.com@gnu.org +# Status: R +# +# Hi, +# +# I have observed the following changed behavior between gawk-3.8.1 and +# gakw-4.0.0. While in the former +# +# echo -ne ' aaa' | gawk '{for (c = 1; c <= NF; c++) {gsub("foo", "bar", $c); print}}' +# +# prints: +# +# aaa +# +# the gawk-4.0.0 does not preserve the leading spaces and prints: +# +# aaa +# +# Best regards, +# -- +# Kacper +# +{for (c = 1; c <= NF; c++) {gsub("foo", "bar", $c); print}} diff -Nru gawk-3.1.8+dfsg/test/gsubtst7.in gawk-4.0.1+dfsg/test/gsubtst7.in --- gawk-3.1.8+dfsg/test/gsubtst7.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst7.in 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ + aaa \ No newline at end of file diff -Nru gawk-3.1.8+dfsg/test/gsubtst7.ok gawk-4.0.1+dfsg/test/gsubtst7.ok --- gawk-3.1.8+dfsg/test/gsubtst7.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst7.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1 @@ + aaa diff -Nru gawk-3.1.8+dfsg/test/gsubtst8.awk gawk-4.0.1+dfsg/test/gsubtst8.awk --- gawk-3.1.8+dfsg/test/gsubtst8.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst8.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,5 @@ +{ + OFS = " " $2 " " + gsub("foo", "_", OFS) + print $1, $2 +} diff -Nru gawk-3.1.8+dfsg/test/gsubtst8.in gawk-4.0.1+dfsg/test/gsubtst8.in --- gawk-3.1.8+dfsg/test/gsubtst8.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst8.in 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,2 @@ +a bar b +c foo d diff -Nru gawk-3.1.8+dfsg/test/gsubtst8.ok gawk-4.0.1+dfsg/test/gsubtst8.ok --- gawk-3.1.8+dfsg/test/gsubtst8.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/gsubtst8.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,2 @@ +a bar bar +c _ foo diff -Nru gawk-3.1.8+dfsg/test/igncfs.awk gawk-4.0.1+dfsg/test/igncfs.awk --- gawk-3.1.8+dfsg/test/igncfs.awk 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/igncfs.awk 2010-11-29 19:55:07.000000000 +0000 @@ -1,6 +1,6 @@ BEGIN { IGNORECASE=1 - FS="[^a-z]+" + FS="[^[:lower:]]+" } { for (i=1; i\n", $i, @the_function(start, NF) "") + } + print "" +} + +# do_sort --- sort the data in ascending order and print it + +function do_sort(first, last, compare, data, i, retval) +{ + delete data + for (i = 1; first <= last; first++) { + data[i] = $first + i++ + } + + quicksort(data, 1, i-1, compare) + + retval = data[1] + for (i = 2; i in data; i++) + retval = retval " " data[i] + + return retval +} + +# sort --- sort the data in ascending order and print it + +function sort(first, last) +{ + return do_sort(first, last, "num_lt") +} + +# rsort --- sort the data in descending order and print it + +function rsort(first, last) +{ + return do_sort(first, last, "num_ge") +} + +# num_lt --- do a numeric less than comparison + +function num_lt(left, right) +{ + return ((left + 0) < (right + 0)) +} + +# num_ge --- do a numeric greater than or equal to comparison + +function num_ge(left, right) +{ + return ((left + 0) >= (right + 0)) +} + +# quicksort.awk --- Quicksort algorithm, with user-supplied +# comparison function +# +# Arnold Robbins, arnold@skeeve.com, Public Domain +# January 2009 + +# quicksort --- C.A.R. Hoare's quick sort algorithm. See Wikipedia +# or almost any algorithms or computer science text +# +# Adapted from K&R-II, page 110 + +function quicksort(data, left, right, less_than, i, last) +{ + if (left >= right) # do nothing if array contains fewer + return # than two elements + + quicksort_swap(data, left, int((left + right) / 2)) + last = left + for (i = left + 1; i <= right; i++) + if (@less_than(data[i], data[left])) + quicksort_swap(data, ++last, i) + quicksort_swap(data, left, last) + quicksort(data, left, last - 1, less_than) + quicksort(data, last + 1, right, less_than) +} + +# quicksort_swap --- helper function for quicksort, should really be inline + +function quicksort_swap(data, i, j, temp) +{ + temp = data[i] + data[i] = data[j] + data[j] = temp +} diff -Nru gawk-3.1.8+dfsg/test/indirectcall.in gawk-4.0.1+dfsg/test/indirectcall.in --- gawk-3.1.8+dfsg/test/indirectcall.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/indirectcall.in 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,3 @@ +Biology_101 sum average sort rsort data: 87.0 92.4 78.5 94.9 +Chemistry_305 sum average sort rsort data: 75.2 98.3 94.7 88.2 +English_401 sum average sort rsort data: 100.0 95.6 87.1 93.4 diff -Nru gawk-3.1.8+dfsg/test/indirectcall.ok gawk-4.0.1+dfsg/test/indirectcall.ok --- gawk-3.1.8+dfsg/test/indirectcall.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/indirectcall.ok 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,18 @@ +Biology 101: + sum: <352.8> + average: <88.2> + sort: <78.5 87.0 92.4 94.9> + rsort: <94.9 92.4 87.0 78.5> + +Chemistry 305: + sum: <356.4> + average: <89.1> + sort: <75.2 88.2 94.7 98.3> + rsort: <98.3 94.7 88.2 75.2> + +English 401: + sum: <376.1> + average: <94.025> + sort: <87.1 93.4 95.6 100.0> + rsort: <100.0 95.6 93.4 87.1> + diff -Nru gawk-3.1.8+dfsg/test/inftest.ok gawk-4.0.1+dfsg/test/inftest.ok --- gawk-3.1.8+dfsg/test/inftest.ok 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/inftest.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,105 +1,105 @@ 100000 100 100000000 100000 -1e+11 100000000 -1e+14 1e+11 -1e+17 1e+14 -1e+20 1e+17 -1e+23 1e+20 -1e+26 1e+23 -1e+29 1e+26 -1e+32 1e+29 -1e+35 1e+32 -1e+38 1e+35 -1e+41 1e+38 -1e+44 1e+41 -1e+47 1e+44 -1e+50 1e+47 -1e+53 1e+50 -1e+56 1e+53 -1e+59 1e+56 -1e+62 1e+59 -1e+65 1e+62 -1e+68 1e+65 -1e+71 1e+68 -1e+74 1e+71 -1e+77 1e+74 -1e+80 1e+77 -1e+83 1e+80 -1e+86 1e+83 -1e+89 1e+86 -1e+92 1e+89 -1e+95 1e+92 -1e+98 1e+95 -1e+101 1e+98 -1e+104 1e+101 -1e+107 1e+104 -1e+110 1e+107 -1e+113 1e+110 -1e+116 1e+113 -1e+119 1e+116 -1e+122 1e+119 -1e+125 1e+122 -1e+128 1e+125 -1e+131 1e+128 -1e+134 1e+131 -1e+137 1e+134 -1e+140 1e+137 -1e+143 1e+140 -1e+146 1e+143 -1e+149 1e+146 -1e+152 1e+149 -1e+155 1e+152 -1e+158 1e+155 -1e+161 1e+158 -1e+164 1e+161 -1e+167 1e+164 -1e+170 1e+167 -1e+173 1e+170 -1e+176 1e+173 -1e+179 1e+176 -1e+182 1e+179 -1e+185 1e+182 -1e+188 1e+185 -1e+191 1e+188 -1e+194 1e+191 -1e+197 1e+194 -1e+200 1e+197 -1e+203 1e+200 -1e+206 1e+203 -1e+209 1e+206 -1e+212 1e+209 -1e+215 1e+212 -1e+218 1e+215 -1e+221 1e+218 -1e+224 1e+221 -1e+227 1e+224 -1e+230 1e+227 -1e+233 1e+230 -1e+236 1e+233 -1e+239 1e+236 -1e+242 1e+239 -1e+245 1e+242 -1e+248 1e+245 -1e+251 1e+248 -1e+254 1e+251 -1e+257 1e+254 -1e+260 1e+257 -1e+263 1e+260 -1e+266 1e+263 -1e+269 1e+266 -1e+272 1e+269 -1e+275 1e+272 -1e+278 1e+275 -1e+281 1e+278 -1e+284 1e+281 -1e+287 1e+284 -1e+290 1e+287 -1e+293 1e+290 -1e+296 1e+293 -1e+299 1e+296 -1e+302 1e+299 -1e+305 1e+302 -1e+308 1e+305 -Inf 1e+308 +100000000000 100000000 +100000000000000 100000000000 +100000000000000000 100000000000000 +100000000000000000000 100000000000000000 +99999999999999991611392 100000000000000000000 +99999999999999987584860160 99999999999999991611392 +99999999999999991433150857216 99999999999999987584860160 +99999999999999987351763694911488 99999999999999991433150857216 +99999999999999978416622034208423936 99999999999999987351763694911488 +99999999999999978859343891977453174784 99999999999999978416622034208423936 +99999999999999981277195531206711524196352 99999999999999978859343891977453174784 +99999999999999989014320776740338242315878400 99999999999999981277195531206711524196352 +99999999999999984102174700855949311516153479168 99999999999999989014320776740338242315878400 +99999999999999986860582406952576489172979654066176 99999999999999984102174700855949311516153479168 +99999999999999978054446934877508831185257879708893184 99999999999999986860582406952576489172979654066176 +99999999999999987412212025203316576428059584082518999040 99999999999999978054446934877508831185257879708893184 +99999999999999986018415450295152630082077192041996404916224 99999999999999987412212025203316576428059584082518999040 +99999999999999980666236602647803076113504806606389643480924160 99999999999999986018415450295152630082077192041996404916224 +99999999999999975825012428989187159563798798233702140870647611392 99999999999999980666236602647803076113504806606389643480924160 +99999999999999971335279399108653394842078992129280704487622839369728 99999999999999975825012428989187159563798798233702140870647611392 +99999999999999967408259575639813195298814735056613421464603838774247424 99999999999999971335279399108653394842078992129280704487622839369728 +99999999999999970056411870256069142542038397972347690757785041907511984128 99999999999999967408259575639813195298814735056613421464603838774247424 +99999999999999972567252564410741448076354167255414257198727219693125789286400 99999999999999970056411870256069142542038397972347690757785041907511984128 +99999999999999973698536947569070602057895480263592729374358127316211945338568704 99999999999999972567252564410741448076354167255414257198727219693125789286400 +99999999999999976120719655945885896110010116988012672708945321528841504187721187328 99999999999999973698536947569070602057895480263592729374358127316211945338568704 +99999999999999973856084135905232153357980849678363696123425190035433415775017926393856 99999999999999976120719655945885896110010116988012672708945321528841504187721187328 +99999999999999971205813538737655658983034598563985922382199344722004978592608624454926336 99999999999999973856084135905232153357980849678363696123425190035433415775017926393856 +99999999999999975389707388132869751436283080323216967861681212523470671424572109115849965568 99999999999999971205813538737655658983034598563985922382199344722004978592608624454926336 +99999999999999972379113067962648670423437470097331363676661611216816006398674924910108594929664 99999999999999975389707388132869751436283080323216967861681212523470671424572109115849965568 +99999999999999969414835583487354067580020253874920922632950003776417566988560774307532476147302400 99999999999999972379113067962648670423437470097331363676661611216816006398674924910108594929664 +99999999999999966622249050912868528133293762816112494334490172638967005189080435307857566164815183872 99999999999999969414835583487354067580020253874920922632950003776417566988560774307532476147302400 +99999999999999968362880378347121775677131631329985434686086700429684016230704354433915805708681998237696 99999999999999966622249050912868528133293762816112494334490172638967005189080435307857566164815183872 +99999999999999964288808425678149603140240254511229112583149913097811514958423455725153206182008585870901248 99999999999999968362880378347121775677131631329985434686086700429684016230704354433915805708681998237696 +99999999999999968982139315152805545902739120606436395645733092104128636424091051037647720836736356917448802304 99999999999999964288808425678149603140240254511229112583149913097811514958423455725153206182008585870901248 +99999999999999967380149038212122984106472840979272309693704700336639058963809845170982926501255944400227237101568 99999999999999968982139315152805545902739120606436395645733092104128636424091051037647720836736356917448802304 +99999999999999966559930016418493512466784505810164297686266163751684395304145867767250551801489973191409795717922816 99999999999999967380149038212122984106472840979272309693704700336639058963809845170982926501255944400227237101568 +99999999999999958580839372410066012355896381285081556877904079853245427222934695583742010722166605272033725937822466048 99999999999999966559930016418493512466784505810164297686266163751684395304145867767250551801489973191409795717922816 +99999999999999964744616902883383199809977537409440210268672488243000947267704701436097240209969526960208587421285248663552 99999999999999958580839372410066012355896381285081556877904079853245427222934695583742010722166605272033725937822466048 +99999999999999973698435499708622381138622312668787627138462205955970454339251530402644148459414217665561018763215928972804096 99999999999999964744616902883383199809977537409440210268672488243000947267704701436097240209969526960208587421285248663552 +99999999999999969038927015485337257005892808638742964825108028921863830855986242882741442632031065833582205967834822157445103616 99999999999999973698435499708622381138622312668787627138462205955970454339251530402644148459414217665561018763215928972804096 +99999999999999971501552402759992207773332814897718827642591733325954247602754580648099053350606729046973846898142049707859353010176 99999999999999969038927015485337257005892808638742964825108028921863830855986242882741442632031065833582205967834822157445103616 +99999999999999971974376477116725958320681296099442193303548604571539607618134101499047714608573256383945041956761037397538888893857792 99999999999999971501552402759992207773332814897718827642591733325954247602754580648099053350606729046973846898142049707859353010176 +99999999999999961968158199529955173403994504587771180275938657358298495399329094904038179293313627194069297996226940583414097499461255168 99999999999999971974376477116725958320681296099442193303548604571539607618134101499047714608573256383945041956761037397538888893857792 +99999999999999963620798121505576670783782774669698779846950364769001543610951083090052657384091991757042324095515152702392127562019650928640 99999999999999961968158199529955173403994504587771180275938657358298495399329094904038179293313627194069297996226940583414097499461255168 +99999999999999959051579265227378354828144165547185352553017196119889755915458610153359828358707969413334501536203103835841670045058198329622528 99999999999999963620798121505576670783782774669698779846950364769001543610951083090052657384091991757042324095515152702392127562019650928640 +99999999999999949000651624039424488856392748028506927595932797882554670922470130425357587563315085893427279408697133232798530309970250449591205888 99999999999999959051579265227378354828144165547185352553017196119889755915458610153359828358707969413334501536203103835841670045058198329622528 +99999999999999948113397321920763733791300209102720142496272933762293366867916664628678769065514886520635469455372468241633342802321107464319475384320 99999999999999949000651624039424488856392748028506927595932797882554670922470130425357587563315085893427279408697133232798530309970250449591205888 +99999999999999946478010192255648230055321641354709940200579872215827731234563716472240370810369559036705605349404445729917669188222207113866621719937024 99999999999999948113397321920763733791300209102720142496272933762293366867916664628678769065514886520635469455372468241633342802321107464319475384320 +99999999999999941174994859794900356607455139003828857556412504641155163420811223250296124735018310448815699341785471398594311548904172910798168237564493824 99999999999999946478010192255648230055321641354709940200579872215827731234563716472240370810369559036705605349404445729917669188222207113866621719937024 +99999999999999946510014354963832392659989467263634555857239408609611720064878292922562279944578696396604449694432883048689164539589319460636017298848184532992 99999999999999941174994859794900356607455139003828857556412504641155163420811223250296124735018310448815699341785471398594311548904172910798168237564493824 +99999999999999941339618318502970259434219055418702861961123734820753251454399578543040337524341888072347466495524305815225809869759600290050307580026961994448896 99999999999999946510014354963832392659989467263634555857239408609611720064878292922562279944578696396604449694432883048689164539589319460636017298848184532992 +99999999999999936244924684387270937819452376396255450979411565991520333252255420434433659770484396036007906295905408882388258279623991724679211271428480374583328768 99999999999999941339618318502970259434219055418702861961123734820753251454399578543040337524341888072347466495524305815225809869759600290050307580026961994448896 +99999999999999938393087270819114040015608114939367394621582908707281601350665380747521463661052072678153904384780012012657644738335288324478035879665769565830174998528 99999999999999936244924684387270937819452376396255450979411565991520333252255420434433659770484396036007906295905408882388258279623991724679211271428480374583328768 +99999999999999936402865781218259783047588779268187110073864544713098209344824228945072115447009943309125688250630284464918540788778765150873943899767450589406430224187392 99999999999999938393087270819114040015608114939367394621582908707281601350665380747521463661052072678153904384780012012657644738335288324478035879665769565830174998528 +99999999999999932755942024273873371963453979756196963399477041511967210604015516252752299267005165619015879149232552133229875362054559318652887774917983563976477694532517888 99999999999999936402865781218259783047588779268187110073864544713098209344824228945072115447009943309125688250630284464918540788778765150873943899767450589406430224187392 +99999999999999930449370010469988507729535311264848842396946780663816593047475793966409789645392732105835839886983821660858314734516991018179899807013191242951604188717858684928 99999999999999932755942024273873371963453979756196963399477041511967210604015516252752299267005165619015879149232552133229875362054559318652887774917983563976477694532517888 +99999999999999926062929060790372034489260266271016529998992090319447875774239110669868148490692058544771170935690235939685426866834118273051840402906249046168301887374323926171648 99999999999999930449370010469988507729535311264848842396946780663816593047475793966409789645392732105835839886983821660858314734516991018179899807013191242951604188717858684928 +99999999999999932742916262928110023686347842483162394048718371574133692602240984883924588271717248394482781662747380635887994975485943351991473842104185224408145227922919218275680256 99999999999999926062929060790372034489260266271016529998992090319447875774239110669868148490692058544771170935690235939685426866834118273051840402906249046168301887374323926171648 +99999999999999937578305619730709881245839649374381910536023685232697991459255307073630546336657965129832648296622676548394350483652119629822535399195325784877482862571061024201468018688 99999999999999932742916262928110023686347842483162394048718371574133692602240984883924588271717248394482781662747380635887994975485943351991473842104185224408145227922919218275680256 +99999999999999940476708761993653639767353567573372418760219182512524240452181745662269903053828283531977973233064610020242062507278752512846344394977566526684664367671371585724203629805568 99999999999999937578305619730709881245839649374381910536023685232697991459255307073630546336657965129832648296622676548394350483652119629822535399195325784877482862571061024201468018688 +99999999999999943939334382617117116614388861848433079252058069929489999249064530962831054545274423916407588090467239874609462471504703263765454875272083466230310539097875936556698439887355904 99999999999999940476708761993653639767353567573372418760219182512524240452181745662269903053828283531977973233064610020242062507278752512846344394977566526684664367671371585724203629805568 +99999999999999945838831865930559938199048223279323498721866831026796929789068801756281743363439163784437548240813825394719579023308653389983938338747932758781065010280415466156238449989365268480 99999999999999943939334382617117116614388861848433079252058069929489999249064530962831054545274423916407588090467239874609462471504703263765454875272083466230310539097875936556698439887355904 +99999999999999945320142419820435818384997240317928354845311051996492317289611635544950141936825645484474167122425851108694843196896054742184544454321460845295205656016170005273590724564176578019328 99999999999999945838831865930559938199048223279323498721866831026796929789068801756281743363439163784437548240813825394719579023308653389983938338747932758781065010280415466156238449989365268480 +99999999999999945984064910841394691746982498508514139007302449155282221288916808295454591762890948908427294953962458194806505054704181011367768626387344894557105629474404195203379813108418101808988160 99999999999999945320142419820435818384997240317928354845311051996492317289611635544950141936825645484474167122425851108694843196896054742184544454321460845295205656016170005273590724564176578019328 +99999999999999946663921541646856578069655402895673981989181639845883082984205305191971148384781819614555297853455943850984846797099702311011390178582810161001291202295636005691483839777721422169600163840 99999999999999945984064910841394691746982498508514139007302449155282221288916808295454591762890948908427294953962458194806505054704181011367768626387344894557105629474404195203379813108418101808988160 +99999999999999950423256767348738624679507494994913049741780812688629607814472577630949099881189578271160702686495122135388605295849976889520759913602854898331059745767919424966503865648301062435640300273664 99999999999999946663921541646856578069655402895673981989181639845883082984205305191971148384781819614555297853455943850984846797099702311011390178582810161001291202295636005691483839777721422169600163840 +99999999999999952561900806859142633417556685166924608285481675461392075273469070396234334510257103195807332991512965781627187908472355316406090251747591460011994739387707325709626369254675257786987577889259520 99999999999999950423256767348738624679507494994913049741780812688629607814472577630949099881189578271160702686495122135388605295849976889520759913602854898331059745767919424966503865648301062435640300273664 +99999999999999953583887505206514362393179124843789865061564861085069499723208194405671971965000837773131802726604159332043065252957502554000360109335689571620590875005483303878073176311374606605551396952498765824 99999999999999952561900806859142633417556685166924608285481675461392075273469070396234334510257103195807332991512965781627187908472355316406090251747591460011994739387707325709626369254675257786987577889259520 +99999999999999952387871071940561618997707835439092695988754367280903005281456350993484382532249312964925794716623151108470655652097170243947180298855446753006645226008223187712942284395877311531026424700205065568256 99999999999999953583887505206514362393179124843789865061564861085069499723208194405671971965000837773131802726604159332043065252957502554000360109335689571620590875005483303878073176311374606605551396952498765824 +99999999999999949479159106237764547059921659606869180803679246349170090799115867815044165031797604631368783236349339108742555502804842065897846999767496218137529407646886585199343955257387889909781692182626786546286592 99999999999999952387871071940561618997707835439092695988754367280903005281456350993484382532249312964925794716623151108470655652097170243947180298855446753006645226008223187712942284395877311531026424700205065568256 +99999999999999944462702596124645891625322848571590225772913900944379346496098343983932109923650153122211091016053956392579903624277946816512554707950971843053782716275082490927470794772649923189521302964942310388818509824 99999999999999949479159106237764547059921659606869180803679246349170090799115867815044165031797604631368783236349339108742555502804842065897846999767496218137529407646886585199343955257387889909781692182626786546286592 +99999999999999935312685921678317464112614617243241411796797910926041028887394380515983721406389201569507460406235178318299226597844889881633781567677631382901028751212911822975574150048487871891766353031885825877596727934976 99999999999999944462702596124645891625322848571590225772913900944379346496098343983932109923650153122211091016053956392579903624277946816512554707950971843053782716275082490927470794772649923189521302964942310388818509824 +99999999999999925121172612428343793833196719162992122293014542956141676109475130820315172455795108724278546368407554066019724438999593062658631582946511398090887633074892676187328287237126462895417822131010561164466052696899584 99999999999999935312685921678317464112614617243241411796797910926041028887394380515983721406389201569507460406235178318299226597844889881633781567677631382901028751212911822975574150048487871891766353031885825877596727934976 +99999999999999923774577821631960175979503309145679183912127553433409168077915219634719740955742418263179913081344910551912084411817969328125656926899457609130167051788011178598791027428244645758351900112623945543014980252539551744 99999999999999925121172612428343793833196719162992122293014542956141676109475130820315172455795108724278546368407554066019724438999593062658631582946511398090887633074892676187328287237126462895417822131010561164466052696899584 +99999999999999931186235550175255608646231837880969596760529543766528892283620970800236995932032426561066790693337700453560535121425626362995149433782441663569973131191006941326100105416330167280762734901823877923481682986297169281024 99999999999999923774577821631960175979503309145679183912127553433409168077915219634719740955742418263179913081344910551912084411817969328125656926899457609130167051788011178598791027428244645758351900112623945543014980252539551744 +99999999999999926244211122435874988985291364022870835895660198026268224087667591790522792799935051725787428951685205754489270499428632351279379918495257505223505226338851255072206945321576956278656608039592704406906303898336741140987904 99999999999999931186235550175255608646231837880969596760529543766528892283620970800236995932032426561066790693337700453560535121425626362995149433782441663569973131191006941326100105416330167280762734901823877923481682986297169281024 +99999999999999929678212096225067465275407716143698317730906554837786494102684339719558490519152427611330116881884882071101074945341972190277308907403380897537393781938977720492054992564559758894977208190720194118995253024599530065721556992 99999999999999926244211122435874988985291364022870835895660198026268224087667591790522792799935051725787428951685205754489270499428632351279379918495257505223505226338851255072206945321576956278656608039592704406906303898336741140987904 +99999999999999934027464697975758399456742447587676871566873309064753633557492919833469807883112792522366919110954619485992994007787162184258685917355227282413257687305369471221698329872724925324405572508442926352243067328514674943868432023552 99999999999999929678212096225067465275407716143698317730906554837786494102684339719558490519152427611330116881884882071101074945341972190277308907403380897537393781938977720492054992564559758894977208190720194118995253024599530065721556992 +99999999999999931658510089362616103392015444928828978413665885485809829939554629388445771191253529932525597045759188042988033837604250187536914609806987549374489262254739070824275575934660494247950974071555650923069789750211957733643751155302400 99999999999999934027464697975758399456742447587676871566873309064753633557492919833469807883112792522366919110954619485992994007787162184258685917355227282413257687305369471221698329872724925324405572508442926352243067328514674943868432023552 +99999999999999930008959616293112859796224738437420013453224492299319680604311838985766633961978088205967287665322305220594819971902484905979610812934997258464934032523484110419542163912507469600794108087982303296227853106888209685820101373122838528 99999999999999931658510089362616103392015444928828978413665885485809829939554629388445771191253529932525597045759188042988033837604250187536914609806987549374489262254739070824275575934660494247950974071555650923069789750211957733643751155302400 +99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240 99999999999999930008959616293112859796224738437420013453224492299319680604311838985766633961978088205967287665322305220594819971902484905979610812934997258464934032523484110419542163912507469600794108087982303296227853106888209685820101373122838528 +99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240000 99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240 +99999999999999922996592795455802961330827165322375947146110930199429488582670882113664381815329718099637973843065789366637766292469752383803230100767176235502514017647481584860713016397448254045302728360926807035301219893389307418875317674924228479494914048 99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240000 +99999999999999924596916259346967987109991595095477818460852927555247447077772756937033318891561415264781702052238819144940944834893730090816542497755823854789719470206880795923550835480811748076441516979762172970252823766002091894481097203918579189374244618240 99999999999999922996592795455802961330827165322375947146110930199429488582670882113664381815329718099637973843065789366637766292469752383803230100767176235502514017647481584860713016397448254045302728360926807035301219893389307418875317674924228479494914048 +99999999999999917714245105843845444238961215527321290310410545327345571182038613696688194314104132096931555770227452674414634559636686768493688540787048173759306259839416668984497943167082032947319814887875031157212965830669028421795760605619675656325219701751808 99999999999999924596916259346967987109991595095477818460852927555247447077772756937033318891561415264781702052238819144940944834893730090816542497755823854789719470206880795923550835480811748076441516979762172970252823766002091894481097203918579189374244618240 +99999999999999917154891513686131358215156841822734601038501577120887513966385299198425225459555222734718972453340179716809956645203098485790624854125458785078739344965108473271355866839363046574921352749613726933677028169892754057031491980488082226337743391078481920 99999999999999917714245105843845444238961215527321290310410545327345571182038613696688194314104132096931555770227452674414634559636686768493688540787048173759306259839416668984497943167082032947319814887875031157212965830669028421795760605619675656325219701751808 +99999999999999916696669050990531978944456298883937185186953750366157073495322103961448201373908756185194424200146125709940204497699102964600275082012284757871618928300075199343149877911695652938652532565950066513756388038184830097416603122780280888492002797374893195264 99999999999999917154891513686131358215156841822734601038501577120887513966385299198425225459555222734718972453340179716809956645203098485790624854125458785078739344965108473271355866839363046574921352749613726933677028169892754057031491980488082226337743391078481920 +99999999999999916462059150090385096757857620899272908270961263067735087974137748000115965042057765311837855494510770058422891398177057257750815998690339655941573274967578163091908411580729947396882896631914272378757020290750373030093780027633886603514983613398655768199168 99999999999999916696669050990531978944456298883937185186953750366157073495322103961448201373908756185194424200146125709940204497699102964600275082012284757871618928300075199343149877911695652938652532565950066513756388038184830097416603122780280888492002797374893195264 +99999999999999919104705073829639577707705129718531323452700639997160332884758333548562275084027326509326245394787416117113906151193380099703123113228729284081607514104824779425892288332727654619376075792893457515389898597852097436418059371362871829496127701706994146657435648 99999999999999916462059150090385096757857620899272908270961263067735087974137748000115965042057765311837855494510770058422891398177057257750815998690339655941573274967578163091908411580729947396882896631914272378757020290750373030093780027633886603514983613398655768199168 +99999999999999917628667205152005074893535757519847350463918209828579541545589890129502808820585418873201821072305623991241397547326808505070852666708377840873210208172166305720801657535975480694376249177888356289983316387049097913467480072465518626911750494564591328725835972608 99999999999999919104705073829639577707705129718531323452700639997160332884758333548562275084027326509326245394787416117113906151193380099703123113228729284081607514104824779425892288332727654619376075792893457515389898597852097436418059371362871829496127701706994146657435648 +99999999999999922666876463571664177832567214624688644932295571470668642649951510333225786999800463604506522759710141114219560248524706214749002457497844100357873012422307229300844343988889567691708990690439101806037783666590002951805457412701817558399758028277326280599029531279360 99999999999999917628667205152005074893535757519847350463918209828579541545589890129502808820585418873201821072305623991241397547326808505070852666708377840873210208172166305720801657535975480694376249177888356289983316387049097913467480072465518626911750494564591328725835972608 +99999999999999925375417760898072911572590525964251324838495241089455743403656317354747260068946471652055930386858809519532620516688696023471975785026261161456827735987182989817475292225976180861475072527586382595468665276071193500415954030812851863967710878401292590726058388421083136 99999999999999922666876463571664177832567214624688644932295571470668642649951510333225786999800463604506522759710141114219560248524706214749002457497844100357873012422307229300844343988889567691708990690439101806037783666590002951805457412701817558399758028277326280599029531279360 +99999999999999922998092370787579302987061493839926595503682273926908893827833126734714698563684604017178278892401463993497843047031616968501411767264176243829402332903954893729735214230453302102183242983667397856859617189120845681749826713430824039194924833949628446523134774381262143488 99999999999999925375417760898072911572590525964251324838495241089455743403656317354747260068946471652055930386858809519532620516688696023471975785026261161456827735987182989817475292225976180861475072527586382595468665276071193500415954030812851863967710878401292590726058388421083136 +99999999999999919617007371519321726332086870374220313783059387295731152208884588964001722200645503380907841211395461467581715090185993423654387386446988805425952870741141601516060436636820763422301529854538175117504526576569239895202445639820828910629184681840594996990087856635738954137600 99999999999999922998092370787579302987061493839926595503682273926908893827833126734714698563684604017178278892401463993497843047031616968501411767264176243829402332903954893729735214230453302102183242983667397856859617189120845681749826713430824039194924833949628446523134774381262143488 +99999999999999921555856753499711351089115518454394923972933375405513716362854438463239371366266645249770760995191543556043059505759547789211465047382796770104026930323785255803070101100113406402892899431306036605160309737430832717440175842671744517153922714665999138290318281147731771838693376 99999999999999919617007371519321726332086870374220313783059387295731152208884588964001722200645503380907841211395461467581715090185993423654387386446988805425952870741141601516060436636820763422301529854538175117504526576569239895202445639820828910629184681840594996990087856635738954137600 +99999999999999925526620287795549302591510189722592525641795303054348407750184690237678076857458743797202020712405919673211892868854187129872360096979331481764722604349039459782865893920936739227144024324526616931879353650875374817383047298110419679316586205892426819673190190548293062490532610048 99999999999999921555856753499711351089115518454394923972933375405513716362854438463239371366266645249770760995191543556043059505759547789211465047382796770104026930323785255803070101100113406402892899431306036605160309737430832717440175842671744517153922714665999138290318281147731771838693376 +99999999999999930899630601631288884967321950615787908928575328581457293010297853781604279487826109145954719575470858327758062813887390534835216941233385308743309664972926291225241001006485111871616403608610236482548322786324903784620029930384009841602978861449101533681556294240023997498278499319808 99999999999999925526620287795549302591510189722592525641795303054348407750184690237678076857458743797202020712405919673211892868854187129872360096979331481764722604349039459782865893920936739227144024324526616931879353650875374817383047298110419679316586205892426819673190190548293062490532610048 +99999999999999931494437365022402110086546949875748132981079409245215076632606597507980542351987858564022045373933398563677552329964579755017051039451347591859641897413884141538429337185469061448690967542329331230644001099265478667047129413135161876865818437588564766886374336421681562627784638845681664 99999999999999930899630601631288884967321950615787908928575328581457293010297853781604279487826109145954719575470858327758062813887390534835216941233385308743309664972926291225241001006485111871616403608610236482548322786324903784620029930384009841602978861449101533681556294240023997498278499319808 +99999999999999935453471182153651736480108544950043384274546570143186884422693595750740947975848462690678165888500066373957674548974351204547338797190104548281949236540899593223010902792786229833699265085163625873968835950197945084481903570326829823575278656372832047097643225182794316129777503529896771584 99999999999999931494437365022402110086546949875748132981079409245215076632606597507980542351987858564022045373933398563677552329964579755017051039451347591859641897413884141538429337185469061448690967542329331230644001099265478667047129413135161876865818437588564766886374336421681562627784638845681664 +99999999999999941222697076902451192049310918572154864313272869839431340328494218420806572909572715350322284890650139835338184957968282769155167357390336223856117715957990417585527301167018263517206741135275385698826195289895225377703777542160595791457125916730459689891664596620526624002220028805109925281792 99999999999999935453471182153651736480108544950043384274546570143186884422693595750740947975848462690678165888500066373957674548974351204547338797190104548281949236540899593223010902792786229833699265085163625873968835950197945084481903570326829823575278656372832047097643225182794316129777503529896771584 +Inf 99999999999999941222697076902451192049310918572154864313272869839431340328494218420806572909572715350322284890650139835338184957968282769155167357390336223856117715957990417585527301167018263517206741135275385698826195289895225377703777542160595791457125916730459689891664596620526624002220028805109925281792 Inf Inf loop terminated diff -Nru gawk-3.1.8+dfsg/test/lintwarn.awk gawk-4.0.1+dfsg/test/lintwarn.awk --- gawk-3.1.8+dfsg/test/lintwarn.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/lintwarn.awk 2011-02-16 18:49:18.000000000 +0000 @@ -0,0 +1,38 @@ +# gawk --lint -f lintwarn.awk +BEGINFILE { + getline var + getline +} + +BEGIN { + PROCINFO["sorted_in"] + print + nextfile + delete a + delete(a) + y = /a/ + y == /a/ + /b/ ~ x + length + switch(s) { + case 1: + default: + case 1: + default: + } + break + continue + next + a[] + f(/pqr/) + // + /* */ +} +END { + getline +} +function zz(aa, aa) +{ + return aa +} +@include "" diff -Nru gawk-3.1.8+dfsg/test/lintwarn.ok gawk-4.0.1+dfsg/test/lintwarn.ok --- gawk-3.1.8+dfsg/test/lintwarn.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/lintwarn.ok 2011-02-16 19:10:43.000000000 +0000 @@ -0,0 +1,39 @@ +gawk: lintwarn.awk:2: warning: `BEGINFILE' is a gawk extension +gawk: lintwarn.awk:3: error: `getline var' invalid inside `BEGINFILE' rule +gawk: lintwarn.awk:4: error: `getline' invalid inside `BEGINFILE' rule +gawk: lintwarn.awk:8: warning: statement may have no effect +gawk: lintwarn.awk:9: warning: plain `print' in BEGIN or END rule should probably be `print ""' +gawk: lintwarn.awk:10: warning: `nextfile' is a gawk extension +gawk: lintwarn.awk:10: error: `nextfile' used in BEGIN action +gawk: lintwarn.awk:11: warning: `delete array' is a gawk extension +gawk: lintwarn.awk:12: warning: `delete(array)' is a non-portable tawk extension +gawk: lintwarn.awk:13: warning: regular expression on right of assignment +gawk: lintwarn.awk:14: warning: regular expression on right of comparison +gawk: lintwarn.awk:14: warning: statement may have no effect +gawk: lintwarn.awk:15: warning: regular expression on left of `~' or `!~' operator +gawk: lintwarn.awk:15: warning: statement may have no effect +gawk: lintwarn.awk:16: warning: call of `length' without parentheses is not portable +gawk: lintwarn.awk:17: warning: `switch' is a gawk extension +gawk: lintwarn.awk:18: warning: `case' is a gawk extension +gawk: lintwarn.awk:19: warning: `default' is a gawk extension +gawk: lintwarn.awk:19: error: duplicate `default' detected in switch body +gawk: lintwarn.awk:18: error: duplicate case values in switch body: 1 +gawk: lintwarn.awk:23: error: `break' is not allowed outside a loop or switch +gawk: lintwarn.awk:24: error: `continue' is not allowed outside a loop +gawk: lintwarn.awk:25: error: `next' used in BEGIN action +gawk: lintwarn.awk:26: a[] +gawk: lintwarn.awk:26: ^ syntax error +gawk: lintwarn.awk:26: error: invalid subscript expression +gawk: lintwarn.awk:26: warning: statement may have no effect +gawk: lintwarn.awk:27: warning: regexp constant for parameter #1 yields boolean value +gawk: lintwarn.awk:28: warning: regexp constant `//' looks like a C++ comment, but is not +gawk: lintwarn.awk:28: warning: statement may have no effect +gawk: lintwarn.awk:29: warning: regexp constant `/* */' looks like a C comment, but is not +gawk: lintwarn.awk:29: warning: statement may have no effect +gawk: lintwarn.awk:32: warning: non-redirected `getline' undefined inside END action +gawk: lintwarn.awk:34: error: function `zz': parameter #2, `aa', duplicates parameter #1 +gawk: lintwarn.awk:38: warning: `include' is a gawk extension +gawk: lintwarn.awk:38: warning: empty filename after @include +gawk: warning: function `f' called but never defined +gawk: warning: function `zz' defined but never called directly +EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/localenl.sh gawk-4.0.1+dfsg/test/localenl.sh --- gawk-3.1.8+dfsg/test/localenl.sh 2010-04-21 19:31:56.000000000 +0000 +++ gawk-4.0.1+dfsg/test/localenl.sh 2010-12-13 18:19:14.000000000 +0000 @@ -50,7 +50,7 @@ line8 line9 EOF -$AWK ' +$AWK --posix ' BEGIN { RS="\0"; } { if (match($0, /\n[^2\n]*2/)) { got2=1; } else { print "no match 2"; } diff -Nru gawk-3.1.8+dfsg/test/longwrds.awk gawk-4.0.1+dfsg/test/longwrds.awk --- gawk-3.1.8+dfsg/test/longwrds.awk 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/longwrds.awk 2010-11-29 19:56:08.000000000 +0000 @@ -9,7 +9,7 @@ { for (i = 1; i <= NF; i++) { tmp = tolower($i) - if (0 != (pos = match(tmp, /([a-z]|-)+/))) + if (0 != (pos = match(tmp, /([[:lower:]]|-)+/))) used[substr(tmp, pos, RLENGTH)] = 1 } } diff -Nru gawk-3.1.8+dfsg/test/nastyparm.awk gawk-4.0.1+dfsg/test/nastyparm.awk --- gawk-3.1.8+dfsg/test/nastyparm.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/nastyparm.awk 2011-05-04 19:57:34.000000000 +0000 @@ -0,0 +1,41 @@ +function biz(baz, bar) +{ + print baz, bar +} + +function buz(baz, bar) +{ + print length(baz), bar +} + +function buz2(baz, baz1, bar, baz2) +{ + print length(baz), length(baz1), bar, length(baz2) + baz2[0] = "baz2" +# baz[0] = "baz" # fatal +} + +function buz3(baz) +{ + buz2(baz, baz, split("abc", baz, ""), baz) +} + + +BEGIN { + biz(foo, foo != "") + + biz(fy, fy = "fy") + + biz(fi = 10, fi = 20) + print fi + + buz(a, split("abc", a, "")) + + buz2(c, c, split("abc", c, ""), c) + print c[0], length(c) + + buz3(d) + print d[0], length(d) + + biz(b, split("abc", b, "")) +} diff -Nru gawk-3.1.8+dfsg/test/nastyparm.ok gawk-4.0.1+dfsg/test/nastyparm.ok --- gawk-3.1.8+dfsg/test/nastyparm.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/nastyparm.ok 2011-05-04 20:09:18.000000000 +0000 @@ -0,0 +1,11 @@ + 0 + fy +10 20 +20 +3 3 +3 3 3 3 +baz2 4 +3 3 3 3 +baz2 4 +gawk: nastyparm.awk:3: fatal: attempt to use array `baz (from b)' in a scalar context +EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/negrange.awk gawk-4.0.1+dfsg/test/negrange.awk --- gawk-3.1.8+dfsg/test/negrange.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/negrange.awk 2011-02-06 18:40:06.000000000 +0000 @@ -0,0 +1,7 @@ +BEGIN { + s = "Volume 8, Numbers 1-2 / January 1971" + n = split(s, parts, "[^-A-Za-z0-9]+") + print "n =", n + for (i = 1; i <= n; i++) + printf("s[%d] = \"%s\"\n", i, parts[i]) +} diff -Nru gawk-3.1.8+dfsg/test/negrange.ok gawk-4.0.1+dfsg/test/negrange.ok --- gawk-3.1.8+dfsg/test/negrange.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/negrange.ok 2011-02-07 19:38:23.000000000 +0000 @@ -0,0 +1,7 @@ +n = 6 +s[1] = "Volume" +s[2] = "8" +s[3] = "Numbers" +s[4] = "1-2" +s[5] = "January" +s[6] = "1971" diff -Nru gawk-3.1.8+dfsg/test/next.ok gawk-4.0.1+dfsg/test/next.ok --- gawk-3.1.8+dfsg/test/next.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/next.ok 2011-03-30 19:32:24.000000000 +0000 @@ -0,0 +1,4 @@ +gawk: cmd. line:1: fatal: `next' cannot be called from a `BEGIN' rule +gawk: cmd. line:1: fatal: `next' cannot be called from a `END' rule +gawk: cmd. line:1: fatal: `next' cannot be called from a `BEGINFILE' rule +gawk: cmd. line:1: fatal: `next' cannot be called from a `ENDFILE' rule diff -Nru gawk-3.1.8+dfsg/test/next.sh gawk-4.0.1+dfsg/test/next.sh --- gawk-3.1.8+dfsg/test/next.sh 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/next.sh 2011-03-30 19:38:58.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh + +# next.sh --- test next invoked in various ways + +if [ "$AWK" = "" ] +then + echo $0: You must set AWK >&2 + exit 1 +fi + +# non-fatal +$AWK '{next}' /dev/null +$AWK 'function f() { next}; {f()}' /dev/null +# fatal +$AWK 'function f() { next}; BEGIN{f()}' +$AWK 'function f() { next}; {f()}; END{f()}' /dev/null +$AWK 'function f() { next}; BEGINFILE{f()}' +$AWK 'function f() { next}; {f()}; ENDFILE{f()}' /dev/null + +exit 0 # for make diff -Nru gawk-3.1.8+dfsg/test/noeffect.ok gawk-4.0.1+dfsg/test/noeffect.ok --- gawk-3.1.8+dfsg/test/noeffect.ok 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/noeffect.ok 2011-02-16 19:11:04.000000000 +0000 @@ -1,4 +1,4 @@ +gawk: noeffect.awk:2: warning: statement may have no effect 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 -Nru gawk-3.1.8+dfsg/test/nofile.ok gawk-4.0.1+dfsg/test/nofile.ok --- gawk-3.1.8+dfsg/test/nofile.ok 2009-02-14 20:36:47.000000000 +0000 +++ gawk-4.0.1+dfsg/test/nofile.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: cmd. line:1: fatal: cannot open file `no/such/file' for reading (No such file or directory) +gawk: fatal: cannot open file `no/such/file' for reading (No such file or directory) EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/ofmta.awk gawk-4.0.1+dfsg/test/ofmta.awk --- gawk-3.1.8+dfsg/test/ofmta.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/ofmta.awk 2011-04-15 10:48:13.000000000 +0000 @@ -0,0 +1,30 @@ +# Date: Thu, 14 Apr 2011 08:18:55 -0500 +# From: j.eh@mchsi.com +# To: arnold@skeeve.com +# Subject: CONVFMT test for the test suite +# Message-ID: <20110414131855.GA1801@apollo> +# +# Hi, +# +# Please consider adding this to the test suite. 3.1.8 segfaults +# with this. +# +# Thanks, +# +# John +# +# +BEGIN { + i=1.2345 + i=3+i + a[i]="hi" + OFMT="%.1f" + print i + for (x in a) print x, a[x] + print a[i] + print "--------" + CONVFMT=OFMT="%.3f" + print i + for (x in a) print x, a[x] + print a[i] +} diff -Nru gawk-3.1.8+dfsg/test/ofmta.ok gawk-4.0.1+dfsg/test/ofmta.ok --- gawk-3.1.8+dfsg/test/ofmta.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/ofmta.ok 2011-04-15 10:51:11.000000000 +0000 @@ -0,0 +1,7 @@ +4.2 +4.2345 hi +hi +-------- +4.234 +4.2345 hi + diff -Nru gawk-3.1.8+dfsg/test/ofmtbig.awk gawk-4.0.1+dfsg/test/ofmtbig.awk --- gawk-3.1.8+dfsg/test/ofmtbig.awk 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/ofmtbig.awk 2010-11-29 19:56:57.000000000 +0000 @@ -88,7 +88,8 @@ next } -$0 ~ /^[a-z]+/ { +# $0 ~ /^[a-z]+/ { +$0 ~ /^[[:lower:]]+/ { print dir, highest, lowest dir = $0 lowest = big diff -Nru gawk-3.1.8+dfsg/test/paramdup.ok gawk-4.0.1+dfsg/test/paramdup.ok --- gawk-3.1.8+dfsg/test/paramdup.ok 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/paramdup.ok 2011-02-16 19:11:04.000000000 +0000 @@ -1,3 +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 +gawk: paramdup.awk:3: error: function `foo': parameter #4, `b', duplicates parameter #2 +gawk: paramdup.awk:3: error: function `foo': parameter #5, `a', duplicates parameter #1 EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/paramres.ok gawk-4.0.1+dfsg/test/paramres.ok --- gawk-3.1.8+dfsg/test/paramres.ok 2009-05-15 11:38:46.000000000 +0000 +++ gawk-4.0.1+dfsg/test/paramres.ok 2011-02-16 19:11:04.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: paramres.awk:7: fatal: function `foo': can't use special variable `FS' as a function parameter -EXIT CODE: 2 +gawk: paramres.awk:3: error: function `foo': can't use special variable `FS' as a function parameter +EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/parseme.ok gawk-4.0.1+dfsg/test/parseme.ok --- gawk-3.1.8+dfsg/test/parseme.ok 2009-02-14 20:36:47.000000000 +0000 +++ gawk-4.0.1+dfsg/test/parseme.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,4 +1,5 @@ gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) } gawk: parseme.awk:1: ^ syntax error -gawk: parseme.awk:1: fatal: 0 is invalid as number of arguments for toupper -EXIT CODE: 2 +gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) } +gawk: parseme.awk:1: ^ 2 is invalid as number of arguments for toupper +EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/patsplit.awk gawk-4.0.1+dfsg/test/patsplit.awk --- gawk-3.1.8+dfsg/test/patsplit.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/patsplit.awk 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,26 @@ +BEGIN { + FALSE = 0 + TRUE = 1 + + fpat[1] = "([^,]*)|(\"[^\"]+\")" + fpat[2] = fpat[1] + fpat[3] = fpat[1] + fpat[4] = "aa+" + fpat[5] = fpat[4] + + data[1] = "Robbins,,Arnold," + data[2] = "Smith,,\"1234 A Pretty Place, NE\",Sometown,NY,12345-6789,USA" + data[3] = "Robbins,Arnold,\"1234 A Pretty Place, NE\",Sometown,NY,12345-6789,USA" + data[4] = "bbbaaacccdddaaaaaqqqq" + data[5] = "bbbaaacccdddaaaaaqqqqa" # should get trailing qqqa + + for (j = 1; j in data; j++) { + printf("Splitting: <%s>\n", data[j]) + n = patsplit(data[j], fields, fpat[j], seps) + print "n =", n + for (i = 1; i <= n; i++) + printf("fields[%d] = <%s>\n", i, fields[i]) + for (i = 0; i in seps; i++) + printf("seps[%s] = <%s>\n", i, seps[i]) + } +} diff -Nru gawk-3.1.8+dfsg/test/patsplit.ok gawk-4.0.1+dfsg/test/patsplit.ok --- gawk-3.1.8+dfsg/test/patsplit.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/patsplit.ok 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,56 @@ +Splitting: +n = 4 +fields[1] = +fields[2] = <> +fields[3] = +fields[4] = <> +seps[0] = <> +seps[1] = <,> +seps[2] = <,> +seps[3] = <,> +Splitting: +n = 7 +fields[1] = +fields[2] = <> +fields[3] = <"1234 A Pretty Place, NE"> +fields[4] = +fields[5] = +fields[6] = <12345-6789> +fields[7] = +seps[0] = <> +seps[1] = <,> +seps[2] = <,> +seps[3] = <,> +seps[4] = <,> +seps[5] = <,> +seps[6] = <,> +Splitting: +n = 7 +fields[1] = +fields[2] = +fields[3] = <"1234 A Pretty Place, NE"> +fields[4] = +fields[5] = +fields[6] = <12345-6789> +fields[7] = +seps[0] = <> +seps[1] = <,> +seps[2] = <,> +seps[3] = <,> +seps[4] = <,> +seps[5] = <,> +seps[6] = <,> +Splitting: +n = 2 +fields[1] = +fields[2] = +seps[0] = +seps[1] = +seps[2] = +Splitting: +n = 2 +fields[1] = +fields[2] = +seps[0] = +seps[1] = +seps[2] = diff -Nru gawk-3.1.8+dfsg/test/pid.awk gawk-4.0.1+dfsg/test/pid.awk --- gawk-3.1.8+dfsg/test/pid.awk 2007-01-16 20:01:27.000000000 +0000 +++ gawk-4.0.1+dfsg/test/pid.awk 2010-10-31 10:25:52.000000000 +0000 @@ -25,8 +25,11 @@ # # ================== pid.awk ============ BEGIN { - getline pid <"/dev/pid" - getline ppid <"/dev/ppid" +# getline pid <"/dev/pid" +# getline ppid <"/dev/ppid" +# 12/2001: switch to PROCINFO. ADR + pid = PROCINFO["pid"] + ppid = PROCINFO["ppid"] if (pid != ok_pid) printf "Bad pid %d, wanted %d\n", pid, ok_pid @@ -39,8 +42,8 @@ print "PPID ok" # ADR --- added - close("/dev/pid") - close("/dev/ppid") +# close("/dev/pid") +# close("/dev/ppid") print "All Done." } diff -Nru gawk-3.1.8+dfsg/test/posix2008sub.awk gawk-4.0.1+dfsg/test/posix2008sub.awk --- gawk-3.1.8+dfsg/test/posix2008sub.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/posix2008sub.awk 2010-11-12 06:48:09.000000000 +0000 @@ -0,0 +1,7 @@ +BEGIN { + text = "here is some text" + repl = "" + printf "orig = \"%s\", repl = \"%s\"\n", text, repl + sub(/some/, repl, text) + printf "result is \"%s\"\n", text +} diff -Nru gawk-3.1.8+dfsg/test/posix2008sub.ok gawk-4.0.1+dfsg/test/posix2008sub.ok --- gawk-3.1.8+dfsg/test/posix2008sub.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/posix2008sub.ok 2010-11-12 06:48:09.000000000 +0000 @@ -0,0 +1,2 @@ +orig = "here is some text", repl = "" +result is "here is text" diff -Nru gawk-3.1.8+dfsg/test/printfbad3.awk gawk-4.0.1+dfsg/test/printfbad3.awk --- gawk-3.1.8+dfsg/test/printfbad3.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/printfbad3.awk 2012-03-28 19:47:54.000000000 +0000 @@ -0,0 +1,22 @@ +# Date: Wed, 14 Mar 2012 08:10:48 -0500 +# From: John Haque +# To: arnold@skeeve.com +# Subject: gawk printf format bug +# +# Hi. +# +# I think this is a bug: +# +# $ gawk 'BEGIN { printf("%.0x%#x%#x\n", 0, 167, 167)}' +# 570xa7 +# +# It should print 0xa70xa7. +# +# The solution is to initialize base to 0 in the beginning +# of the while loop along with other stuff (format_tree). +# +# Thanks. +# +# John + +BEGIN { printf(">>%.0x<< >>%#x<< >>%#x<<\n", 0, 167, 167) } diff -Nru gawk-3.1.8+dfsg/test/printfbad3.ok gawk-4.0.1+dfsg/test/printfbad3.ok --- gawk-3.1.8+dfsg/test/printfbad3.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/printfbad3.ok 2012-03-28 19:47:54.000000000 +0000 @@ -0,0 +1 @@ +>><< >>0xa7<< >>0xa7<< diff -Nru gawk-3.1.8+dfsg/test/profile2.ok gawk-4.0.1+dfsg/test/profile2.ok --- gawk-3.1.8+dfsg/test/profile2.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/profile2.ok 2011-02-14 19:25:09.000000000 +0000 @@ -0,0 +1,170 @@ + # BEGIN block(s) + + BEGIN { + 1 if (sortcmd == "") { + sortcmd = "sort" + } + 1 asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" "do:else:exit:exp:for:getline:gsub:if:in:index:int:" "length:log:match:next:print:printf:rand:return:sin:" "split:sprintf:sqrt:srand:sub:substr:system:while", keywords, ":") + 1 split("00:00:00:00:00:00:00:00:00:00:" "20:10:10:12:12:11:07:00:00:00:" "08:08:08:08:08:33:08:00:00:00:" "08:44:08:36:08:08:08:00:00:00:" "08:44:45:42:42:41:08", machine, ":") + 1 state = 1 + 571 for (; ; ) { + 571 symb = lex() + 571 nextstate = substr(machine[state symb], 1, 1) + 571 act = substr(machine[state symb], 2, 1) + 571 if (act == "0") { # 12 + 559 } else { + 559 if (act == "1") { # 8 + 8 if (! inarray(tok, names)) { # 3 + 3 names[++nnames] = tok + } + 8 lines[tok, ++xnames[tok]] = NR + 551 } else { + 551 if (act == "2") { # 426 + 426 if (tok in local) { # 309 + 309 tok = tok "(" funcname ")" + 309 if (! inarray(tok, names)) { # 22 + 22 names[++nnames] = tok + } + 309 lines[tok, ++xnames[tok]] = NR + 117 } else { + 117 tok = tok "()" + 117 if (! inarray(tok, names)) { # 22 + 22 names[++nnames] = tok + } + 117 lines[tok, ++xnames[tok]] = NR + } + 125 } else { + 125 if (act == "3") { # 4 + 4 funcname = tok + 4 flines[tok] = NR + 121 } else { + 121 if (act == "4") { # 49 + 49 braces++ + 72 } else { + 72 if (act == "5") { # 49 + 49 braces-- + 49 if (braces == 0) { # 4 + 22 for (temp in local) { + 22 delete local[temp] + } + 4 funcname = "" + 4 nextstate = 1 + } + 23 } else { + 23 if (act == "6") { # 22 + 22 local[tok] = 1 + 1 } else { + 1 if (act == "7") { # 1 + 1 break + } else { + if (act == "8") { + print("error: xref.awk: line " NR ": aborting") > "/dev/con" + exit 1 + } + } + } + } + } + } + } + } + } + 570 state = nextstate + } + 47 for (i = 1; i <= nnames; i++) { + 47 printf("%d ", xnames[names[i]]) | sortcmd + 47 if (index(names[i], "(") == 0) { # 3 + 3 printf("%s(%d)", names[i], flines[names[i]]) | sortcmd + 44 } else { + 44 printf("%s", names[i]) | sortcmd + } + 434 for (j = 1; j <= xnames[names[i]]; j++) { + 434 if (lines[names[i], j] != lines[names[i], j - 1]) { # 390 + 390 printf(" %d", lines[names[i], j]) | sortcmd + } + } + 47 printf("\n") | sortcmd + } + 1 close(sortcmd) + } + + + # Functions, listed alphabetically + + 1 function asplit(str, arr, fs, n) + { + 1 n = split(str, temp_asplit, fs) + 36 for (i = 1; i <= n; i++) { + 36 arr[temp_asplit[i]]++ + } + } + + 434 function inarray(val, arr, j, tmp) + { + 16297 for (j in arr) { + 16297 tmp[arr[j]]++ + } + 434 return (val in tmp) + } + + 571 function lex() + { + 1702 for (; ; ) { + 1702 if (tok == "(eof)") { + return 7 + } + 326 while (length(line) == 0) { + 326 if ((getline line) == 0) { # 1 + 1 tok = "(eof)" + 1 return 7 + } + } + 1701 sub(/^[ \t]+/, "", line) + 1701 sub(/^"([^"]|\\")*"/, "", line) + 1701 sub(/^\/([^\/]|\\\/)+\//, "", line) + 1701 sub(/^#.*/, "", line) + 1701 if (line ~ /^function/) { # 4 + 4 tok = "function" + 4 line = substr(line, 9) + 4 return 1 + 1697 } else { + 1697 if (line ~ /^{/) { # 53 + 53 tok = "{" + 53 line = substr(line, 2) + 53 return 2 + 1644 } else { + 1644 if (line ~ /^}/) { # 53 + 53 tok = "}" + 53 line = substr(line, 2) + 53 return 3 + 1591 } else { + 1591 if (match(line, /^[[:alpha:]_][[:alnum:]]*\[/)) { # 43 + 43 tok = substr(line, 1, RLENGTH - 1) + 43 line = substr(line, RLENGTH + 1) + 43 return 5 + 1548 } else { + 1548 if (match(line, /^[[:alpha:]_][[:alnum:]]*\(/)) { # 87 + 87 tok = substr(line, 1, RLENGTH - 1) + 87 line = substr(line, RLENGTH + 1) + 87 if (! (tok in keywords)) { # 12 + 12 return 6 + } + 1461 } else { + 1461 if (match(line, /^[[:alpha:]_][[:alnum:]]*/)) { # 525 + 525 tok = substr(line, 1, RLENGTH) + 525 line = substr(line, RLENGTH + 1) + 525 if (! (tok in keywords)) { # 405 + 405 return 4 + } + 936 } else { + 936 match(line, /^[^[:alpha:]_{}]/) + 936 tok = substr(line, 1, RLENGTH) + 936 line = substr(line, RLENGTH + 1) + } + } + } + } + } + } + } + } diff -Nru gawk-3.1.8+dfsg/test/profile3.awk gawk-4.0.1+dfsg/test/profile3.awk --- gawk-3.1.8+dfsg/test/profile3.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/profile3.awk 2011-02-13 17:25:32.000000000 +0000 @@ -0,0 +1,9 @@ +BEGIN { + the_func = "p" + print @the_func("Hello") +} + +function p(str) +{ + print "! " str " !" +} diff -Nru gawk-3.1.8+dfsg/test/profile3.ok gawk-4.0.1+dfsg/test/profile3.ok --- gawk-3.1.8+dfsg/test/profile3.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/profile3.ok 2011-02-13 17:28:04.000000000 +0000 @@ -0,0 +1,14 @@ + # BEGIN block(s) + + BEGIN { + 1 the_func = "p" + 1 print @the_func("Hello") + } + + + # Functions, listed alphabetically + + 1 function p(str) + { + 1 print "! " str " !" + } diff -Nru gawk-3.1.8+dfsg/test/psx96sub.awk gawk-4.0.1+dfsg/test/psx96sub.awk --- gawk-3.1.8+dfsg/test/psx96sub.awk 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/psx96sub.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -BEGIN { - text = "here is some text" - repl = "" - printf "orig = \"%s\", repl = \"%s\"\n", text, repl - sub(/some/, repl, text) - printf "result is \"%s\"\n", text -} diff -Nru gawk-3.1.8+dfsg/test/psx96sub.ok gawk-4.0.1+dfsg/test/psx96sub.ok --- gawk-3.1.8+dfsg/test/psx96sub.ok 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/psx96sub.ok 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -orig = "here is some text", repl = "" -result is "here is text" diff -Nru gawk-3.1.8+dfsg/test/pty1.awk gawk-4.0.1+dfsg/test/pty1.awk --- gawk-3.1.8+dfsg/test/pty1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/pty1.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,54 @@ +# Message-ID: <1312419482.36133.YahooMailNeo@web110416.mail.gq1.yahoo.com> +# Date: Wed, 3 Aug 2011 17:58:02 -0700 (PDT) +# From: "T. X. G." +# To: "bug-gawk@gnu.org" +# Subject: [bug-gawk] two bugs in gawk 4.0.0 with FPAT and pty +# +# $ gawk --version +# GNU Awk 4.0.0 +# Copyright (C) 1989, 1991-2011 Free Software Foundation. +# +# # bug due to trying to make field splitting more efficient by not parse all fields +# $ echo a,b,,c |gawk '{for(i=1;i<=4;++i)print i, $i}' FPAT='[^,]*' +# 1 a +# 2 +# 3 b +# 4 +# +# # work around +# $ echo a,b,,c |gawk '{NF;for(i=1;i<=4;++i)print i, $i}' FPAT='[^,]*' +# 1 a +# 2 b +# 3 +# 4 c +# +# This bug, as you commented in function fpat_parse_field, is subtle. The null matches of previous call should be remembered across calls. You could make the auto variable non_empty static, but then any calls to patsplit between references of fields will cause it to be wrong. I guess you can either forgo the field splitting optimization by always parse all field in the case of FPAT or make a separate function for splitting $0 only (or pass an extra arg to it?) I am sure you will find the best fix. +# +# +# The next bug is with pty: +# +# $ gawk 'BEGIN{ +# c = "echo 123 > /dev/tty; read x < /dev/tty; echo \"x is $x\"" +# PROCINFO[c, "pty"] = 1 +# c |& getline;print +# print "abc" |& c +# c |& getline;print +# }' +# 123 +# ^C +# +# Adding a call to setsid() in the function two_way_open right after fork in the child process seems to fix it. +# +# One request for feature: +# Currently the format for mktime is not configurable. Could you please make it configurable just like strftime through PROCINFO["mktime"]? In fact I have already done it myself. But I don't think you would like my style. It should be pretty simple for you to implement. +# +# Thank you, Arnold. Again as I have said before, I enjoy your writings and appreciate your contributions to the FSF. +# W. G. +# +BEGIN { + c = "echo 123 > /dev/tty; read x < /dev/tty; echo \"x is $x\"" + PROCINFO[c, "pty"] = 1 + c |& getline; print + print "abc" |& c + c |& getline; print +} diff -Nru gawk-3.1.8+dfsg/test/pty1.ok gawk-4.0.1+dfsg/test/pty1.ok --- gawk-3.1.8+dfsg/test/pty1.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/pty1.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,2 @@ +123 +x is abc diff -Nru gawk-3.1.8+dfsg/test/range1.awk gawk-4.0.1+dfsg/test/range1.awk --- gawk-3.1.8+dfsg/test/range1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/range1.awk 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1 @@ +/foo/,/bar/ { print } diff -Nru gawk-3.1.8+dfsg/test/range1.in gawk-4.0.1+dfsg/test/range1.in --- gawk-3.1.8+dfsg/test/range1.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/range1.in 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,2 @@ +foobar +junk diff -Nru gawk-3.1.8+dfsg/test/range1.ok gawk-4.0.1+dfsg/test/range1.ok --- gawk-3.1.8+dfsg/test/range1.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/range1.ok 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1 @@ +foobar diff -Nru gawk-3.1.8+dfsg/test/reg/func2.good gawk-4.0.1+dfsg/test/reg/func2.good --- gawk-3.1.8+dfsg/test/reg/func2.good 2007-09-26 13:13:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/reg/func2.good 2010-10-31 10:25:52.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: reg/func2.awk:2: fatal: function `dummy' called with space between name and `(', +gawk: reg/func2.awk:2: error: function `dummy' called with space between name and `(', or used as a variable or an array diff -Nru gawk-3.1.8+dfsg/test/regrange.awk gawk-4.0.1+dfsg/test/regrange.awk --- gawk-3.1.8+dfsg/test/regrange.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/regrange.awk 2011-05-31 19:49:40.000000000 +0000 @@ -0,0 +1,30 @@ +# Tests due to John Haque, May 2011 +# +# The following should be fatal; can't catch them inside awk, though +# $> echo 'a' | ./gawk '/[z-a]/ { print }' +# $> echo 'A' | ./gawk '/[+-[:digit:]]/' + +BEGIN { + char[1] = "." + pat[1] = "[--\\/]" + + char[2] = "a" + pat[2] = "[]-c]" + + char[3] = "c" + pat[3] = "[[a-d]" + + char[4] = "\\" + pat[4] = "[\\[-\\]]" + + char[5] = "[.c.]" + pat[5] = "[a-[.e.]]" + + char[6] = "[.d.]" + pat[6] = "[[.c.]-[.z.]]" + + for (i = 1; i in char; i++) { + printf("\"%s\" ~ /%s/ --> %d\n", char[i], pat[i], + char[i] ~ pat[i]) + } +} diff -Nru gawk-3.1.8+dfsg/test/regrange.ok gawk-4.0.1+dfsg/test/regrange.ok --- gawk-3.1.8+dfsg/test/regrange.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/regrange.ok 2011-05-31 19:49:09.000000000 +0000 @@ -0,0 +1,6 @@ +"." ~ /[--\/]/ --> 1 +"a" ~ /[]-c]/ --> 1 +"c" ~ /[[a-d]/ --> 1 +"\" ~ /[\[-\]]/ --> 1 +"[.c.]" ~ /[a-[.e.]]/ --> 1 +"[.d.]" ~ /[[.c.]-[.z.]]/ --> 0 diff -Nru gawk-3.1.8+dfsg/test/rri1.awk gawk-4.0.1+dfsg/test/rri1.awk --- gawk-3.1.8+dfsg/test/rri1.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/rri1.awk 2011-12-26 20:45:29.000000000 +0000 @@ -0,0 +1 @@ +/[d-f]/ diff -Nru gawk-3.1.8+dfsg/test/rri1.in gawk-4.0.1+dfsg/test/rri1.in --- gawk-3.1.8+dfsg/test/rri1.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/rri1.in 2011-12-26 20:45:29.000000000 +0000 @@ -0,0 +1 @@ +no match: è diff -Nru gawk-3.1.8+dfsg/test/rtlen.ok gawk-4.0.1+dfsg/test/rtlen.ok --- gawk-3.1.8+dfsg/test/rtlen.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/rtlen.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,3 @@ +3 +5 +2 diff -Nru gawk-3.1.8+dfsg/test/rtlen.sh gawk-4.0.1+dfsg/test/rtlen.sh --- gawk-3.1.8+dfsg/test/rtlen.sh 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/rtlen.sh 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,5 @@ +#! /bin/sh + +AWK=${AWK:-../gawk} + +$AWK 'BEGIN {printf "0\n\n\n1\n\n\n\n\n2\n\n"; exit}' | $AWK 'BEGIN {RS=""}; {print length(RT)}' diff -Nru gawk-3.1.8+dfsg/test/rtlen01.ok gawk-4.0.1+dfsg/test/rtlen01.ok --- gawk-3.1.8+dfsg/test/rtlen01.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/rtlen01.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,3 @@ +0 +1 +2 diff -Nru gawk-3.1.8+dfsg/test/rtlen01.sh gawk-4.0.1+dfsg/test/rtlen01.sh --- gawk-3.1.8+dfsg/test/rtlen01.sh 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/rtlen01.sh 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,8 @@ +#! /bin/sh + +AWK=${AWK:-../gawk} + +$AWK 'BEGIN {printf "0"; exit}' | $AWK 'BEGIN {RS=""}; {print length(RT)}' +$AWK 'BEGIN {printf "0\n"; exit}' | $AWK 'BEGIN {RS=""}; {print length(RT)}' +$AWK 'BEGIN {printf "0\n\n"; exit}' | $AWK 'BEGIN {RS=""}; {print length(RT)}' + diff -Nru gawk-3.1.8+dfsg/test/scalar.ok gawk-4.0.1+dfsg/test/scalar.ok --- gawk-3.1.8+dfsg/test/scalar.ok 2009-02-14 20:36:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/scalar.ok 2011-02-08 20:47:58.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: scalar.awk:3: fatal: attempt to use scalar `a' as array +gawk: scalar.awk:3: fatal: attempt to use scalar `a' as an array EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/sclforin.ok gawk-4.0.1+dfsg/test/sclforin.ok --- gawk-3.1.8+dfsg/test/sclforin.ok 2009-02-14 20:36:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sclforin.ok 2011-02-08 20:47:58.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: sclforin.awk:1: fatal: attempt to use scalar `j' as array +gawk: sclforin.awk:1: fatal: attempt to use scalar `j' as an array EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/sclifin.ok gawk-4.0.1+dfsg/test/sclifin.ok --- gawk-3.1.8+dfsg/test/sclifin.ok 2009-02-14 20:36:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sclifin.ok 2011-02-08 20:47:58.000000000 +0000 @@ -1,2 +1,2 @@ -gawk: sclifin.awk:7: fatal: attempt to use scalar `j' as array +gawk: sclifin.awk:3: fatal: attempt to use scalar `j' as an array EXIT CODE: 2 diff -Nru gawk-3.1.8+dfsg/test/shadow.ok gawk-4.0.1+dfsg/test/shadow.ok --- gawk-3.1.8+dfsg/test/shadow.ok 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/shadow.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,7 +1,7 @@ -gawk: shadow.awk:22: warning: function `bar': parameter `A' shadows global variable -gawk: shadow.awk:22: warning: function `bar': parameter `Z' shadows global variable -gawk: shadow.awk:22: warning: function `baz': parameter `C' shadows global variable -gawk: shadow.awk:22: warning: function `baz': parameter `D' shadows global variable +gawk: shadow.awk:6: warning: function `bar': parameter `A' shadows global variable +gawk: shadow.awk:6: warning: function `bar': parameter `Z' shadows global variable +gawk: shadow.awk:11: warning: function `baz': parameter `C' shadows global variable +gawk: shadow.awk:11: warning: function `baz': parameter `D' shadows global variable foo bar baz diff -Nru gawk-3.1.8+dfsg/test/sort1.awk gawk-4.0.1+dfsg/test/sort1.awk --- gawk-3.1.8+dfsg/test/sort1.awk 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sort1.awk 2011-05-04 20:11:33.000000000 +0000 @@ -1,31 +1,127 @@ BEGIN{ - a[1] = "barz"; - a[2] = "blattt"; - a[3] = "Zebra"; - a[4] = 1234; + for (IGNORECASE=0; IGNORECASE <= 1; IGNORECASE++) { + SORT_STR = -1 - testit1(a) - - delete a + makea(a) + asort1(a, "") + printf("---end asort(a), IGNORECASE = %d---\n", IGNORECASE) + + makea(a) + asort2(a, "") + printf("---end asort(a, b), IGNORECASE = %d---\n", IGNORECASE) + + makea(a) + SORT_STR = "" + asort1(a) + printf("---end asort(a, a), IGNORECASE = %d---\n", IGNORECASE) + + makea(a) + SORT_STR = "@ind_num_asc" + asort2(a, "") + printf("---end asort(a, b, \"%s\"), IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@ind_str_desc" + asort1(a, "") + printf("---end asort(a, a, \"%s\"), IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@val_str_asc" + proc_sort(a, "") + printf("---end PROCINFO[\"sorted_in\"] = \"%s\", IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@val_num_asc" + proc_sort(a, "") + printf("---end PROCINFO[\"sorted_in\"] = \"%s\", IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@val_str_desc" + proc_sort(a, "") + printf("---end PROCINFO[\"sorted_in\"] = \"%s\", IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@val_num_desc" + proc_sort(a, "") + printf("---end PROCINFO[\"sorted_in\"] = \"%s\", IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@val_type_asc" + proc_sort(a, "") + printf("---end PROCINFO[\"sorted_in\"] = \"%s\", IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + + makea(a) + SORT_STR = "@val_type_desc" + proc_sort(a, "") + printf("---end PROCINFO[\"sorted_in\"] = \"%s\", IGNORECASE = %d---\n", + SORT_STR, IGNORECASE) + } +} - a[1] = "barz"; - a[2] = "blattt"; - a[3] = "Zebra"; - a[4] = 1234; +function makea(aa) +{ + delete aa + aa[1] = "barz"; + aa[2] = "blattt"; + aa[3] = "Zebra"; + aa[4] = 1234; + aa[5] = 234; + aa[6][1] = 4321; +# aa[6][2] = 432; + aa[6][3] = "tttalb"; + aa[6][2] = "arbeZ"; + aa[6][4] = "zrab"; +} - n = asort(a, b); - print "N = ", n; +# source array != destination array +function asort2(c, s, d, k, m) +{ + if (SORT_STR < 0) + m = asort(c, d); + else + m = asort(c, d, SORT_STR); + for(k=1; k <= m; k++) { + if (isarray(d[k])) + asort2(d[k], s"["k"]") + else + printf("%10s:%10s%10s\n", s"["k"]", c[k], d[k]) + } +} - for(i=1; i <= n; i++) - print i, a[i], b[i]; +# source array == destination array +function asort1(c, s, k, m) +{ + if (SORT_STR < 0) + m = asort(c) + else if (SORT_STR != "") + m = asort(c, c, SORT_STR) + else + m = asort(c, c); + + for(k=1; k <= m; k++) { + if (isarray(c[k])) + asort1(c[k], s"["k"]") + else + printf("%10s:%10s\n", s"["k"]", c[k]) + } } -function testit1(a, count, j) + +function proc_sort(c, s, k) { - print "start testit" - count = asort(a) - for (j = 1; j <= count; j++) - print j, a[j] - print "end testit" + PROCINFO["sorted_in"] = SORT_STR + for(k in c) { + if (isarray(c[k])) + proc_sort(c[k], s"["k"]") + else + printf("%10s:%10s\n", s"["k"]", c[k]) + } } diff -Nru gawk-3.1.8+dfsg/test/sort1.ok gawk-4.0.1+dfsg/test/sort1.ok --- gawk-3.1.8+dfsg/test/sort1.ok 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sort1.ok 2011-05-08 17:30:16.000000000 +0000 @@ -1,11 +1,220 @@ -start testit -1 1234 -2 Zebra -3 barz -4 blattt -end testit -N = 4 -1 barz 1234 -2 blattt Zebra -3 Zebra barz -4 1234 blattt + [1]: 234 + [2]: 1234 + [3]: Zebra + [4]: barz + [5]: blattt + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end asort(a), IGNORECASE = 0--- + [1]: barz 234 + [2]: blattt 1234 + [3]: Zebra Zebra + [4]: 1234 barz + [5]: 234 blattt + [6][1]: 4321 4321 + [6][2]: arbeZ arbeZ + [6][3]: tttalb tttalb + [6][4]: zrab zrab +---end asort(a, b), IGNORECASE = 0--- + [1]: 234 + [2]: 1234 + [3]: Zebra + [4]: barz + [5]: blattt + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end asort(a, a), IGNORECASE = 0--- + [1]: barz barz + [2]: blattt blattt + [3]: Zebra Zebra + [4]: 1234 1234 + [5]: 234 234 + [6][1]: 4321 4321 + [6][2]: arbeZ arbeZ + [6][3]: tttalb tttalb + [6][4]: zrab zrab +---end asort(a, b, "@ind_num_asc"), IGNORECASE = 0--- + [1][1]: zrab + [1][2]: tttalb + [1][3]: arbeZ + [1][4]: 4321 + [2]: 234 + [3]: 1234 + [4]: Zebra + [5]: blattt + [6]: barz +---end asort(a, a, "@ind_str_desc"), IGNORECASE = 0--- + [4]: 1234 + [5]: 234 + [3]: Zebra + [1]: barz + [2]: blattt + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end PROCINFO["sorted_in"] = "@val_str_asc", IGNORECASE = 0--- + [3]: Zebra + [1]: barz + [2]: blattt + [5]: 234 + [4]: 1234 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab + [6][1]: 4321 +---end PROCINFO["sorted_in"] = "@val_num_asc", IGNORECASE = 0--- + [6][4]: zrab + [6][3]: tttalb + [6][2]: arbeZ + [6][1]: 4321 + [2]: blattt + [1]: barz + [3]: Zebra + [5]: 234 + [4]: 1234 +---end PROCINFO["sorted_in"] = "@val_str_desc", IGNORECASE = 0--- + [6][1]: 4321 + [6][4]: zrab + [6][3]: tttalb + [6][2]: arbeZ + [4]: 1234 + [5]: 234 + [2]: blattt + [1]: barz + [3]: Zebra +---end PROCINFO["sorted_in"] = "@val_num_desc", IGNORECASE = 0--- + [5]: 234 + [4]: 1234 + [3]: Zebra + [1]: barz + [2]: blattt + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end PROCINFO["sorted_in"] = "@val_type_asc", IGNORECASE = 0--- + [6][4]: zrab + [6][3]: tttalb + [6][2]: arbeZ + [6][1]: 4321 + [2]: blattt + [1]: barz + [3]: Zebra + [4]: 1234 + [5]: 234 +---end PROCINFO["sorted_in"] = "@val_type_desc", IGNORECASE = 0--- + [1]: 234 + [2]: 1234 + [3]: barz + [4]: blattt + [5]: Zebra + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end asort(a), IGNORECASE = 1--- + [1]: barz 234 + [2]: blattt 1234 + [3]: Zebra barz + [4]: 1234 blattt + [5]: 234 Zebra + [6][1]: 4321 4321 + [6][2]: arbeZ arbeZ + [6][3]: tttalb tttalb + [6][4]: zrab zrab +---end asort(a, b), IGNORECASE = 1--- + [1]: 234 + [2]: 1234 + [3]: barz + [4]: blattt + [5]: Zebra + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end asort(a, a), IGNORECASE = 1--- + [1]: barz barz + [2]: blattt blattt + [3]: Zebra Zebra + [4]: 1234 1234 + [5]: 234 234 + [6][1]: 4321 4321 + [6][2]: arbeZ arbeZ + [6][3]: tttalb tttalb + [6][4]: zrab zrab +---end asort(a, b, "@ind_num_asc"), IGNORECASE = 1--- + [1][1]: zrab + [1][2]: tttalb + [1][3]: arbeZ + [1][4]: 4321 + [2]: 234 + [3]: 1234 + [4]: Zebra + [5]: blattt + [6]: barz +---end asort(a, a, "@ind_str_desc"), IGNORECASE = 1--- + [4]: 1234 + [5]: 234 + [1]: barz + [2]: blattt + [3]: Zebra + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end PROCINFO["sorted_in"] = "@val_str_asc", IGNORECASE = 1--- + [1]: barz + [2]: blattt + [3]: Zebra + [5]: 234 + [4]: 1234 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab + [6][1]: 4321 +---end PROCINFO["sorted_in"] = "@val_num_asc", IGNORECASE = 1--- + [6][4]: zrab + [6][3]: tttalb + [6][2]: arbeZ + [6][1]: 4321 + [3]: Zebra + [2]: blattt + [1]: barz + [5]: 234 + [4]: 1234 +---end PROCINFO["sorted_in"] = "@val_str_desc", IGNORECASE = 1--- + [6][1]: 4321 + [6][4]: zrab + [6][3]: tttalb + [6][2]: arbeZ + [4]: 1234 + [5]: 234 + [3]: Zebra + [2]: blattt + [1]: barz +---end PROCINFO["sorted_in"] = "@val_num_desc", IGNORECASE = 1--- + [5]: 234 + [4]: 1234 + [1]: barz + [2]: blattt + [3]: Zebra + [6][1]: 4321 + [6][2]: arbeZ + [6][3]: tttalb + [6][4]: zrab +---end PROCINFO["sorted_in"] = "@val_type_asc", IGNORECASE = 1--- + [6][4]: zrab + [6][3]: tttalb + [6][2]: arbeZ + [6][1]: 4321 + [3]: Zebra + [2]: blattt + [1]: barz + [4]: 1234 + [5]: 234 +---end PROCINFO["sorted_in"] = "@val_type_desc", IGNORECASE = 1--- diff -Nru gawk-3.1.8+dfsg/test/sortfor.awk gawk-4.0.1+dfsg/test/sortfor.awk --- gawk-3.1.8+dfsg/test/sortfor.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sortfor.awk 2011-05-04 20:11:33.000000000 +0000 @@ -0,0 +1,9 @@ +{ a[$0]++ } +END { + PROCINFO["sorted_in"] = "@ind_str_asc" + for (i in a) + print i + PROCINFO["sorted_in"] = "@ind_str_desc" + for (i in a) + print i +} diff -Nru gawk-3.1.8+dfsg/test/sortfor.in gawk-4.0.1+dfsg/test/sortfor.in --- gawk-3.1.8+dfsg/test/sortfor.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sortfor.in 2011-01-27 20:50:17.000000000 +0000 @@ -0,0 +1,289 @@ +fsspcoln +ofmtfidl +strtonum +strftime +uninitialized +manyfiles +delarpm2 +wideidx +parseme +paramres +fldchgnf +subslash +intprec +asorti +mbprintf1 +mbprintf2 +synerr1 +mbprintf3 +synerr2 +arynasty +swaplns +asort +patsplit +delarprm +gensub +litoct +opasnidx +clsflnam +fnarydel +uparrfs +argarray +numindex +devfd1 +devfd2 +delfunc +localenl +noeffect +fstabplus +hsprint +fsfwfs +tradanch +fldchg +printfbad1 +unterm +printfbad2 +fmttest +minusstr +posix +arrymem1 +concat1 +reint2 +gnuops2 +concat2 +fsrs +gnuops3 +resplit +concat3 +fnparydl +concat4 +uninit2 +rs +fnarray +uninit3 +paramdup +mmap8k +fieldwdth +devfd +uninit4 +poundbang +uninit5 +nondec2 +switch2 +numsubstr +profile1 +regx8bit +profile2 +getline +membug1 +lint +zeroflag +fnasgnm +widesub2 +widesub3 +reindops +exitval1 +binmode1 +widesub4 +exitval2 +intest +back89 +substr +arynocls +opasnslf +ofmtbig +mbfw1 +zeroe0 +arrayparm +nasty +aasort +sclifin +nofmtch +leadnl +getlnhd +nofile +fflush +printf0 +reparse +printf1 +prtoeval +funsmnam +tweakfld +sclforin +wjposer1 +clobber +iobug1 +fnamedat +leaddig +double1 +double2 +strcat1 +prdupval +messages +space +nlfldsep +posix2008sub +wideidx2 +nfldstr +zero2 +rebt8b1 +onlynl +rebt8b2 +fwtest +anchgsub +beginfile1 +fnmisc +getlndir +rand +fwtest2 +nested +childin +mtchi18n +gsubtest +manglprm +intformat +longwrds +splitarr +arysubnm +rsstart1 +procinfs +argtest +regeq +rsstart2 +rsstart3 +sort1 +fmtspcl +reint +rsnulbig +closebad +strftlng +parse1 +ofmt +ignrcas2 +splitarg4 +range1 +noloop1 +longsub +igncdym +widesub +noloop2 +aadelete1 +subi18n +gsubtst2 +aadelete2 +gsubtst3 +gsubtst4 +convfmt +gsubtst5 +nors +arrayref +gsubtst6 +parsefld +indirectcall +asgext +shadow +octsub +nfneg +backgsub +math +getlnbuf +addcomma +mbstr1 +subsepnm +nulrsend +rsnulbig2 +sprintfc +redfilnm +igncfs +splitwht +fcall_exit +fordel +subamp +paramtyp +nlinstr +eofsplit +fsbs +dumpvars +nlstrina +datanonl +fcall_exit2 +icasers +badargs +nfset +gsubasgn +lc_num1 +aasorti +pipeio1 +pipeio2 +sortempty +inputred +backw +rswhite +awkpath +forsimp +match1 +match2 +splitvar +match3 +aryprm1 +aryprm2 +aryprm3 +getline2 +aarray1 +aryprm4 +fnarray2 +getline3 +ignrcase +aryprm5 +pcntplus +aryprm6 +aryprm7 +ofmts +aryprm8 +dynlj +prec +prmreuse +gensub2 +splitdef +prt1eval +lintold +scalar +fnaryscl +nondec +compare2 +icasefs +rstest1 +getnr2tb +rstest2 +arryref2 +rstest3 +arryref3 +gnureops +rstest4 +arryref4 +funstack +splitargv +rstest5 +arryref5 +rstest6 +clos1way +pid +rsnul1nl +nasty2 +noparms +defref +rebuf +strtod +prmarscl +arrayprm2 +arrayprm3 +getnr2tm +forref +funsemnl +hex +fpat1 +strnum1 +negexp +compare +funlen +nonl diff -Nru gawk-3.1.8+dfsg/test/sortfor.ok gawk-4.0.1+dfsg/test/sortfor.ok --- gawk-3.1.8+dfsg/test/sortfor.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sortfor.ok 2011-02-17 06:31:06.000000000 +0000 @@ -0,0 +1,578 @@ +aadelete1 +aadelete2 +aarray1 +aasort +aasorti +addcomma +anchgsub +argarray +argtest +arrayparm +arrayprm2 +arrayprm3 +arrayref +arrymem1 +arryref2 +arryref3 +arryref4 +arryref5 +arynasty +arynocls +aryprm1 +aryprm2 +aryprm3 +aryprm4 +aryprm5 +aryprm6 +aryprm7 +aryprm8 +arysubnm +asgext +asort +asorti +awkpath +back89 +backgsub +backw +badargs +beginfile1 +binmode1 +childin +clobber +clos1way +closebad +clsflnam +compare +compare2 +concat1 +concat2 +concat3 +concat4 +convfmt +datanonl +defref +delarpm2 +delarprm +delfunc +devfd +devfd1 +devfd2 +double1 +double2 +dumpvars +dynlj +eofsplit +exitval1 +exitval2 +fcall_exit +fcall_exit2 +fflush +fieldwdth +fldchg +fldchgnf +fmtspcl +fmttest +fnamedat +fnarray +fnarray2 +fnarydel +fnaryscl +fnasgnm +fnmisc +fnparydl +fordel +forref +forsimp +fpat1 +fsbs +fsfwfs +fsrs +fsspcoln +fstabplus +funlen +funsemnl +funsmnam +funstack +fwtest +fwtest2 +gensub +gensub2 +getline +getline2 +getline3 +getlnbuf +getlndir +getlnhd +getnr2tb +getnr2tm +gnuops2 +gnuops3 +gnureops +gsubasgn +gsubtest +gsubtst2 +gsubtst3 +gsubtst4 +gsubtst5 +gsubtst6 +hex +hsprint +icasefs +icasers +igncdym +igncfs +ignrcas2 +ignrcase +indirectcall +inputred +intest +intformat +intprec +iobug1 +lc_num1 +leaddig +leadnl +lint +lintold +litoct +localenl +longsub +longwrds +manglprm +manyfiles +match1 +match2 +match3 +math +mbfw1 +mbprintf1 +mbprintf2 +mbprintf3 +mbstr1 +membug1 +messages +minusstr +mmap8k +mtchi18n +nasty +nasty2 +negexp +nested +nfldstr +nfneg +nfset +nlfldsep +nlinstr +nlstrina +noeffect +nofile +nofmtch +noloop1 +noloop2 +nondec +nondec2 +nonl +noparms +nors +nulrsend +numindex +numsubstr +octsub +ofmt +ofmtbig +ofmtfidl +ofmts +onlynl +opasnidx +opasnslf +paramdup +paramres +paramtyp +parse1 +parsefld +parseme +patsplit +pcntplus +pid +pipeio1 +pipeio2 +posix +posix2008sub +poundbang +prdupval +prec +printf0 +printf1 +printfbad1 +printfbad2 +prmarscl +prmreuse +procinfs +profile1 +profile2 +prt1eval +prtoeval +rand +range1 +rebt8b1 +rebt8b2 +rebuf +redfilnm +regeq +regx8bit +reindops +reint +reint2 +reparse +resplit +rs +rsnul1nl +rsnulbig +rsnulbig2 +rsstart1 +rsstart2 +rsstart3 +rstest1 +rstest2 +rstest3 +rstest4 +rstest5 +rstest6 +rswhite +scalar +sclforin +sclifin +shadow +sort1 +sortempty +space +splitarg4 +splitargv +splitarr +splitdef +splitvar +splitwht +sprintfc +strcat1 +strftime +strftlng +strnum1 +strtod +strtonum +subamp +subi18n +subsepnm +subslash +substr +swaplns +switch2 +synerr1 +synerr2 +tradanch +tweakfld +uninit2 +uninit3 +uninit4 +uninit5 +uninitialized +unterm +uparrfs +wideidx +wideidx2 +widesub +widesub2 +widesub3 +widesub4 +wjposer1 +zero2 +zeroe0 +zeroflag +zeroflag +zeroe0 +zero2 +wjposer1 +widesub4 +widesub3 +widesub2 +widesub +wideidx2 +wideidx +uparrfs +unterm +uninitialized +uninit5 +uninit4 +uninit3 +uninit2 +tweakfld +tradanch +synerr2 +synerr1 +switch2 +swaplns +substr +subslash +subsepnm +subi18n +subamp +strtonum +strtod +strnum1 +strftlng +strftime +strcat1 +sprintfc +splitwht +splitvar +splitdef +splitarr +splitargv +splitarg4 +space +sortempty +sort1 +shadow +sclifin +sclforin +scalar +rswhite +rstest6 +rstest5 +rstest4 +rstest3 +rstest2 +rstest1 +rsstart3 +rsstart2 +rsstart1 +rsnulbig2 +rsnulbig +rsnul1nl +rs +resplit +reparse +reint2 +reint +reindops +regx8bit +regeq +redfilnm +rebuf +rebt8b2 +rebt8b1 +range1 +rand +prtoeval +prt1eval +profile2 +profile1 +procinfs +prmreuse +prmarscl +printfbad2 +printfbad1 +printf1 +printf0 +prec +prdupval +poundbang +posix2008sub +posix +pipeio2 +pipeio1 +pid +pcntplus +patsplit +parseme +parsefld +parse1 +paramtyp +paramres +paramdup +opasnslf +opasnidx +onlynl +ofmts +ofmtfidl +ofmtbig +ofmt +octsub +numsubstr +numindex +nulrsend +nors +noparms +nonl +nondec2 +nondec +noloop2 +noloop1 +nofmtch +nofile +noeffect +nlstrina +nlinstr +nlfldsep +nfset +nfneg +nfldstr +nested +negexp +nasty2 +nasty +mtchi18n +mmap8k +minusstr +messages +membug1 +mbstr1 +mbprintf3 +mbprintf2 +mbprintf1 +mbfw1 +math +match3 +match2 +match1 +manyfiles +manglprm +longwrds +longsub +localenl +litoct +lintold +lint +leadnl +leaddig +lc_num1 +iobug1 +intprec +intformat +intest +inputred +indirectcall +ignrcase +ignrcas2 +igncfs +igncdym +icasers +icasefs +hsprint +hex +gsubtst6 +gsubtst5 +gsubtst4 +gsubtst3 +gsubtst2 +gsubtest +gsubasgn +gnureops +gnuops3 +gnuops2 +getnr2tm +getnr2tb +getlnhd +getlndir +getlnbuf +getline3 +getline2 +getline +gensub2 +gensub +fwtest2 +fwtest +funstack +funsmnam +funsemnl +funlen +fstabplus +fsspcoln +fsrs +fsfwfs +fsbs +fpat1 +forsimp +forref +fordel +fnparydl +fnmisc +fnasgnm +fnaryscl +fnarydel +fnarray2 +fnarray +fnamedat +fmttest +fmtspcl +fldchgnf +fldchg +fieldwdth +fflush +fcall_exit2 +fcall_exit +exitval2 +exitval1 +eofsplit +dynlj +dumpvars +double2 +double1 +devfd2 +devfd1 +devfd +delfunc +delarprm +delarpm2 +defref +datanonl +convfmt +concat4 +concat3 +concat2 +concat1 +compare2 +compare +clsflnam +closebad +clos1way +clobber +childin +binmode1 +beginfile1 +badargs +backw +backgsub +back89 +awkpath +asorti +asort +asgext +arysubnm +aryprm8 +aryprm7 +aryprm6 +aryprm5 +aryprm4 +aryprm3 +aryprm2 +aryprm1 +arynocls +arynasty +arryref5 +arryref4 +arryref3 +arryref2 +arrymem1 +arrayref +arrayprm3 +arrayprm2 +arrayparm +argtest +argarray +anchgsub +addcomma +aasorti +aasort +aarray1 +aadelete2 +aadelete1 diff -Nru gawk-3.1.8+dfsg/test/sortu.awk gawk-4.0.1+dfsg/test/sortu.awk --- gawk-3.1.8+dfsg/test/sortu.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sortu.awk 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,118 @@ +# numeric before string, ascending by index +function comp_num_str(s1, v1, s2, v2, n1, n2) { + n1 = s1 + 0 + n2 = s2 + 0 + if (n1 == s1) + return (n2 == s2) ? (n1 - n2) : -1 + else if (n2 == s2) + return 1 + return (s1 < s2) ? -1 : (s1 != s2) +} + +# ascending index number +function comp_idx_num(s1, v1, s2, v2) +{ + return (s1 - s2) +} + +# ascending value number +function comp_val_num(s1, v1, s2, v2, num) +{ + num = "^[-+]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][-+]?[0-9]+)?$" + # force stable sort, compare as strings if not numeric + if ((v1 - v2) == 0 && (v1 !~ num || v2 !~ num)) + return comp_val_str(s1, v1, s2, v2) + return (v1 - v2) +} + +# ascending value string +function comp_val_str(s1, v1, s2, v2) +{ + v1 = v1 "" + v2 = v2 "" + return (v1 < v2) ? -1 : (v1 != v2) +} + +# deterministic, by value (and index), descending numeric +function comp_val_idx(s1, v1, s2, v2) +{ + return (v1 != v2) ? (v2 - v1) : (s2 - s1) +} + +BEGIN { + a[1] = 10; a[100] = 1; a[2] = 200 + a["cat"] = "tac"; a["rat"] = "tar";a["bat"] = "tab" + + print "--- number before string, ascending by index ---" + PROCINFO["sorted_in"] = "comp_num_str" + for (i in a) + printf("%-10s%-s\n", i, a[i]) + + delete a + a[11] = 10; a[100] = 5; a[2] = 200 + a[4] = 1; a[20] = 10; a[14] = 10 + print "--- deterministic, by value (index), descending numeric ---" + PROCINFO["sorted_in"] = "comp_val_idx" + for (i in a) + printf("%-10s%-s\n", i, a[i]) + + for (IGNORECASE=0; IGNORECASE <= 1; IGNORECASE++) { + makea(a) + SORT_STR = "comp_val_num" + printf("--- asort(a, b, \"%s\"), IGNORECASE = %d---\n", SORT_STR, IGNORECASE) + asort2(a, "") + + makea(a) + SORT_STR = "comp_val_str" + printf("--- asort(a, b, \"%s\"), IGNORECASE = %d---\n", SORT_STR, IGNORECASE) + asort2(a, "") + + makea(a) + SORT_STR = "comp_val_str" + printf("--- asort(a, a, \"%s\"), IGNORECASE = %d---\n", SORT_STR, IGNORECASE) + asort1(a, "") + } +} + +function makea(aa) +{ + delete aa + aa[1] = "barz"; + aa[2] = "blattt"; + aa[3] = "Zebra"; + aa[4] = 1234; + aa[5] = 234; +} + +# source array != destination array +function asort2(c, s, d, k, m) +{ + if (SORT_STR < 0) + m = asort(c, d); + else + m = asort(c, d, SORT_STR); + for (k=1; k <= m; k++) { + if (isarray(d[k])) + asort2(d[k], s"["k"]") + else + printf("%-10s:%-10s%-10s\n", s"["k"]", c[k], d[k]) + } +} + +# source array == destination array +function asort1(c, s, k, m) +{ + if (SORT_STR < 0) + m = asort(c) + else if (SORT_STR != "") + m = asort(c, c, SORT_STR) + else + m = asort(c, c); + + for (k=1; k <= m; k++) { + if (isarray(c[k])) + asort1(c[k], s"["k"]") + else + printf("%-10s:%-10s\n", s"["k"]", c[k]) + } +} diff -Nru gawk-3.1.8+dfsg/test/sortu.ok gawk-4.0.1+dfsg/test/sortu.ok --- gawk-3.1.8+dfsg/test/sortu.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/sortu.ok 2011-11-01 20:09:45.000000000 +0000 @@ -0,0 +1,50 @@ +--- number before string, ascending by index --- +1 10 +2 200 +100 1 +bat tab +cat tac +rat tar +--- deterministic, by value (index), descending numeric --- +2 200 +20 10 +14 10 +11 10 +100 5 +4 1 +--- asort(a, b, "comp_val_num"), IGNORECASE = 0--- +[1] :barz Zebra +[2] :blattt barz +[3] :Zebra blattt +[4] :1234 234 +[5] :234 1234 +--- asort(a, b, "comp_val_str"), IGNORECASE = 0--- +[1] :barz 1234 +[2] :blattt 234 +[3] :Zebra Zebra +[4] :1234 barz +[5] :234 blattt +--- asort(a, a, "comp_val_str"), IGNORECASE = 0--- +[1] :1234 +[2] :234 +[3] :Zebra +[4] :barz +[5] :blattt +--- asort(a, b, "comp_val_num"), IGNORECASE = 1--- +[1] :barz barz +[2] :blattt blattt +[3] :Zebra Zebra +[4] :1234 234 +[5] :234 1234 +--- asort(a, b, "comp_val_str"), IGNORECASE = 1--- +[1] :barz 1234 +[2] :blattt 234 +[3] :Zebra barz +[4] :1234 blattt +[5] :234 Zebra +--- asort(a, a, "comp_val_str"), IGNORECASE = 1--- +[1] :1234 +[2] :234 +[3] :barz +[4] :blattt +[5] :Zebra diff -Nru gawk-3.1.8+dfsg/test/splitarg4.awk gawk-4.0.1+dfsg/test/splitarg4.awk --- gawk-3.1.8+dfsg/test/splitarg4.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/splitarg4.awk 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,138 @@ +BEGIN { + split("c: ::ab+", fs_arr, ":") +} +{ + for (i = 1; i in fs_arr; ++i) { + split($0, a, fs_arr[i], seps) + print zipcat(a, seps) + dump_array(seps) + } +} +END { + seps[1] = "123"; seps[5] = 10 + for (i = 1; i in fs_arr; ++i) { + split("", a, fs_arr[i], seps) + dump_array(seps) + } +} +function dump_array(a, i, mini, maxi) +{ + mini = minidx(a) + 0 + maxi = maxidx(a) + 0 + printf "{" + for (i = mini; i <= maxi; ++i) + if (i in a) { + if (i > mini) + printf ", " + printf "%d => \"%s\"", i, a[i] + } + printf "}\n" +} +function zipcat(a, b, c) +{ + zip(a, b, c) + return cat(c) +} + +function cat(a, mini, maxi, i, s) +{ + mini = minidx(a) + 0 + maxi = maxidx(a) + 0 + for (i = mini; i <= maxi; ++i) + if (i in a) + s = s a[i] + return s +} + +function zip(a, b, c, mini, maxi, i) +{ + del(c) + mini = minidx2(a, b) + 0 + maxi = maxidx2(a, b) + 0 + for (i = mini; i <= maxi; ++i) { + if (i in a) + c[i] = a[i] + if (i in b) + c[i] = c[i] b[i] + } +} + +function maxidx2(a, b) +{ + if (emptyarr(a)) + return maxidx(b) + else if (emptyarr(b)) + return maxidx(a) + else + return max(maxidx(a), maxidx(b)) +} + +function minidx2(a, b) +{ + if (emptyarr(a)) + return minidx(b) + else if (emptyarr(b)) + return minidx(a) + else + return min(minidx(a), minidx(b)) +} + +function maxidx(a, i, m) +{ + if (emptyarr(a)) + m = "" + else { + m = choose(a) + 0 + for (i in a) { + i += 0 + if (i > m) + m = i + } + } + return m +} + +function minidx(a, i, m) +{ + if (emptyarr(a)) + m = "" + else { + m = choose(a) + 0 + for (i in a) { + i += 0 + if (i < m) + m = i + } + } + return m +} + +function choose(a, m) +{ + for (m in a) + return m + return "" +} + +function emptyarr(a, k) +{ + for (k in a) + return 0 + return 1 +} + +# portable delete +function del(a) +{ + split("", a) +} + +function max(x, y) +{ + return x > y ? x : y +} + +function min(x, y) +{ + return x < y ? x : y +} diff -Nru gawk-3.1.8+dfsg/test/splitarg4.in gawk-4.0.1+dfsg/test/splitarg4.in --- gawk-3.1.8+dfsg/test/splitarg4.in 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/splitarg4.in 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,11 @@ +caccbdc +acbcd + + a b def +a b dwf + a b dwf +a b dwf +abc +a +aabaabbabbbaabbb +ab diff -Nru gawk-3.1.8+dfsg/test/splitarg4.ok gawk-4.0.1+dfsg/test/splitarg4.ok --- gawk-3.1.8+dfsg/test/splitarg4.ok 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/splitarg4.ok 2010-10-31 10:25:52.000000000 +0000 @@ -0,0 +1,92 @@ +caccbdc +{1 => "c", 2 => "c", 3 => "c", 4 => "c"} +caccbdc +{} +caccbdc +{1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => ""} +caccbdc +{} +acbcd +{1 => "c", 2 => "c"} +acbcd +{} +acbcd +{1 => "", 2 => "", 3 => "", 4 => ""} +acbcd +{} + +{} + +{} + +{} + +{} + a b def +{} + a b def +{0 => " ", 1 => " ", 2 => " ", 3 => " "} + a b def +{1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "", 7 => "", 8 => "", 9 => ""} + a b def +{} +a b dwf +{} +a b dwf +{1 => " ", 2 => " "} +a b dwf +{1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => ""} +a b dwf +{} + a b dwf +{} + a b dwf +{0 => " ", 1 => " ", 2 => " "} + a b dwf +{1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "", 7 => ""} + a b dwf +{} +a b dwf +{} +a b dwf +{1 => " ", 2 => " "} +a b dwf +{1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => ""} +a b dwf +{} +abc +{1 => "c"} +abc +{} +abc +{1 => "", 2 => ""} +abc +{1 => "ab"} +a +{} +a +{} +a +{} +a +{} +aabaabbabbbaabbb +{} +aabaabbabbbaabbb +{} +aabaabbabbbaabbb +{1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "", 7 => "", 8 => "", 9 => "", 10 => "", 11 => "", 12 => "", 13 => "", 14 => "", 15 => ""} +aabaabbabbbaabbb +{1 => "ab", 2 => "abb", 3 => "abbb", 4 => "abbb"} +ab +{} +ab +{} +ab +{1 => ""} +ab +{1 => "ab"} +{} +{} +{} +{} diff -Nru gawk-3.1.8+dfsg/test/subamp.awk gawk-4.0.1+dfsg/test/subamp.awk --- gawk-3.1.8+dfsg/test/subamp.awk 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/subamp.awk 2010-11-29 19:57:37.000000000 +0000 @@ -1 +1 @@ -{ sub(/[a-z]/, "&") ; print } +{ sub(/[[:lower:]]/, "&") ; print } diff -Nru gawk-3.1.8+dfsg/test/uninit3.ok gawk-4.0.1+dfsg/test/uninit3.ok --- gawk-3.1.8+dfsg/test/uninit3.ok 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/uninit3.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,3 +1,3 @@ -gawk: uninit3.awk:8: warning: function `f': parameter `x' shadows global variable -gawk: uninit3.awk:2: warning: reference to uninitialized variable `x' +gawk: uninit3.awk:1: warning: function `f': parameter `x' shadows global variable +gawk: uninit3.awk:2: warning: reference to uninitialized argument `x' diff -Nru gawk-3.1.8+dfsg/test/uninit5.ok gawk-4.0.1+dfsg/test/uninit5.ok --- gawk-3.1.8+dfsg/test/uninit5.ok 2009-10-06 17:51:20.000000000 +0000 +++ gawk-4.0.1+dfsg/test/uninit5.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,10 +1,9 @@ -gawk: uninit5.awk:75: warning: `length(array)' is a gawk extension -gawk: uninit5.awk:75: warning: length: untyped parameter argument will be forced to scalar +gawk: uninit5.awk:75: warning: reference to uninitialized argument `a' length: 0 -gawk: uninit5.awk:77: warning: length: untyped parameter argument will be forced to scalar +gawk: uninit5.awk:77: warning: reference to uninitialized argument `a' -gawk: uninit5.awk:97: warning: length: untyped parameter argument will be forced to scalar +gawk: uninit5.awk:97: warning: reference to uninitialized argument `a' length: 0 diff -Nru gawk-3.1.8+dfsg/test/unterm.ok gawk-4.0.1+dfsg/test/unterm.ok --- gawk-3.1.8+dfsg/test/unterm.ok 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/unterm.ok 2010-10-31 10:25:52.000000000 +0000 @@ -1,3 +1,5 @@ gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................} gawk: unterm.awk:1: ^ unterminated string +gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................} +gawk: unterm.awk:1: ^ syntax error EXIT CODE: 1 diff -Nru gawk-3.1.8+dfsg/test/whiny.awk gawk-4.0.1+dfsg/test/whiny.awk --- gawk-3.1.8+dfsg/test/whiny.awk 2006-08-11 12:05:49.000000000 +0000 +++ gawk-4.0.1+dfsg/test/whiny.awk 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -{ word[$0]++ } -END { - for (i in word) - print i -} diff -Nru gawk-3.1.8+dfsg/test/whiny.in gawk-4.0.1+dfsg/test/whiny.in --- gawk-3.1.8+dfsg/test/whiny.in 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/test/whiny.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,178 +0,0 @@ -gawk -pattern -scanning -and -processing -language -or -style -options -file -or -style -options -file -or -style -options -file -or -style -options -file -is -the -Project's -implementation -of -the -programming -language. -It -conforms -to -the -definition -of -the -language -in -the -Command -Language -And -Utilities -Standard. -This -version -in -turn -is -based -on -the -description -in -by -Aho, -Kernighan, -and -Weinberger, -with -the -additional -features -found -in -the -System -V -Release -version -of -also -provides -more -recent -Bell -Laboratories -extensions, -and -a -number -of -extensions. -is -the -profiling -version -of -It -is -identical -in -every -way -to -except -that -programs -run -more -slowly, -and -it -automatically -produces -an -execution -profile -in -the -file -when -done. -See -the -option, -below. -The -command -line -consists -of -options -to -itself, -the -program -text -not -supplied -via -the -or -options), -and -values -to -be -made -available -in -the -and -pre-defined -variables. -options -may -be -either -traditional -one -letter -options, -or -style -long -options. -options -start -with -a -single -while -long -options -start -with -Long -options -are -provided -for -both -features -and -for -features. diff -Nru gawk-3.1.8+dfsg/test/whiny.ok gawk-4.0.1+dfsg/test/whiny.ok --- gawk-3.1.8+dfsg/test/whiny.ok 2006-08-11 12:05:50.000000000 +0000 +++ gawk-4.0.1+dfsg/test/whiny.ok 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ -Aho, -And -Bell -Command -It -Kernighan, -Laboratories -Language -Long -Project's -Release -See -Standard. -System -The -This -Utilities -V -Weinberger, -a -additional -also -an -and -are -automatically -available -based -be -below. -both -by -command -conforms -consists -definition -description -done. -either -every -except -execution -extensions, -extensions. -features -features. -file -for -found -gawk -identical -implementation -in -is -it -itself, -language -language. -letter -line -long -made -may -more -not -number -of -on -one -option, -options -options), -options, -options. -or -pattern -pre-defined -processing -produces -profile -profiling -program -programming -programs -provided -provides -recent -run -scanning -single -slowly, -start -style -supplied -text -that -the -to -traditional -turn -values -variables. -version -via -way -when -while -with diff -Nru gawk-3.1.8+dfsg/test/xref.awk gawk-4.0.1+dfsg/test/xref.awk --- gawk-3.1.8+dfsg/test/xref.awk 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/xref.awk 2012-02-10 12:06:02.000000000 +0000 @@ -0,0 +1,139 @@ + # xref.awk - cross reference an awk program + + # 12/2010: Modified for gawk test suite to use a variable + # for the sort command and to use `sort -k1' instead of `sort +1' + + BEGIN { + if (sortcmd == "") sortcmd = "sort" # "sort -k1" + + # create array of keywords to be ignored by lexer + asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" \ + "do:else:exit:exp:for:getline:gsub:if:in:index:int:" \ + "length:log:match:next:print:printf:rand:return:sin:" \ + "split:sprintf:sqrt:srand:sub:substr:system:while", + keywords,":") + + # build the symbol-state table + split("00:00:00:00:00:00:00:00:00:00:" \ + "20:10:10:12:12:11:07:00:00:00:" \ + "08:08:08:08:08:33:08:00:00:00:" \ + "08:44:08:36:08:08:08:00:00:00:" \ + "08:44:45:42:42:41:08",machine,":") + + # parse the input and store an intermediate representation + # of the cross-reference information + + # set up the machine + state = 1 + + # run the machine + for (;;) { + + # get next symbol + symb = lex() + nextstate = substr(machine[state symb],1,1) + act = substr(machine[state symb],2,1) + + # perform required action + if ( act == "0" ) + ; # do nothing + else if ( act == "1" ) { + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else if ( act == "2" ) { + if ( tok in local ) { + tok = tok "(" funcname ")" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else { + tok = tok "()" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } } + else if ( act == "3" ) { + funcname = tok + flines[tok] = NR } + else if ( act == "4" ) + braces++ + else if ( act == "5" ) { + braces-- + if ( braces == 0 ) { + for ( temp in local ) + delete local[temp] + funcname = "" + nextstate = 1 } } + else if ( act == "6" ) { + local[tok] = 1 } + else if ( act == "7" ) + break + else if ( act == "8" ) { + print "error: xref.awk: line " NR ": aborting" \ + > "/dev/con" + exit 1 } + + # finished with current token + state = nextstate } + + # finished parsing, now ready to print output + for ( i = 1; i <= nnames; i++ ) { + printf "%d ", xnames[names[i]] | sortcmd + if ( index(names[i],"(") == 0 ) + printf "%s(%d)", names[i], flines[names[i]] | sortcmd + else + printf "%s", names[i] | sortcmd + for ( j = 1; j <= xnames[names[i]]; j++ ) + if ( lines[names[i],j] != lines[names[i],j-1] ) + printf " %d", lines[names[i],j] | sortcmd + printf "\n" | sortcmd } + + close(sortcmd) + } # END OF PROGRAM + + function asplit(str,arr,fs, n) { n = split(str,temp_asplit,fs) + for ( i = 1; i <= n; i++ ) arr[temp_asplit[i]]++ } + + function inarray(val,arr, j, tmp) { + for ( j in arr ) + tmp[arr[j]]++ + return (val in tmp) } + + function lex() { + + for (;;) { + + if ( tok == "(eof)" ) return 7 + + while ( length(line) == 0 ) + if ( getline line == 0 ) { + tok = "(eof)"; return 7 } + + sub(/^[ \t]+/,"",line) # remove white space, + sub(/^"([^"]|\\")*"/,"",line) # quoted strings, + sub(/^\/([^\/]|\\\/)+\//,"",line) # regular expressions, + sub(/^#.*/,"",line) # and comments + + if ( line ~ /^function/ ) { + tok = "function"; line = substr(line,9); return 1 } + else if ( line ~ /^{/ ) { + tok = "{"; line = substr(line,2); return 2 } + else if ( line ~ /^}/ ) { + tok = "}"; line = substr(line,2); return 3 } + # change regexes to use posix character classes + else if ( match(line,/^[[:alpha:]_][[:alnum:]]*\[/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + return 5 } + else if ( match(line,/^[[:alpha:]_][[:alnum:]]*\(/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 6 } + else if ( match(line,/^[[:alpha:]_][[:alnum:]]*/) ) { + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 4 } + else { + match(line,/^[^[:alpha:]_{}]/) + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) } } } diff -Nru gawk-3.1.8+dfsg/test/xref.original gawk-4.0.1+dfsg/test/xref.original --- gawk-3.1.8+dfsg/test/xref.original 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/test/xref.original 2010-12-07 20:19:27.000000000 +0000 @@ -0,0 +1,313 @@ +XREF(AWK) Philip L. Bewig XREF(AWK) + +NAME + + xref(awk) - produce a cross reference listing of an awk program + +SYNOPSIS + + awk -f xref.awk [ file ... ] + +DESCRIPTION + + XREF(AWK) takes as input a valid awk program and produces as out- + put a cross-reference listing of all variables and function calls + which appear in the program. + + For ordinary variables and array variables, a line of the form + + count var(func) lines ... + + is produced, where "count" is the number of times the variable is + used, "var" is the name of the variable, "func" is the function + name to which the variable is local (a null "func" indicates that + the variable is global), and "lines" is the number of each line + where the variable appears. Appearances of the variable in a + function's parameter list are ignored. The number of lines shown + may differ from "count" if the variable appears more than once on + the same line. + + For functions, a line of the form + + count func(define) lines ... + + is produced, where "count" is the number of times the function is + called, "func" is the name of the function, "define" is the lime + number where the function is defined, and "lines" is the number of + each line where the function is called. As for variables, the + number of lines shown may differ from "count." + + Output lines for variables and functions are intermixed and are + sorted by name. Though terse, the output is informative, easy to + read, and amenable to further processing. + +EXAMPLE + + The cross-reference listing produced by running xref.awk against + itself is shown below: + + 5 NR() 39 45 50 53 68 + 8 RLENGTH() 119 120 123 124 127 128 132 133 + 10 act() 31 34 36 40 51 54 56 63 65 67 + 1 arr(asplit) 90 + 2 arr(inarray) 93 94 + 1 asplit(89) 6 + 3 braces() 55 57 58 + 2 flines() 53 79 + 1 fs(asplit) 89 + 3 funcname() 42 52 61 + 16 i() 76 77 78 79 81 82 83 84 90 + 3 inarray(92) 37 43 48 + 6 j() 82 83 84 + 3 j(inarray) 93 94 + 3 keywords() 10 125 129 + 1 lex(97) 29 + 31 line() 103 104 107 108 109 110 112 113 114 115 116 117 118 + 119 120 122 123 124 126 127 128 131 132 133 + 6 lines() 39 45 50 83 84 + 4 local() 41 59 60 64 + 3 machine() 17 30 31 + 2 n(asplit) 89 90 + 15 names() 37 38 43 44 48 49 77 78 79 81 82 83 84 + 3 nextstate() 30 62 73 + 4 nnames() 38 44 49 76 + 4 state() 23 30 31 73 + 1 str(asplit) 89 + 3 symb() 29 30 31 + 2 temp() 59 60 + 2 temp_asplit() 89 90 + 31 tok() 37 38 39 41 42 43 44 45 47 48 49 50 52 53 64 101 105 + 113 115 117 119 123 125 127 129 132 + 1 val(inarray) 94 + 5 xnames() 39 45 50 77 82 + + For readability, some lines have been folded. + +SOURCE CODE + + # xref.awk - cross reference an awk program + + BEGIN { + + # create array of keywords to be ignored by lexer + asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" \ + "do:else:exit:exp:for:getline:gsub:if:in:index:int:" \ + "length:log:match:next:print:printf:rand:return:sin:" \ + "split:sprintf:sqrt:srand:sub:substr:system:while", + keywords,":") + + # build the symbol-state table + split("00:00:00:00:00:00:00:00:00:00:" \ + "20:10:10:12:12:11:07:00:00:00:" \ + "08:08:08:08:08:33:08:00:00:00:" \ + "08:44:08:36:08:08:08:00:00:00:" \ + "08:44:45:42:42:41:08",machine,":") + + # parse the input and store an intermediate representation + # of the cross-reference information + + # set up the machine + state = 1 + + # run the machine + for (;;) { + + # get next symbol + symb = lex() + nextstate = substr(machine[state symb],1,1) + act = substr(machine[state symb],2,1) + + # perform required action + if ( act == "0" ) + ; # do nothing + else if ( act == "1" ) { + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else if ( act == "2" ) { + if ( tok in local ) { + tok = tok "(" funcname ")" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else { + tok = tok "()" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } } + else if ( act == "3" ) { + funcname = tok + flines[tok] = NR } + else if ( act == "4" ) + braces++ + else if ( act == "5" ) { + braces-- + if ( braces == 0 ) { + for ( temp in local ) + delete local[temp] + funcname = "" + nextstate = 1 } } + else if ( act == "6" ) { + local[tok] = 1 } + else if ( act == "7" ) + break + else if ( act == "8" ) { + print "error: xref.awk: line " NR ": aborting" \ + > "/dev/con" + exit 1 } + + # finished with current token + state = nextstate } + + # finished parsing, now ready to print output + for ( i = 1; i <= nnames; i++ ) { + printf "%d ", xnames[names[i]] |"sort +1" + if ( index(names[i],"(") == 0 ) + printf "%s(%d)", names[i], flines[names[i]] |"sort +1" + else + printf "%s", names[i] |"sort +1" + for ( j = 1; j <= xnames[names[i]]; j++ ) + if ( lines[names[i],j] != lines[names[i],j-1] ) + printf " %d", lines[names[i],j] |"sort +1" + printf "\n" |"sort +1" } + + } # END OF PROGRAM + + function asplit(str,arr,fs, n) { n = split(str,temp_asplit,fs) + for ( i = 1; i <= n; i++ ) arr[temp_asplit[i]]++ } + + function inarray(val,arr, j) { + for ( j in arr ) + if ( arr[j] == val ) return j + return "" } + + function lex() { + + for (;;) { + + if ( tok == "(eof)" ) return 7 + + while ( length(line) == 0 ) + if ( getline line == 0 ) { + tok = "(eof)"; return 7 } + + sub(/^[ \t]+/,"",line) # remove white space, + sub(/^"([^"]|\\")*"/,"",line) # quoted strings, + sub(/^\/([^\/]|\\\/)+\//,"",line) # regular expressions, + sub(/^#.*/,"",line) # and comments + + if ( line ~ /^function/ ) { + tok = "function"; line = substr(line,9); return 1 } + else if ( line ~ /^{/ ) { + tok = "{"; line = substr(line,2); return 2 } + else if ( line ~ /^}/ ) { + tok = "}"; line = substr(line,2); return 3 } + else if ( match(line,/^[A-Za-z_][A-Za-z_0-9]*\[/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + return 5 } + else if ( match(line,/^[A-Za-z_][A-Za-z_0-9]*\(/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 6 } + else if ( match(line,/^[A-Za-z_][A-Za-z_0-9]*/) ) { + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 4 } + else { + match(line,/^[^A-Za-z_{}]/) + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) } } } + +TECHNICAL DISCUSSION + + Broadly, XREF(AWK) parses an awk program using a symbol-state + table, in much the same way as a yacc-generated parser. The + lexical analyzer recognizes seven distinct symbols: the word + "function", the left brace, the right brace, identifiers used + as variables, identifiers used as arrays, identifiers used as + functions, and end of file. The type of symbol is returned to + the parser as the value of the "lex" function, and the global + variable "tok" is set to the text of the current token. + + The symbol-state table is stored in the "machine" array. The + table can be represented as follows: + + symbol | 1 2 3 4 5 6 7 + | + state | "function" { } var array func eof + -- -- -- -- -- -- -- -+- -- -- -- -- -- -- -- -- -- -- -- -- -- + 1 any | 20 10 10 12 12 11 07 + 2 "function" | 08 08 08 08 08 33 08 + 3 "function" name | 08 44 08 36 08 08 08 + 4 "function" name "{" | 08 44 45 42 42 41 08 + + where the first digit is the state to be entered after process- + ing the current token and the second digit is an action to be + performed. The actions are listed below: + + 1 found a function call + 2 found a variable or array + 3 found a function definition + 4 found a left brace + 5 found a right brace + 6 found a local variable declaration + 7 found end of file + 8 found an error + + Each of the first six actions causes some information about the + target program to be stored for later processing; the structures + used will be discussed below. The seventh action causes the + parser to exit. The eighth action causes errors to be reported + to standard error and the program to abort. + + Before describing the intermediate data structures, we will + discuss some of the more interesting points in the action calls. + The "braces" variable keeps track of whether we are currently + within a functions; it is positive within a function and zero + without. When the right brace which causes the value of "braces" + to go from one to zero is found, the value of "nextstate" is + changed from four (scanning a function) to one (any) and the + names of local variables are forgotten. The "local" array is + accumulated from the variables found after the function name but + before the opening left brace of the function; action two care- + fully checks whether a variable is global or local before writing + to the intermediate data structure. The variable "funcname" is + the name of the current function when within a function and null + without. + + The following arrays store an intermediate representation of the + variable and function identifiers of the target program: + + names[1..nnames] = list of all identifiers, both variable and + function names; for variables, the name has the form + var(func), but for functions, there are no parentheses + + xnames[names[i]] = number of times names[i] is used + + lines[names[i],1..xnames[names[i]]] = list of line numbers + where names[i] is used + + flines[names[i]] = line number where function names[i] is + defined + + These arrays are created as the parser reads the input; when the + parser is finished, the arrays are output in user-readable form. + +PORTABILITY + + XREF(AWK) will work with any implementation of nawk. The MKS + ToolKit implementation requires the large-model version of awk. + +HISTORY + + Written by Phil Bewig on February 10, 1990. Inspired by + Exercise 3-16 of the book "The Awk Programming Language" by + Alfred V. Aho, Brian W. Kernighan and Peter J. Weinberger + (Addison-Wesley: 1988). + +COPYRIGHT + + This program is placed in the public domain. However, the + author requests credit when distributed. + diff -Nru gawk-3.1.8+dfsg/unsupported/atari/ChangeLog gawk-4.0.1+dfsg/unsupported/atari/ChangeLog --- gawk-3.1.8+dfsg/unsupported/atari/ChangeLog 2010-05-06 17:56:29.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/ChangeLog 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins - - * Release 3.1.8: Release tar file made. - -Tue Jul 21 22:28:56 2009 Arnold D. Robbins - - * Release 3.1.7: Release tar file made. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -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. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Sun Jan 28 15:50:02 2001 Eli Zaretskii - - * gawkmisc.atr (os_restore_mode): New function - -Sun Dec 3 16:53:37 2000 Arnold D. Robbins - - * gawkmisc.atr (os_setbinmode): new function. - -Tue Nov 7 14:09:14 2000 Arnold D. Robbins - - * gawkmisc.atr (os_is_setuid): new function. - -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - * Close-on-exec changes: - gawkmisc.atr: (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. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Thu Nov 21 13:11:20 1996 Michal Jaegermann - - * Makefile.st: Once again Makefile.st and config.h chase - moving targets from the main directory. - -Thu Nov 7 21:02:01 1996 Michal Jaegermann - - * Makefile.st, Makefile.awklib: sync'ed with ones in main tree. - -Wed Jan 10 22:58:55 1996 Arnold D. Robbins - - * ChangeLog created. diff -Nru gawk-3.1.8+dfsg/unsupported/atari/Makefile.awklib gawk-4.0.1+dfsg/unsupported/atari/Makefile.awklib --- gawk-3.1.8+dfsg/unsupported/atari/Makefile.awklib 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/Makefile.awklib 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -# Makefile for GNU Awk support library -# Copy this file to 'awklib' subdirectory of main directory -# and execute via relevant targets in your top Makefile -# -# This Makefile actually will work for awklib even when NOT -# compiling with Atari Makefile!!! -# -# Copyright (C) 1995, 1996 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -SHELL = /bin/sh - -srcdir = . - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -CFLAGS = -g -O - -prefix = /usr/local -exec_prefix = ${prefix} -binprefix = -manprefix = - -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -mandir = ${prefix}/man/man1 -manext = .1 -infodir = ${prefix}/info -datadir = ${prefix}/share/awk -libexecdir = ${exec_prefix}/libexec/awk - -# default names of library utilities; on some systems they may require -# names with extenstions -PWCAT = pwcat -GRCAT = grcat -# the following command used, when necessary, for edits when -# creating igawk from igawk.sh -GCOM = '{print}' -GAWK = gawk -# $(AWK) is a by default freshly compiled gawk or installed awk when -# cross-compiling; it is used for edits, since we may compile not on -# Unix machine and an utility like 'sed' may NOT exist there -AWK = $(srcdir)/../$(GAWK) -AUXPROGS = $(PWCAT) $(GRCAT) -AUXAWK = passwd.awk group.awk - -all: stamp-eg $(AUXPROGS) igawk $(AUXAWK) - -stamp-eg: $(srcdir)/../doc/gawk.texi - rm -fr eg stamp-eg - $(AWK) -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.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): $(srcdir)/eg/lib/pwcat.c - $(CC) $(CFLAGS) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ - -$(GRCAT): $(srcdir)/eg/lib/grcat.c - $(CC) $(CFLAGS) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@ - -igawk: $(srcdir)/eg/prog/igawk.sh - $(AWK) $(GCOM) $(srcdir)/eg/prog/igawk.sh > $@ ; chmod 755 $@ - -passwd.awk: $(srcdir)/eg/lib/passwdawk.in - $(AWK) '{gsub(/\/usr\/local\/libexec\/awk/, "$(libexecdir)"); print}' \ - $? > $@ - -group.awk: $(srcdir)/eg/lib/groupawk.in - $(AWK) '{gsub(/\/usr\/local\/libexec\/awk/, "$(libexecdir)"); print}' \ - $? > $@ - -install: igawk $(AUXPROGS) $(AUXAWK) - $(INSTALL_PROGRAM) igawk $(bindir)/igawk && chmod 755 $(bindir)/igawk - for i in $(AUXPROGS) ; do \ - $(INSTALL_PROGRAM) $$i $(libexecdir)/$$i ; \ - done - for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \ - $(INSTALL_DATA) $$i $(datadir)/$$i ; \ - done - -# libexecdir and bindir are removed in the top level Makefile's uninstall -uninstall: - rm -fr $(libexecdir)/* $(datadir)/* - rm -f $(bindir)/igawk - -clean: - rm -f $(AUXPROGS) $(AUXAWK) igawk *~ - -distclean: clean - rm -f Makefile diff -Nru gawk-3.1.8+dfsg/unsupported/atari/Makefile.st gawk-4.0.1+dfsg/unsupported/atari/Makefile.st --- gawk-3.1.8+dfsg/unsupported/atari/Makefile.st 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/Makefile.st 1970-01-01 00:00:00.000000000 +0000 @@ -1,282 +0,0 @@ -# Makefile for GNU Awk - ST version. -# -# This makefile hand edited from Makefile automatically generated -# by configure - gcc 2.x.x compiler with TOS version of libraries -# and modified system(). -# Check comments in this Makefile and adjust to your needs!! -# -# This Makefile assumes that you are using Bourne compatible shell -# (like bash). If this is not the case you will have to edit various -# targets or perform some actions by hand. -# -# Copyright (C) 1986, 1988-1996 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - -MAKEINFO = makeinfo --no-split - -srcdir = . - -# native compiler with freshly compiled gawk.ttp to fix awklib -GAWK = gawk.ttp -CC = gcc - -# cross-compiler and gawk already installed on the system (any awk will do) -# GAWK = gawk -# CC = cgcc - -# WIDTH and EXT have to be both defined or both undefined -# WIDTH = -mshort -DINT_IS_16BIT -# EXT = 16 - -OFLAGS = -O2 -Wall -fomit-frame-pointer $(WIDTH) -LDFLAGS = $(WIDTH) -YACC = bison -y - -# xstrip -k in target gawk.ttp removes all symbols but _stksize -# allowing for stack size manipulations without recompiling (with fixstk) -INSTALL = xstrip -k ; cp -p -INSTALL_PROGRAM = ${INSTALL} -#INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_DATA = ${INSTALL} - -LIBS = -lpml$(EXT) - -ALLOCA = - -#all these definitions likely require changes -exec_prefix = ${prefix} -prefix = /usr/local -binprefix = -manprefix = - -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -manexta = l -mandir = ${prefix}/man/man$(manexta) -manext = .$(manexta) -infodir = ${prefix}/info -#datadir = ${prefix}/share/awk -datadir = ${prefix}/lib/awk -libexecdir = ${exec_prefix}/lib/awk - -#DEFPATH = ".:$(datadir)" -# datadir is passed to the next Makefile level and through sed -# you may need many more backslashes than that if you have to use -# them at all - sigh... -DEFPATH = ".,c:\\lib\\awk,c:\\gnu\\lib\\awk" - -SHELL = /bin/sh - -SHELL = /bin/sh -#CFLAGS = -g -O -CFLAGS = $(OFLAGS) -COMPFLAGS = $(CFLAGS) -DGAWK -I. -I$(srcdir) -DHAVE_CONFIG_H - -MFLAGS = "CC=$(CC)" \ - "CFLAGS=$(CFLAGS)" \ - GAWK=../$(GAWK) \ - AWK=awk \ - PWCAT=pwcat.ttp GRCAT=grcat.ttp \ - "GCOM='{sub(/\":\"/, \"\\\",\\\"\"); print}'" \ - "COMPFLAGS=$(COMPFLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "bindir=$(bindir)" \ - "libdir=$(libdir)" \ - "mandir=$(mandir)" \ - "manext=$(manext)" \ - "infodir=$(infodir)" \ - "datadir=$(datadir)" \ - "libexecdir=$(libexecdir)" - -MMAKE = $(MAKE) $(MFLAGS) - -# object files -AWKOBJS = array.o builtin.o eval.o field.o gawkmisc.o io.o main.o \ - missing.o msg.o node.o re.o version.o - -ALLOBJS = $(AWKOBJS) awktab.o - -# LIBOBJS -# GNU and other stuff that gawk uses as library routines. -LIBOBJS= getopt.o getopt1.o regex.o dfa.o random.o $(ALLOCA) - -# source and documentation files -SRC = array.c builtin.c eval.c field.c gawkmisc.c io.c main.c \ - missing.c msg.c node.c re.c version.c - -ALLSRC= $(SRC) awktab.c - -AWKSRC= awk.h awk.y custom.h $(ALLSRC) patchlevel.h protos.h random.h - -LIBSRC = alloca.c dfa.c dfa.h regex.c regex.h getopt.h getopt.c getopt1.c random.c - -COPIES = missing/system.c missing/tzset.c \ - missing/memcmp.c missing/memcpy.c missing/memset.c \ - missing/strncasecmp.c missing/strchr.c \ - missing/strerror.c missing/strtod.c \ - missing/strftime.c missing/strftime.3 - -DOCS= doc/gawk.1 doc/gawk.texi doc/texinfo.tex - -TEXFILES= doc/gawk.aux doc/gawk.cp doc/gawk.cps doc/gawk.fn doc/gawk.fns \ - doc/gawk.ky doc/gawk.kys doc/gawk.pg doc/gawk.pgs doc/gawk.toc \ - doc/gawk.tp doc/gawk.tps doc/gawk.vr doc/gawk.vrs - -MISC = NEWS COPYING FUTURES Makefile.in PROBLEMS README PORTS POSIX.STD \ - configure configure.in acconfig.h configh.in ACKNOWLEDGMENT \ - ChangeLog INSTALL LIMITATIONS install-sh mkinstalldirs aclocal.m4 \ - stamp-h.in - -OTHERS= amiga doc pc atari vms README_d posix awklib - -ALLDOC= doc/gawk.dvi $(TEXFILES) doc/gawk.info* - -MAKEFILEIN = Makefile.in awklib/Makefile.in doc/Makefile.in test/Makefile.in - -# Release of gawk. There can be no leading or trailing white space here! -REL=3.0 - -# clear out suffixes list -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) -c $(COMPFLAGS) $< - -# rules to build gawk -all: $(GAWK) awklib/all - -alldoc: all doc/all - -$(GAWK): $(ALLOBJS) $(LIBOBJS) $(REOBJS) - $(CC) -o $(GAWK) $(COMPFLAGS) $(LDFLAGS) $(ALLOBJS) $(LIBOBJS) \ - $(REOBJS) $(LIBS) - -$(ALLOBJS): awk.h dfa.h regex.h config.h custom.h - -$(LIBOBJS): config.h custom.h - -gawkmisc.o: $(srcdir)/atari/gawkmisc.atr - $(CC) -c $(COMPFLAGS) -DDEFPATH='$(DEFPATH)' $(srcdir)/gawkmisc.c - -# this rule needed or not - depending on your library -missing.o io.o: - $(CC) -c $(COMPFLAGS) -DPIPES_SIMULATED $(srcdir)/$< - -# cheat with defines to force an inclusion of a proper code -getopt.o: getopt.h - $(CC) $(CFLAGS) -D_LIBC -D__alloca=__builtin_alloca -c getopt.c - -getopt.o: getopt.h - -getopt1.o: getopt.h - -random.o: random.h - -main.o: patchlevel.h - -awktab.c: awk.y - $(YACC) -v $(srcdir)/awk.y && \ - if test -f y.tab.c ; then mv y.tab.c ytab.c ; else true ; fi && \ - sed '/^extern char .malloc(), .realloc();$$/d' ytab.c >awktab.c && \ - rm ytab.c - -# VMS POSIX make won't apply the default .c.o rule to awktab.o for some reason -awktab.o: awktab.c awk.h - $(CC) -c $(COMPFLAGS) $(srcdir)/awktab.c - -alloca.o: alloca.c - -install: $(GAWK) info installdirs - $(INSTALL_PROGRAM) $(GAWK) $(bindir) && chmod 755 $(bindir)/$(GAWK) - cd awklib && $(MMAKE) install - -installdirs: mkinstalldirs - $(srcdir)/mkinstalldirs $(bindir) $(datadir) \ - $(libdir) $(infodir) $(mandir) $(libexecdir) - -installdoc: info - cd doc && $(MMAKE) install - -# -#installtotal: installdirs install installdoc - -uninstall: - rm -f $(bindir)/$(GAWK) - cd awklib && $(MMAKE) uninstall - -rmdir $(datadir) $(libexecdir) -# cd doc && $(MMAKE) uninstall - -clean: - rm -rf $(GAWK) *.o core y.output - cd awklib && $(MMAKE) clean -# the following does not always make sense (when crosscompiling) -# cd test && $(MAKE) $(MFLAGS) clean -# cd doc && $(MAKE) $(MFLAGS) clean - -local-distclean: - rm -f Makefile *.orig *.rej */*.orig */*.rej awk.output \ - gmon.out make.out config.h config.status config.cache \ - config.log stamp-h *~ - -distclean: clean local-distclean - cd doc && $(MMAKE) distclean - cd awklib && $(MMAKE) distclean - cd test && $(MMAKE) distclean - -maintainer-clean: clean local-distclean - @echo "This command is intended for maintainers to use; it" - @echo "deletes files that may require special tools to rebuild." - rm -f awktab.c TAGS tags - cd doc && $(MMAKE) maintainer-clean -# cd test && $(MMAKE) maintainer-clean -# cd awklib && $(MMAKE) maintainer-clean - -clobber: maintainer-clean - -TAGS: - etags $(AWKSRC) - -tags: - ctags $(AWKSRC) - -dvi: $(srcdir)/doc/gawk.texi - cd doc && $(MMAKE) dvi - -info: $(srcdir)/doc/gawk.texi - cd doc && $(MMAKE) info - -doc/all: - cd doc && $(MMAKE) all - -awklib/all: - cd awklib && $(MMAKE) all - -# to run this target you have to adjust test/Makefile quite a bit -# in order to make it palatable to your shell -# -check: $(GAWK) - cd test; $(MMAKE) -k - -test: check - diff -Nru gawk-3.1.8+dfsg/unsupported/atari/README.1st gawk-4.0.1+dfsg/unsupported/atari/README.1st --- gawk-3.1.8+dfsg/unsupported/atari/README.1st 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/README.1st 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -Tue Nov 7 14:19:41 2000 - -The atari port is no longer supported. If you have an atari, -you are welcome to try and use the port here, but we no longer have -the hardware to test gawk on. diff -Nru gawk-3.1.8+dfsg/unsupported/atari/config.h gawk-4.0.1+dfsg/unsupported/atari/config.h --- gawk-3.1.8+dfsg/unsupported/atari/config.h 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,190 +0,0 @@ -/* - * Sample configuration file for ST - works with gcc and TOS libraries; - * revise for your configuration if configure script does not work - */ -/* - * config.h -- configuration definitions for gawk. - */ - -/* - * Copyright (C) 1995, 1996 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* Define if using alloca.c. */ -/* #undef C_ALLOCA */ - -/* Define if type char is unsigned and you are not using gcc. */ -#ifndef __CHAR_UNSIGNED__ -/* #undef __CHAR_UNSIGNED__ */ -#endif - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define to the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ -#define GETGROUPS_T gid_t - -/* Define if the `getpgrp' function takes no argument. */ -#define GETPGRP_VOID 1 - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define if you have alloca, as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define if you have and it should be used (not on Ultrix). */ -/* #undef HAVE_ALLOCA_H */ - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define if your struct stat has st_blksize. */ -#define HAVE_ST_BLKSIZE 1 - -/* Define if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define if your struct tm has tm_zone. */ -/* #undef HAVE_TM_ZONE */ - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -/* #undef HAVE_TZNAME */ - -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - -/* Define if on MINIX. */ -/* #undef _MINIX */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define if you need to in order for stat and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* 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 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if your declares struct tm. */ -#define TM_IN_SYS_TIME 1 - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -#define HAVE_STRINGIZE 1 /* can use ANSI # operator in cpp */ -/* #undef REGEX_MALLOC */ /* use malloc instead of alloca in regex.c */ -#define SPRINTF_RET int /* return type of sprintf */ - -/* Define if you have the fmod function. */ -#define HAVE_FMOD 1 - -/* Define if you have the getpagesize function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if you have the madvise function. */ -/* #undef HAVE_MADVISE */ - -/* Define if you have the memcmp function. */ -#define HAVE_MEMCMP 1 - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the memset function. */ -#define HAVE_MEMSET 1 - -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 - -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* Define if you have the strftime function. */ -#define HAVE_STRFTIME 1 - -/* Define if you have the strncasecmp function. */ -/* #undef HAVE_STRNCASECMP */ - -/* Define if you have the strtod function. */ -#define HAVE_STRTOD 1 - -/* Define if you have the system function. */ -/* This is a white lie - but you may or may not prefer this way */ -/* #define HAVE_SYSTEM 1 */ - -/* Define if you have the tzset function. */ -#define HAVE_TZSET 1 - -/* Define if you have the valloc function. */ -/* #undef HAVE_VALLOC */ - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SIGNUM_H */ - -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -#include /* overrides for stuff autoconf can't deal with */ diff -Nru gawk-3.1.8+dfsg/unsupported/atari/gawkmisc.atr gawk-4.0.1+dfsg/unsupported/atari/gawkmisc.atr --- gawk-3.1.8+dfsg/unsupported/atari/gawkmisc.atr 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/gawkmisc.atr 1970-01-01 00:00:00.000000000 +0000 @@ -1,177 +0,0 @@ -/* - * gawkmisc.atr --- miscellaneous gawk routines that are OS specific. - */ - -/* - * Copyright (C) 1986, 1988, 1989, 1991-1996 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Progamming 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -char quote = '\''; -#ifndef DEFPATH -char *defpath = ".,c:\\lib\\awk,c:\\gnu\\lib\\awk"; -#else -char *defpath = DEFPATH; -#endif -char envsep = ','; - - -/* gawk_name --- pull out the "gawk" part from how the OS called us */ - -char * -gawk_name(filespec) -const char *filespec; -{ - char *p, *q; - - p = (char *)filespec; - - if ((q = strrchr(p, '\\')) != NULL) - p = q + 1; - if ((q = strrchr(p, '/')) != NULL) - p = q + 1; - if ((q = strchr(p, '.')) != NULL) - *q = '\0'; - strlwr(p); - - return (p == NULL ? (char *)filespec : (char *)p); -} - -/* os_arg_fixup --- fixup the command line */ - -void -os_arg_fixup(argcp, argvp) -int *argcp; -char ***argvp; -{ - /* no-op */ - return; -} - -/* os_devopen --- open special per-OS devices */ - -int -os_devopen(name, flag) -const char *name; -int flag; -{ - /* no-op */ - return INVALID_HANDLE; -} - -/* optimal_bufsize --- determine optimal buffer size */ - -size_t -optimal_bufsize(fd, stb) -int fd; -struct stat *stb; -{ - /* force all members to zero in case OS doesn't use all of them. */ - memset(stb, '\0', sizeof(struct stat)); - - /* The atari has the st_blksize structure, so we just use it. */ -#define DEFBLKSIZE (stb->st_blksize ? stb->st_blksize : BUFSIZ) - - /* - * On ST redirected stdin does not have a name attached - * (this could be hard to do to) and fstat would fail - */ - if (fd == 0) - return BUFSIZ; - 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; - return DEFBLKSIZE; -} - -/* ispath --- return true if path has directory components */ - -int -ispath(file) -const char *file; -{ - return (strchr(file, '/') != NULL || strchr(file, '\\') != NULL); -} - -/* isdirpunct --- return true if char is a directory separator */ - -int -isdirpunct(c) -int c; -{ - return (c == '/' || c == '\\'); -} - -/* os_close_on_exec --- set close on exec flag, print warning if fails */ - -void -os_close_on_exec(fd, name, what, dir) -int fd; -const char *name, *what, *dir; -{ - if (fcntl(fd, F_SETFD, 1) < 0) - warning("%s %s `%s': could not set close-on-exec: %s", - what, dir, name, strerror(errno)); -} - -/* os_isdir --- is this an fd on a directory? */ - -#if ! defined(S_ISDIR) && defined(S_IFDIR) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - -int -os_isdir(fd) -int fd; -{ - struct stat sbuf; - - return (fstat(fd, &sbuf) == 0 && S_ISDIR(sbuf.st_mode)); -} - -/* os_is_setuid --- true if running setuid root */ - -int -os_is_setuid() -{ - return 0; -} - -/* os_setbinmode --- set binary mode on file */ - -int -os_setbinmode (fd, mode) -int fd, mode; -{ - return 0; -} - -/* os_restore_mode --- restore the original mode of the console device */ - -void -os_restore_mode (fd) -int fd; -{ - /* no-op */ - return; -} diff -Nru gawk-3.1.8+dfsg/unsupported/atari/redirect.h gawk-4.0.1+dfsg/unsupported/atari/redirect.h --- gawk-3.1.8+dfsg/unsupported/atari/redirect.h 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/redirect.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -/* - * redirect.h --- definitions for functions that are OS specific. - */ - -/* - * Copyright (C) 1986, 1988, 1989, 1991-1993 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* This file is already conditioned on atarist in awk.h */ - -#define read _text_read /* we do not want all these CR's to mess our input */ -extern int _text_read(int, char *, int); -#ifndef __MINT__ -#undef NGROUPS_MAX -#endif /* __MINT__ */ diff -Nru gawk-3.1.8+dfsg/unsupported/atari/stack.c gawk-4.0.1+dfsg/unsupported/atari/stack.c --- gawk-3.1.8+dfsg/unsupported/atari/stack.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/stack.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -/* - * This value indicates an amount of reserved memory for a stack - * in executables - see source of a startup code for details. - * It can be changed without recompilation with fixstk.ttp utility. - */ -long _stksize = 2L; /* keep half of memory */ diff -Nru gawk-3.1.8+dfsg/unsupported/atari/system.c gawk-4.0.1+dfsg/unsupported/atari/system.c --- gawk-3.1.8+dfsg/unsupported/atari/system.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/system.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -/* - * function system() - slightly modified from sources dLibs 1.2 - * - a freely distributable C library for Atari ST. - * Authors: Dale Schumacher and John Stanley, I believe. - * Changes for gcc compiler and gnulib.olb - Michal Jaegermann - */ - -#include -#include -#include -#include -#ifdef __GNUC__ -#include -#define ERROR 2 -#endif - -/* #define DEBUG */ -#ifdef DEBUG -#define _COOKIE(x) puts(x);putchar('\n') -#endif - -static void -parse_args(char *cmdln, register char **argv) -{ - register char *p; - static char delim[] = " \t\r\n"; - - if(NULL != (p = strtok(cmdln, delim))) { - do { - *argv++ = p; - } while(NULL != (p = strtok(NULL, delim))); - } -} - -#ifdef __GNUC__ -/* this is used by assembler statement to keep a copy of registers */ -static volatile long savearea[16]; -#endif - -int -system(const char *command) -{ - register char *p; - register int (*shell)(); -#ifndef __GNUC__ - char rv[2]; -#endif - char cmdln[1024]; - char *args[64]; - char *getenv(const char *); - - if(!command) - return(ERROR); - - /* get _shell_p value */ - p = (char *) Super(0L); /* supervisor mode */ - shell = (int (*)()) *((long *) 0x4F6L); - (void) Super(p); /* restore user mode */ - - /* validate _shell_p */ - if((shell) && /* Shell available. */ - (((long) shell) < ((long) _base)) && /* Reasonable shell pointer. */ - (strncmp((char *)shell, "PATH", 4))) /* Not corrupted */ - { -#ifdef __GNUC__ - int ret; -#endif - /* execute the command */ -#ifdef DEBUG -_COOKIE("system: using _shell_p"); -printf("'shell' got value 0x%08lx\n", (long)shell); -#endif -/* a bit of paranoia caused by some misbehaving programs */ -#ifdef __GNUC__ -asm("moveml d1-d7/a0-a7,_savearea"); - ret = (*shell)(command); -asm("moveml _savearea,d1-d7/a0-a7"); - return (ret); -#else - return ((*shell)(command)); -#endif - } - - strcpy(cmdln, command); /* copy the command line for parsing */ - - if((p = getenv("SHELL")) && (*p)) /* SHELL= variable? */ - { - args[0] = p; - parse_args(cmdln, (args + 1)); -#ifdef DEBUG -_COOKIE("system: executing SHELL"); -_COOKIE(p); -#endif - } - else /* attempt to find first token as a program on the path */ - { - parse_args(cmdln, args); - p = args[0]; -#ifdef DEBUG -_COOKIE("system: directly executing program"); -_COOKIE(p); -#endif - } - -#ifdef __GNUC__ - return(spawnvp(0, p, args)); -#else /* original from dLibs */ - forkvpe(p, args, NULL); - wait(rv); - return((rv[1] == 0) ? rv[0] : rv[1]); -#endif -} diff -Nru gawk-3.1.8+dfsg/unsupported/atari/tmpnam.c gawk-4.0.1+dfsg/unsupported/atari/tmpnam.c --- gawk-3.1.8+dfsg/unsupported/atari/tmpnam.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/atari/tmpnam.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -#ifdef PIPES_SIMULATED -/* tmpnam.c : return a temporary file name */ -/* written by Eric R. Smith and placed in the public domain */ -/** - * - modified for gawk needs - pattern /$$XXXXXX from the original - * code creates names which are hard to remove when somethig - * goes wrong - * - returned name can be passed outside via system(); other programs - * may not dig '/' as a path separator - * - somehow more frugal in a memory use - * (mj - October 1990) - **/ -#include -#include -#include - -extern char * getenv(const char *); -extern char * mktemp(char *); -char * tempnam(const char *path, const char *base); -static char pattern[] = "\\gwkXXXXX"; - -char *tmpnam(buf) - char *buf; -{ - char *tmpdir; - - if (!(tmpdir = getenv("TEMP")) && !(tmpdir = getenv("TMPDIR"))) - tmpdir = "."; - - if (!buf) { - size_t blen; - - blen = strlen (tmpdir) + sizeof(pattern); - if (NULL == (buf = malloc(blen))) - return NULL; - } - (void) strcat(strcpy(buf, tmpdir), pattern); - return(mktemp(buf)); -} - -/* used by gawk_popen() */ -char *tempnam(path, base) -const char *path, *base; /* ignored */ -{ - return tmpnam(NULL); -} -#endif /* PIPES_SIMULATED */ diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/ChangeLog gawk-4.0.1+dfsg/unsupported/tandem/ChangeLog --- gawk-3.1.8+dfsg/unsupported/tandem/ChangeLog 2010-05-06 17:56:34.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/ChangeLog 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins - - * Release 3.1.8: Release tar file made. - -Tue Jul 21 22:28:56 2009 Arnold D. Robbins - - * Release 3.1.7: Release tar file made. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -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. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Sun Jan 28 15:50:02 2001 Eli Zaretskii - - * tmisc.c (os_restore_mode): New function - -Sun Dec 3 16:53:37 2000 Arnold D. Robbins - - * tmisc.c (os_setbinmode): new function. - -Tue Nov 7 14:09:14 2000 Arnold D. Robbins - - * tmisc.c (os_is_setuid): new function. - -Tue Jun 1 14:09:36 1999 Arnold D. Robbins - - Sync with changes in 3.0.4 for non-Unix popen/pclose - * popen.h: add defines for popen and pclose. - * config.h: add define for HAVE_POPEN_H. - -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - * Close-on-exec changes: - tmisc.c: (os_close_on_exec, os_isdir): new functions. - -Mon Jul 27 11:40:00 1997 Arnold D. Robbins - - * Initial integration of Tandem stuff into gawk source tree. diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/compit gawk-4.0.1+dfsg/unsupported/tandem/compit --- gawk-3.1.8+dfsg/unsupported/tandem/compit 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/compit 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -?TACL MACRO #FRAME #PUSH #INLINEPREFIX #SET #INLINEPREFIX + == == Compile the bits == c /in allocac, out allocax/allocao; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in arrayc, out arrayx/arrayo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in builtinc, out builtinx/builtino; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in dfac, out dfax/dfao; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in evalc, out evalx/evalo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in fieldc, out fieldx/fieldo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in gawkmisc, out gawkmisx/gawkmiso; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in getoptc, out getoptx/getopto; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in getopt1c, out getopt1x/getopt1o;symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in ioc, out iox/ioo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in isattyc, out isattyx/isattyo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in mainc, out mainx/maino; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in missingc, out missingx/missingo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in msgc, out msgx/msgo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in nodec, out nodex/nodeo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in popenc, out popenx/popeno; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in rec, out rex/reo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in regexc, out regexx/regexo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in awktabc, out tawktabx/tawktabo; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" c /in versionc, out versionx/versiono; symbols,WIDE,define TANDEM,define HAVE_CONFIG_H,SSV0 "$system.system",SSV1 "[#defaults]" == == then bind them == bind/inline,out bindout/ + select runnable object on + select check parameter off + select list * off + select fixups on + select search $system.system.cwide + add * from arrayo + add * from allocao + add * from builtino + add * from dfao + add * from evalo + add * from fieldo + add * from gawkmiso + add * from getopto + add * from getopt1o + add * from ioo + add * from isattyo + add * from maino + add * from missingo + add * from msgo + add * from nodeo + add * from popeno + add * from reo + add * from regexo + add * from tawktabo + add * from versiono + set heap 5000 pages + build awk + file awk + info unresolved * + list * INLEOF #UNFRAME \ No newline at end of file diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/config.h gawk-4.0.1+dfsg/unsupported/tandem/config.h --- gawk-3.1.8+dfsg/unsupported/tandem/config.h 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,209 +0,0 @@ -/* config.h. Generated automatically by configure. */ -/* configh.in. Generated automatically from configure.in by autoheader. */ -/* - * acconfig.h -- configuration definitions for gawk. - */ - -/* - * Copyright (C) 1995-1997 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Progamming 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -/* Define 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 - -/* Define if using alloca.c. */ -#define C_ALLOCA - -/* Define if type char is unsigned and you are not using gcc. */ -#ifndef __CHAR_UNSIGNED__ -#define __CHAR_UNSIGNED__ -#endif - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* 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 the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ -#define GETGROUPS_T gid_t - -/* Define if the `getpgrp' function takes no argument. */ -#define GETPGRP_VOID 1 - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define if you have alloca, as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if your struct stat has st_blksize. */ -/* #define HAVE_ST_BLKSIZE 1 */ - -/* Define if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define if your struct tm has tm_zone. */ -/* #undef HAVE_TM_ZONE */ - -/* Define if you don't have tm_zone but do have the external array - tzname. */ -#define HAVE_TZNAME 1 - -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - -/* Define if on MINIX. */ -/* #undef _MINIX */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define if you need to in order for stat and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* 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 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if your declares struct tm. */ -/* #undef TM_IN_SYS_TIME */ - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -#define HAVE_STRINGIZE 1 /* can use ANSI # operator in cpp */ -#define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */ -#define SPRINTF_RET int /* return type of sprintf */ -/* #undef BITOPS */ /* bitwise ops (undocumented feature) */ -/* #undef NONDECDATA */ /* non-decimal input data (undocumented feature) */ -/* #undef HAVE_MKTIME */ /* we have the mktime function */ - -/* Define if you have the fmod function. */ -#define HAVE_FMOD - -/* Define if you have the memcmp function. */ -#define HAVE_MEMCMP 1 - -/* Define if you have the memcpy function. */ -#define HAVE_MEMCPY 1 - -/* Define if you have the memset function. */ -#define HAVE_MEMSET 1 - -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 - -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 - -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* Define if you have the strftime function. */ -#define HAVE_STRFTIME 1 - -/* Define if you have the strncasecmp function. */ -/* Tandem doesn't have it but the file name is too long, so pretend here - and do it properly at the end of this file */ -#define HAVE_STRNCASECMP 1 - -/* Define if you have the strtod function. */ -#define HAVE_STRTOD 1 - -/* Define if you have the system function. */ -#define HAVE_SYSTEM 1 - -/* Define if you have the tzset function. */ -#define HAVE_TZSET 1 - -/* Define if you have the header file. */ -/* #undef HAVE_FCNTL_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_LIMITS_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_LOCALE_H */ - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SIGNUM_H */ - -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H 1 - -/* Define if you have the m library (-lm). */ -/* #undef HAVE_LIBM */ - -#define HAVE_POPEN_H 1 - -#include /* overrides for stuff autoconf can't deal with */ diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/getid.c gawk-4.0.1+dfsg/unsupported/tandem/getid.c --- gawk-3.1.8+dfsg/unsupported/tandem/getid.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/getid.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -#if defined _MSC_VER || defined TANDEM - -#ifndef TANDEM -#ifdef OS2 -# define INCL_DOSPROCESS -# include -# if _MSC_VER == 510 -# define DosGetPID DosGetPid -# endif -#else -# include -#endif - -#ifdef OS2 -int getpid(void) -{ - PIDINFO PidInfo; - - DosGetPID(&PidInfo); - return(PidInfo.pid); -} -#endif - -int getppid(void) -{ -#ifdef OS2 - PIDINFO PidInfo; - - DosGetPID(&PidInfo); - return(PidInfo.pidParent); -#else - return(0); -#endif -} - -#endif /* TANDEM */ -#ifdef TANDEM -unsigned int getuid (void) -{ - short cret; - short cwd,pwd; - - cret = PROCESS_GETINFO_(,,,,,,,,,,&cwd,&pwd); - return ((unsigned int) (cwd & 255)); -} - -unsigned int geteuid (void) -{ - short cret; - short cwd,pwd; - - cret = PROCESS_GETINFO_(,,,,,,,,,,&cwd,&pwd); - return ((unsigned int) (pwd & 255)); -} - -unsigned int getgid (void) -{ - short cret; - short cwd,pwd; - - cret = PROCESS_GETINFO_(,,,,,,,,,,&cwd,&pwd); - return ((unsigned int) ((cwd >> 8) & 255)); -} - -unsigned int getegid (void) -{ - short cret; - short cwd,pwd; - - cret = PROCESS_GETINFO_(,,,,,,,,,,&cwd,&pwd); - return ((unsigned int) ((pwd >> 8) & 255)); -} - -int getpid(void) -{ - return (0); -} - -int getppid(void) -{ - return (0); -} - -#else -unsigned int getuid (void) -{ - return (0); /* root! */ -} - - -unsigned int geteuid (void) -{ - return (0); -} - - -unsigned int getgid (void) -{ - return (0); -} - - -unsigned int getegid (void) -{ - return (0); -} - - -char *getlogin (void) -{ - return ("root"); -} - -#endif /* TANDEM */ -#endif - -int getpgrp(void) -{ - return (0); -} diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/isatty.c gawk-4.0.1+dfsg/unsupported/tandem/isatty.c --- gawk-3.1.8+dfsg/unsupported/tandem/isatty.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/isatty.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#include -#include -#include - -int isatty(int fd) -{ - short cret,sfd,typ[5]; - sfd = (short) fd; - cret = FILE_GETINFO_(sfd,,,,,&typ[0]); - if(typ[0] == 6) - return (1); - else - return (0); -} -int dup(int fd) -{ - return (fd); -} -int dup2(int fd, int fd2) -{ - return (0); -} diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/popen.c gawk-4.0.1+dfsg/unsupported/tandem/popen.c --- gawk-3.1.8+dfsg/unsupported/tandem/popen.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/popen.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -#include "popen.h" -#include -#if !defined(TANDEM) -#include -#else -#include "config.h" -#include -#endif -#include -#if !defined(TANDEM) -#include -#endif - -#ifdef OS2 -#ifdef _MSC_VER -#define popen(c,m) _popen(c,m) -#define pclose(f) _pclose(f) -#endif -#endif - -#ifndef _NFILE -#define _NFILE 40 -#endif - -static char template[] = "piXXXXXX"; -typedef enum { unopened = 0, reading, writing } pipemode; -static -struct { - char *command; - char *name; - pipemode pmode; -} pipes[_NFILE]; - -FILE * -os_popen( char *command, char *mode ) { - FILE *current; - char *name; - int cur; - pipemode curmode; - -#if defined(OS2) && (_MSC_VER != 510) - if (_osmode == OS2_MODE) - return(popen(command, mode)); -#endif - - /* - ** decide on mode. - */ - if(strcmp(mode,"r") == 0) - curmode = reading; - else if(strcmp(mode,"w") == 0) - curmode = writing; - else - return NULL; - /* - ** get a name to use. - */ - if((name = tempnam(".","pip"))==NULL) - return NULL; - /* - ** If we're reading, just call system to get a file filled with - ** output. - */ - if(curmode == reading) { - if ((cur = dup(fileno(stdout))) == -1) - return NULL; - if ((current = freopen(name, "w", stdout)) == NULL) - return NULL; - system(command); - if (dup2(cur, fileno(stdout)) == -1) - return NULL; - close(cur); - if((current = fopen(name,"r")) == NULL) - return NULL; - } else { - if((current = fopen(name,"w")) == NULL) - return NULL; - } - cur = fileno(current); - pipes[cur].name = name; - pipes[cur].pmode = curmode; - pipes[cur].command = strdup(command); - return current; -} - -int -os_pclose( FILE * current) { - int cur = fileno(current),rval; - -#if defined(OS2) && (_MSC_VER != 510) - if (_osmode == OS2_MODE) - return(pclose(current)); -#endif - - /* - ** check for an open file. - */ - if(pipes[cur].pmode == unopened) - return -1; - if(pipes[cur].pmode == reading) { - /* - ** input pipes are just files we're done with. - */ - rval = fclose(current); - unlink(pipes[cur].name); - } else { - /* - ** output pipes are temporary files we have - ** to cram down the throats of programs. - */ - char command[256]; - fclose(current); -#if defined(TANDEM) - sprintf(command,"%s /IN %s/",pipes[cur].command,pipes[cur].name); -#else - sprintf(command,"%s < %s",pipes[cur].command,pipes[cur].name); -#endif - rval = system(command); - unlink(pipes[cur].name); - } - /* - ** clean up current pipe. - */ - pipes[cur].pmode = unopened; - free(pipes[cur].name); - free(pipes[cur].command); - return rval; -} diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/popen.h gawk-4.0.1+dfsg/unsupported/tandem/popen.h --- gawk-3.1.8+dfsg/unsupported/tandem/popen.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/popen.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -/* - -** popen.h -- prototypes for pipe functions - -*/ - -#if !defined(FILE) - -#include - -#endif - - - -extern FILE *os_popen( char *, char * ); - -extern int os_pclose( FILE * ); - -#define popen os_popen -#define pclose os_close diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/strdup.c gawk-4.0.1+dfsg/unsupported/tandem/strdup.c --- gawk-3.1.8+dfsg/unsupported/tandem/strdup.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/strdup.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -/* - * strdup --- duplicate a string - * - * We supply this routine for those systems that aren't standard yet. - */ - -char * -strdup (str) -register const char *str; -{ - char *p; - - p=(char *)malloc(strlen(str)+1); - return strcpy(p,str); -} diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/strnchk.c gawk-4.0.1+dfsg/unsupported/tandem/strnchk.c --- gawk-3.1.8+dfsg/unsupported/tandem/strnchk.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/strnchk.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strcasecmp.c 5.6 (Berkeley) 6/27/88"; -#endif /* LIBC_SCCS and not lint */ - -#ifdef atarist -#include -#else -#define u_char unsigned char -#endif - -/* - * This array is designed for mapping upper and lower case letter - * together for a case independent comparison. The mappings are - * based upon ascii character sequences. - */ -static u_char charmap[] = { - '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', - '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', - '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', - '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', - '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', - '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', - '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', - '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', - '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', - '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', - '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', - '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', - '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', - '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', - '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', - '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', - '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', - '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', - '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', - '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', - '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', - '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', - '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', - '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', - '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327', - '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337', - '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', - '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', -}; - -int -strcasecmp(s1, s2) - const char *s1, *s2; -{ - register u_char *cm = charmap, - *us1 = (u_char *)s1, - *us2 = (u_char *)s2; - - while (cm[*us1] == cm[*us2++]) - if (*us1++ == '\0') - return(0); - return(cm[*us1] - cm[*--us2]); -} - -int -strncasecmp(s1, s2, n) - const char *s1, *s2; - register size_t n; -{ - register u_char *cm = charmap, - *us1 = (u_char *)s1, - *us2 = (u_char *)s2; - - while ((long)(--n) >= 0 && cm[*us1] == cm[*us2++]) - if (*us1++ == '\0') - return(0); - return((long)n < 0 ? 0 : cm[*us1] - cm[*--us2]); -} diff -Nru gawk-3.1.8+dfsg/unsupported/tandem/tmisc.c gawk-4.0.1+dfsg/unsupported/tandem/tmisc.c --- gawk-3.1.8+dfsg/unsupported/tandem/tmisc.c 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/unsupported/tandem/tmisc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ - -/* os_close_on_exec --- set close on exec flag, print warning if fails */ - -void -os_close_on_exec(fd, name, what, dir) -int fd; -char *name, *what, *dir; -{ - /* no-op */ -} - -/* os_isdir --- is this an fd on a directory? */ - -#if ! defined(S_ISDIR) && defined(S_IFDIR) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - -int -os_isdir(fd) -int fd; -{ - struct stat sbuf; - - return (fstat(fd, &sbuf) == 0 && S_ISDIR(sbuf.st_mode)); -} -/* - * gawkmisc.c --- miscellanious gawk routines that are OS specific. - */ - -/* - * Copyright (C) 1986, 1988, 1989, 1991 - 95 the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Progamming 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -char quote = '"'; -char envsep = ';'; -char *defpath = ""; - -/* gawk_name --- pull out the "gawk" part from how the OS called us */ - -char * -gawk_name(filespec) -const char *filespec; -{ - char *p, *q; - - p = (char *) filespec; /* Sloppy... */ - - if ((q = strrchr(p, '.')) != NULL) - p = q + 1; - return p; -} - -/* os_arg_fixup --- fixup the command line */ - -void -os_arg_fixup(argcp, argvp) -int *argcp; -char ***argvp; -{ - return; -} - -/* os_devopen --- open special per-OS devices */ - -int -os_devopen(name, flag) -const char *name; -int flag; -{ - /* no-op */ - return -1; -} - -/* optimal_bufsize --- determine optimal buffer size */ - -size_t -optimal_bufsize(fd, stb) -int fd; -struct stat *stb; -{ - /* - * TANDEM doesn't have a stat function. - * So we just return 4096 which is the Tandem disk block size. - */ - - /* set all members to zero. */ - - memset(stb, '\0', sizeof(struct stat)); - - /* set file size to arbitrary non-zero value. */ - stb->st_size = 1; - - return 4096; -} - -/* ispath --- return true if path has directory components */ - -int -ispath(file) -const char *file; -{ - for (; *file; file++) { - switch (*file) { - case '.': - return 1; - } - } - return 0; -} - -/* isdirpunct --- return true if char is a directory separator */ - -int -isdirpunct(c) -int c; -{ - return (strchr(".\\", c) != NULL); -} - -void -initstate(i, j, k) -unsigned i; -char * j; -int k; -{ -} - -void setstate(i) -char * i; -{ -} - -/* os_close_on_exec --- set close on exec flag, print warning if fails */ - -void -os_close_on_exec(fd, name, what, dir) -int fd; -char *name, *what, *dir; -{ - /* no-op */ -} - -/* os_isdir --- is this an fd on a directory? */ - -/* can't do this on tandem, so just assume it's not a directory */ - -int -os_isdir(fd) -int fd; -{ - return 0; -} - -/* os_is_setuid --- true if running setuid root */ - -int -os_is_setuid() -{ - return 0; -} - -/* os_setbinmode --- set binary mode on file */ - -int -os_setbinmode (fd, mode) -int fd, mode; -{ - return 0; -} - -/* os_restore_mode --- restore the original mode of the console device */ - -void -os_restore_mode (fd) -int fd; -{ - /* no-op */ - return; -} diff -Nru gawk-3.1.8+dfsg/version.c gawk-4.0.1+dfsg/version.c --- gawk-3.1.8+dfsg/version.c 2010-05-06 17:56:17.000000000 +0000 +++ gawk-4.0.1+dfsg/version.c 2012-03-28 20:03:34.000000000 +0000 @@ -1,55 +1,3 @@ #include "config.h" -const char *version_string = "@(#)GNU Awk 3.1.8"; - -/* 1.02 fixed /= += *= etc to return the new Left Hand Side instead - of the Right Hand Side */ - -/* 1.03 Fixed split() to treat strings of space and tab as FS if - the split char is ' '. - - Added -v option to print version number - - Fixed bug that caused rounding when printing large numbers */ - -/* 2.00beta Incorporated the functionality of the "new" awk as described - the book (reference not handy). Extensively tested, but no - doubt still buggy. Badly needs tuning and cleanup, in - particular in memory management which is currently almost - non-existent. */ - -/* 2.01 JF: Modified to compile under GCC, and fixed a few - bugs while I was at it. I hope I didn't add any more. - I modified parse.y to reduce the number of reduce/reduce - conflicts. There are still a few left. */ - -/* 2.02 Fixed JF's bugs; improved memory management, still needs - lots of work. */ - -/* 2.10 Major grammar rework and lots of bug fixes from David. - Major changes for performance enhancements from David. - A number of minor bug fixes and new features from Arnold. - Changes for MSDOS from Conrad Kwok and Scott Garfinkle. - The gawk.texinfo and info files included! */ - -/* 2.11 Bug fix release to 2.10. Lots of changes for portability, - speed, and configurability. */ - -/* 2.12 Lots of changes for portability, speed, and configurability. - Several bugs fixed. POSIX compliance. Removal of last set - of hard-wired limits. Atari and VMS ports added. */ - -/* 2.13 Public release of 2.12 */ - -/* 2.14 Mostly bug fixes. */ - -/* 2.15 Bug fixes plus intermixing of command-line source and files, - GNU long options, ARGIND, ERRNO and Plan 9 style /dev/ files. - `delete array'. OS/2 port added. */ - -/* 3.0 RS as regexp, RT variable, FS = "", fflush builtin, posix - regexps, IGNORECASE applies to all comparison, autoconf, source - code cleanup. See the NEWS file. */ - -/* 3.1 PROCINFO array, LINT variable, mktime builtin, BINMODE variable, - |&, tcp/ip, i18n stuff. Automake. See NEWS. */ +const char *version_string = "GNU Awk 4.0.1"; diff -Nru gawk-3.1.8+dfsg/version.in gawk-4.0.1+dfsg/version.in --- gawk-3.1.8+dfsg/version.in 2006-08-11 12:05:47.000000000 +0000 +++ gawk-4.0.1+dfsg/version.in 2011-06-17 08:07:24.000000000 +0000 @@ -1,55 +1,3 @@ #include "config.h" -const char *version_string = "@(#)@PACKAGE_STRING@"; - -/* 1.02 fixed /= += *= etc to return the new Left Hand Side instead - of the Right Hand Side */ - -/* 1.03 Fixed split() to treat strings of space and tab as FS if - the split char is ' '. - - Added -v option to print version number - - Fixed bug that caused rounding when printing large numbers */ - -/* 2.00beta Incorporated the functionality of the "new" awk as described - the book (reference not handy). Extensively tested, but no - doubt still buggy. Badly needs tuning and cleanup, in - particular in memory management which is currently almost - non-existent. */ - -/* 2.01 JF: Modified to compile under GCC, and fixed a few - bugs while I was at it. I hope I didn't add any more. - I modified parse.y to reduce the number of reduce/reduce - conflicts. There are still a few left. */ - -/* 2.02 Fixed JF's bugs; improved memory management, still needs - lots of work. */ - -/* 2.10 Major grammar rework and lots of bug fixes from David. - Major changes for performance enhancements from David. - A number of minor bug fixes and new features from Arnold. - Changes for MSDOS from Conrad Kwok and Scott Garfinkle. - The gawk.texinfo and info files included! */ - -/* 2.11 Bug fix release to 2.10. Lots of changes for portability, - speed, and configurability. */ - -/* 2.12 Lots of changes for portability, speed, and configurability. - Several bugs fixed. POSIX compliance. Removal of last set - of hard-wired limits. Atari and VMS ports added. */ - -/* 2.13 Public release of 2.12 */ - -/* 2.14 Mostly bug fixes. */ - -/* 2.15 Bug fixes plus intermixing of command-line source and files, - GNU long options, ARGIND, ERRNO and Plan 9 style /dev/ files. - `delete array'. OS/2 port added. */ - -/* 3.0 RS as regexp, RT variable, FS = "", fflush builtin, posix - regexps, IGNORECASE applies to all comparison, autoconf, source - code cleanup. See the NEWS file. */ - -/* 3.1 PROCINFO array, LINT variable, mktime builtin, BINMODE variable, - |&, tcp/ip, i18n stuff. Automake. See NEWS. */ +const char *version_string = "@PACKAGE_STRING@"; diff -Nru gawk-3.1.8+dfsg/vms/ChangeLog gawk-4.0.1+dfsg/vms/ChangeLog --- gawk-3.1.8+dfsg/vms/ChangeLog 2010-05-06 17:57:15.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/ChangeLog 2012-03-28 20:02:08.000000000 +0000 @@ -1,514 +1,59 @@ -Thu May 6 20:55:14 2010 Arnold D. Robbins +2012-03-28 Arnold D. Robbins - * Release 3.1.8: Release tar file made. + * 4.0.1: Release tar ball made. -Tue Apr 20 14:54:03 2010 Pat Rankin +2012-03-28 Arnold D. Robbins - * vms-conf.h (HAVE_LIBSIGSEGV): Add placeholder; leave undefined. - * vmstest.com (manyfiles): keep going even if gawk fails. + * vms-conf.h: Update copyright year. -Thu Apr 1 14:04:17 2010 Pat Rankin +2012-03-21 Anders Wallin - * vmstest.com (uninit5): fix typo in test name. + * vmstest.com: Make printfbad3 test work. -Mon Mar 29 16:26:39 2010 Pat Rankin +2012-03-20 Arnold D. Robbins - * vms-conf.h (HAVE_USLEEP): define. - * vmstest.com (fcall_exit, fcall_exit2, forref, uninit5): new tests. - * descrip.mms (builtin.obj): add floatmagic.h dependency. + * vmstest.com: Add printfbad3 test. -Mon Mar 8 15:17:41 2010 Pat Rankin +2012-02-10 Arnold D. Robbins - * vmstest.com (space): handle alternate error reason. - (fmtspcl): suppress this test. + * vmsbuild.com, descrip.mms, vms-conf.h: Update patch level. -Wed Mar 3 16:29:10 2010 Pat Rankin +2011-12-31 Arnold D. Robbins - * vms-conf.h: sync with configh.in; reformat a couple of comments. - (PACKAGE_URL): add #undef as placeholder. + * vms_misc.c: [STREQ, STREQN]: Change use of macros to call + strcmp, strncmp, directly. -Tue Jul 21 22:28:56 2009 Arnold D. Robbins +2011-11-02 Pat Rankin - * Release 3.1.7: Release tar file made. + * vms-conf.h (HAVE_SETSID, HAVE_SYS_IOCTL): Add but leave undef'd. + (HAVE_ISWCTYPE, HAVE_ISWLOWER, HAVE_ISWUPPER, HAVE_MBRLEN, + HAVE_MBRTOWC, HAVE_TOWLOWER, HAVE_TOWUPPER, HAVE_WCHAR_H, + HAVE_WCRTOMB, HAVE_WCSCOLL, HAVE_WCTYPE, HAVE_WCTYPE_H, + HAVE_WCTYPE_T): Define as 1 since DEC C supports all these. -Wed Jul 8 18:59:22 2009 Pat Rankin + * descrip.mms (replace.obj): Add dependencies for missing_d/*.c. + * vmstest.com (unix_tests): Fix typo in spelling of rtlen01. - * vmstest.com (charset_tests): New list; move various tests from - basic and gawk_ext lists. - (fmtspcl): Move to machine_tests list. - (lc_num1, mbfw1, mbprintf1, rsstart3): Skip these failing tests. - (double1, double2): Likewise. +2011-10-30 Pat Rankin -Mon Jun 22 00:51:17 2009 Pat Rankin + * vmstest.com (fpat3, fwtest3, getline5, gsubtst7, gsubtst8, + pty1, rtlen, rtlen01, rtlenmb): New tests. + (posix2008sub): Revised test. - * vms_misc.c (vms_open): Explicitly specify "rat=cr" to force - carriage-return-carraige-control record attribute along with - stmlf foramt. gawk failed on an internal redirection attempt - (``print anything > file'') if an earlier version of the output - file existed with conflicting attributes and the program was - built using DECC$SHR run-time library rather than VAXCRTL. +2011-10-25 Anders Wallin - * vmstest.com: Add over 70 new tests. Overhaul how lists of - tests are specified and executed. Make many similar tests run - with shared commands instead of maintaining separate code for - each one. Put output for 'test' into "_'test'.tmp" instead of - "tmp." so that it's easier to investigate if/when multiple test - failures occur in the same run. - (vms_io2): New test to check the ``print anything > file'' fix. + * vmstest.com (posix2008sub): Added as specific test in order to + use --posix option. -Wed Mar 18 18:16:50 2009 Pat Rankin +2011-06-24 Arnold D. Robbins - * vms-conf.h (EXIT_SUCCESS, EXIT_FAILURE): Define #if !HAVE_STDLIB_H. - (EXIT_FATAL): Define. + * vmsbuild.com (REL, PATCHLVL): Move to 4.0.0. + * descrip.mms (REL, PATCHLVL): Move to 4.0.0. + * vms-conf.h (VERSION, PACKAGE_VERSION): Move to 4.0.0. + * 4.0.0: Remake the tar ball. -Mon Mar 16 19:09:27 2009 Pat Rankin +2011-06-23 Arnold D. Robbins - * vms-conf.h: Synchronize with configh.in, - (HAVE_ATEXIT): Define. - -Tue Jan 27 21:49:53 2009 Arnold D. Robbins - - Per Pat Rankin based on changes to awk.h and change in main code - to use EXIT_SUCCESS / EXIT_FAILURE from Toni Schilling - . - - * redirect.h (exit): Remove definition. - * vms_misc.c (vms_exit): Remove code. - -Mon Oct 22 08:49:05 2007 Arnold D. Robbins - - * Release 3.1.6: Release tar file made. - -Wed May 16 19:54:00 2007 Pat Rankin - - * vms-conf.h: re-sync with configh.in. - -Sun Apr 29 18:09:17 2007 Pat Rankin - - * redirect.h: declare snprintf() if CRTL_VER_V732 is defined; - redefining __CRTL_VER in config.h causes to suppress it. - - * vmstest.com (fnarray): exit code has changed to 2. - (pid): target values now passed by command line rather than file. - -Fri Apr 20 16:48:30 2007 Pat Rankin - - * vms-conf.h: #define HAVE_SNPRINTF for V7.3-2 and later CRTL. - * redirect.h: #define snprintf to gawk_snprintf if we're using - missing_d/snprintf.c; avoids diagnostic about its declaration. - -Thu Apr 12 18:59:33 2007 Pat Rankin - - * vms-conf.h: Leave HAVE_MKSTEMP undefined; we want tmpfile(). - -Thu Mar 29 19:30:20 2007 Pat Rankin - - * vms-conf.h: reconcile with configh.in. - - * descrip.mms: compile floatcomp.c; add pgawk target and build - pgawk.exe for `make all'. - * vmsbuild.com: compile floatcomp.c; always build pgawk.exe in - addition to gawk.exe. - -Wed Jul 27 21:31:14 2005 Pat Rankin - - * vmstest.com: Format test group feedback differently (append "...") - to distinguish it from individual test feedback. - (manyfiles): Determine the number of files to use dynamically - instead of using hardcoded 300 in case user's open file quota - is generous enough to support more than that. - (longsub): Add error trap so that failure when gawk is built with - VAXCRTL doesn't cause testing to terminate. - (vms_io1): Invoke with normal Unix-style command line syntax. - (vms_cmd): New test; split off DCL-style command line from vms_io1. - -Tue Jul 26 21:46:16 2005 Arnold D. Robbins - - * Release 3.1.5: Release tar file made. - -Mon May 23 20:54:31 2005 Pat Rankin - - * vms_gawk.c [gawk_cmd, #if __ia64__]: Switch from globalvalue - to strict_refdef and then take gawk_cmd's address during use. - - * vmstest.com (concat1, longsub, arrayprm2, arrayprm3, arryref2, - arryref3, arryref4, arryref5, aryprm1, aryprm2, aryprm3, - aryprm4, aryprm5, aryprm6, aryprm7, aryprm8, concat2, concat3, - delarpm2, delfunc, exitval2, fmttest, fnarray2, fnmisc, fordel, - getline3, gsubasgn, gsubtest, gsubtst2, gsubtst4, gsubtst5, - hex, inputred, iobug1, manglprm, nested, nfneg, noloop1, - noloop2, nulrsend, prec, prtoeval, rstest1, rstest2, rstest3, - rstest4, rstest5, scalar, sortempty, splitarr, strcat1, - subsepnm, synerr1, uninit2, uninit3, uninit4, uninitialized, - unterm, wjposer1, zeroe0): New tests. - -Wed May 18 21:22:09 2005 Pat Rankin - - * vms_gawk.c [#if __ia64__]: Use #pragma extern_model globalvalue - for the declaration of gawk_cmd. - -Mon May 9 21:17:33 2005 Pat Rankin - - * vms-conf.h [#if DECC]: Use #pragma to suppress "new feature in C99" - diagnostic for structure field designator style initialization in - regexec.c. - -Thu May 5 21:17:48 2005 Anders Wallin - - * vms_gawk.c [__ia64__]: Change to lower case, then Itanium - VMS is happy. - -Sun May 1 08:20:00 2005 Pat Rankin - - * vms_gawk.c [gawk_cmd]: Declare as ordinary data symbol rather - than as a fake routine for Itanium. (Can't do that for other - configurations without getting tangled up in compiler-specific - details like `#pragma extern_model' and VAX C's `globalref'.) - -Fri Mar 4 20:46:20 2005 Pat Rankin - - * vms-conf.h: Define VAXCRTL when appropriate; used in builtin.c. - -Sat Feb 19 20:13:28 2005 Pat Rankin - - * vms-conf.h [RE_TOKEN_INIT_BUG]: Define for regcomp.c. - -Wed Feb 16 20:45:21 2005 Pat Rankin - - * vms-conf.h [NO_MBSUPPORT]: Define when compiling with VAX C. - [inline]: Define as empty when compiling with VAX C. - -Thu Jan 20 19:09:52 2005 Pat Rankin - - * vms-conf.h: Synchronize with configh.in. - -Mon Aug 2 12:18:15 2004 Arnold D. Robbins - - * Release 3.1.4: Release tar file made. - -Mon Jun 14 18:40:22 2004 Pat Rankin - - * descrip.mms (dfa.c, dfa.h): reinstate these. - (gettext.h, mbsupport.h): add these. - (patchlev.h): remove this. - - * vmstest.com (longwrds): customize it. - (getline, getline2): replace getline with getline2. - -Mon Jul 7 11:01:43 2003 Arnold D. Robbins - - * Release 3.1.3: Release tar file made. - -Mon Jun 9 22:15:40 2003 Pat Rankin - - * vms-conf.h: Synchronize with current configh.in. - ALLOW_SWITCH: Define this to enable new `switch' feature. - -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. - -Wed Apr 17 15:57:30 2002 Pat Rankin - - * vmstest.com (forsimp, concat1, longsub): New Tests. - (strftime): Revamp test to avoid use of defunct %v extension. - -Sat Dec 22 19:18:31 2001 Pat Rankin - - * redirect.h (tzset): Declare. - -Sun Jun 3 13:04:44 2001 Arnold D. Robbins - - * Release 3.1.0: Release tar file made. And there was - rejoicing. - -Thu Apr 12 18:29:50 2001 Pat Rankin - - * vms_misc.c (open): Add handling for /dev/null and /dev/tty. - (vms_devopen): Remove handling for /dev/null and /dev/tty. - - * vms_misc.c (VMS_stat, VMS_fstat): New functions to work - around old VAXCRTL bugs. - * redirect.h (fstat): Define as VMS_fstat for VAX C or GNU C. - - * vms-conf.h (HAVE_UNISTD_H): Avoid for GNU C. - - * descrip.mms: Synchronize with 3.1.0 sources. - - * vmstest.com: Add many new tests. - (fixup_LRL): New subroutine. - -Thu Apr 5 20:31:22 2001 Pat Rankin - - * vms-conf.h: synchronize with current configh.in. - [NO_ALLOCA]: define instead of C_ALLOCA. - * redirect.h (strcoll): substitute strcmp for VAXCRTL config. - (struct timeval): define. - (gettimeofday): substitute vms_gettimeofday; declare. - - * vms_misc.c (vms_gettimeofday): new function. - * vms_fwrite.c [#if NO_ALLOCA]: fix fake alloca's use of free(). - - * vmsbuild.com: synchronize with current sources. - -Sun Jan 28 15:50:02 2001 Eli Zaretskii - - * gawkmisc.vms (os_restore_mode): New function. - -Sun Dec 3 16:53:37 2000 Arnold D. Robbins - - * gawkmisc.vms (os_setbinmode): new function. - -Tue Nov 7 14:09:14 2000 Arnold D. Robbins - - * gawkmisc.vms (os_is_setuid): new function. - -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - * Close-on-exec changes: - gawkmisc.vms: (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. - -Sat Jul 15 20:52:09 2000 Pat Rankin - - * vmstest.com (printf1, fusmnam, fnamedat, numindex, - subslash, opasnslf, opasnidx, arynocls, getlnbuf, - arysubnm, fnparydl): New basic tests. - (igncdym): New gawk.extensions test. - (nondec): Old gawk.extensions test commented out. - -Sun Jun 25 15:08:19 2000 Arnold D. Robbins - - * Release 3.0.5: Release tar file made. - -Wed Jun 30 16:14:36 1999 Arnold D. Robbins - - * Release 3.0.4: Release tar file made. This time for sure. - -Fri May 7 20:29:04 1999 Pat Rankin - - * vms-conf.h (__CRTL_VER): Add same override as __VMS_VER. - -Wed May 5 19:10:15 1999 Pat Rankin - - * vmstest.com (nasty, zeroflag, getnr2tm, getnr2tb): New tests. - -Wed Nov 25 17:24:26 1998 Pat Rankin - - * vmstest.com (vms_tests): New general target. - (vms_io1): New specific test. - -Thu May 15 12:49:08 1997 Arnold D. Robbins - - * Release 3.0.3: Release tar file made. - -Mon May 12 18:39:30 1997 Pat Rankin - - * vmstest.com (delarprm, prdupval): new `basic' tests. - (nondec): new `gawk.extensions' test (commented out for now). - (reint): move from `basic' to `gawk.extensions'. - -Mon May 5 21:40:07 1997 Pat Rankin - - * vmstest.com (clobber): new `basic' test. - (pid): new test, replacing `specfile'. - (pipeio2): new for `unix-tests'; can't execute this one under VMS. - -Mon May 5 21:23:52 1997 Pat Rankin - - * vms_args.c (vms_arg_fixup): for the 2>&1 case, don't set the - output filename to "sys$error" because that results in an extra - empty file being created. - - * vms_misc.c (vms_open): explicitly specify stream_lf format - when creating files rather than letting DECC$SHR make a new file - inherit its record format from any earlier version of that file. - - Suggested by Pete Cascio : - - * vms_misc.c (vms_open): use full record sharing options when - reading any record-oriented file, regardless of its organization. - -Mon Apr 21 19:22:12 1997 Pat Rankin - - * vmstest.com (funstack): new `basic' test. - (reint): add missing entry to `basic'. - (pipeio1, specfile, strftlng): move from `basic' to `unix-tests'. - (childin): skip due to known failure. - (specfile): skip due to potentially confusing feedback. - -Thu Apr 24 23:18:04 1997 Arnold D. Robbins - - * vms_popen.c, vms_misc.c, vms_gawk.c, vms_fwrite.c, - vms_args.c: moved to generic GPL statement at top. - -Fri Apr 18 07:55:47 1997 Arnold D. Robbins - - * BETA Release 3.0.34: Release tar file made. - -Wed Apr 2 18:17:30 1997 Pat Rankin - - * descrip.mms, vmsbuild.com (PATCHLVL): update to 3. - - * vmstest.com (nlfldsep, splitvar, intest, nfldstr, nors, - fnarydel, noparms, pipeio1): new tests. - -Wed Jan 15 15:21:01 1997 Pat Rankin - - * redirect.h (stat, fstat): do not declare these functions; - rely on to do so. There are too many DEC C version - variants to handle otherwise. - - From Martin Zinser : - - * descrip.mms (gawk.dvi): update to build in [.doc] directory - using texindex.c retained from an earlier gawk 2.x distribution. - (texindex.exe): don't assume VAX C. - -Wed Dec 25 11:25:22 1996 Arnold D. Robbins - - * Release 3.0.2: Release tar file made. - -Mon Dec 23 20:51:27 1996 Pat Rankin - - * vms_misc.c (vms_bcopy): `bcopy' is defined as this in redirect.h. - -Thu Dec 19 17:49:31 1996 Pat Rankin - - * redirect.h (strcasecmp, strncasecmp, tzset, tzname, - daylight, timezone, altzone, bcopy, popen, pclose, unlink): - New macros to avoid conflict with VMS V7.x DECC$SHR symbols. - (close, dup, dup2, read): Declare with full prototypes. - (fstat, stat): Ditto, and guard against conflicting DEC C - declarations (which might have trailing elipsis). - * vms_misc.c (tzset, tzname, daylight, timezone, altzone): - Suppress these if compiled with VMS_V7 defined [not supported]. - -Mon Dec 16 14:32:08 1996 Pat Rankin - - * vms_popen (popen): Delete unprototyped declaration of strcmp() - to avoid conflict with a strcmp macro in DEC C V5.0 header files. - -Tue Dec 10 23:09:26 1996 Arnold D. Robbins - - * Release 3.0.1: Release tar file made. - -Fri Dec 6 20:55:57 1996 Pat Rankin - - * redirect.h, vms-conf.h: Refine Sep 20th change: include - and in redirect.h rather than vms-conf.h - so that it occurs for VMS POSIX as well as for normal VMS. - -Wed Nov 20 15:47:02 1996 Pat Rankin - - * descrip.mms (LIBOBJS): Rename from GNUOBJS; add random.obj. - (LIBSRC): Rename from GNUSRC; add random.c. - (AWKSRC): Add random.h. - (random.obj, builtin.obj): Depend upon random.h. - * vmsbuild.com: compile random.c, link random.obj. - - * vmstest.com (childin): Split message about expected failure - in order to avoid consecutive tick marks in the quoted string. - -Wed Nov 13 15:32:58 1996 Pat Rankin - - * vmstest.com: New file to execute test suite. - -Fri Nov 8 18:29:42 1996 Pat Rankin - - Revise makefiles so that no editing should be needed. - - * descrip.mms: Use DEC C as the default compiler, since - the same compile and link options for it can be used as-is - on both VAX and Alpha. - (GNUC, VAXC): New `make' macros for specifying an alternate - compiler on the MMS or MMK command line. - (PATCHLVL): Update to 1. - * vmsbuild.com: Make the equivalent changes. - -Mon Oct 28 17:02:39 1996 Pat Rankin - - * vms.h (U_Long, U_Short): Replace u_long and u_short typedefs. - * vms_*.c: Use them. - - * vms.h, vms_*.c: Change SYS$ and LIB$ routines to lower case - equivalents; fully prototype sys$ and lib$ routines rather than - just declare them. - -Fri Sep 20 17:33:05 1996 Pat Rankin - - * vms-conf.h: directly include and . - * vms-conf.h (strftime): delete this macro. - * redirect.h (strftime): define it here instead. - -Fri May 17 09:08:16 1996 Arnold Robbins - - * gawkmisc.vms (envsep): Now initialized to ',' instead of ':', - per email from Pat Rankin. - -Thu Jan 11 15:20:14 1996 Pat Rankin - - * vms-conf.h [#if __DECC]: Changes to support V5.x of DEC C. - (_DECC_V4SOURCE, __SOCKET_TYPEDEFS): Define these to avoid - duplicate u_long and u_short typedefs. - (__VMS_VER): If value indicates VMS V6.2 or later, redefine it to - indicate V6.1 in order to avoid conflicting prototype for getopt. - -Wed Jan 10 22:58:55 1996 Arnold D. Robbins - - * ChangeLog created. + * ChangeLog.0: Rotated ChangeLog into this file. + * ChangeLog: Created anew for gawk 4.0.0 and on. + * 4.0.0: Release tar ball made. diff -Nru gawk-3.1.8+dfsg/vms/ChangeLog.0 gawk-4.0.1+dfsg/vms/ChangeLog.0 --- gawk-3.1.8+dfsg/vms/ChangeLog.0 1970-01-01 00:00:00.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/ChangeLog.0 2011-06-23 06:31:41.000000000 +0000 @@ -0,0 +1,699 @@ +Wed Jun 22 18:04:29 2011 Pat Rankin + + * vmstest.com (msg): Display gawk's version at start of test run. + +Mon Jun 20 20:38:35 2011 Arnold D. Robbins + + * vmstest.com (dfastress): New test. + +Mon Jun 20 20:24:34 2011 Pat Rankin + + * descrip.mms: Remove compilation of hard-locale.c. + * vmsbuild.com: Likewise. + +Tue May 31 23:10:35 2011 Arnold D. Robbins + + * vmstest.com (regrange): New test. + +Thu May 26 22:14:06 2011 Arnold D. Robbins + + * vmstest.com (fpat2): New test. + +Wed May 25 01:31:50 2011 Pat Rankin + + * gawk.hlp: Substantial updates, for first time in 8 years! + + * vmstest.com (fpatnull): New test. + +Sun May 15 19:24:22 2011 Pat Rankin + + * vmstest.com (delargv): New test. + +Fri May 13 18:45:35 2011 Pat Rankin + + * vmstest.com (exit, next): Move from basic to gawk extensions. + (exit: do__exit): Define "gawk" in subroutine to make sure PIPE + uses the local definition instead of some other global one. + + * vms_gawk.c (vms_gawk): Convert /OPTIMIZE into "-O" rather than + to "-W optimize". + + * gawk.cld (gen_pot): Fix typo in name. + +Mon May 9 01:43:40 2011 Pat Rankin + + * vmstest.com (arraysort, delsub, exit, next, ofmta, sortu): New + tests. + (paramdup): Merge with other exit_code 1 tests. + {various}: change several instances of "nl:" to "_NL:" so that all + tests which reference the null device spell it the same way. + +Fri Apr 29 18:10:49 2011 Pat Rankin + + * gawkmisc.vms (os_isatty): New routine. + +Sat Feb 26 18:35:01 2011 Pat Rankin + + * vms_gawk.c, gawk.cld: Add support for new command qualifiers: + /extra_commands="text" -e "awk program text" + /profile[=file] --profile [awkprof.out] + /dump_variables[=file] --dump_variables [awkvars.out] + /optimize, /traditional, /re_interval, /sandbox, /non_decimal_data + New but not documented since not useful for present VMS port: + /characters_as_bytes, /use_lc_numeric, /gen_pot + Revamp several existing qualifiers: + /strict was --compat, now synonym for /traditional + /lint=(warn,fatal,invalid,old) + /lint=warn --lint (same as /lint without any value) + /lint=fatal --lint fatal + /lint=old --lint-old + /lint=(warn,fatal) --lint fatal (warn ignored) + /lint=(warn,old) --lint --lint-old + /lint=(fatal,old) --lint fatal --lint-old + /usage, /version, /copyright try harder to make awk program and + data file be optional since these just give messages and then quit. + (vms_usage): Substitute "GAWK", "DGAWK", or "PGAWK" as appropriate + for command name when issuing the VMS-specific usage message. + * vms.h (CLI$_NEGATED): Define macro (from ). + + * vms_cli.c: Add copyright notice. Remove unused P() macro. + (dcl$present, dcl$get_value, dcl$parse_command): Use lowercase + rather than upper for these system routine names. + +Fri Feb 18 19:24:30 2011 Pat Rankin + + * vmstest.com (beginfile1, dumpvars): New tests. + (lintwarn): Add exit_code 1. + +Wed Feb 16 21:09:50 2011 Arnold D. Robbins + + * vmstest.com (lintwarn): New test. + +Sun Feb 13 18:48:29 2011 Pat Rankin + + * gawkmisc.vms (files_are_same): Update to handle new arguments. + + * vmstest.com (profile1, profile2, profile3): New tests. + (pgawk_tests, profile_tests): New test sets. + (iobug1): Clean up spurious extra output file. Sigh. + + * descrip.mms, vmsbuild.com: Include hard-locale.c in build. + +Sun Feb 13 20:23:57 2011 Eli Zaretskii + + * gawkmisc.vms (files_are_same): Change arguments; call `stat' as + part of the body. + +Sat Feb 12 19:29:41 2011 Pat Rankin + + * redirect.h (snprintf): Declare regardless of HAVE_SNPRINTF or + CRTL_VER_V732. + +Mon Feb 7 22:43:37 2011 Arnold Robbins + + * vmstest.com (negrange): Add new test. + +Sun Feb 6 18:54:20 2011 Pat Rankin + + * vmstest.com (psx96sub, whiny): Remove obsolete tests. + (aadelete1, aadelete2, aarray1, aasort, assorti, fpat1, + indirectcall, patsplit, posix2000sub, range1, sortfor, splitarg4, + switch2): Add new tests. + +Tue Jan 18 17:51:07 2011 Pat Rankin + + * vms_args.c (vms_arg_fixup): If AWK_LIBRARY lacks a value, define + it as "SYS$LIBRARY:" so that the default value of AWKPATH ends + with a valid directory. Needed so that gawk -f no-such-file + will report "file not found" or "no such file or directory" + instead of "file specification syntax error". + + * vms-conf.h: Sync with configh.in; define HAVE_STRCOLL as 1. + + * vmstest.com (fnarray, funsmnam, paramres, parseme): Change these + tests to expect EXIT_CODE 1 rather than EXIT_CODE 2. + +Sat Nov 6 16:33:01 2010 Pat Rankin + + * redirect.h, vms.h: Drop use of P() macro in function prototypes. + * vms_misc.c, vms_popen.c: Likewise. + +Wed Aug 11 17:47:57 2010 Pat Rankin + + * redirect.h (vsnprintf): Move #define into !HAVE_SNPRINTF block. + +Tue Aug 10 12:57:40 2010 Pat Rankin + + * redirect.h: Declare vsnprintf and define it to use missing_d one. + * vms-conf.h: Add #undef template for HAVE_SETENV. + +Mon Aug 9 10:58:03 2010 Arnold Robbins + + * redirect.h: Add decls of setenv, unsetenv, and snprintf to + avoid informational warnings from the compiler about undecleared + functions. + +Thu Aug 5 15:01:55 2010 Arnold Robbins + + * vms-build.com: Correctly build dgawk. + * redirect.h (setenv, unsetenv): Define as macros to get the + replacement versions in missing_d/. + +Mon Mar 8 15:17:41 2010 Pat Rankin + + * vmstest.com (space): handle alternate error reason. + (fmtspcl): suppress this test. + +Wed Mar 3 16:29:10 2010 Pat Rankin + + * vms-conf.h: sync with configh.in; reformat a couple of comments. + (PACKAGE_URL): add #undef as placeholder. + +Wed Jan 6 19:05:05 2010 Pat Rankin + + * vms_fwrite.c (tty_fwrite): Check which_gawk, and stick to + ordinary fwrite() when it's exe_debugging because dgawk uses + other stdio calls besides fwrite for terminal output, and that + wouldn't interleave sanely with tty_fwrite()'s terminal output. + +Wed Jan 6 19:05:05 2010 Pat Rankin + + * awk.h (exe_mode): Define new enum: exe_gawking for regular gawk, + exe_debugging for dgawk, and exe_profiling for pgawk. + (which_gawk): Declare new variable. + * eval.c (which_gawk): Define it. + +Thu May 6 20:55:14 2010 Arnold D. Robbins + + * Release 3.1.8: Release tar file made. + +Tue Apr 20 14:54:03 2010 Pat Rankin + + * vms-conf.h (HAVE_LIBSIGSEGV): Add placeholder; leave undefined. + * vmstest.com (manyfiles): keep going even if gawk fails. + +Thu Apr 1 14:04:17 2010 Pat Rankin + + * vmstest.com (uninit5): fix typo in test name. + +Mon Mar 29 16:26:39 2010 Pat Rankin + + * vms-conf.h (HAVE_USLEEP): define. + * vmstest.com (fcall_exit, fcall_exit2, forref, uninit5): new tests. + * descrip.mms (builtin.obj): add floatmagic.h dependency. + +Mon Mar 8 15:17:41 2010 Pat Rankin + + * vmstest.com (space): handle alternate error reason. + (fmtspcl): suppress this test. + +Wed Mar 3 16:29:10 2010 Pat Rankin + + * vms-conf.h: sync with configh.in; reformat a couple of comments. + (PACKAGE_URL): add #undef as placeholder. + +Tue Jul 21 22:28:56 2009 Arnold D. Robbins + + * Release 3.1.7: Release tar file made. + +Wed Jul 8 18:59:22 2009 Pat Rankin + + * vmstest.com (charset_tests): New list; move various tests from + basic and gawk_ext lists. + (fmtspcl): Move to machine_tests list. + (lc_num1, mbfw1, mbprintf1, rsstart3): Skip these failing tests. + (double1, double2): Likewise. + +Mon Jun 22 00:51:17 2009 Pat Rankin + + * vms_misc.c (vms_open): Explicitly specify "rat=cr" to force + carriage-return-carraige-control record attribute along with + stmlf foramt. gawk failed on an internal redirection attempt + (``print anything > file'') if an earlier version of the output + file existed with conflicting attributes and the program was + built using DECC$SHR run-time library rather than VAXCRTL. + + * vmstest.com: Add over 70 new tests. Overhaul how lists of + tests are specified and executed. Make many similar tests run + with shared commands instead of maintaining separate code for + each one. Put output for 'test' into "_'test'.tmp" instead of + "tmp." so that it's easier to investigate if/when multiple test + failures occur in the same run. + (vms_io2): New test to check the ``print anything > file'' fix. + +Wed Mar 18 18:16:50 2009 Pat Rankin + + * vms-conf.h (EXIT_SUCCESS, EXIT_FAILURE): Define #if !HAVE_STDLIB_H. + (EXIT_FATAL): Define. + +Mon Mar 16 19:09:27 2009 Pat Rankin + + * vms-conf.h: Synchronize with configh.in, + (HAVE_ATEXIT): Define. + +Tue Jan 27 21:49:53 2009 Arnold D. Robbins + + Per Pat Rankin based on changes to awk.h and change in main code + to use EXIT_SUCCESS / EXIT_FAILURE from Toni Schilling + . + + * redirect.h (exit): Remove definition. + * vms_misc.c (vms_exit): Remove code. + +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Wed May 16 19:54:00 2007 Pat Rankin + + * vms-conf.h: re-sync with configh.in. + +Sun Apr 29 18:09:17 2007 Pat Rankin + + * redirect.h: declare snprintf() if CRTL_VER_V732 is defined; + redefining __CRTL_VER in config.h causes to suppress it. + + * vmstest.com (fnarray): exit code has changed to 2. + (pid): target values now passed by command line rather than file. + +Fri Apr 20 16:48:30 2007 Pat Rankin + + * vms-conf.h: #define HAVE_SNPRINTF for V7.3-2 and later CRTL. + * redirect.h: #define snprintf to gawk_snprintf if we're using + missing_d/snprintf.c; avoids diagnostic about its declaration. + +Thu Apr 12 18:59:33 2007 Pat Rankin + + * vms-conf.h: Leave HAVE_MKSTEMP undefined; we want tmpfile(). + +Thu Mar 29 19:30:20 2007 Pat Rankin + + * vms-conf.h: reconcile with configh.in. + + * descrip.mms: compile floatcomp.c; add pgawk target and build + pgawk.exe for `make all'. + * vmsbuild.com: compile floatcomp.c; always build pgawk.exe in + addition to gawk.exe. + +Wed Jul 27 21:31:14 2005 Pat Rankin + + * vmstest.com: Format test group feedback differently (append "...") + to distinguish it from individual test feedback. + (manyfiles): Determine the number of files to use dynamically + instead of using hardcoded 300 in case user's open file quota + is generous enough to support more than that. + (longsub): Add error trap so that failure when gawk is built with + VAXCRTL doesn't cause testing to terminate. + (vms_io1): Invoke with normal Unix-style command line syntax. + (vms_cmd): New test; split off DCL-style command line from vms_io1. + +Tue Jul 26 21:46:16 2005 Arnold D. Robbins + + * Release 3.1.5: Release tar file made. + +Mon May 23 20:54:31 2005 Pat Rankin + + * vms_gawk.c [gawk_cmd, #if __ia64__]: Switch from globalvalue + to strict_refdef and then take gawk_cmd's address during use. + + * vmstest.com (concat1, longsub, arrayprm2, arrayprm3, arryref2, + arryref3, arryref4, arryref5, aryprm1, aryprm2, aryprm3, + aryprm4, aryprm5, aryprm6, aryprm7, aryprm8, concat2, concat3, + delarpm2, delfunc, exitval2, fmttest, fnarray2, fnmisc, fordel, + getline3, gsubasgn, gsubtest, gsubtst2, gsubtst4, gsubtst5, + hex, inputred, iobug1, manglprm, nested, nfneg, noloop1, + noloop2, nulrsend, prec, prtoeval, rstest1, rstest2, rstest3, + rstest4, rstest5, scalar, sortempty, splitarr, strcat1, + subsepnm, synerr1, uninit2, uninit3, uninit4, uninitialized, + unterm, wjposer1, zeroe0): New tests. + +Wed May 18 21:22:09 2005 Pat Rankin + + * vms_gawk.c [#if __ia64__]: Use #pragma extern_model globalvalue + for the declaration of gawk_cmd. + +Mon May 9 21:17:33 2005 Pat Rankin + + * vms-conf.h [#if DECC]: Use #pragma to suppress "new feature in C99" + diagnostic for structure field designator style initialization in + regexec.c. + +Thu May 5 21:17:48 2005 Anders Wallin + + * vms_gawk.c [__ia64__]: Change to lower case, then Itanium + VMS is happy. + +Sun May 1 08:20:00 2005 Pat Rankin + + * vms_gawk.c [gawk_cmd]: Declare as ordinary data symbol rather + than as a fake routine for Itanium. (Can't do that for other + configurations without getting tangled up in compiler-specific + details like `#pragma extern_model' and VAX C's `globalref'.) + +Fri Mar 4 20:46:20 2005 Pat Rankin + + * vms-conf.h: Define VAXCRTL when appropriate; used in builtin.c. + +Sat Feb 19 20:13:28 2005 Pat Rankin + + * vms-conf.h [RE_TOKEN_INIT_BUG]: Define for regcomp.c. + +Wed Feb 16 20:45:21 2005 Pat Rankin + + * vms-conf.h [NO_MBSUPPORT]: Define when compiling with VAX C. + [inline]: Define as empty when compiling with VAX C. + +Thu Jan 20 19:09:52 2005 Pat Rankin + + * vms-conf.h: Synchronize with configh.in. + +Mon Aug 2 12:18:15 2004 Arnold D. Robbins + + * Release 3.1.4: Release tar file made. + +Mon Jun 14 18:40:22 2004 Pat Rankin + + * descrip.mms (dfa.c, dfa.h): reinstate these. + (gettext.h, mbsupport.h): add these. + (patchlev.h): remove this. + + * vmstest.com (longwrds): customize it. + (getline, getline2): replace getline with getline2. + +Mon Jul 7 11:01:43 2003 Arnold D. Robbins + + * Release 3.1.3: Release tar file made. + +Mon Jun 9 22:15:40 2003 Pat Rankin + + * vms-conf.h: Synchronize with current configh.in. + ALLOW_SWITCH: Define this to enable new `switch' feature. + +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. + +Wed Apr 17 15:57:30 2002 Pat Rankin + + * vmstest.com (forsimp, concat1, longsub): New Tests. + (strftime): Revamp test to avoid use of defunct %v extension. + +Sat Dec 22 19:18:31 2001 Pat Rankin + + * redirect.h (tzset): Declare. + +Sun Jun 3 13:04:44 2001 Arnold D. Robbins + + * Release 3.1.0: Release tar file made. And there was + rejoicing. + +Thu Apr 12 18:29:50 2001 Pat Rankin + + * vms_misc.c (open): Add handling for /dev/null and /dev/tty. + (vms_devopen): Remove handling for /dev/null and /dev/tty. + + * vms_misc.c (VMS_stat, VMS_fstat): New functions to work + around old VAXCRTL bugs. + * redirect.h (fstat): Define as VMS_fstat for VAX C or GNU C. + + * vms-conf.h (HAVE_UNISTD_H): Avoid for GNU C. + + * descrip.mms: Synchronize with 3.1.0 sources. + + * vmstest.com: Add many new tests. + (fixup_LRL): New subroutine. + +Thu Apr 5 20:31:22 2001 Pat Rankin + + * vms-conf.h: synchronize with current configh.in. + [NO_ALLOCA]: define instead of C_ALLOCA. + * redirect.h (strcoll): substitute strcmp for VAXCRTL config. + (struct timeval): define. + (gettimeofday): substitute vms_gettimeofday; declare. + + * vms_misc.c (vms_gettimeofday): new function. + * vms_fwrite.c [#if NO_ALLOCA]: fix fake alloca's use of free(). + + * vmsbuild.com: synchronize with current sources. + +Sun Jan 28 15:50:02 2001 Eli Zaretskii + + * gawkmisc.vms (os_restore_mode): New function. + +Sun Dec 3 16:53:37 2000 Arnold D. Robbins + + * gawkmisc.vms (os_setbinmode): new function. + +Tue Nov 7 14:09:14 2000 Arnold D. Robbins + + * gawkmisc.vms (os_is_setuid): new function. + +Wed Jul 30 19:53:52 1997 Arnold D. Robbins + + * Close-on-exec changes: + gawkmisc.vms: (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. + +Sat Jul 15 20:52:09 2000 Pat Rankin + + * vmstest.com (printf1, fusmnam, fnamedat, numindex, + subslash, opasnslf, opasnidx, arynocls, getlnbuf, + arysubnm, fnparydl): New basic tests. + (igncdym): New gawk.extensions test. + (nondec): Old gawk.extensions test commented out. + +Sun Jun 25 15:08:19 2000 Arnold D. Robbins + + * Release 3.0.5: Release tar file made. + +Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + +Fri May 7 20:29:04 1999 Pat Rankin + + * vms-conf.h (__CRTL_VER): Add same override as __VMS_VER. + +Wed May 5 19:10:15 1999 Pat Rankin + + * vmstest.com (nasty, zeroflag, getnr2tm, getnr2tb): New tests. + +Wed Nov 25 17:24:26 1998 Pat Rankin + + * vmstest.com (vms_tests): New general target. + (vms_io1): New specific test. + +Thu May 15 12:49:08 1997 Arnold D. Robbins + + * Release 3.0.3: Release tar file made. + +Mon May 12 18:39:30 1997 Pat Rankin + + * vmstest.com (delarprm, prdupval): new `basic' tests. + (nondec): new `gawk.extensions' test (commented out for now). + (reint): move from `basic' to `gawk.extensions'. + +Mon May 5 21:40:07 1997 Pat Rankin + + * vmstest.com (clobber): new `basic' test. + (pid): new test, replacing `specfile'. + (pipeio2): new for `unix-tests'; can't execute this one under VMS. + +Mon May 5 21:23:52 1997 Pat Rankin + + * vms_args.c (vms_arg_fixup): for the 2>&1 case, don't set the + output filename to "sys$error" because that results in an extra + empty file being created. + + * vms_misc.c (vms_open): explicitly specify stream_lf format + when creating files rather than letting DECC$SHR make a new file + inherit its record format from any earlier version of that file. + + Suggested by Pete Cascio : + + * vms_misc.c (vms_open): use full record sharing options when + reading any record-oriented file, regardless of its organization. + +Mon Apr 21 19:22:12 1997 Pat Rankin + + * vmstest.com (funstack): new `basic' test. + (reint): add missing entry to `basic'. + (pipeio1, specfile, strftlng): move from `basic' to `unix-tests'. + (childin): skip due to known failure. + (specfile): skip due to potentially confusing feedback. + +Thu Apr 24 23:18:04 1997 Arnold D. Robbins + + * vms_popen.c, vms_misc.c, vms_gawk.c, vms_fwrite.c, + vms_args.c: moved to generic GPL statement at top. + +Fri Apr 18 07:55:47 1997 Arnold D. Robbins + + * BETA Release 3.0.34: Release tar file made. + +Wed Apr 2 18:17:30 1997 Pat Rankin + + * descrip.mms, vmsbuild.com (PATCHLVL): update to 3. + + * vmstest.com (nlfldsep, splitvar, intest, nfldstr, nors, + fnarydel, noparms, pipeio1): new tests. + +Wed Jan 15 15:21:01 1997 Pat Rankin + + * redirect.h (stat, fstat): do not declare these functions; + rely on to do so. There are too many DEC C version + variants to handle otherwise. + + From Martin Zinser : + + * descrip.mms (gawk.dvi): update to build in [.doc] directory + using texindex.c retained from an earlier gawk 2.x distribution. + (texindex.exe): don't assume VAX C. + +Wed Dec 25 11:25:22 1996 Arnold D. Robbins + + * Release 3.0.2: Release tar file made. + +Mon Dec 23 20:51:27 1996 Pat Rankin + + * vms_misc.c (vms_bcopy): `bcopy' is defined as this in redirect.h. + +Thu Dec 19 17:49:31 1996 Pat Rankin + + * redirect.h (strcasecmp, strncasecmp, tzset, tzname, + daylight, timezone, altzone, bcopy, popen, pclose, unlink): + New macros to avoid conflict with VMS V7.x DECC$SHR symbols. + (close, dup, dup2, read): Declare with full prototypes. + (fstat, stat): Ditto, and guard against conflicting DEC C + declarations (which might have trailing elipsis). + * vms_misc.c (tzset, tzname, daylight, timezone, altzone): + Suppress these if compiled with VMS_V7 defined [not supported]. + +Mon Dec 16 14:32:08 1996 Pat Rankin + + * vms_popen (popen): Delete unprototyped declaration of strcmp() + to avoid conflict with a strcmp macro in DEC C V5.0 header files. + +Tue Dec 10 23:09:26 1996 Arnold D. Robbins + + * Release 3.0.1: Release tar file made. + +Fri Dec 6 20:55:57 1996 Pat Rankin + + * redirect.h, vms-conf.h: Refine Sep 20th change: include + and in redirect.h rather than vms-conf.h + so that it occurs for VMS POSIX as well as for normal VMS. + +Wed Nov 20 15:47:02 1996 Pat Rankin + + * descrip.mms (LIBOBJS): Rename from GNUOBJS; add random.obj. + (LIBSRC): Rename from GNUSRC; add random.c. + (AWKSRC): Add random.h. + (random.obj, builtin.obj): Depend upon random.h. + * vmsbuild.com: compile random.c, link random.obj. + + * vmstest.com (childin): Split message about expected failure + in order to avoid consecutive tick marks in the quoted string. + +Wed Nov 13 15:32:58 1996 Pat Rankin + + * vmstest.com: New file to execute test suite. + +Fri Nov 8 18:29:42 1996 Pat Rankin + + Revise makefiles so that no editing should be needed. + + * descrip.mms: Use DEC C as the default compiler, since + the same compile and link options for it can be used as-is + on both VAX and Alpha. + (GNUC, VAXC): New `make' macros for specifying an alternate + compiler on the MMS or MMK command line. + (PATCHLVL): Update to 1. + * vmsbuild.com: Make the equivalent changes. + +Mon Oct 28 17:02:39 1996 Pat Rankin + + * vms.h (U_Long, U_Short): Replace u_long and u_short typedefs. + * vms_*.c: Use them. + + * vms.h, vms_*.c: Change SYS$ and LIB$ routines to lower case + equivalents; fully prototype sys$ and lib$ routines rather than + just declare them. + +Fri Sep 20 17:33:05 1996 Pat Rankin + + * vms-conf.h: directly include and . + * vms-conf.h (strftime): delete this macro. + * redirect.h (strftime): define it here instead. + +Fri May 17 09:08:16 1996 Arnold Robbins + + * gawkmisc.vms (envsep): Now initialized to ',' instead of ':', + per email from Pat Rankin. + +Thu Jan 11 15:20:14 1996 Pat Rankin + + * vms-conf.h [#if __DECC]: Changes to support V5.x of DEC C. + (_DECC_V4SOURCE, __SOCKET_TYPEDEFS): Define these to avoid + duplicate u_long and u_short typedefs. + (__VMS_VER): If value indicates VMS V6.2 or later, redefine it to + indicate V6.1 in order to avoid conflicting prototype for getopt. + +Wed Jan 10 22:58:55 1996 Arnold D. Robbins + + * ChangeLog created. diff -Nru gawk-3.1.8+dfsg/vms/descrip.mms gawk-4.0.1+dfsg/vms/descrip.mms --- gawk-3.1.8+dfsg/vms/descrip.mms 2010-04-20 08:37:51.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/descrip.mms 2012-03-28 19:47:54.000000000 +0000 @@ -16,6 +16,10 @@ # An alternate version which generates some profiling feedback for # the awk programs it executes. Included with `make all'. # +# dgawk.exe : +# An alternate version which supports debugging. +# Included with `make all'. +# # awkgram.c : # If you don't have bison but do have VMS POSIX or DEC/Shell, # change the PARSER and PASERINIT macros to use yacc. If you don't @@ -25,6 +29,9 @@ # target. If you use bison and it is already defined system-wide, # comment out the PARSERINIT definition. # +# command.c : +# Similar to awkgram.c; built from command.y with yacc or bison. +# # install.help : # You can make the target 'install.help' to load the VMS help text # into a help library. Modify the HELPLIB macro if you don't want @@ -41,6 +48,7 @@ # location of various source files, relative to the 'main' directory VMSDIR = [.vms] DOCDIR = [.doc] +MISSNGD = [.missing_d] MAKEFILE = $(VMSDIR)Descrip.MMS # debugging &c !'ccflags' is an escape to allow external compile flags @@ -94,8 +102,10 @@ # object files GAWKOBJ = eval.obj,profile.obj PGAWKOBJ = eval_p.obj,profile_p.obj +DGAWKOBJ = eval_d.obj,profile.obj,command.obj,debug.obj AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\ - field.obj,floatcomp.obj,gawkmisc.obj,getopt.obj,getopt1.obj,io.obj + field.obj,floatcomp.obj,gawkmisc.obj,getopt.obj,getopt1.obj,\ + io.obj AWKOBJ2 = main.obj,msg.obj,node.obj,random.obj,re.obj,\ regex.obj,replace.obj,version.obj AWKOBJS = $(AWKOBJ1),$(AWKOBJ2) @@ -113,6 +123,8 @@ msg.c,node.c,profile.c,profile_p.c,random.c,re.c,regcomp.c,\ regex.c,regex_internal.c,regexec.c,replace.c,version.c +DBGSRC = eval_d.c,debug.c,command.y,cmd.h + ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\ gettext.h,mbsupport.h,protos.h,random.h @@ -127,11 +139,11 @@ DOCS= $(DOCDIR)gawk.1,$(DOCDIR)gawk.texi,$(DOCDIR)texinfo.tex # Release of gawk -REL=3.1 -PATCHLVL=8 +REL=4.0 +PATCHLVL=1 # generic target -all : gawk,pgawk +all : gawk,pgawk,dgawk $(NOOP) # dummy target to allow building "gawk" in addition to explicit "gawk.exe" @@ -139,14 +151,18 @@ $(ECHO) " GAWK " pgawk : pgawk.exe $(ECHO) " PGAWK " +dgawk : dgawk.exe + $(ECHO) " DGAWK " # rules to build gawk gawk.exe : $(GAWKOBJ) $(AWKOBJS) $(VMSOBJS) gawk.opt $(LINK) $(LINKFLAGS) gawk.opt/options -# rules to build pgawk +# rules to build pgawk and dgawk pgawk.exe : $(PGAWKOBJ) $(AWKOBJS) $(VMSOBJS) pgawk.opt $(LINK) $(LINKFLAGS) pgawk.opt/options +dgawk.exe : $(DGAWKOBJ) $(AWKOBJS) $(VMSOBJS) dgawk.opt + $(LINK) $(LINKFLAGS) dgawk.opt/options gawk.opt : $(MAKEFILE) # create linker options file open/write opt gawk.opt ! ~ 'cat <gawk.opt' @@ -176,6 +192,20 @@ write opt "identification=""V$(REL).$(PATCHLVL)""" close opt +dgawk.opt : $(MAKEFILE) # create linker options file + open/write opt dgawk.opt + write opt "! DGAWK -- GNU awk w/ debugging" + @ write opt "$(DGAWKOBJ)" + @ 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)" + @ write opt "iosegment=128 !ditto (default is 32)" + write opt "$(LIBS)" + write opt "identification=""V$(REL).$(PATCHLVL)""" + close opt + vms_misc.obj : $(VMSDIR)vms_misc.c vms_popen.obj : $(VMSDIR)vms_popen.c vms_fwrite.obj : $(VMSDIR)vms_fwrite.c @@ -190,22 +220,40 @@ config.h $(VMSDIR)redirect.h $(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h $(PGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h +$(DGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h random.obj : random.h builtin.obj : floatmagic.h random.h awkgram.obj : awkgram.c awk.h dfa.obj : dfa.c dfa.h regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h +command.obj,debug.obj : cmd.h +replace.obj : replace.c $(MISSNGD)system.c $(MISSNGD)memcmp.c \ + $(MISSNGD)memcpy.c $(MISSNGD)memset.c $(MISSNGD)memmove.c \ + $(MISSNGD)strncasecmp.c $(MISSNGD)strerror.c \ + $(MISSNGD)strftime.c $(MISSNGD)strchr.c $(MISSNGD)strtod.c \ + $(MISSNGD)strtoul.c $(MISSNGD)tzset.c $(MISSNGD)mktime.c \ + $(MISSNGD)snprintf.c $(MISSNGD)getaddrinfo.c $(MISSNGD)usleep.c \ + $(MISSNGD)setenv.c $(MISSNGD)strcoll.c $(MISSNGD)wcmisc.c # bison or yacc required awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c @- if f$search("ytab.c") .nes."" then delete ytab.c;* !POSIX yacc @- if f$search("y_tab.c") .nes."" then delete y_tab.c;* !DEC/Shell yacc - @- if f$search("awk_tab.c").nes."" then delete awk_tab.c;* !bison + @- if f$search("awkgram_tab.c").nes."" then delete awkgram_tab.c;* !bison + - $(PARSERINIT) + $(PARSER) $(YFLAGS) $< + @- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@ + @- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@ + @- if f$search("awkgram_tab.c").nes."" then rename/new_vers awkgram_tab.c $@ +command.c : command.y + @- if f$search("ytab.c") .nes."" then delete ytab.c;* + @- if f$search("y_tab.c") .nes."" then delete y_tab.c;* + @- if f$search("command_tab.c").nes."" then delete command_tab.c;* - $(PARSERINIT) $(PARSER) $(YFLAGS) $< @- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@ @- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@ - @- if f$search("awk_tab.c").nes."" then rename/new_vers awk_tab.c $@ + @- if f$search("command_tab.c").nes."" then rename/new_vers command_tab.c $@ config.h : $(VMSDIR)vms-conf.h copy $< $@ @@ -223,12 +271,13 @@ - if f$search("[.*]*.*;-1").nes."" then purge [.*] clean : - - delete *.obj;*,gawk.opt;*,pgawk.opt;* + - delete *.obj;*,gawk.opt;*,pgawk.opt;*,dgawk.opt;* spotless : clean tidy - if f$search("config.h").nes."" then rename config.h config.h-old/New - if f$search("gawk.exe").nes."" then delete gawk.exe;* - if f$search("pgawk.exe").nes."" then delete pgawk.exe;* + - if f$search("dgawk.exe").nes."" then delete dgawk.exe;* - if f$search("gawk.dvi").nes."" then delete gawk.dvi;* - if f$search("[.doc]texindex.exe").nes."" then delete [.doc]texindex.exe;* diff -Nru gawk-3.1.8+dfsg/vms/gawk.cld gawk-4.0.1+dfsg/vms/gawk.cld --- gawk-3.1.8+dfsg/vms/gawk.cld 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/gawk.cld 2011-05-14 19:40:40.000000000 +0000 @@ -1,6 +1,16 @@ ! Gawk.Cld -- command defintion for GAWK ! Pat Rankin, Nov'89 ! [ revised for 2.12, May'91 ] +! [ revised for 4.0.0, Feb'11 ] +! +! This command definition is compiled into an object module which is +! linked into all three programs, GAWK, DGAWK, and PGAWK, and it is +! not able to use syntax-switching qualifers to invoke the different +! images gawk.exe, dgawk.exe, and pgawk.exe. To use dgawk or pgawk +! when this command definition is installed as a native command, use +! $ define gawk location:dgawk.exe +! or $ define gawk location:pgawk.exe +! module Gawk_Cmd define verb GAWK synonym AWK @@ -8,18 +18,35 @@ parameter p1, value(required,list), label=gawk_p1, prompt="data file(s)" qualifier input, value(required,list,type=$infile), label=progfile qualifier commands, value(required), label=program + qualifier extra_commands, value(required), label=moreprog qualifier field_separator, value(required), label=field_sep - qualifier reg_expr, value(type=reg_expr_keywords) !(OBSOLETE) qualifier variables, value(required,list) + qualifier usage qualifier copyright qualifier version - qualifier lint + qualifier lint, value(list,type=lint_keywords) qualifier posix - qualifier usage - qualifier strict, negatable - qualifier debug, negatable + qualifier strict, negatable !synonym for /traditional + qualifier traditional, negatable + qualifier re_interval, negatable !only used with /traditional + qualifier sandbox + qualifier debug, negatable !obsolete; debug via separate DGAWK program qualifier output, value(type=$outfile,default="SYS$OUTPUT") + qualifier optimize, negatable !actually on always; negation is ignored + qualifier profile, value(type=$outfile,default="awkprof.out") + qualifier dump_variables, value(type=$outfile,default="awkvars.out") + qualifier non_decimal_data + qualifier characters_as_bytes + qualifier use_lc_numeric + qualifier gen_pot + qualifier reg_expr, value(type=reg_expr_keywords) !(OBSOLETE) disallow progfile and program !or not progfile and not program + !disallow lint.warn and (lint.fatal or lint.invalid) +define type lint_keywords + keyword warn, default + keyword fatal !lint warnings terminate execution + keyword invalid !warn about invalid constructs but not extensions + keyword old !warn about constructs not available in original awk define type reg_expr_keywords keyword awk keyword egrep, default !synonym for 'posix' @@ -30,17 +57,23 @@ ! /input = program source file ('-f progfile') ! /commands = program source text ('program') !note: either input or commands, but not both; if neither, usage message given +! /extra_commands = additional program source text; may be combined with /input ! /field_separator = character(s) delimiting record fields; default is "[ \t]" -! /reg_expr = type of regular expressions: awk or posix (posix == egrep) -!note: by default, use awk style; /reg_expr (w/o value), use egrep style +! /reg_expr = obsolete ! /variables = list of 'var=value' items for assignment prior to BEGIN ! /posix = force POSIX compatability mode operation -! /strict = force compatability mode operation (UN*X SYS V, Release 4) +! /sandbox = disable I/O redirection and use of system() to execute commands +! /strict = synonym for /traditional +! /traditional = force compatability mode operation (UN*X SYS V, Release 4) +! /re_interval = for /traditional, regular expressions allow interval ranges ! /output = destination for print,printf (default is sys$output: ie, 'stdout') ! /lint = scan the awk program for possible problems and warn about them -! /debug = debugging mode -!note: compilation options determine whether debug mode is valid +! /optimize = parse-time evaluation of constant [sub-]expressions only +! /debug = debugging mode; no-op unless program built using `#define DEBUG' +! /dump_var = at program termination, write out final values for all variables +! /profile = collect all parts of the parsed awk program into awkprof.out +!note: use separate pgawk program to collect run-time execution profiling ! /usage = display 'usage' reminder [describing this VMS command syntax] -! /version = show program version -! /copyright = show abbreviated edition of FSF's copyright notice +! /version = show program version and quit; also shows copyright notice +! /copyright = show abbreviated edition of FSF's copyright notice and quit ! diff -Nru gawk-3.1.8+dfsg/vms/gawk.hlp gawk-4.0.1+dfsg/vms/gawk.hlp --- gawk-3.1.8+dfsg/vms/gawk.hlp 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/gawk.hlp 2011-05-25 19:05:12.000000000 +0000 @@ -5,6 +5,7 @@ ! revised, Jan'95 ! revised, Apr'97 ! revised, Jan'03 +! revised, May'11 ! Online help for GAWK. ! 1 GAWK @@ -26,8 +27,8 @@ There are two main alternatives, depending on how the awk program is to be passed to GAWK. Both alternatives share most options. - Usage: $ gawk [-W opts] [-F fs] [-v var=val] -f progfile [--] file ... - or $ gawk [-W opts] [-F fs] [-v var=val] [--] "program" file ... + Usage: $ gawk [-Wopts] [-F fs] [-v var=val] -f progfile [--] file ... + or $ gawk [-Wopts] [-F fs] [-v var=val] [--] "program" file ... The options are case-sensitive. On VMS, the DCL command interpreter converts unquoted text into uppercase before passing it to the running @@ -35,27 +36,33 @@ (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 - in succession - -Fstring define a value for the FS variable (field separator) - -v var=val assign a value of 'val' to the variable 'var' - -W 'options' additional gawk-specific options; multiple values may - be separated by commas, or by spaces if they're quoted, - or mulitple occurrences of -W may be used. - -W compat use awk "compatibility mode" to disable GAWK extensions - and get the behavior of UN*X awk. - -W copyright [or -W copyleft] display an abbreviated version of - the GNU copyright information - -W help list command line options (same as -W usage) - -W lint warn about suspect or non-portable awk program code - -W lint-old warn about constructs not available in original awk - -W posix compatibility mode with additional restrictions - -W re-interval evaluate '{' and '}' as intervals in regular expressions - -W traditional suppress POSIX and GNU regular expression extensions - -W usage list command line options (same as -W help) - -W version display program version number - -- don't check further arguments for leading dash + -d[file] dump variable values into file (default is awkvars.out + if not specified) upon program completion + -e program_text additional program text, as a quoted string, for use + in combination with -f + -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 in succession + -Fstring define a value for the FS variable (field separator) + -O optimize; of limited use + -p[file] write program execution profiling into file (default + is awkprof.out if not specified) + -v var=val assign a value of 'val' to the variable 'var' + -W'options' additional gawk-specific options; multiple values may + be separated by commas, or by spaces if they're quoted, + or mulitple occurrences of -W may be used. + -Wcopyright display an abbreviated version of the GNU copyright + information + -Whelp list command line options (supersedes -Wusage) + -Wlint warn about suspect or non-portable awk program code + -Wlint=fatal treat lint warnings as errors + -Wlint-old warn about constructs not available in original awk + -Wposix traditional mode with additional restrictions + -Wre-interval evaluate '{' and '}' as intervals in regular expressions + -Wtraditional use awk compatibility mode to disable GAWK extensions + and get the behavior of UN*X awk. + -Wversion display program version number + -- don't check further arguments for leading dash 3 program_text If the '-f file' option is not used on the command line, then the first "non-dash" argument is assumed to be a string of text containing @@ -182,7 +189,16 @@ Multiple source files are processed in order as if they had been concatenated together. - Either /INPUT or /COMMANDS (but not both) must be supplied. + Either /INPUT or /COMMANDS (but not both) must be supplied unless + one of /VERSION, /COPYRIGHT, and /USAGE is used. +/EXTRA_COMMANDS + /EXTRA_COMMANDS="awk program text" (-E "awk program text") + + Add more program text, for use in combination with /INPUT. Unlike + Un*x or GNU syntax processing of VMS GAWK where multiple instances of + -f file and -e text can be interspersed, DCL command processing of + VMS GAWK allows only one /EXTRA_COMMANDS="text" qualifier and handles + it before /INPUT=(file,...). /FIELD_SEPARATOR /FIELD_SEPARATOR="FS_value" (-F"FS_value") @@ -191,36 +207,89 @@ /VARIABLES=("Var1=val1","Var2=val2",...) (-v Var1=val1 -v Var2=val2) Assign value(s) to the specified variable(s). -/REG_EXPR - /REG_EXPR={AWK | EGREP | POSIX} (-a vs -e options [obsolete]) +/OPTIMIZE + /[NO]OPTIMIZE (-"O" option) - This qualifier is obsolete and has no effect. -/STRICT - /[NO]STRICT (-"W compat" option) - - Use strict awk compatibility mode (/strict) and suppress GAWK - extensions. The default is /NOSTRICT. + Perform some relatively minor optimizations on the source code as it + is read in; primarily constant folding. Default is /NOOPTIMIZE but + presently optimization is always enabled and explicitly negating it + has no effect. This may change when/if more elaborate optimizations + are implemented. +/PROFILE + /PROFILE[=file] (-p[file]) + + Write profiling feedback into the specified file. If no file name is + specified, awkprof.out in the current directory is used. +/DUMP_VARIABLES + /DUMP_VARIABLES[=file] (-d[file]) + + Print a sorted list of global variables, their types, and final values + to the specified file. If no file name is specified, awkvars.out in + the current directory is used. +!-/REG_EXPR +!- /REG_EXPR={AWK | EGREP | POSIX} (-a vs -e options [obsolete]) +!- +!- This qualifier is obsolete and has no effect. /POSIX - /[NO]POSIX (-"W posix" option) + /[NO]POSIX (-"Wposix" option) Use POSIX compatibility mode (/posix) and suppress GAWK extensions. The default is /NOPOSIX. Slightly more restrictive than /strict. +/TRADITIONAL + /[NO]TRADITIONAL (-"Wtraditional" option) + + Use strict awk compatibility mode (/traditional) and suppress GAWK + extensions. Supersedes /STRICT. The default is /NOTRADITIONAL. +/STRICT + /[NO]STRICT (-"Wtraditional" option) + + Use strict awk compatibility mode (/strict) and suppress GAWK + extensions. Superseded by /TRADITIONAL. The default is /NOSTRICT. +/RE_INTERVAL + /RE_INTERVAL (-"Wre-interval" option) + + Allow interval expressions in regexps (regular expressions). GAWK + always accepts intervals in normal mode; /RE_INTERVAL can be used to + enable them in strict (/TRADITIONAL) compatability mode. +/SANDBOX + /SANDBOX (-"Wsandbox" option) + + Disables the system() function, input redirections with getline, + output redirections with print and printf, and dynamic extensions. +/NON_DECIMAL_DATA + /NON_DECIMAL_DATA (-"Wnon-decimal-data" option) + + Enable automatic interpretation of octal and hexadecimal values in + input data. Use with care. /LINT - /[NO]LINT (-"W lint" option) + /[NO]LINT[=(WARN,OLD,FATAL)] (-"Wlint" and -"Wlint-old" options) Check the awk program cafefully for potential problems that might be encountered if it were to be used with other awk implementations, and print warnings for anything found. The default in /NOLINT. + + /LINT without a value is equivalent to /LINE=WARN. /LINT=OLD warns + about constructs which wouldn't work with /TRADITIONAL. /LINT=FATAL + turns lint warnings into errors which cause GAWK to terminate. +!- /LINT=INVALID is accepted but isn't documented here. +!three undocumented qualifiers; judged not useful for VMS +!- /CHARACTERS_AS_BYTES +!- /CHARACTERS_AS_BYTES (-"Wcharacters-as-bytes" option) +!- /USE_LC_NUMERIC +!- /USE_LC_NUMERIC (-"Wuse-lc-numeric" option) +!- /GEN_POT +!- /GEN_POT (-"Wgen-pot" option) /VERSION - /VERSION (-"W version" option) + /VERSION (-"Wversion" option) - Print GAWK's version number. + Print GAWK's version number and then terminate. Includes copyright + notice. /COPYRIGHT - /COPYRIGHT (-"W copyright" or -"W copyleft" option) + /COPYRIGHT (-"Wcopyright" option) - Print a brief version of GAWK's copyright notice. + Print a brief version of GAWK's copyright notice and then terminate. /USAGE - /USAGE (comparable to -"W usage" or -"W help" option) + /USAGE (comparable to -"Whelp" option) Print a compact summary of the command line options. @@ -272,6 +341,24 @@ reading the 1st record of the 1st input file END keyword for specifying a rule to be executed after handling the last input record of last file + BEGINFILE gawk-specific keyword for specifying a rule to be + executed when a file from the command line + has just been opened, before attempting to + read its first record + ENDFILE gawk-specific keyword for specifying a rule to be + executed after the last record of a file + from the command has been processed by any + other patterns and actions +4 BEGINFILE + Normally a file open attempt which fails will generate an error + and cause GAWK to terminate. However, if your program has a + BEGINFILE rule, failed open attempts will set ERRNO to a non-null + value and execute the BEGINFILE rule's actions. You can check + for that condition and use the 'nextfile' statement to skip files + which couldn't be opened. Note that when executing the BEGINFILE + rule for a failed open attempt, allowing the actions to finish + without using 'nextfile' will result in an error just like for a + program which has no BEGINFILE rule. 4 examples Some example patterns (mostly with the corresponding actions omitted) @@ -290,6 +377,9 @@ unnecessary in awk) END { print "total =", sum } # keyword 'END': perform this action after the last input record has been processed + # two different ways to handle the start of an input file: + FNR == 1 { print FILENAME } # print name after reading first record + BEGINFILE { print FILENAME } # print name before reading first record 3 actions An 'action' is something to do when a given record has matched the corresponding pattern in a rule. In general, actions resemble 'C' @@ -479,6 +569,43 @@ } Another example ('next' is described under 'action-controls') if ($1 > $2) { print "rejected"; next } else diff = $2 - $1 +4 switch-case + A gawk extension provides an alternative for conditional execution + to the if-then-else construct. The switch statement takes a value + to use to decide which of one or more case clauses to execute, + similar to the same construct in C and C++. The main difference + is that in those languages, the case values must be constant + integers, whereas in awk they can by numbers, strings, or regular + expressions. Like in C/C++, an optional 'default' clause can be + specified to serve as a catch-all for values which don't match + any of the cases. + + The first case which matches the switch value is the one which + will be executed. If it doesn't use one of 'break', 'continue', + 'next', 'nextfile', 'return', or 'exit', then execution will + continue into the body of the next case. (Note that 'continue' + doesn't operate as an explicit request to do such; rather, it + causes execution of an enclosing for, while, or do-while + statement to jump to the end of its loop.) +5 example + In this example, the value of variable 'x' is examined. It + contains a mistake that someone coming from a background of + programming in Pascal might accidentally make. + + switch (x) { + case 1: print "x is 1"; break; + case 2: print "x is 2" + case "two": print "x is \"two\""; break; + default: print "x is neither 1 nor 2"; break + } + + Note that if the value is '2', after printing "x is 2" it will + continue into the next case and also print "x is \"two\"", which + was probably not intended. The 'break' statement is needed to + jump out of the switch statement instead of falling through + into the subsequent clause. For the very last one, 'default' + in this example, 'break' is optional; reaching the closing + bracket of a switch statement also breaks out of the statement. 4 loops Three types of loop statements are available in awk. Each uses the same syntax as 'C'. The simplest of the three is the 'while' @@ -522,7 +649,8 @@ array_name (where 'var in array' is enclosed in parentheses), followed by a statement (or block). Each valid subscript value for the array in question is successively placed--in no particular - order--into the specified 'index' variable. + order--into the specified 'index' variable. Order can optionally + be controlled by assigning a sort mode to PROCINFO["sorted_in"]. 5 while_example # strip fields from the input record until there's nothing left while (NF > 0) { @@ -546,6 +674,98 @@ # display contents of builtin environment array for (itm in ENVIRON) print itm, ENVIRON[itm] +5 for_index_in_array_sorting + Normally indices in an array are processed in an arbitrary + order when using the 'for (index in array)' statement, + but a gawk-extension allows you to control that order. + Assign a value to the "sorted_in" element of the PROCINFO[] + array to accomplish this. The value may be a comparison + function which accepts four arguments (index and value of one + element, then index and value of another), or a special value + which specifies one of several built-in comparison functions. + These functions are used to compare pairs of array elements + and their result controls which of each pair comes before the + other. +6 comparison_function + A function assigned to PROCINFO["sorted_in"] should be + prepared to accept four arguments and to return a numeric + value, negative if the element specified by the first two + arguments (its index and its value, respectively) is less + than the element specified the second pair of arguments, + zero if they compare equal, and positive of the first + element is greater than the second. Here's an example: + + function my_compare(idx1, val1, idx2, val2) + { + if (val1 < val2) return -1 + if (val2 > val2) return 1 + # the two values are equal + return (idx1 < idx2) ? -1 : (idx1 > idx2) + } + + This compares the two values and returns either negative + or positive if they're different. If they're the same, + it compares the two indices as a tie-breaker instead of + simply returning zero. + + You can force values to be numeric or to be string, as + needed, and use more elaborate ordering criteria. Just + be sure that the results are consistent; returning a + positive value when idx1,val1 is compared to idx2,val2 + and then also returning a positive value if idx2,val2 + gets compared to idx1,idx2 will likely confuse the sort + routine and produce strange results. + + If you plan to sort arrays which contain sub-arrays (array + elements which contain their own arrays) and you're sorting + by value rather than by index, your compare routine should + use the isarray() function to check for them (test second + and fourth arguments to see whether they're arrays) and + handle them appropriately. The basic comparison operators + like '<' will produce an error if used on arrays. +6 built-in_comparisons + Here is a list of built-in compare routines that can be + assigned to PROCINFO["sorted_in"]. They are strings + and start with '@' so that these names can't be confused + with actual functions. + + "@ind_str_asc" order by indices compared as strings + (all array indices are strings internally, + even when they were assigned as numbers) + "@ind_num_asc" order by indices compared as numbers + (non-numeric ones end up with value 0) + "@val_type_asc" order by values using assigned type + (if a mixture of strings and numbers is + present, numbers come first, then strings) + "@val_str_asc" order by values compared as strings + "@val_num_asc" order by values compared as numbers + "@ind_str_desc" \ + "@ind_num_desc" \ + "@val_type_desc" descending versions of the above + "@val_str_desc" / + "@val_num_desc" / + "@unsorted" explicitly specify arbitrary order + (same as deleting the "sorted_in" element + from the PROCINFO[] array, or never having + assigned it a value in the first place) + + All the ascending sorts put sub-arrays--if any--last, and + descending ones place them first. When multiple sub-arrays + are present, they tie with each other without regard to + their contents; such ties are then disambiguated by + comparing their indices. +6 processing_order + Sorting of the array takes place as the 'for (index in array)' + statement is about to start executing. Changing the value of + PROCINFO["sorted_in"] during the course of the loop will not + affect traversal order, and could be used to control ordering + of sub-arrays using different criteria. + + After the loop finishes, any ordering imposed on the indices + is forgotten. A subsequent 'for (index in array)' traversal + of the same array will yield whatever order is specified by + PROCINFO["sorted_in"] at that time, including reverting to + arbitrary if it no longer has a value. 4 loop-controls There are two special statements--both from 'C'--for changing the behavior of loop execution. The 'continue' statement is useful in @@ -569,10 +789,12 @@ the next input record will be immediately processed. This is useful if any early action knows that the current record will fail all the remaining patterns; skipping those rules will reduce processing time. - An extended form, 'next file', is also available. It causes the - remainder of the current file to be skipped, and then either the - next input file will be processed, if any, or the END action will be - performed. 'next file' is not available in traditional awk. + + A GAWK extension, 'nextfile', is also available. It causes the + remainder of the current file to be skipped, the ENDFILE action, if + applicable, to be performed, and then the next input file will be + processed. If there is no next input file, the END action will be + performed. 'nextfile' is not available in traditional awk. The 'exit' statement causes GAWK execution to terminate. All open files are closed, and no further processing is done. The END rule, @@ -583,9 +805,11 @@ 4 other_statements The delete statement is used to remove an element from an array. The syntax is 'delete' keyword followed by array name, followed - by index value enclosed in square brackets ([]). 'delete' may - also used on an array name, without any index specified, to delete - all its elements in a single operation. + by index value enclosed in square brackets ([]). As a gawk + extension, 'delete' may also used on an array name without any + index specified, to delete all its elements in a single operation. + (The array itself will continue to exist as an array, even though + it no longer contains any elements.) The return statement is used in user-defined functions. The syntax is the keyword 'return' optionally followed by a string or numeric @@ -620,6 +844,38 @@ to be re-evaluated. Changing a specific field will cause $0 to receive a new value once it's re-evaluated, but until then the other existing fields remain unchanged. +4 field_separation + Three built in variables control separating input lines into fields, + and the most recently assigned of those three is the one which has + effect. PROCINFO["FS"] can be used to determine which one that is. + + FS is a character, string, or regular expression specifying what + separates fields. It is available in all implementations of awk so + is the most widely used. The default value is an explicit space and + behaves as if the value was /[ \t\n]+/ to treat any number of spaces + and tabs (and newlines, if RS isn't using them as record separators) + as the separator. (Explicitly using that regular expression + actually produces different results if the input happens to have + leading and/or trailing whitespace. The default skips such space; + the regexp increases NF by 1 and produces an empty $1 if there is + leading whitespace and it increases NF by 1 and produces an empty $NF + if there is trailing whitespace. To actually force the separator to + be a single space, use the regular expression / /.) + + FIELDWIDTHS is a string containing a space-separated list of numbers + which indicate how wide each field is. It is a gawk-extension and + used to be considered experimental, but it has been in place for many + years without significant changes. There is no default value, nor is + there any way to specify a repeat count the way a Fortran FORMAT + statment could. + + FPAT is a regular expression which specifies field values rather than + the separation between fields. It is also a gawk-extension and is + new with version 4.0.0. + + A gawk-extension makes setting FS to "" force each input character + to be a separate field, similar to FIELDWIDTHS="1 1 1 1 1 1"(...) if + you were able to supply an unlimited number of 1's. 3 variables Variables in awk can hold both numeric and string values and do not have to be pre-declared. In fact, there is no way to explicitly @@ -640,12 +896,15 @@ These builtin variables control how awk behaves FS input field separator; default is a single space, which is treated as if it were a regular expression for matching - one or more spaces and/or tabs; a value of " " also has a - second special-case side-effect of causing leading blanks - to be ignored instead of producing a null first field; + one or more spaces and/or tabs and/or newlines; a value + of " " also has a second special-case side-effect of + causing leading and/or trailing blanks to be ignored + instead of producing a null first and/or last field; initial value can be specified on the command line with the -F option (or /field_separator); the value can be a - regular expression + regular expression; as a gawk extension, if the value is + an empty string (""), every character becomes a separate + field RS input record separator; default value is a newline ("\n"); the value can be multiple characters or a regular expression OFS output field separator; value to place between variables in @@ -676,6 +935,21 @@ value assigned to it; [note: the current implementation of fixed-field input is considered experimental and is expected to evolve over time] + FPAT an alternate way to specify fields, with a regexp pattern + which defines field values rather than field separator + [assigning a value to any of FS, FIELDWIDTHS, or FPAT + causes the other two to be deactivated; the value of + PROCINFO["FS"] can be used to determine which one is + currently in use] + BINMODE can be used force input and/or output files to be processed + using binary I/O; a value of 1 or "r" forces binary mode when + reading input, a value of 2 or "w" forces binary mode when + writing output, and a value of 3 or "rw" causes GAWK to use + binary mode for both input and output; BINMODE has no effect + on reading from stdin or writing to stdout; they'll have + already been opened in text mode before you assign a value + LINT setting or unsetting this can dynamically toggle the --lint + command line option on or off These builtin variables provide useful information NF number of fields in the current record @@ -684,7 +958,7 @@ FNR current record number of the current input file; reset to 0 each time an input file is completed RT record terminator, the input text which matched RS; not - available when the `-W traditional' option is used + available when the `-Wtraditional' option is used RSTART starting position of substring matched by last invocation of the 'match' function; set to 0 if a match fails and at the start of each input record @@ -697,8 +971,15 @@ username), ["PATH"] (current default directory), ["HOME"] (the user's login directory), and "[TERM]" (terminal type if available) [all info provided by C RTL's environ] + PROCINFO miscellaneous process information and assorted GAWK + extensions which don't fit in elsewhere ERRNO information about the cause of failure for 'getline' or - 'close'; "0" if no such failure has occured. + 'close' or for file open during a BEGINFILE rule; it is + only set if an error has occurred, it isn't reset when + any subsequent operation succeeds; the only exception is + that it is reset prior to attempting to open a file so + that BEGINFILE rule actions can distinguish between + success and failure ARGC number of elements in the ARGV array, counting [0] which is the program name (ie, "gawk") ARGV array of command-line arguments (in [0] to [ARGC-1]); the @@ -741,6 +1022,19 @@ To process all elements of an array (in succession) when their subscripts might be unknown, use the 'in' variant of the for-loop for (Index in Array) { ... } + (See the "awk_language statements loops" entry for a way to control + the order of traversal with this construct.) + + Starting with version 4.0.0 array values can contain arrays, sometimes + referred to as sub-arrays. They're created by assigning a value using + multiple instances of subscripting: 'a[1][2] = 3' would create array + a if it didn't already exist, create array element a[1] if it didn't + already exist, create sub-array element a[1][2] if it didn't exist, + then assign that the value 3. You can't directly assign an existing + array to be a subarray: 'a[1] = 2; a[3] = 4; b["a"] = a' would get + rejected. But you can produce the same effect by traversing the array + and assigning it element by element: + 'a[1] = 2; a[3] = 4; for (i in a) b["a"][i] = a[i]'. 3 functions awk supports both built-in and user-defined functions. A function may be considered a 'black-box' which accepts zero or more input @@ -789,11 +1083,18 @@ variables RSTART and RLENGTH are also set [RSTART to the return value and RLENGTH to the size of the matching substring, or to -1 if no match was found] - split(s,a,f) break string s into components based on field + split(s,a,f,x) break string s into components based on field separator f and store them in array a (into elements - [1], [2], and so on); the last argument is optional, - if omitted, the value of FS is used; the return value - is the number of components found + [1], [2], and so on); the third argument is optional, + if omitted, the value of FS is used; the fourth one + is optional too, and is a gawk extension; when + specified it should be an array which will receive + the separators between the corresponding fields; the + return value is the number of components found + patsplit(s,a,p,x) similar to split, but p is a regexp pattern + specifying field contents rather than a separator; + if not specified, the value of FPAT is used; this + function is a gawk extension sprintf(f,e,...) format expression(s) e using format string f and return the result as a string; formatting is similar to the printf function @@ -827,13 +1128,61 @@ tolower(s) return a copy of string s in which every uppercase letter has been converted into lowercase toupper(s) analogous to tolower(); convert lowercase to uppercase + strtonum(s) convert string s into the corresponding number; if s + begins with "0x", the rest of the string will be + considered to be hexacimal digits, otherwise if it + begins with "0" (not "o"), the rest will be treated + as octal digits; this function is a gawk extension +4 array_functions + isarray(a) returns 1 of a is an array, 0 otherwise; most useful + when traversing an array which might contain array + values (sub-arrays) + split(s,a[,f[,x]]) break string s into components based on field + separator f and store them in array a (into elements + [1], [2], and so on); the third argument is optional, + if omitted, the value of FS is used; the fourth one + is optional too, and is a gawk extension; when + specified it should be an array which will receive + the separators between the corresponding fields; the + return value is the number of components found + patsplit(s,a[,p[,x]]) similar to split, but p is a regexp pattern + specifying field contents rather than a separator; + if not specified, the value of FPAT is used; this + function is a gawk extension + asort(s[,d[,m]]) sort the contents of array s, replacing the index + values with an integer sequence of 1 to N; if d is + specified, leave the indices of s intact and put the + values and sequence index into d; if m is specified, + it should be a string containing "ascending" or + "descending" to control order, or "string" or "number" + to control how comparisons are performed, or a + combination of the two; m can also be a comparison + function similar to ones used by PROCINFO["sorted_in"] + asorti(s[,d[,m]]) sort the indices of array s, replacing the values + with an integer sequence of 1 to N; if d is specified, + leave the values of s intact and put the indices and + sequence values into d; m is the same as for asort() 4 time_functions Builtin time functions systime() return the current time of day as the number of seconds since some reference point; on VMS the reference point is January 1, 1970, at 12 AM local time (not UTC) - strftime(f,t) format time value t using format f; if t is omitted, - the default is systime() + mktime(s) convert string s into number of seconds since the + reference point; s should contain a value of the form + "yyyy mm dd hh mm ss[ dst]" where yyyy is a four digit + year, mm a month number from 1 to 12, dd day-of-month + number from 1 to 31, hh hour 0 to 23, mm minute 0 to + 59, ss second 0 to 60, and [ dst] is an optional flag + to handle daylight savings time: if dst is positive, + then daylight savins time is in effect, if zero, then + it isn't, and if negative or omitted, gawk attempts + to determine whether it was--or will be--at specified + date and time + strftime(f,t,u) format time value t using format f; if it is omitted + then PROCINFO["strftime"] is used; if t is omitted, + the default is systime(); if u is present and non-zero + then t is treated as a UTC value, otherwise it is + considered to be local time 5 time_formats Formatting directives similar to the 'printf' & 'sprintf' functions (each is introduced in the format string by preceding it with a @@ -997,6 +1346,25 @@ actually longer) or as number of fraction digits for 'f' or 'e' numeric formats, or number of significant digits for 'g' numeric format +4 bitwise_functions + Bitwise functions operate on bits (binary digits) of integer + numeric values. Non-integer numbers are converted into integers + before their bits are accessed. + + and(x,y) x AND y, where result contains 1 for bits that both x + and y have set, 0 for other bits + or(x,y) x OR y, where the result contains 1 for any bits that + either x or y or both have set, 0 for other bits + xor(x,y) x XOR y, where the result contains 1 for bits that x + has set but y has clear or vice versa, 0 for other bits + compl(x) NOT x, where the result contains 1 for bits that x + has clear and 0 for bits that it has set + lshift(x,n) x << n, shift the bits of x by n positions left, + approximately the same as x * 2^n + rshift(x,n) x >> n, shift the bits of x by n positions right, + approximately the same as int(x / 2^n) + + The set of bitwise functions is a gawk extension. 4 user_defined_functions User-defined functions may be created as needed to simplify awk programs or to collect commonly used code into one place. The @@ -1015,6 +1383,26 @@ Functions may be placed in an awk program before, between, or after the pattern-action rules. The abbreviation 'func' may be used in place of 'function', unless POSIX compatibility mode is in effect. +4 indirect_function_calls + A gawk extension allows you to assign a string containing the name + of a function to a variable, then call the function by preceding + the variable with @ (at-sign) and following with the parenthesized + argument list. For example + + function my_max(x, y) { return (x > y) ? x : y } + function my_min(x, y) { return (x < y) ? x : y } + ... + max_or_min = some_criterion ? "my_max" : "my_min" + ... + c = @max_or_min(a, b) + + would call either my_max() or my_min() depending upon the value of + some_criterion at the time max_or_min was assigned. + + Indirect function calls only operate on user-defined functions, not + on built-in ones. If you need to use one of the latter, create a + user-defined function to call the built-in function; this if often + referred to as a "wrapper" function. 3 regular_expressions A regular expression is a shorthand way of specifying a 'wildcard' type of string comparison. Regular expression matching is very @@ -1052,7 +1440,7 @@ followed by a single digit] { } interval specification; {n} to match n times or {m,n} to match at least m but not more than n times; only functional when - either the `-W posix' or `-W re-interval' options are used + either the `-Wposix' or `-Wre-interval' options are used \ quote; prevent the character which follows from having special meaning; if the regexp is specified as a string, then the backslash itself will need to be quoted by preceding it with @@ -1098,17 +1486,10 @@ 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 - successfully with GNU C (tested with gcc-vms 2.7.1). + GAWK 4.0.0 has many changes from 3.1.8, and these release_notes were + not updated for any of the 3.1.* releases, so some information is + probably missing or out of date. In particular, the known_problems + subtopic hasn't been touched in many years. 3 AWK_LIBRARY GAWK uses a built in search path when looking for a program file specified by the -f option (or the /input qualifier) when that file @@ -1179,8 +1560,49 @@ 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 + Changes between version 4.0.0 and earlier versions + + [This 'changes' section hasn't been updated in many releases. Some + features mentioned here may have become available in versions 3.1.*.] + + General + dgawk.exe does interactive debugging of awk programs + pgawk.exe does comprehensive execution profiling of awk programs + -d[file] and -p[file] options added + -Wcompat and -Wusage options dropped; use -Wtraditional and -Whelp + BEGINFILE and ENDFILE built-in rule patterns + nextfile statement skips remainder of current input file + switch-case statement performs an alternate form of if-then-else + indirect function calls: var="user_function"; @var(args) + + FPAT regexp pattern as alternative to FS field splitting + patsplit() function, FPAT analog to split() + PROCINFO["sorted_in"] can be used to control traversal order for + 'for (index in array)' statement + asort(), asorti() functions, to sort arrays + sub-arrays: array element values can be arrays + isarray() function, to test whether a value is an array + + PROCINFO["strftime"] can be used to supply default format for + date/time formatting by strftime() function + mktime() function, to convert list of separate date and time fields + into single numeric date/time value + and(), or(), xor(), compl(), lshift(), rshift() functions, to + perform bit-wise logic operations on numeric values + strtonum() function, to convert string of digits into number, with + support for radix prefix '0' (octal) and '0x' (hexadecimal) + + VMS-specific + New command qualifiers: /EXTRA_COMMANDS, /PROFILE, /DUMP_VARIABLES, + /OPTIMIZE, /TRADITIONAL, /SANDBOX, /NON_DECIMAL_DATA + Revised qualifier: /LINT, takes optional argument list + Deprecated qualifier: /STRICT, superseded by /TRADITIONAL 3 prior_changes + Changes between version 3.1.8 and [...] and 3.0.6 + + [Someday someone ought to dig up and document this information....] + Changes between version 3.0.6 and 2.15.6 General diff -Nru gawk-3.1.8+dfsg/vms/gawkmisc.vms gawk-4.0.1+dfsg/vms/gawkmisc.vms --- gawk-3.1.8+dfsg/vms/gawkmisc.vms 2007-08-11 19:40:06.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/gawkmisc.vms 2012-03-28 19:47:54.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-1996, 2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-1996, 2003, 2011 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -169,3 +169,28 @@ /* no-op */ return; } + +/* files_are_same --- deal with VMS struct stat */ + +int +files_are_same(char *newfile, SRCFILE *oldfile) +{ + struct stat st, *f1, *f2; + + f1 = &st; + if (stat(newfile, f1) != 0) return 0; + + f2 = &oldfile->sbuf; + /* compare device string */ + return (strcmp(f1->st_dev, f2->st_dev) == 0 + /* and 48-bit file id cookie stored in 3 short ints */ + && f1->st_ino[0] == f2->st_ino[0] + && f1->st_ino[1] == f2->st_ino[1] + && f1->st_ino[2] == f2->st_ino[2]); +} + +int +os_isatty(int fd) +{ + return (isatty(fd) > 0); +} diff -Nru gawk-3.1.8+dfsg/vms/redirect.h gawk-4.0.1+dfsg/vms/redirect.h --- gawk-3.1.8+dfsg/vms/redirect.h 2010-04-21 19:24:39.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/redirect.h 2011-02-13 18:19:21.000000000 +0000 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-1993, 1996, 1997, 2007, 2010 + * Copyright (C) 1986, 1988, 1989, 1991-1993, 1996, 1997, 2007, 2010, 2011 * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -41,6 +41,8 @@ #define regexec gnu_regexec #define regfree gnu_regfree #define regerror gnu_regerror +#define setenv gawk_setenv +#define unsetenv gawk_unsetenv #ifndef VMS_POSIX #define strftime gnu_strftime /* always use missing/strftime.c */ #define strcasecmp gnu_strcasecmp @@ -84,47 +86,47 @@ #define pclose vms_pclose #ifndef HAVE_SNPRINTF #define snprintf gawk_snprintf /* avoid %CC-I-INTRINSICDECL diagnostic */ -#else -#ifdef CRTL_VER_V732 -/* when overriding the version of the C library that compiler thinks is - in use, we need to duplicate something being suppressed in */ -int snprintf(char *,size_t,const char *,...); -#endif +#define vsnprintf gawk_vsnprintf #endif +/* supply missing or suppressed (due to defines in config.h) declarations */ +extern int snprintf(char *,size_t,const char *,...); +extern int vsnprintf(char *restrict,size_t,const char *,va_list); +extern int setenv(const char *,const char *,int); +extern int unsetenv(const char *); #define strerror vms_strerror #define strdup vms_strdup #define unlink vms_unlink #if defined(VAXC) || (defined(__GNUC__) && !defined(__alpha)) #define fstat(fd,sb) VMS_fstat(fd,sb) #endif -extern void exit P((int)); -extern int open P((const char *,int,...)); -extern char *strerror P((int)); -extern char *strdup P((const char *str)); -extern int vms_devopen P((const char *,int)); +extern void exit(int); +extern int open(const char *,int,...); +extern char *strerror(int); +extern char *strdup(const char *str); +extern int vms_devopen(const char *,int); # ifndef NO_TTY_FWRITE #define fwrite tty_fwrite #define fclose tty_fclose -extern size_t fwrite P((const void *,size_t,size_t,FILE *)); -extern int fclose P((FILE *)); +extern size_t fwrite(const void *,size_t,size_t,FILE *); +extern int fclose(FILE *); # endif -extern FILE *popen P((const char *,const char *)); -extern int pclose P((FILE *)); -extern void vms_arg_fixup P((int *,char ***)); +extern FILE *popen(const char *,const char *); +extern int pclose(FILE *); +extern void vms_arg_fixup(int *,char ***); /* some things not in STDC_HEADERS */ -extern size_t gnu_strftime P((char *,size_t,const char *,const struct tm *)); -extern int unlink P((const char *)); -extern int getopt P((int,char **,char *)); -extern int isatty P((int)); +extern size_t gnu_strftime(char *,size_t,const char *,const struct tm *); +extern int unlink(const char *); +extern int getopt(int,char **,char *); +extern int isatty(int); #ifndef fileno -extern int fileno P((FILE *)); +extern int fileno(FILE *); #endif -extern int close P((int)); -extern int dup P((int)); -extern int dup2 P((int, int)); -extern int read P((int, void *, int)); -extern int getpgrp P((void)); -extern void tzset P((void)); +extern int close(int); +extern int dup(int); +extern int dup2(int, int); +extern int read(int, void *, int); +extern int getpgrp(void); +extern void tzset(void); #endif /* not VMS_POSIX and not IN_CONFIG_H */ diff -Nru gawk-3.1.8+dfsg/vms/vms-conf.h gawk-4.0.1+dfsg/vms/vms-conf.h --- gawk-3.1.8+dfsg/vms/vms-conf.h 2010-04-21 19:26:02.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms-conf.h 2012-03-28 19:59:47.000000000 +0000 @@ -7,8 +7,8 @@ */ /* - * Copyright (C) 1991-1992, 1995-1996, 1999, 2001-2003, 2005, 2009, 2010 - * the Free Software Foundation, Inc. + * Copyright (C) 1991-1992, 1995-1996, 1999, 2001-2003, 2005, 2009, 2010, 2011, + * 2012, the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -128,13 +128,13 @@ #define HAVE_ISASCII 1 /* Define to 1 if you have the `iswctype' function. */ -#undef HAVE_ISWCTYPE +#define HAVE_ISWCTYPE 1 /* Define to 1 if you have the `iswlower' function. */ -#undef HAVE_ISWLOWER +#define HAVE_ISWLOWER 1 /* Define to 1 if you have the `iswupper' function. */ -#undef HAVE_ISWUPPER +#define HAVE_ISWUPPER 1 /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET @@ -145,11 +145,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H +/* Define if you have the libsigsegv library. */ +#undef HAVE_LIBSIGSEGV + /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM -/* Define if you have the sigsegv library. */ -#undef HAVE_LIBSIGSEGV +/* Define to 1 if you have a fully functional readline library. */ +#undef HAVE_LIBREADLINE /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 @@ -164,10 +167,10 @@ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `mbrlen' function. */ -#undef HAVE_MBRLEN +#define HAVE_MBRLEN 1 /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ -#undef HAVE_MBRTOWC +#define HAVE_MBRTOWC 1 /* Define to 1 if you have the header file. */ #undef HAVE_MCHECK_H @@ -205,14 +208,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H -/* we have portals on /p on this system */ -#undef HAVE_PORTALS +/* we'll use the one in [.missing_d] */ +#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 +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF @@ -242,6 +245,9 @@ /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 +/* Define to 1 if you have the `strcoll' function. */ +#define HAVE_STRCOLL 1 + /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 @@ -286,6 +292,9 @@ /* Define to 1 if you have the `system' function. */ #define HAVE_SYSTEM 1 +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -319,10 +328,10 @@ #undef HAVE_TM_ZONE /* Define to 1 if you have the `towlower' function. */ -#undef HAVE_TOWLOWER +#define HAVE_TOWLOWER 1 /* Define to 1 if you have the `towupper' function. */ -#undef HAVE_TOWUPPER +#define HAVE_TOWUPPER 1 /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ @@ -354,22 +363,22 @@ #define HAVE_VPRINTF 1 /* Define to 1 if you have the header file. */ -#undef HAVE_WCHAR_H +#define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcrtomb' function. */ -#undef HAVE_WCRTOMB +#define HAVE_WCRTOMB 1 /* Define to 1 if you have the `wcscoll' function. */ -#undef HAVE_WCSCOLL +#define HAVE_WCSCOLL 1 /* Define to 1 if you have the `wctype' function. */ -#undef HAVE_WCTYPE +#define HAVE_WCTYPE 1 /* Define to 1 if you have the header file. */ -#undef HAVE_WCTYPE_H +#define HAVE_WCTYPE_H 1 /* systems should define this type here */ -#undef HAVE_WCTYPE_T +#define HAVE_WCTYPE_T 1 /* systems should define this type here */ #undef HAVE_WINT_T @@ -399,14 +408,11 @@ #undef PACKAGE_URL /* Define to the version of this package. */ -#define PACKAGE_VERSION "3.1.8" +#define PACKAGE_VERSION "4.0.1" /* Define to 1 if *printf supports %F format */ #undef PRINTF_HAS_F_FORMAT -/* Define to 1 if the C compiler supports function prototypes. */ -#define PROTOTYPES 1 - /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -416,9 +422,6 @@ /* The size of a `unsigned long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG 4 -/* return type of sprintf */ -#define SPRINTF_RET int - /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -435,7 +438,7 @@ #define USE_INCLUDED_STRFTIME 1 /* Version number of package */ -#define VERSION "3.1.8" +#define VERSION "4.0.1" /* Define to 1 if on AIX 3. System headers sometimes define this. @@ -481,9 +484,6 @@ # undef _TANDEM_SOURCE #endif -/* Define like PROTOTYPES; this can be used by system headers. */ -#define __PROTOTYPES 1 - /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff -Nru gawk-3.1.8+dfsg/vms/vms.h gawk-4.0.1+dfsg/vms/vms.h --- gawk-3.1.8+dfsg/vms/vms.h 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms.h 2011-03-03 19:10:16.000000000 +0000 @@ -29,6 +29,7 @@ #define CLI$_SYNTAX 0x000310FC /* error signalled by CLI$DCL_PARSE */ #define CLI$_INSFPRM 0x00038048 /* insufficient parameters */ #define CLI$_VALREQ 0x00038150 /* missing required value */ +#define CLI$_NEGATED 0x000381F8 /* explicitly negated */ #define CLI$_CONFLICT 0x00038258 /* conflicting qualifiers */ #define CLI$_NOOPTPRS 0x00038840 /* no option present */ #endif @@ -52,36 +53,36 @@ #define CondVal(sts) ((sts)&0x0FFFFFF8) /* strip severity & msg inhibit */ #define Descrip(strdsc,strbuf) Dsc strdsc = {sizeof strbuf - 1, (char *)strbuf} -extern int shell$is_shell P((void)); -extern U_Long lib$find_file P((const Dsc *, Dsc *, void *, ...)); -extern U_Long lib$find_file_end P((void *)); +extern int shell$is_shell(void); +extern U_Long lib$find_file(const Dsc *, Dsc *, void *, ...); +extern U_Long lib$find_file_end(void *); #ifndef NO_TTY_FWRITE -extern U_Long lib$get_ef P((long *)); -extern U_Long sys$assign P((const Dsc *, short *, long, const Dsc *)); -extern U_Long sys$dassgn P((short)); -extern U_Long sys$qio P((U_Long, U_Long, U_Long, void *, +extern U_Long lib$get_ef(long *); +extern U_Long sys$assign(const Dsc *, short *, long, const Dsc *); +extern U_Long sys$dassgn(short); +extern U_Long sys$qio(U_Long, U_Long, U_Long, void *, void (*)(U_Long), U_Long, - const char *, int, int, U_Long, int, int)); -extern U_Long sys$synch P((long, void *)); + const char *, int, int, U_Long, int, int); +extern U_Long sys$synch(long, void *); #endif /*!NO_TTY_FWRITE*/ -extern U_Long lib$spawn P((const Dsc *,const Dsc *,const Dsc *, - const U_Long *,const Dsc *,U_Long *,U_Long *,...)); +extern U_Long lib$spawn(const Dsc *,const Dsc *,const Dsc *, + const U_Long *,const Dsc *,U_Long *,U_Long *,...); /* system services for logical name manipulation */ -extern U_Long sys$trnlnm P((const U_Long *,const Dsc *,const Dsc *, - const unsigned char *,Itm *)); -extern U_Long sys$crelnm P((const U_Long *,const Dsc *,const Dsc *, - const unsigned char *,const Itm *)); -extern U_Long sys$crelog P((int,const Dsc *,const Dsc *,unsigned char)); -extern U_Long sys$dellnm P((const Dsc *,const Dsc *,const unsigned char *)); - -extern void v_add_arg P((int, const char *)); -extern void vms_exit P((int)); -extern char *vms_strerror P((int)); -extern char *vms_strdup P((const char *)); -extern int vms_devopen P((const char *,int)); -extern int vms_execute P((const char *, const char *, const char *)); -extern int vms_gawk P((void)); -extern U_Long Cli_Present P((const char *)); -extern U_Long Cli_Get_Value P((const char *, char *, int)); -extern U_Long Cli_Parse_Command P((const void *, const char *)); +extern U_Long sys$trnlnm(const U_Long *,const Dsc *,const Dsc *, + const unsigned char *,Itm *); +extern U_Long sys$crelnm(const U_Long *,const Dsc *,const Dsc *, + const unsigned char *,const Itm *); +extern U_Long sys$crelog(int,const Dsc *,const Dsc *,unsigned char); +extern U_Long sys$dellnm(const Dsc *,const Dsc *,const unsigned char *); + +extern void v_add_arg(int, const char *); +extern void vms_exit(int); +extern char *vms_strerror(int); +extern char *vms_strdup(const char *); +extern int vms_devopen(const char *,int); +extern int vms_execute(const char *, const char *, const char *); +extern int vms_gawk(void); +extern U_Long Cli_Present(const char *); +extern U_Long Cli_Get_Value(const char *, char *, int); +extern U_Long Cli_Parse_Command(const void *, const char *); diff -Nru gawk-3.1.8+dfsg/vms/vms_args.c gawk-4.0.1+dfsg/vms/vms_args.c --- gawk-3.1.8+dfsg/vms/vms_args.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms_args.c 2011-01-27 19:52:41.000000000 +0000 @@ -1,7 +1,7 @@ /* vms_args.c -- command line parsing, to emulate shell i/o redirection. [ Escape sequence parsing now suppressed. ] - Copyright (C) 1991-1996, 1997 the Free Software Foundation, Inc. + Copyright (C) 1991-1996, 1997, 2011 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 @@ -76,6 +76,10 @@ * Add '>+' to force binary mode output, to enable better control * for the user when the output destination is a mailbox or socket. * (ORS = "\r\n" for tcp/ip.) Contributed by Per Steinar Iversen. + * + * Jan'11, gawk 4.0.0 [pr] + * If AWK_LIBRARY is undefined, define it to be SYS$LIBRARY: so + * that the default value of AWKPATH ends with a valid directory. */ #include "awk.h" /* really "../awk.h" */ @@ -103,6 +107,9 @@ int i, argc = *pargc; int err_to_out_redirect = 0, out_to_err_redirect = 0; + /* make sure AWK_LIBRARY has a value */ + if (!getenv("AWK_LIBRARY")) + vms_define("AWK_LIBRARY", "SYS$LIBRARY:"); #ifdef CHECK_DECSHELL /* don't define this if linking with DECC$SHR */ if (shell$is_shell()) return; /* don't do anything if we're running DEC/Shell */ diff -Nru gawk-3.1.8+dfsg/vms/vms_cli.c gawk-4.0.1+dfsg/vms/vms_cli.c --- gawk-3.1.8+dfsg/vms/vms_cli.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms_cli.c 2011-03-03 19:10:16.000000000 +0000 @@ -1,19 +1,37 @@ +/* vms_cli.c -- interface to CLI$xxx routines for fetching command line components + + Copyright (C) 1991-1993, 2003, 2011 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 + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + + /* * vms_cli.c - command line interface routines. * Pat Rankin, Nov'89 * Routines called from vms_gawk.c for DCL parsing. */ -#define P(foo) () #include "config.h" /* in case we want to suppress 'const' &c */ #include "vms.h" #ifndef _STRING_H #include #endif -extern U_Long CLI$PRESENT(const Dsc *); -extern U_Long CLI$GET_VALUE(const Dsc *, Dsc *, short *); -extern U_Long CLI$DCL_PARSE(const Dsc *, const void *, ...); +extern U_Long cli$present(const Dsc *); +extern U_Long cli$get_value(const Dsc *, Dsc *, short *); +extern U_Long cli$dcl_parse(const Dsc *, const void *, ...); extern U_Long sys$cli(void *, ...); extern U_Long sys$filescan(const Dsc *, void *, long *); extern void *lib$establish(U_Long (*handler)(void *, void *)); @@ -28,7 +46,7 @@ (void)lib$establish(lib$sig_to_ret); item_dsc.len = strlen(item_dsc.adr = (char *)item); - return CLI$PRESENT(&item_dsc); + return cli$present(&item_dsc); } /* Cli_Get_Value() - call CLI$GET_VALUE to retreive the value of a */ @@ -43,7 +61,7 @@ item_dsc.len = strlen(item_dsc.adr = (char *)item); res_dsc.len = size, res_dsc.adr = result; - sts = CLI$GET_VALUE(&item_dsc, &res_dsc, &len); + sts = cli$get_value(&item_dsc, &res_dsc, &len); result[len] = '\0'; return sts; } @@ -84,7 +102,7 @@ cmd.rdesc.len = sizeof longbuf - ltmp; strncpy(&longbuf[ltmp], cmd.rdesc.adr, cmd.rdesc.len); cmd.rdesc.len += ltmp, cmd.rdesc.adr = longbuf; - sts = CLI$DCL_PARSE( &cmd.rdesc, cmd_tables); + sts = cli$dcl_parse(&cmd.rdesc, cmd_tables); } return sts; diff -Nru gawk-3.1.8+dfsg/vms/vms_fwrite.c gawk-4.0.1+dfsg/vms/vms_fwrite.c --- gawk-3.1.8+dfsg/vms/vms_fwrite.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms_fwrite.c 2011-02-27 06:00:54.000000000 +0000 @@ -1,6 +1,6 @@ /* vms_fwrite.c - augmentation for the fwrite() function. - Copyright (C) 1991-1996 the Free Software Foundation, Inc. + Copyright (C) 1991-1996, 2010, 2011 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 @@ -50,6 +50,9 @@ * unless fflush() is always called first. Also, this routine * will not detect that a freopen() call has finished with the * original terminal; tty_fclose() should be used to close a file. + * + * When running gawk's debugging version we stick with normal + * fwrite because dgawk also uses other stdio calls for output. */ #ifdef fwrite # undef fwrite @@ -73,9 +76,11 @@ chan = file_num < _NFILE ? channel[file_num] : -1; if (chan == 0) { /* if not initialized, need to assign a channel */ - if (isatty(file_num) > 0) { /* isatty: 1=yes, 0=no, -1=problem */ + if (isatty(file_num) > 0 /* isatty: 1=yes, 0=no, -1=problem */ + && which_gawk != exe_debugging) { Dsc device; char devnam[255+1]; + fgetname(file, devnam); /* get 'file's name */ device.len = strlen(device.adr = devnam); /* create descriptor */ if (vmswork(sys$assign(&device, &chan, 0, (Dsc *)0))) { @@ -86,13 +91,16 @@ /* store channel for later use; -1 => don't repeat failed init attempt */ channel[file_num] = (chan > 0 ? chan : -1); } - if (chan > 0) { /* chan > 0 iff 'file' is a terminal */ + + /* chan > 0 iff 'file' is a terminal and we're not running as dgawk */ + if (chan > 0) { struct _iosbw { U_Short status, count; U_Long rt_kludge; } iosb; register U_Long sts = 1; register char *pt = (char *)buf; register int offset, pos, count = size * number; U_Long cc_fmt, io_func = IO$_WRITEVBLK; int extra = 0; + result = 0; if (is_stderr(file_num)) /* if it's SYS$ERROR (stderr)... */ io_func |= IO$M_CANCTRLO; /* cancel ^O (resume tty output) */ @@ -160,6 +168,7 @@ #endif /*NO_ALLOCA*/ register char *pt = (char *)buf; register int pos, count = number; + if (pt[count] != '\0') { /*(out of bounds, but relatively safe)*/ pt = (char *)alloca(count + 1); memcpy(pt, buf, count), pt[count] = '\0'; @@ -191,6 +200,7 @@ if (file && *file) { /* note: VAXCRTL stdio has extra level of indirection */ int file_num = fileno(file); short chan = file_num < _NFILE ? channel[file_num] : -1; + if (chan > 0) (void)sys$dassgn(chan); /* deassign the channel (ie, close) */ if (file_num < _NFILE) diff -Nru gawk-3.1.8+dfsg/vms/vms_gawk.c gawk-4.0.1+dfsg/vms/vms_gawk.c --- gawk-3.1.8+dfsg/vms/vms_gawk.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms_gawk.c 2011-05-14 19:40:40.000000000 +0000 @@ -1,6 +1,6 @@ /* vms_gawk.c -- parse GAWK command line using DCL syntax - Copyright (C) 1991-1993, 1996, 2003, 2005 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996, 2003, 2005, 2011 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 @@ -22,11 +22,12 @@ * rather than as a foreign command string. * Pat Rankin, Nov'89 * [ revised for 2.12, May'91 ] + * [ revised for 4.0.0, Feb'11 ] */ #include "awk.h" #include "vms.h" -#define COMMAND_NAME "GAWK" /* verb name & for 'usage' message(s) */ + #define USAGE_PROG_RQRD 1 #define USAGE_FILE_RQRD 2 #define USAGE_BAD_COMBO 3 @@ -50,6 +51,8 @@ extern void _exit(int); static int vms_usage(int); +static const char *CmdName; /* "GAWK", "DGAWK", or "PGAWK" */ + #define ARG_SIZ 250 union arg_w_prefix { /* structure used to simplify prepending of "-" */ char value[2+ARG_SIZ+1]; @@ -74,7 +77,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 */ + int native_dcl = 1, /* assume true until we know otherwise */ + short_circ; /* some options make P1, /commands, /input superfluous */ + + CmdName = (which_gawk == exe_profiling) ? "PGAWK" + : (which_gawk == exe_debugging) ? "DGAWK" + : "GAWK"; /* check "GAWK_P1"--it's required; its presence will tip us off */ sts = Cli_Present("GAWK_P1"); @@ -84,14 +92,17 @@ command, so we'll now attempt to generate a command from the foreign command string and parse that. */ - sts = Cli_Parse_Command(GAWK_CMD, COMMAND_NAME); + sts = Cli_Parse_Command(GAWK_CMD, "GAWK"); /* (*not* CmdName) */ if (vmswork(sts)) sts = Cli_Present("GAWK_P1"); } + short_circ = Present("USAGE") || Present("VERSION") || Present("COPYRIGHT"); if (vmswork(sts)) /* command parsed successfully */ - v_add_arg(argc = 0, COMMAND_NAME); /* save "GAWK" as argv[0] */ + v_add_arg(argc = 0, CmdName); /* save "GAWK|DGAWK|PGAWK" as argv[0] */ else if (CondVal(sts) == CondVal(CLI$_INSFPRM)) - return native_dcl ? vms_usage(USAGE_FILE_RQRD) : 0; /* insufficient parameters */ + /* vms_usage() will handle /usage, /version, and /copyright */ + return short_circ ? vms_usage(0) + : 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 */ @@ -101,55 +112,63 @@ else return 0; /* forced to rely on original parsing */ - if (Present("USAGE")) /* give usage message and quit */ - return vms_usage(0); + if (short_circ) /* give usage message & quit or have main() */ + return vms_usage(0); /* give --version or --copyleft mesg & quit */ else if (! (Present("PROGRAM") || Present("PROGFILE")) ) return native_dcl ? vms_usage(USAGE_PROG_RQRD) : 0; /* missing required option */ misc_argp = misc_args; *misc_argp++ = '-'; /* now points at &misc_args[1] */ -#if 0 /* as of 2.12, -a and -e are obsolete */ - if (Present("REG_EXPR")) { - if (Present("REG_EXPR.AWK")) /* /reg_exp=awk -> -a */ - *misc_argp++ = 'a'; - else if (Present("REG_EXPR.EGREP") /* /reg_exp=egrep -> -e */ - || Present("REG_EXPR.POSIX")) /* /reg_exp=posix -> -e */ - *misc_argp++ = 'e'; - } -#endif /* 0 */ -#if 0 /* gawk 2.11.1 */ - if (Present("STRICT")) /* /strict -> -c */ - *misc_argp++ = 'c'; - if (Present("COPYRIGHT")) /* /copyright -> -C */ - *misc_argp++ = 'C'; - if (Present("VERSION")) /* /version -> -V */ - *misc_argp++ = 'V'; -#else /* gawk 2.12 and later */ + if (Present("OPTIMIZE")) + *misc_argp++ = 'O'; W_cnt = 0, buf.arg.buf[0] = '\0'; strncpy(buf.arg.prefix, "-W", 2); - chk_option("LINT","lint"); - chk_option("POSIX","posix"); - chk_option("STRICT","compat"); - chk_option("COPYRIGHT","copyright"); - chk_option("VERSION","version"); + if (Present("LINT")) { + if (!Present("LINT.FATAL") && !Present("LINT.INVALID")) + chk_option("LINT.WARN", "lint"); + chk_option("LINT.FATAL", "lint=fatal"); + chk_option("LINT.INVALID", "lint=invalid"); + chk_option("LINT.OLD", "lint-old"); /* distinct option */ + } + chk_option("POSIX", "posix"); + if (CondVal(Cli_Present("TRADITIONAL")) != CondVal(CLI$_NEGATED)) + chk_option("STRICT", "traditional"); /* /strict is synonym for /traditional */ + if (CondVal(Cli_Present("STRICT")) != CondVal(CLI$_NEGATED)) + chk_option("TRADITIONAL", "traditional"); + chk_option("RE_INTERVAL", "re-interval"); /* only used with /traditional */ + chk_option("SANDBOX", "sandbox"); + /* potentially a problem due to leading "NO" */ + chk_option("NON_DECIMAL_DATA", "non-decimal-data"); + /* note: locale and translation stuff is not supported by vms gawk */ + chk_option("CHARACTERS_AS_BYTES", "characters-as-bytes"); + chk_option("USE_LC_NUMERIC", "use-lc-numeric"); + chk_option("GEN_POT", "gen-pot"); +# if 0 + /* /copyright and /version don't reach here anymore (short_circ above) */ + chk_option("COPYRIGHT", "copyright"); /* --copyleft */ + chk_option("VERSION", "version"); +# endif if (W_cnt > 0) /* got something */ v_add_arg(++argc, strdup(buf.value)); -#endif /*0*/ -#ifdef DEBUG - if (Present("DEBUG")) { -#if 0 - int both = Present("DEBUG.ALL"); - if (both || Present("DEBUG.EXECUTION")) - *misc_argp++ = 'd'; - if (both || Present("DEBUG.PARSE")) -#endif - *misc_argp++ = 'D'; - } + +#ifdef DEBUG /* most debugging functionality moved to separate DGAWK program */ + if (Present("DEBUG")) + *misc_argp++ = 'Y'; /* --parsedebug */ #endif *misc_argp = '\0'; /* terminate misc_args[] */ if (misc_argp > &misc_args[1]) /* got something */ v_add_arg(++argc, misc_args); /* store it/them */ + if (Present("PROFILE")) { /* /profile[=file] */ + strncpy(buf.arg.prefix, "-p", 2); + if (Get_Value("PROFILE", buf.arg.buf, sizeof buf.arg.buf)) + v_add_arg(++argc, strdup(buf.value)); + } + if (Present("DUMP_VARIABLES")) { /* /dump_variables[=file] */ + strncpy(buf.arg.prefix, "-d", 2); + if (Get_Value("DUMP_VARIABLES", buf.arg.buf, sizeof buf.arg.buf)) + v_add_arg(++argc, strdup(buf.value)); + } if (Present("FIELD_SEP")) { /* field separator */ strncpy(buf.arg.prefix, "-F", 2); if (Get_Value("FIELD_SEP", buf.arg.buf, sizeof buf.arg.buf)) @@ -160,12 +179,19 @@ while (Get_Value("VARIABLES", buf.arg.buf, sizeof buf.arg.buf)) v_add_arg(++argc, strdup(buf.value)); } + /* the relative order of -e and -f args matters; unfortunately, + we're losing that here... */ + if (Present("MOREPROG")) { /* /extra_input=text -> -e text */ + strncpy(buf.arg.prefix, "-e", 2); + if (Get_Value("MOREPROG", buf.arg.buf, sizeof buf.arg.buf)) + v_add_arg(++argc, strdup(buf.value)); + } if (Present("PROGFILE")) { /* program files, /input=file -> -f file */ strncpy(buf.arg.prefix, "-f", 2); while (Get_Value("PROGFILE", buf.arg.buf, sizeof buf.arg.buf)) v_add_arg(++argc, strdup(buf.value)); v_add_arg(++argc, "--"); - } else if (Present("PROGRAM")) { /* program text, /program -> 'text' */ + } else if (Present("PROGRAM")) { /* program text, /commands -> 'text' */ v_add_arg(++argc, "--"); if (Get_Value("PROGRAM", buf.value, sizeof buf.value)) v_add_arg(++argc, strdup(buf.value)); @@ -190,16 +216,21 @@ { static const char *usage_txt = "\n\ -usage: %s /COMMANDS=\"awk program text\" data_file[,data_file,...] \n\ - or %s /INPUT=awk_file data_file[,\"Var=value\",data_file,...] \n\ - or %s /INPUT=(awk_file1,awk_file2,...) data_file[,...] \n\ +usage: %s /COMMANDS=\"awk program text\" data_file[,data_file,...] \n\ + or %s /INPUT=awk_file data_file[,\"Var=value\",data_file,...] \n\ + or %s /INPUT=(awk_file1,awk_file2,...) data_file[,...] \n\ + or %s /INPUT=awk_file /EXTRA_COMMANDS=\"program text\" data_file \n\ ", *options_txt = "\n\ -options: /FIELD_SEPARATOR=\"FS_value\" \n\ - - /VARIABLES=(\"Var1=value1\",\"Var2=value2\",...) \n\ - - /LINT /POSIX /[NO]STRICT /VERSION /COPYRIGHT /USAGE \n\ - - /OUTPUT=out_file \n\ -", +options: /FIELD_SEPARATOR=\"FS_value\" \n\ + and /VARIABLES=(\"Var1=value1\",\"Var2=value2\",...) \n\ + and /OPTIMIZE /PROFILE[=file] /DUMP_VARIABLES[=file] \n\ + and /POSIX /[NO]TRADITIONAL /[NO]STRICT /RE_INTERVAL \n\ + and /SANDBOX /NON_DECIMAL_DATA \n\ + and /LINT[=WARN] or /LINT=OLD or /LINT=FATAL \n\ + and /VERSION /COPYRIGHT /USAGE \n\ + and /OUTPUT=out_file \n\ +", /* omitted: /LINT=INVALID /CHARACTERS_AS_BYTES /USE_LC_NUMERIC /GEN_POT */ *no_prog = "missing required element: /COMMANDS or /INPUT", *no_file = "missing required element: data_file \n\ (use \"SYS$INPUT:\" to read data lines from the terminal)", @@ -208,44 +239,49 @@ *run_used = "\"RUN\" was used; required command components missing"; int status, argc; + /* presence of /usage, /version, or /copyright for feedback+quit + supersedes absence of required program or data file */ + if (Present("USAGE")) { + complaint = 0; /* clean exit */ + } else if (Present("VERSION") || Present("COPYRIGHT")) { + /* construct a truncated Unix-style command line to control main() */ + v_add_arg(argc=0, CmdName); /* save "GAWK",&c as argv[0] */ +#if 0 + v_add_arg(++argc, Present("VERSION") ? "-V" : "-C"); +#else + v_add_arg(++argc, "-W"); + v_add_arg(++argc, Present("VERSION") ? "version" : "copyright"); +#endif + /* kludge to suppress 'usage' message from main() */ + v_add_arg(++argc, "--"); /* no more arguments */ + v_add_arg(++argc, "{}"); /* dummy program text */ + v_add_arg(++argc, "NL:"); /* dummy input file */ + return ++argc; /* count argv[0] too */ + } + fflush(stdout); switch (complaint) { case USAGE_PROG_RQRD: - fprintf(stderr, "\n%%%s-W-%s, %s \n", COMMAND_NAME, "PROG_RQRD", no_prog); + fprintf(stderr, "\n%%%s-W-%s, %s \n", CmdName, "PROG_RQRD", no_prog); status = CLI$_VALREQ | STS$M_INHIB_MSG; break; case USAGE_FILE_RQRD: - if (Present("USAGE")) { - status = 1; /* clean exit */ - } else if (Present("COPYRIGHT") || Present("VERSION")) { - v_add_arg(argc=0, COMMAND_NAME); /* save "GAWK" as argv[0] */ -#if 0 - v_add_arg(++argc, Present("COPYRIGHT") ? "-C" : "-V"); -#else - v_add_arg(++argc, "-W"); - v_add_arg(++argc, Present("COPYRIGHT") ? "copyright" : "version"); -#endif - v_add_arg(++argc, "{}"); /* kludge to suppress 'usage' */ - v_add_arg(++argc, "NL:"); /* dummy input for kludge */ - return ++argc; /* count argv[0] too */ - } else { - fprintf(stderr, "\n%%%s-W-%s, %s \n", COMMAND_NAME, "FILE_RQRD", no_file); - status = CLI$_INSFPRM | STS$M_INHIB_MSG; - } + fprintf(stderr, "\n%%%s-W-%s, %s \n", CmdName, "FILE_RQRD", no_file); + status = CLI$_INSFPRM | STS$M_INHIB_MSG; break; case USAGE_BAD_COMBO: - fprintf(stderr, "\n%%%s-W-%s, %s \n", COMMAND_NAME, "BAD_COMBO", bad_combo); + fprintf(stderr, "\n%%%s-W-%s, %s \n", CmdName, "BAD_COMBO", bad_combo); status = CLI$_CONFLICT | STS$M_INHIB_MSG; break; case USAGE_RUN_CMD: - fprintf(stderr, "\n%%%s-W-%s, %s \n", COMMAND_NAME, "RUN_CMD", run_used); + fprintf(stderr, "\n%%%s-W-%s, %s \n", CmdName, "RUN_CMD", run_used); status = CLI$_NOOPTPRS | STS$M_INHIB_MSG; break; default: status = 1; break; } - fprintf(stderr, usage_txt, COMMAND_NAME, COMMAND_NAME, COMMAND_NAME); + fprintf(stderr, usage_txt, CmdName, CmdName, CmdName, CmdName); fprintf(stderr, options_txt); fflush(stderr); diff -Nru gawk-3.1.8+dfsg/vms/vms_misc.c gawk-4.0.1+dfsg/vms/vms_misc.c --- gawk-3.1.8+dfsg/vms/vms_misc.c 2009-06-23 02:35:47.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms_misc.c 2011-12-31 18:54:26.000000000 +0000 @@ -1,6 +1,7 @@ /* vms_misc.c -- sustitute code for missing/different run-time library routines. - Copyright (C) 1991-1993, 1996-1997, 2001, 2003, 2009 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996-1997, 2001, 2003, 2009, 2010, 2011 + 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 @@ -37,7 +38,7 @@ #ifdef strerror # undef strerror #endif -extern char *strerror P((int,...)); +extern char *strerror(int,...); /* vms_strerror() -- convert numeric error code into text string */ char * @@ -88,8 +89,8 @@ #ifdef open # undef open #endif -extern int creat P((const char *,int,...)); -extern int open P((const char *,int,unsigned,...)); +extern int creat(const char *,int,...); +extern int open(const char *,int,unsigned,...); /* vms_open() - open a file, possibly creating it */ int @@ -97,7 +98,7 @@ { int result; - if (STREQN(name, "/dev/", 5)) { + if (strncmp(name, "/dev/", 5) == 0) { /* (this used to be handled in vms_devopen(), but that is only called when opening files for output; we want it for input too) */ if (strcmp(name + 5, "null") == 0) /* /dev/null -> NL: */ @@ -306,7 +307,7 @@ if (result == 0 /* GAWK addition; fixup /dev/null flags */ && (statbuf->st_mode & S_IFREG) - && STREQ(statbuf->st_dev, "_NLA0:")) + && strcmp(statbuf->st_dev, "_NLA0:") == 0) { statbuf->st_mode &= ~S_IFREG; statbuf->st_mode |= S_IFCHR; @@ -353,7 +354,7 @@ if (result == 0 /* GAWK addition; fixup /dev/null flags */ && (statbuf->st_mode & S_IFREG) - && STREQ(statbuf->st_dev, "_NLA0:")) + && strcmp(statbuf->st_dev, "_NLA0:") == 0) { statbuf->st_mode &= ~S_IFREG; statbuf->st_mode |= S_IFCHR; diff -Nru gawk-3.1.8+dfsg/vms/vms_popen.c gawk-4.0.1+dfsg/vms/vms_popen.c --- gawk-3.1.8+dfsg/vms/vms_popen.c 2006-08-11 12:05:48.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vms_popen.c 2011-02-27 06:00:54.000000000 +0000 @@ -1,6 +1,6 @@ /* [.vms]vms_popen.c -- substitute routines for missing pipe calls. - Copyright (C) 1991-1993, 1996 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996, 2010, 2011 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 @@ -64,14 +64,14 @@ #include /* logical name definitions */ #ifndef STDC_HEADERS -extern int strcmp P((const char*, const char *)); +extern int strcmp(const char*, const char *); #endif -extern char *mktemp P((char *)); +extern char *mktemp(char *); -static void push_logicals P((void)); -static void pop_logicals P((void)); -static Itm *save_translation P((const Dsc *)); -static void restore_translation P((const Dsc *, const Itm *)); +static void push_logicals(void); +static void pop_logicals(void); +static Itm *save_translation(const Dsc *); +static void restore_translation(const Dsc *, const Itm *); typedef enum { unopened = 0, reading, writing } pipemode; typedef struct pipe_info { diff -Nru gawk-3.1.8+dfsg/vms/vmsbuild.com gawk-4.0.1+dfsg/vms/vmsbuild.com --- gawk-3.1.8+dfsg/vms/vmsbuild.com 2010-04-20 08:37:38.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vmsbuild.com 2012-03-28 19:47:54.000000000 +0000 @@ -8,9 +8,11 @@ $! gawk 3.1.0 revised, Mar'01 $! gawk 3.1.1 revised, Apr'02 $! gawk 3.1.6 revised, Mar'07 +$! gawk-bytecode revd, Jan'10 +$! gawk 4.0.0 revd, May'11 $! -$ REL = "3.1" !release version number -$ PATCHLVL = "8" +$ REL = "4.0" !release version number +$ PATCHLVL = "1" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" @@ -54,11 +56,19 @@ $ if f$search("awkgram.c").nes."" then goto awkgram_ok $ write sys$output " You must process `awkgram.y' with ""yacc"" or ""bison""" $ if f$search("awkgram_tab.c").nes."" then - !bison was run manually - write sys$output " or else rename `awkgram_tab.c' to `awkgramtab.c'." + write sys$output " or else rename `awkgram_tab.c' to `awkgram.c'." $ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc - write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgramtab.c'." + write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgram.c'." $ exit $awkgram_ok: +$ if f$search("command.c").nes."" then goto command_ok +$ write sys$output " You must process `command.y' with ""yacc"" or ""bison""" +$ if f$search("command_tab.c").nes."" then - !bison was run manually + write sys$output " or else rename `command_tab.c' to `command.c'." +$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc + write sys$output " or else rename `ytab.c' or `y_tab.c' to `command.c'." +$ exit +$command_ok: $ v = f$verify(1) $ cc array.c $ cc awkgram.c @@ -81,8 +91,11 @@ $ cc version.c $ cc eval.c $ cc eval_p.c +$ cc eval_d.c $ cc profile.c $ cc profile_p.c +$ cc command.c +$ cc debug.c $ cc [.vms]vms_misc.c $ cc [.vms]vms_popen.c $ cc [.vms]vms_fwrite.c @@ -96,7 +109,8 @@ $ create gawk.opt ! GAWK -- GNU awk array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj -gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.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 []vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj []vms_gawk.obj,vms_cli.obj,gawk_cmd.obj @@ -111,7 +125,8 @@ $ create pgawk.opt ! PGAWK -- GNU awk w/ run-time profiling array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj -gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.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_p.obj,profile_p.obj []vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj []vms_gawk.obj,vms_cli.obj,gawk_cmd.obj @@ -123,8 +138,26 @@ $ write Fopt "identification=""V''REL'.''PATCHLVL'""" $ close Fopt $! +$ create dgawk.opt +! DGAWK -- GNU awk w/ debugging +array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.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_d.obj,profile.obj,command.obj,debug.obj +[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj +[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj +psect_attr=environ,noshr !extern [noshare] char ** +stack=48 !preallocate more pages (default is 20) +iosegment=128 !ditto (default is 32) +$ open/append Fopt dgawk.opt +$ write Fopt libs +$ write Fopt "identification=""V''REL'.''PATCHLVL'""" +$ close Fopt +$! $ v = f$verify(1) $ link/exe=gawk.exe gawk.opt/options $ link/exe=pgawk.exe pgawk.opt/options +$ link/exe=dgawk.exe dgawk.opt/options $! 'f$verify(v)' $ exit diff -Nru gawk-3.1.8+dfsg/vms/vmstest.com gawk-4.0.1+dfsg/vms/vmstest.com --- gawk-3.1.8+dfsg/vms/vmstest.com 2010-04-21 19:26:50.000000000 +0000 +++ gawk-4.0.1+dfsg/vms/vmstest.com 2012-03-28 19:47:54.000000000 +0000 @@ -11,13 +11,16 @@ $ echo = "write sys$output" $ cmp = "diff/Output=_NL:/Maximum=1" $ igncascmp = "''cmp'/Ignore=Case" +$ sumslp = "edit/Sum" $ rm = "delete/noConfirm/noLog" $ mv = "rename/New_Vers" $ gawk = "$sys$disk:[-]gawk" +$ pgawk = "$sys$disk:[-]pgawk" $ AWKPATH_srcdir = "define/User AWKPATH sys$disk:[]" $ $ listdepth = 0 $ pipeok = 0 +$ pgawkok = -1 $ floatmode = -1 ! 0: D_float, 1: G_float, 2: IEEE T_float $ $ list = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7+" "+p8 @@ -30,7 +33,8 @@ $all: $bigtest: echo "bigtest..." $ ! omits "printlang" and "extra" -$ list = "basic unix_tests gawk_ext vms_tests charset_tests machine_tests" +$ list = "basic unix_tests gawk_ext vms_tests charset_tests" - + + " machine_tests pgawk_tests" $ gosub list_of_tests $ return $ @@ -43,28 +47,32 @@ + " clobber closebad clsflnam compare compare2 concat1" $ gosub list_of_tests $ list = "concat2 concat3 concat4 convfmt datanonl defref" - - + " delarprm delarpm2 delfunc dynlj eofsplit exitval1" - + + " delargv delarprm delarpm2 delfunc dfastress dynlj" - + + " eofsplit exitval1" - + " exitval2 fcall_exit fcall_exit2 fldchg fldchgnf" - + " fnamedat fnarray fnarray2 fnaryscl fnasgnm fnmisc" - + " fordel forref forsimp fsbs fsspcoln fsrs fstabplus" - - + " funsemnl funsmnam funstack getline getline2 getline3" + + " funsemnl funsmnam funstack getline getline2 getline3" - + + " getline4" $ gosub list_of_tests $ list = "getlnbuf getnr2tb getnr2tm gsubasgn gsubtest" - - + " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex" - + + " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6" - + + " gsubtst7 gsubtst8 hex" - + " hsprint inputred intest intprec iobug1" - + " leaddig leadnl litoct longsub longwrds"- + " manglprm math membug1 messages minusstr mmap8k" - - + " mtchi18n nasty nasty2 negexp nested nfldstr nfneg" + + " mtchi18n nasty nasty2 negexp negrange nested" - + + " nfldstr nfneg" $ gosub list_of_tests $ list = "nfset nlfldsep nlinstr nlstrina noeffect nofile" - + " nofmtch noloop1 noloop2 nonl noparms nors nulrsend" - + " numindex numsubstr octsub ofmt ofmtbig ofmtfidl" - - + " ofmts onlynl opasnidx opasnslf paramdup" - + + " ofmta ofmts onlynl opasnidx opasnslf paramdup" - + " paramres paramtyp parse1 parsefld parseme pcntplus" - - + " prdupval prec printf0 printf1 prmarscl prmreuse" + + " posix2008sub prdupval prec printf0 printf1 prmarscl" $ gosub list_of_tests -$ list = "prt1eval prtoeval psx96sub rand rebt8b1" - - + " redfilnm regeq reindops reparse resplit rs rsnul1nl" - +$ list = "prmreuse prt1eval prtoeval rand range1 rebt8b1" - + + " redfilnm regeq regrange reindops reparse resplit rs rsnul1nl" - + " rsnulbig rsnulbig2 rstest1 rstest2 rstest3 rstest4" - + " rstest5 rswhite scalar sclforin sclifin sortempty" - + " splitargv splitarr splitdef splitvar splitwht" - @@ -81,23 +89,27 @@ $unix: $unix_tests: echo "unix_tests..." $ list = "fflush getlnhd localenl pid pipeio1 pipeio2" - - + " poundbang space strftlng" + + " poundbang rtlen rtlen01 space strftlng" $ gosub list_of_tests $ return $ $gnu: $gawk_ext: echo "gawk_ext... (gawk.extensions)" -$ list = "argtest backw badargs binmode1" - - + " clos1way devfd devfd1 devfd2" - - + " fieldwdth funlen fsfwfs fwtest fwtest2 gensub" - - + " gensub2 getlndir gnuops2 gnuops3 gnureops icasefs" - - + " icasers igncdym igncfs ignrcase ignrcas2 lint" +$ list = "aadelete1 aadelete2 aarray1 aasort aasorti" - + + " argtest arraysort backw badargs beginfile1 binmode1" - + + " clos1way delsub devfd devfd1 devfd2 dumpvars exit" - + + " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen fsfwfs" - + + " fwtest fwtest2 fwtest3" - + + " gensub gensub2 getlndir gnuops2 gnuops3 gnureops" - + + " icasefs icasers igncdym igncfs ignrcase ignrcas2" $ gosub list_of_tests -$ list = "lintold match1 match2 match3 manyfiles" - - + " mbprintf3 mbstr1" - - + " nondec nondec2 posix procinfs printfbad1" - - + " printfbad2 regx8bit rebuf reint reint2 rsstart1" - - + " rsstart2 rsstart3 rstest6 shadow strtonum strftime" +$ list = "indirectcall lint lintold lintwarn match1" - + + " match2 match3 manyfiles mbprintf3 mbstr1" - + + " nastyparm next nondec" - + + " nondec2 patsplit posix profile1 procinfs printfbad1" - + + " printfbad2 printfbad3 pty1 regx8bit rebuf reint" - + + " reint2 rsstart1 rsstart2 rsstart3 rstest6 shadow" - + + " sortfor sortu splitarg4 strtonum strftime switch2" $ gosub list_of_tests $ return $ @@ -112,7 +124,7 @@ $ ! without i18n kit, VMS only supports the C locale $ ! and several of these fail $ list = "asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1" - - + " mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny" + + " mbprintf1 mbprintf2 rebt8b2 rtlenmb sort1 sprintfc" $ gosub list_of_tests $ return $ @@ -123,6 +135,16 @@ $ gosub list_of_tests $ return $ +$ ! pgawk_tests is part of bigtest; profile_tests is a separate subset +$profile_tests: echo "profile_tests..." +$ list = "profile1" +$ gosub list_of_tests +$ ! fall through to pgawk_tests +$pgawk_tests: echo "pgawk_tests..." +$ list = "profile2 profile3" +$ gosub list_of_tests +$ return +$ $extra: echo "extra..." $ list = "regtest inftest inet" $ gosub list_of_tests @@ -174,24 +196,32 @@ $fldchgnf: $fmttest: $fordel: +$fpat1: +$fpat3: +$fpatnull: $fsfwfs: $fsrs: $funlen: $funstack: $fwtest: $fwtest2: +$fwtest3: $gensub: $getline3: +$getline4: $getnr2tb: $getnr2tm: $gsubtest: $gsubtst2: $gsubtst4: $gsubtst5: +$gsubtst7: +$gsubtst8: $hex: $icasers: $igncfs: $igncdym: +$indirectcall: $inputred: $leadnl: $manglprm: @@ -213,6 +243,7 @@ $prdupval: $prec: $prtoeval: +$range1: $rebuf: $regeq: $reindops: @@ -225,6 +256,8 @@ $rstest6: $rswhite: $sortempty: +$sortfor: +$splitarg4: $splitargv: $splitarr: $splitvar: @@ -244,7 +277,11 @@ $ return $ $! more common tests, without a data file: gawk -f 'test'.awk +$aarray1: +$aasort: +$aasorti: $arrayref: +$arraysort: $arrymem1: $arynasty: $arysubnm: @@ -253,12 +290,15 @@ $closebad: $compare2: $convfmt: +$delargv: $delarprm: +$delsub: $!!double1: $!!double2: $dynlj: $fnarydel: $fnparydl: +$fpat2: $forref: $forsimp: $funsemnl: @@ -272,24 +312,29 @@ $match1: $math: $minusstr: +$negrange: $nlstrina: $nondec: $octsub: +$ofmta: $paramtyp: +$patsplit: $pcntplus: $printf1: $procinfs: $prt1eval: -$psx96sub: $rebt8b1: $rebt8b2: +$regrange: $regx8bit: $sort1: +$sortu: $splitdef: $splitwht: $strnum1: $strtonum: $substr: +$switch2: $zero2: $zeroflag: $! common without 'test'.in @@ -307,10 +352,15 @@ $ return $ $msg: +$ ! first show gawk's version (without copyright notice) +$ gawk --version >_msg.tmp +$ gawk "FNR == 1 {print; exit}" _msg.tmp +$ rm _msg.tmp; $ echo "Any output from ""DIF"" 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." +$ echo "" $ return $ $printlang: @@ -321,7 +371,8 @@ $ return $ $poundbang: -$ echo "poundbang: not supported" +$pty1: +$ echo "''test': not supported" $ return $ $messages: echo "messages" @@ -485,15 +536,6 @@ $ if $status then rm _badargs.tmp;,_badargs.too; $ return $ -$paramdup: echo "paramdup" -$ set noOn -$ gawk -f paramdup.awk >_paramdup.tmp 2>&1 -$ if .not.$status then call exit_code 1 _paramdup.tmp -$ set On -$ cmp paramdup.ok _paramdup.tmp -$ if $status then rm _paramdup.tmp; -$ return -$ $nonl: echo "nonl" $ ! This one might fail, depending on the tool used to unpack the $ ! distribution. Some will add a final newline if the file lacks one. @@ -754,15 +796,14 @@ $ set On $ return $ +$aadelete1: +$aadelete2: $arrayparm: -$fnarray: $fnaryscl: -$funsmnam: $match2: +$nastyparm: $opasnslf: $opasnidx: -$paramres: -$parseme: $printfbad1: $prmarscl: $subslash: @@ -829,7 +870,7 @@ $inetdayu: echo "inetdayu" $ echo "this test is for bidirectional UDP transmission" $ set noOn -$ gawk -f - nl: +$ gawk -f - _NL: BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; "/inet/udp/0/127.0.0.1/13" |& getline; print $0} $ set On @@ -838,7 +879,7 @@ $inetdayt: echo "inetdayt" $ echo "this test is for bidirectional TCP transmission" $ set noOn -$ gawk -f - nl: +$ gawk -f - _NL: BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; "/inet/tcp/0/127.0.0.1/13" |& getline; print $0} $ set On @@ -874,6 +915,16 @@ $ if $status then rm _shadow.tmp; $ return $ +$lintwarn: echo "lintwarn" +$ set noOn +$ AWKPATH_srcdir +$ gawk --lint -f lintwarn.awk >_lintwarn.tmp 2>&1 +$ if .not.$status then call exit_code 1 _lintwarn.tmp +$ set On +$ cmp lintwarn.ok _lintwarn.tmp +$ if $status then rm _lintwarn.tmp; +$ return +$ $longsub: echo "longsub" $ set noOn $ gawk -f longsub.awk longsub.in >_longsub.tmp @@ -903,6 +954,7 @@ $aryprm6: $aryprm7: $delfunc: +$dfastress: $nfneg: $numindex: $scalar: @@ -968,7 +1020,10 @@ $iobug1: echo "iobug1" $ cat = "TYPE sys$input:" $ true = "exit 1" !success +$ oldout = f$search("_iobug1.tmp;") $ gawk -f iobug1.awk iobug1.in >_iobug1.tmp +$ badout = f$search("_iobug1.tmp;-1") +$ if badout.nes."" .and. badout.nes.oldout then rm 'badout' $ cmp iobug1.ok _iobug1.tmp $ if $status then rm _iobug1.tmp; $ return @@ -990,6 +1045,11 @@ $ return $ $fcall_exit: +$fnarray: +$funsmnam: +$paramdup: +$paramres: +$parseme: $synerr1: $synerr2: $ echo "''test'" @@ -1026,10 +1086,12 @@ $ if $status then rm _space.tmp; $ return $ -$printf0: echo "printf0" -$ gawk --posix -f printf0.awk >_printf0.tmp -$ cmp printf0.ok _printf0.tmp -$ if $status then rm _printf0.tmp; +$posix2008sub: +$printf0: +$ echo "''test'" +$ gawk --posix -f 'test'.awk >_'test'.tmp +$ cmp 'test'.ok _'test'.tmp +$ if $status then rm _'test'.tmp; $ return $ $rsnulbig: echo "rsnulbig" @@ -1070,14 +1132,6 @@ $ if $status then rm _rsnulbig2.tmp; $ return $ -$whiny: echo "whiny" -$ ! WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ -$ Define/User WHINY_USERS 1 -$ gawk -f whiny.awk whiny.in >_whiny.tmp -$ cmp whiny.ok _whiny.tmp -$ if $status then rm _whiny.tmp; -$ return -$ $subamp: $wideidx: $widesub2: @@ -1152,6 +1206,50 @@ $ if $status then rm _rsstart3.tmp; $ return $ +$rtlen: +$rtlen01: +$rtlenmb: +$ echo "''test'" +$ if .not.pipeok +$ then echo "Without the PIPE command, ''test' can't be run." +$ On warning then return +$ pipe echo "With PIPE, ''test' will finish quickly." +$ On warning then $ +$ pipeok = 1 +$ endif +$ f = "''test'.ok" +$ if test.eqs."rtlen" .or. test.eqs."rtlenmb" +$ then +$ if test.eqs."rtlenmb" then GAWKLOCALE = "en_US.UTF-8" +$ pipe - + gawk -- "BEGIN {printf ""0\n\n\n1\n\n\n\n\n2\n\n""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" >_'test'.tmp +$ if test.eqs."rtlenmb" then delet_/Symbol/Local GAWKLOCALE +$ if test.eqs."rtlenmb" then f = "rtlen.ok" +$ else +$ call/Output=_rtlen01.tmp do__rtlen01 +$ ! first test yields 1 instead of 0 due to forced newline +$ gawk -- "FNR==1 {sub(""1"",""0"")}; {print}" _rtlen01.tmp >_rtlen01.too +$ rm _rtlen01.tmp; +$ mv _rtlen01.too _rtlen01.tmp +$ endif +$ cmp 'f' _'test'.tmp +$ if $status then rm _'test'.tmp; +$ return +$ +$do__rtlen01: subroutine +$ gawk = gawk !PIPE won't propagate local symbols from outer procedure +$ pipe - + gawk -- "BEGIN {printf ""0""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" +$ pipe - + gawk -- "BEGIN {printf ""0\n""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" +$ pipe - + gawk -- "BEGIN {printf ""0\n\n""; exit}" | - + gawk -- "BEGIN {RS=""""}; {print length(RT)}" +$ endsubroutine !do__rtlen01 +$ $nondec2: echo "nondec2" $ gawk --non-decimal-data -v "a=0x1" -f nondec2.awk >_nondec2.tmp $ cmp nondec2.ok _nondec2.tmp @@ -1302,12 +1400,14 @@ $ if $status then rm _mbstr1.tmp; $ return $ -$printfbad2: echo "printfbad2" +$printfbad2: +$printfbad3: +$ echo "''test'" $ set noOn -$ gawk --lint -f printfbad2.awk printfbad2.in >_printfbad2.tmp 2>&1 +$ gawk --lint -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 $ set On -$ cmp printfbad2.ok _printfbad2.tmp -$ if $status then rm _printfbad2.tmp; +$ cmp 'test'.ok _'test'.tmp +$ if $status then rm _'test'.tmp; $ return $ $fmtspcl: echo "fmtspcl: not supported" @@ -1339,6 +1439,160 @@ $ if $status then rm _intformat.tmp; $ return $ +$! ugh... BEGINFILE functionality works fine, but test is heavily Unix-centric +$beginfile1: echo "beginfile1" +$ ! complications: "." is a filename, not the current directory +$ ! (even "[]" is actually "[].", that same filename, but we can +$ ! handle hacking it more easily); +$ ! "no/such/file" yields syntax error rather than no such file +$ ! when subdirectories no/ and no/such/ don't exist; +$ ! vms test suite doesn't generate Makefile; +$ ! "is a directory" and "no such file" aren't capitalized +$ ! gawk -f beginfile1.awk beginfile1.awk . ./no/such/file "Makefile" >_beginfile1.tmp 2>&1 +$ gawk -f beginfile1.awk beginfile1.awk [] ./no-such-file "Makefile.in" >_beginfile1.tmp 2>&1 +$ gawk -f - _beginfile1.tmp >_beginfile1.too +{ if (gsub("\\[\\]",".")) gsub("no such file or directory","is a directory") + gsub("no-such-file","file"); gsub("Makefile.in","Makefile"); print } +$ rm _beginfile1.tmp; +$ mv _beginfile1.too _beginfile1.tmp +$ igncascmp beginfile1.ok _beginfile1.tmp +$ if $status then rm _beginfile1.tmp; +$ return +$ +$dumpvars: echo "dumpvars" +$ gawk --dump-variables 1 _NL: 2>&1 +$ mv awkvars.out _dumpvars.tmp +$ cmp dumpvars.ok _dumpvars.tmp +$ if $status then rm _dumpvars.tmp; +$ return +$ +$profile1: echo "profile1" +$ ! this profile test is run with gawk rather than pgawk +$ ! FIXME: for both gawk invocations which pipe output to SORT, +$ ! two output files get created; the top version has real output +$ ! but there's also an empty lower version. +$ oldout = f$search("_profile1.tmp1") +$ gawk --profile -v "sortcmd=SORT sys$intput: sys$output:" - + -f xref.awk dtdgport.awk > _'test'.tmp1 +$ badout = f$search("_profile1.tmp1;-1") +$ if badout.nes."" .and. badout.nes.oldout then rm 'badout' +$ oldout = f$search("_profile1.tmp2") +$ gawk -v "sortcmd=SORT sys$intput: sys$output:" - + -f awkprof.out dtdgport.awk > _'test'.tmp2 +$ badout = f$search("_profile1.tmp2;-1") +$ if badout.nes."" .and. badout.nes.oldout then rm 'badout' +$ cmp _profile1.tmp1 _profile1.tmp2 +$ if $status then rm _profile1.tmp%;,awkprof.out; +$ return +$ +$ ! pgawk tests; building pgawk is optional so have to check whether it's here +$profile2: +$profile3: +$ if pgawkok.lt.0 +$ then f = f$parse(pgawk,".exe;") +$ ! expect first parse to fail due to leading dollar sign +$ if f.eqs."" then f = f$parse(f$extract(1,999,pgawk),".exe;") +$ if f.nes."" then f = f$search(f) +$ pgawkok = (f.nes."").and.1 ! set to 1 or 0 +$ if .not.pgawkok then - + echo "Can't find pgawk.exe so can't run profiling tests." +$ endif +$ if pgawkok then goto do__'test' +$ echo "''test' skipped" +$ return +$ +$do__profile2: echo "profile2" +$ pgawk -v "sortcmd=SORT sys$input: sys$output:" - + -f xref.awk dtdgport.awk > _NL: +$ ! sed _profile2.tmp +$ sumslp awkprof.out /update=sys$input: /output=_profile2.tmp +-1,2 +/ +$ rm awkprof.out; +$ cmp profile2.ok _profile2.tmp +$ if $status then rm _profile2.tmp;* +$ return +$ +$do__profile3: echo "profile3" +$ pgawk -f profile3.awk > _NL: +$ ! sed _profile3.tmp +$ sumslp awkprof.out /update=sys$input: /output=_profile3.tmp +-1,2 +/ +$ rm awkprof.out; +$ cmp profile3.ok _profile3.tmp +$ if $status then rm _profile3.tmp;* +$ return +$ +$next: echo "next" +$ set noOn +$ gawk "{next}" _NL: > _next.tmp 2>&1 +$ gawk "function f() {next}; {f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; BEGIN{f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; {f()}; END{f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; BEGINFILE{f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; {f()}; ENDFILE{f()}" _NL: >>_next.tmp 2>&1 +$ set On +$ cmp next.ok _next.tmp +$ if $status then rm _next.tmp; +$ return +$ +$exit: echo "exit" +$ if .not.pipeok +$ then echo "Without the PIPE command, ''test' can't be run." +$ On warning then return +$ pipe echo "PIPE command is available; running exit test" +$ On warning then $ +$ pipeok = 1 +$ else echo "PIPE command is available; running exit test" +$ endif +$ set noOn +$ call/Output=_exit.tmp do__exit +$ set On +$ cmp exit.ok _exit.tmp +$ if $status then rm _exit.tmp; +$ return +$ +$do__exit: subroutine +$ gawk = gawk !PIPE won't propagate local symbols from outer procedure +$ x = "BEGIN{print 1; exit; print 2}; NR>1{print}; END{print 3; exit; print 4}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 1" +$ x = "function f(){exit}; END{print NR;f();print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 2" +$ x = "function f(){exit}; NR>1 {f()}; END{print NR; f();print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 3" +$ x = "function f(){exit}; NR>1 {f()}; END{print NR;print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 4" +$ x = "function f(){exit}; BEGINFILE {f()}; NR>1 {f()}; END{print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 5" +$! Ugh; extra quotes are needed here to end up with """" after "''y'" +$! expansion and finally "" when gawk actually sees its command line. +$ y = "function strip(f) { sub(/.*\//, """""""", f); return f };" +$ x = "BEGINFILE{if(++i==1) exit;}; END{print i, strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 6" +$ x = "BEGINFILE{if(++i==1) exit;}; ENDFILE{print i++}; END{print i, strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 7" +$ x = "function f(){exit}; BEGINFILE{i++ && f()}; END{print NR,strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 8" +$ x = "function f(){exit}; BEGINFILE{i++ && f()}; ENDFILE{print i}; END{print NR,strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 9" +$ x = "function f(){exit}; BEGINFILE{i++}; ENDFILE{f(); print i}; END{print NR,strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 10" +$ x = "function f(){exit}; BEGINFILE{i++}; ENDFILE{i>1 && f(); print i, strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 11" +$ endsubroutine !do__exit +$ $vms_cmd: echo "vms_cmd" $ if f$search("vms_cmd.ok").eqs."" $ then create vms_cmd.ok @@ -1439,8 +1693,8 @@ $! otherwise DIFF will choke if any record is longer than 512 bytes $fixup_LRL: subroutine $ lrl = 0 !VMS V5.5-2 didn't support the LRL argument yet -$ define/user sys$error nl: -$ define/user sys$output nl: +$ define/user sys$error _NL: +$ define/user sys$output _NL: $ lrl = f$file_attribute(p1,"LRL") $ if lrl.eq.0 then lrl = f$file_attribute(p1,"MRS") $ if lrl.eq.0 @@ -1451,7 +1705,7 @@ format stream_lf size 32767 $ if $status .and. p2.eqs."purge" then rm 'p1';-1 -$ else cmp nl: nl: !deassign/user sys${error,output} +$ else cmp _NL: _NL: !deassign/user sys${error,output} $ endif $ endsubroutine !fixup_LRL $ diff -Nru gawk-3.1.8+dfsg/xalloc.h gawk-4.0.1+dfsg/xalloc.h --- gawk-3.1.8+dfsg/xalloc.h 2010-03-18 21:30:01.000000000 +0000 +++ gawk-4.0.1+dfsg/xalloc.h 2011-11-01 20:09:45.000000000 +0000 @@ -281,6 +281,16 @@ return XNMALLOC (n, char); } +/* Allocate S bytes of zeroed memory dynamically, with error checking. + There's no need for xnzalloc (N, S), since it would be equivalent + to xcalloc (N, S). */ + +inline void * +xzalloc (size_t s) +{ + return memset (xmalloc (s), 0, s); +} + # endif # ifdef __cplusplus